home/ modules/ mapping-audio-features-to-visual-parameters

Mapping Audio Features to Visual Parameters

  • learner can route system/DAW audio back into a visual tool via a loopback device and extract DSP data from it
  • learner can map audio features to visual parameters treating any control channel as interchangeable with any parameter
  • learner can account for the perceptual asymmetries between seeing and hearing when choosing a mapping

Route a DAW's output into a visual patch through a loopback device, then map at least three audio features (e.g. loudness, a spectral band, a beat trigger) onto three distinct visual parameters — and adjust one mapping to fix a place where the visuals feel out of step with what you hear.

This module builds toward the bread-and-butter task of the audiovisual live-coder: making a visual rig breathe with the music coming out of your DAW. In a club or gallery set, nobody hands you a clean analysis feed — your techno kick, pad swells, and hat patterns leave the DAW as an output stream, and the visuals only react if you close the loop yourself and then choose mappings that read as musical rather than merely synchronized.

The arc starts fully supported. First, get signal flowing: the loopback-routing procedure (“route system audio back in as an input via a platform-specific loopback device”) is your JIT how-to for the single most common setup failure, whether you’re on PulseAudio monitors, BlackHole, or a virtual cable. With audio arriving, the two-stage extract-then-map model (“extract DSP data from audio and map it to visual parameters”) frames your first exercise: drive one obvious parameter — size from loudness — and feel how curve and scaling choices change the result. Then generalize: the insight that any channel can drive any parameter (“any CHOP channel can drive any operator parameter”) turns reactivity into a wiring-and-remapping habit, which is why that mapping move is the part-task drill — you’ll repoint sources to destinations dozens of times per set. Note that these ideas were first articulated in different tools (p5.js for extract-then-map, TouchDesigner for channel interchangeability), but they are the same model wearing different clothes: apply them in whichever visual environment your patch lives in. Finally, the eye-versus-ear asymmetry concept gives you the judgment to notice when a mapping is technically correct but perceptually wrong, exactly the repair the capstone demands.

Every required atom gates the capstone directly: without routing there is no signal, without the mapping model and channel interchangeability there are no three distinct mappings, and without the perceptual lens you cannot diagnose the out-of-step moment. There are no supporting atoms here — this module is all load-bearing.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

audio-reactive-map

updateAudio(); scale(1 + amp * 0.01)

p5live-0044 · CC0-1.0

voronoi(() => 4 + a.fft[0] * 10).out()

hydra-0035 · CC0-1.0

modulation-warp

osc(4).modulate(src(o0), 0.6).out(o0)

hydra-0022 · CC0-1.0

s0.initP5(); src(s0).modulate(noize(), 0.3).out()

p5live-0038 · CC0-1.0

feedback-trail

osc(4).modulate(src(o0), 0.6).out(o0)

hydra-0022 · CC0-1.0

function draw(){ fill(0, 20); rect(0, 0, width, height); circle(mouseX, mouseY, 40) }

p5live-0003 · CC0-1.0

scale-pulse

uv *= 1.0 + 0.3 * sin(u_time * 2.0);

glsl-0030 · public-domain

updateAudio(); scale(1 + amp * 0.01)

p5live-0044 · CC0-1.0

grain-glitch

col += (h21(st + fract(u_time)) - 0.5) * 0.15;

glsl-0026 · public-domain

flow-field

let ang = noise(x*0.01, y*0.01) * TWO_PI

p5live-0008 · CC0-1.0

spectral-band-split

[ihi, imid, ilo] >> rgb

punctual-0041 · CC0-1.0

chromatic-aberration

col = vec3(texture2D(u_tex0,st+vec2(.005,0)).r, texture2D(u_tex0,st).g, texture2D(u_tex0,st-vec2(.005,0)).b);

glsl-0036 · public-domain

visual-pulse

zoom (1 ~~ 2 $ osc 0.25) (circle 0 0.3) >> add

punctual-0022 · CC0-1.0

Atoms in this module

Required — these gate the capstone

Audio-reactive visuals extract DSP data from audio and map it to visual parameters
Concept L2 First instrument JH
To make software react to music playing on a computer you must route system audio back in as an input via a platform-specific loopback device
Procedure L2 First instrument JI
In TouchDesigner any CHOP channel can drive any operator parameter, so audio, MIDI and beat inputs are interchangeable
Concept L2 First instrument JI
Vision and hearing process time and density differently — AV artists must account for these asymmetries to achieve coherence
Concept L3 Craft JI

Supporting — enrichment, not gating

Audio-reactive texture intensity (band amplitude to grain/warp) is realizable now; onset-triggered glitch bursts are not possible in this rig
Fact L2 First instrument JH
Audio can drive emphasis in a composition but cannot move focus on the beat in the current rig
Fact L2 First instrument LHJ
A visual pulse is amplitude-following, not beat-locked, and will drift from the musical grid
Concept L2 First instrument HJ
Tempo-locked visual changes are not achievable in this rig because the bridge exposes only FFT energy with no beat-phase or onset
Fact L2 First instrument JH
In the 4-bin rig, audio bands can drive color brightness, saturation, or palette phase but not onset-triggered color events
Fact L2 First instrument LHJ
A single 'energy' scalar driving multiple motion parameters makes the whole image rise and fall coherently
Principle L2 First instrument HJ
In this rig, audio-reactive visual motion is envelope-following only — beat-locking and onset-triggering are not available
Fact L2 First instrument JH
Driving a shape's radius or count from audio is realizable now; making a shape appear on-the-kick is not
Fact L2 First instrument LGHJ
P5LIVE is not part of the 4-bin Strudel+Hydra rig — a.fft[] does not exist in P5 and must never be emitted there
Fact L2 First instrument LHJ
Mapping high-mid band to rotation speed or line thickness gives geometric visuals a crisp, articulate audio response
Principle L2 First instrument JH
Mapping audio low-mid to fractal zoom rate or feedback gain risks runaway whiteout — keep gain in check
Principle L2 First instrument JH
Mapping the highs band to glitch intensity makes corruption spike with hats and transients — the closest proxy to onset-triggered glitching
Principle L2 First instrument JH
Overt audio-reactivity breaks the stillness of a minimal visual — subtle smoothed bass or no reactivity at all
Principle L2 First instrument HJ
Mapping bass to feedback-trail zoom or symmetry scale makes the tunnel pulse with the low end
Principle L2 First instrument JH
Map the low-mid band to organic warp/flow depth so the field swells and eddies with the music's body
Principle L2 First instrument JH