Audio-Reactive Visuals
Route live microphone or audio file data through CHOPs to drive textures, geometry, and colour in real time.
Audio-reactive visuals are one of the most immediately satisfying things you can build in TouchDesigner. A few operators, wired correctly, turn any music or microphone input into a living control signal that drives your entire visual system. This tutorial builds a complete audio-reactive chain from signal capture through frequency analysis to visual output.
Getting Audio In
There are two ways to bring audio into TouchDesigner:
Audio File In CHOP loads a pre-recorded audio file. Set the File parameter to any WAV, MP3, AIFF, or FLAC file. Set Play Mode to Real-Time and Loop to On for continuous playback. The output is two channels — chan1 (left) and chan2 (right) — at the file’s native sample rate. This is ideal for testing and for installations where you control the audio content.
Audio Device In CHOP captures live audio from any input device on your system: microphone, line-in, or a virtual audio cable routing from another application. Set Device to your input device from the dropdown. Set Multi-Channel to On if you want to capture multiple input channels separately. For live performance and interactive installations, this is what you use.
For the remainder of this tutorial, either CHOP works identically at the analysis stage.
Frequency Analysis with Audio Spectrum CHOP
Connect your audio source to an Audio Spectrum CHOP. This performs an FFT (Fast Fourier Transform), which converts the time-domain audio waveform into a frequency-domain representation. Instead of channels that show amplitude over time, you now have a series of channels where each channel represents the energy at a specific frequency bin.
Key parameters to set:
- FFT Size: Controls frequency resolution vs. time resolution. 512 is a good starting point. Larger values give finer frequency resolution but slower response to transients.
- Window Function: Hann is the standard choice. It reduces spectral leakage between adjacent frequency bins.
- Smooth: A value between 0 and 1 that blends the current spectrum with the previous frame’s spectrum. At 0.85–0.92, peaks decay gradually instead of dropping instantly, which looks much better visually and reduces noise.
- Output: Set to Magnitude for linear amplitude, or Power (dB) for a logarithmic scale that matches how humans perceive loudness.
The output contains many channels — often 256 or 512 depending on FFT Size. Low-numbered channels are bass; high-numbered are treble.
Cleaning the Signal: Audio Dynamics CHOP
Before extracting frequency bands, route your audio through an Audio Dynamics CHOP. This is a compressor and noise gate that normalises the dynamic range. Without it, a loud performance sounds completely different from a quiet one — your visuals will behave inconsistently.
Set Threshold to –18 dB and Ratio to 4:1. Set Attack to 5 ms (fast enough to catch transients) and Release to 150 ms (slow enough to avoid pumping). Enable the Noise Gate section with a Gate Threshold of –45 dB to silence electrical hiss when no signal is present.
Extracting Frequency Bands
Now use a Select CHOP to pull out specific frequency ranges from the Audio Spectrum CHOP output. You will create three separate Select CHOPs — one each for bass, mid, and treble.
Bass CHOP (Select CHOP 1)
- Set CHOP parameter to
audioSpectrum1 - Channel Names (by index):
chan0tochan5 - This selects channels 0–5, corresponding to roughly 0–250 Hz (sub-bass and bass)
Mid CHOP (Select CHOP 2)
- Channel Names:
chan10tochan30 - This selects midrange frequencies roughly 500 Hz–3 kHz
Treble CHOP (Select CHOP 3)
- Channel Names:
chan50tochan120 - This selects high frequencies roughly 4 kHz–15 kHz
After each Select CHOP, add a Math CHOP set to Function: Combine Channels → Maximum (or Mean). This collapses the multi-channel selection into a single channel representing the energy in that band. Rename the output channel on the Rename parameter to bass, mid, and treble respectively.
Now add a final Math CHOP for each band with the Range function. Map the values — which depend on your audio levels but might range from 0 to 0.4 — to a clean 0-to-1 range. Set From Range Low to 0, From Range High to 0.35 (adjust this to your actual signal level), To Range Low to 0, To Range High to 1, and check Clamp.
Mapping to Visual Parameters
Driving Noise TOP Amplitude from Bass
In your visual network, place a Noise TOP. Right-click its Amplitude parameter, choose Expression, and type:
op('bass_math')['bass'] * 0.8 + 0.1
Now the noise pattern grows and shrinks with every bass hit.
Driving Colour Hue from Midrange
Place an HSV Adjust TOP after your Noise TOP. Right-click its Hue Shift parameter and enter:
op('mid_math')['mid'] * 0.5
As the midrange energy increases, the hue shifts. Combine with an LFO CHOP offset for continuous slow hue rotation plus reactive hue jumps.
The Beat CHOP
The Beat CHOP is a dedicated onset detector. It analyses the amplitude envelope of its audio input and fires a pulse channel when it detects a beat. Parameters include Amplitude Threshold (how loud the transient must be to count as a beat) and Minimum Interval (the minimum time between detected beats, preventing double-firing).
The beat output channel sits at 0 and briefly pulses to 1 on each detected kick or hit. Feed this into a Trigger CHOP to convert the pulse into a decaying envelope — a smooth shape that rises instantly on beat and decays over 0.3–0.5 seconds. That envelope is ideal for scaling geometry: instant impact, smooth return.
Full Working Example
Build this complete audio-reactive system:
- Audio Device In CHOP → Audio Dynamics CHOP → Audio Spectrum CHOP (Smooth 0.9)
- Three Select CHOPs extracting bass / mid / treble, each followed by a Math CHOP (Mean, then Range 0–1).
- Beat CHOP connected to the Audio Device In CHOP → Trigger CHOP (Attack 0.001, Release 0.4) → rename output
kick_env - Visual network: Noise TOP → Blur TOP → HSV Adjust TOP → Level TOP → Null TOP named
OUT - Parameter wiring:
- Noise TOP Amplitude ←
op('bass_math')['bass'] * 0.7 + 0.05 - Noise TOP Period ←
0.3 + op('mid_math')['mid'] * 0.4 - HSV Adjust TOP Hue Shift ←
op('mid_math')['mid'] * 0.3 - HSV Adjust TOP Saturation ←
0.5 + op('treble_math')['treble'] * 0.5 - Level TOP Brightness ←
0.8 + op('kick_env')['kick_env'] * 0.4
- Noise TOP Amplitude ←
Play music and watch. On bass hits, the noise pattern amplifies and sharpens. On midrange energy, the colours shift. On kick drum, the whole image brightens. Treble lifts colour saturation.
This is the complete foundation. From here, connect the same CHOP channels to Geo COMP scale parameters, camera field-of-view, particle emission rates — anything that accepts a number can be made reactive.