This recipe builds a classic 3D equalizer. You split a sound into frequency bands and use each band to drive the height of a box.
Key Concept: Instancing
Instancing is a way to render hundreds or thousands of copies of a single shape (like a box) very efficiently. Instead of creating 100 separate nodes, we create one box and tell TouchDesigner: “Put a copy of this box at every point in this list of numbers.”
1. The Audio Analysis
- Audio In: Create an Audio File In CHOP. It comes with a default song.
- Break it down: Connect it to an Audio Spectrum CHOP.
- What it does: It runs an FFT (Fast Fourier Transform), which turns the sound wave into a graph with the bass on the left and the treble on the right.
- Smooth it out: Connect the spectrum to a Resample CHOP. Set the “Method” to
New Rate, New Intervaland “End” to40.- Why? This reduces the hundreds of frequency bars down to just 40, which is easier to see.
- Finalize: Connect to a Null CHOP and name it
OUT_AUDIO.
2. The 3D Scene
- The Shape: Create a Box SOP.
- The Container: Connect the Box SOP to a Geometry COMP.
- The View: Add a Camera COMP, a Light COMP, and a Render TOP.
- Now you should see a single box in your
render1viewer.
- Now you should see a single box in your
3. Instancing
Now the Geometry COMP needs to copy that box.
- Select the Geometry COMP. Go to the Instance tab in the parameters.
- Turn Instancing →
On. - Define the Data: Drag your
OUT_AUDIONull CHOP into the Instance CHOP/DAT field.- The box may disappear or look wrong at this point. TD doesn’t know where to put the copies yet.
4. Layout (The Grid)
We want the boxes to sit in a row, but our audio data only has “Height” (Y) values. We need “Position” (X) values.
- Generate X positions: Add a Pattern CHOP. It is a generator, so it needs no input.
- Set Type to
Ramp. - Set Number of Samples to
40(to match our audio). - Set Amplitude to
20and Offset to-10. This spreads the values from -10 to +10. - Set Channel Names to
ramp1so it doesn’t clash with the audio’schan1.
- Set Type to
- Merge them: Insert a Merge CHOP between the Resample CHOP and the
OUT_AUDIONull, and wire the Pattern CHOP into its second input.OUT_AUDIOnow carries both the audio channel (chan1) and the ramp (ramp1). - Map the Channels:
- On the Geometry COMP Instance page, find Translate X. Select
ramp1from the dropdown. - Find Scale Y (to make them grow tall). Select
chan1from the dropdown.
- On the Geometry COMP Instance page, find Translate X. Select
Visualizing the Result
Look at your Render TOP. You should now see a row of 40 bars jumping up and down with the music!
Troubleshooting
- “The bars are too small/too big” Use a Math CHOP before the Null to multiply the audio values.
- “The bars are jittery” Add a Lag CHOP or Filter CHOP before the Null to smooth the movement.
- “I only see one bar” Check that your Pattern CHOP has the same “Number of Samples” as your audio spectrum.
Next Steps
- Add Color: Use the audio data to drive the
Instance Colorparameters. - Change the Shape: Replace the Box SOP with a Sphere SOP or Tube SOP.
- 3D Grid: Use a Noise TOP to generate a 2D grid of boxes instead of a 1D row.
Parameter Tuning & Behavior
| Parameter | Behavior |
|---|---|
| Resample (Samples) | Higher = more 3D bars (finer frequency detail); Lower = fewer, thicker bars. |
| Pattern Amplitude | Higher = bars spread further apart across the screen; Lower = bars cluster together. |
| Math (Multiply) | Higher = bars grow taller/more reactive to sound; Lower = subtler, shorter movement. |
| Lag/Filter | Higher = smoother, “liquid” motion; Lower = raw, “jittery” real-time data response. |
Network Architecture
[ AUDIO PROCESSING ] [ 3D SCENE ]
Audio File In CHOP Box SOP
│ │
▼ ▼
Audio Spectrum CHOP (FFT) Geometry COMP (Instancing On)
│ ▲ chan1 → Scale Y
▼ │ ramp1 → Translate X
Resample CHOP (40 pts) ──┐ │
▼ │
Pattern CHOP (ramp1) ──▶ Merge CHOP ──▶ Null (OUT_AUDIO)📚 Learning Path · Stage 2: Your First Visuals · step 10 of 44
(y) Return to Recipes & Projects | (y) Return to TouchDesigner | (y) Return to Home