Skip to main content

Audio Script node

An Audio Script node analyzes a live audio stream and publishes the result as data other nodes can react to. It's the bridge that makes shaders pulse to the music and lets a Script node read the sound.

Add it: right‑click the empty canvas → Add Audio Script Node.

Like the Script node, this is part of the optional scripting feature — the menu item only appears on builds that include it.

Ports​

What it produces​

Every frame the node emits these values from its analysis:

ValueRangeMeaning
level0–1Overall loudness (RMS)
low / mid / high0–1Energy in the low, mid, and high bands
beat0–1A pulse that spikes on each beat, then decays
spectrum0–1 eachThe FFT spectrum as an array of bins (low → high)
hasAudiotrue/falseWhether audio is currently flowing

Wired into a shader, these become the u_audioLevel, u_bands, u_beat, u_spectrum (and related) uniforms automatically — see Writing audio‑reactive shaders. Wired into a Script node, they arrive in its input table (input.level, input.beat, input.spectrum, …).

Tuning the analysis​

Click Edit to shape how the audio is analyzed. These settings change the feel of the reaction without changing what shaders/scripts expect:

SettingRangeDefaultEffect
FFT size256 – 81921024Frequency resolution of the analysis
Spectrum bins8 – 25664Number of bars in the spectrum output
Smoothing0.0 – 0.980.5Higher = smoother, less jumpy motion
Beat sensitivity0.1 – 5.01.0Higher = more beats trigger the pulse
Low/Mid split20 Hz – 20 kHz250 HzCrossover between the low and mid bands
Mid/High split20 Hz – 20 kHz4 kHzCrossover between the mid and high bands

Smooth idle when audio pauses​

When the source is paused, the outputs don't cut out abruptly — the level, bands, spectrum, and beat pulse fade smoothly toward zero, so reactive visuals settle into their idle state instead of freezing. Resuming playback brings the reaction straight back.

Example​

Media File (audio port) → Audio Script → Shader (audio‑in)
Audio Capture → Audio Script → Script Node (Data In)