đŸŽĩAudio Sample

Sample a region of audio frequencies to drive motion

Use this behavior to generate audio amplitude from a range of frequencies to drive audio-reactive behaviors. This requires an Audio Spectrum to provide the spectrum data for calculation.

Add multiple instances of Audio Sample to separate low, mid, and high frequencies.

Each instance of Audio Sample has an Amplitude channel outputting the final calculation.

Use Channel Link to link behaviors to Amplitude to drive audio-reactive effects.

Audio Sample Editor

Select the object to view its settings in the Inspector.

For common features, please see Menu Bar and Update Settings.

Spectrum

Assign the Audio Spectrum to provide spectrum data for this sample.

Mode

  • Average: calculates the average amplitude value over the frequency range.

  • Maximum: returns the maximum value over the frequency range.

Average is usually preferred since it results in a more stable calculation over time, whereas Maximum will jump any time there is a spike in the

Register

If this button appears, click it to register this Audio Sample to receive data from the Audio Spectrum. This might occur if the Audio Spectrum reference has been changed.

Frequency Range

Set the range of frequencies to sample, from about 20Hz to 20000Hz.

Frequencies are distributed logarithmically from low to high. For lower frequencies, a smaller range is usually best, while higher ranges may span larger values.

Example Ranges

Threshold

Sets the minimum amplitude or lower threshold (RMS) for detecting changes in amplitude. Everything below this level is ignored.

Decay Rate

Sets time in seconds for amplitude to decrease, effectively applying temporal smoothing. Set to 0 to disable.

Multiply

Scales the final amplitude.

Apply to Scale

Scales the current object by the final amplitude. This is primarily a preview function however may be used in production as well.

To map Audio Sample to additional properties, use Audio Reactive or Channel Link to route the Amplitude value where desired.

Set Shader Property

If enabled, the named global property is set with the current amplitude on each update affecting all shaders with the named property.

To target a global property defined in Shader Graph, make sure the variable name matches exactly and is not exposed in the editor.

Use Baked Data

Audio sampling data may be "baked" meaning that its values are recorded and stored for subsequent replays without reprocessing audio. This may be advantageous for performance and to overcome any limitations with real-time audio processing and target devices.

Start Baking

Click to enable recording of data for the Audio Sample. The UI displays in red while capturing.

Start / Stop All

Use these buttons to enable / disable recording on all instances of Audio Sample in the scene.

The bulk operation to start, stop, turn off, and clear all are useful when preparing scenes for rendering and then removing all the baked data when finished.

Turn Off All

Disables Use Baked Data for all Audio Sample instances in the scene.

Clear All

Clears all baked data and turns off Used Baked Data for all Audio Sample instances.

Baking Required for Rendering!

Last updated