Music unfolds through time. To respond to a phrase, a visual system needs some record of what came before. These experiments isolate three ingredients: a short memory, a tonal reference, and a stored pattern.
Each experiment measures its generated audio before playback, then reveals those measurements in time with the sound. The simple shapes make one relationship visible at a time. They are teaching mappings; the full Psychodeli director combines many signals when it composes a performance.
Sound starts only when you play. Each clip ends automatically; its result stays on screen. No microphone or music upload is needed.
§1 · Motion memory
The sound ends. The motion can linger.
Hear a swell, a pause, then one short accent. One ring follows the sound level immediately. The other carries a fading memory of it. Increase the memory time and replay: the same sound leaves a longer gesture.
This experiment needs JavaScript and Web Audio. With playback enabled, a swell and an accent compare immediate sound level with a fading motion response.
What the memory calculation measures
The sound-level trace is the root-mean-square amplitude of the generated audio, scaled to 0–1 for this display. The memory trace approaches that level through an exponential smoother. Its time constant, τ, controls how much history remains. Both rings use the same radius scale.
This is a small model of temporal continuity. It demonstrates a delayed, sustained response, not prediction of a future drop. Psychodeli's build-up and anticipation systems use additional signals and policies.
§2 · Tonal distance
A chord can be smooth and still be far from home.
C major is home in this experiment. The sequence leaves it, reaches D♭ major, and returns. The sound level stays broadly similar, but the measured distance changes. The second ring makes that distance visible.
This experiment needs JavaScript and Web Audio. Four chords compare sound level with their measured tonal distance from C major.
How the chord is measured
The app's Meyda extractor measures the audio's twelve pitch classes. Psychodeli's own
HarmonicAnalyzer.calculateTonalDistance then weights them relative to C major.
Tonic, fifth, and third receive more stability than notes outside the key. The resulting distance is scaled from 0 to 1.
We supply C major as the reference so this experiment isolates distance. It does not test automatic key detection or measure a listener's feeling of tension. The radius mapping is made for this explanation; the full app combines tonal distance with other musical signals.
§3 · Phrase comparison
The same notes can leave a different shape.
The first phrase leaves an outline. The second draws over it. Replay with the notes reversed: their order changes even though the collection of pitches stays the same.
The similarity score compares measured frequency patterns in time. A close match lets a visual system reuse a remembered shape; it does not tell us what the music means to a listener.
This experiment needs JavaScript and Web Audio. Two phrases compare the same notes in their original or reversed order.
What this comparison can establish
For each of eight note positions, the experiment measures energy in 24 frequency bands from the actual generated audio. A cosine comparison uses those ordered measurements. The outline shows each note's spectral centre as a readable projection of the larger pattern.
The phrase boundaries and timing are supplied by this experiment. This is an aligned comparison, not the app's autonomous phrase detector. Finding a return in an unfamiliar recording, or across a change of key, tempo, or instrument, requires more than this demonstration.
Recorded example · 10 seconds
Let the voice take the foreground.
Listen to this passage from Aretha Franklin's Dr. Feelgood, recorded live. The accompaniment keeps moving while the voice comes forward and recedes. Give that voice its own visual layer, and the picture can follow the changing arrangement.
Play it once, then switch off the voice layer and replay. The teal field follows overall sound level. The purple ribbon follows the recorded voice score: two different readings of the same music.
Ready · press play to hear the passage.
How this recorded example works
Apple SoundAnalysis measured the project's full 45-second audio fixture. Psychodeli's production instrument-family timeline combines and smooths the singing and speech scores. This ten-second excerpt replays those measurements against the audio player's clock. The teal trace measures the decoded audio's RMS level, scaled to the excerpt's peak.
The voice score is classifier evidence, not isolated vocal volume. The ribbon is a teaching mapping of that score; this is not a recording of the full director. The visible clip is short, but its analysis retains the preceding musical context.
From a composed reel · 10 seconds
The brushes join the bass.
In our Blue Note Crystal reel, the opening bass phrase makes space for a brushed drum kit. Listen for its entrance about 2.8 seconds into this excerpt. The original crystal performance plays alongside a measured response to the arriving drums.
Both teal rings follow the same sound level. In the second view, an amber form grows with the drum evidence. The added shape makes the change in instrumentation visible.
Ready · press play to hear the brushes arrive.
Finding the entrance in our composed reel
The saved composition starts the brush kit at 4.8 seconds in Blue Note Crystal. This excerpt uses seconds 2–12 of the finished reel, including its original picture and soundtrack. Apple SoundAnalysis measured audio decoded from the complete movie; Psychodeli's production instrument-family timeline folds and smooths the drum scores. Each one-second analysis window appears only after its audio has finished.
The amber form’s radius maps linearly to the drum score (0–1); the teal rings follow overall sound level in both views. This is a teaching mapping, not isolated drum volume. The original reel includes composed visual cues; its crystal changes are not presented as proof of autonomous instrument-triggered scene changes. The shared video clock keeps the picture, soundtrack, and measured trace together.
Inside the app: composing a performance from these signals
The experiments above make three relationships visible. In a full performance, Psychodeli combines them with rhythm, musical texture, and a memory of earlier scenes.
§4 · Coherence Live
Short accents can belong to a longer gesture.
A beat gives the picture a small accent. A phrase gives it room to travel. Psychodeli coordinates those timescales so a long sweep can continue while shorter gestures add detail.
Psychodeli ranks each request by musical timescale. The section sweep keeps control while the beats add detail around it. A velocity-and-jerk limiter rounds abrupt changes, and a render-rate glide fills the gaps between the ~20 Hz analysis ticks.
How long gestures survive short accents
Every visual proposal carries a timescale. A section-length sweep outranks a frame-length beat accent, so the larger phrase keeps temporary ownership while the kicks decorate it. Once a value is committed, one smoothing chain limits velocity and jerk — the rate at which acceleration changes — so sharp decisions still arrive with rounded motion. A render-rate glide fills the space between the slower analysis updates, and the whole system is rate-independent: it behaves consistently at 30 fps on a phone and 120 Hz on a desktop. Continuity and common fate let the visual system read a moving field as one thing instead of many (Wertheimer 1923; Johansson 1973).
§5 · The ledger Live
A whole track leaves a readable trace.
The ledger keeps the sound and the picture on one timeline. It records audio energy, harmonic measurements, and the visual parameters they influence, alongside the director's decisions. Follow a trace across the song to see how a changing sound becomes a changing response.
Below is one page of it: a four-minute electronic track played through the desktop app; three model channels drawn over the controller's event lane. The build-up proxy rides above the raw energy it integrates. The tension heuristic changes with the harmony. At 2:38, the recurrence system matched material from 2:04 earlier and requested a visual reprise with an internal score of 0.87. The chart lets you follow that match back to its earlier passage.
What one row of the ledger remembers
Ten times a second, one row records audio measurements, model outputs, and shader parameters. A parallel lane records discrete events such as section changes, predictions, and visual returns. Rows are batched away from the render loop, then compressed into one artifact keyed by song identity rather than filename — a necessity when loopback audio has no file to inspect. When the reported song changes, one artifact closes and the next begins. Long live sets rotate periodically so a single ambiguous title cannot swallow an evening.
The offline half — from capture to reference analysis
The clean layer is baked in two tiers. Tier A runs when capture closes: octave-settled global tempo and a corrected beat grid. Tier B adds whole-song structure — separated musical parts, section boundaries, and downbeats — then merges those results back into the same artifact. Local files can enter at this second tier without a prior listening pass. On top of that sits the recurrence work: a repeated musical span is only admitted as a family when the pitch lane and the rhythm lane independently agree on the same beat-grid span — a discipline that cut the review surface from 3.5–10 candidate repeats per minute to at most one root family per track. That analysis is an internal reference for grading the live recurrence ladder in the app. It is not ground truth until independently annotated and evaluated.
Beyond the waveform
A waveform shows changes in amplitude. A spectrum shows where the energy sits. Those measurements are the starting point for a richer kind of audio reactivity: identifying what is sounding, following how the music unfolds, and composing a visual response across phrases and sections. Apple's SoundAnalysis makes one part of that advance available as a built-in platform capability: a classifier for over 300 sound categories, including musical instruments and human vocal sounds. A visual system can respond to the arrival of a voice or a string texture, rather than treating every equally loud sound as the same event.
Psychodeli combines instrument-family cues with its own models of rhythm, harmonic tension, melodic motion and recurrence. The conductor coordinates their requests so a beat accent can coexist with a longer gesture. The aim is for a returning phrase to recall a look, an instrumental entrance to reshape a scene, and a quiet passage to leave space. Audio reactivity becomes musical direction: the picture gains context, memory and pacing, instead of starting over with every audio frame.
Where the Apple analysis stands today
As of October 3, 2026, our local-file reference covers 5,680 tracks and about 369 hours of analyzed audio. Agreement with Apple is useful evidence, but its labels still need independent listener checks. A blind listening pilot pairs 12 candidate changes with 12 shifted controls from the same recordings: do people actually hear the claimed entrance or exit? Results are still pending. In six excerpts played through MacBook speakers into its microphone, broad family identity often survived, but confidence and timing changed substantially. File analysis alone cannot certify what a room microphone hears.
§6 · The director Live
A performance can explore, develop, and return.
The Algorithmic Exploration controller maps model signals to visual policies. It runs a four-phase creative cycle — discovery (try new combinations), development (refine what's working), variation (bend the established), return (call back to the memorable) — over two stores of recent and session-scale state plus a growing book of audio→visual fingerprints. When a fingerprint crosses its match threshold, it replays the associated visual move — a turbo replay.
Read the capture in §5 again, top band this time. The log records why each phase
changed: to variation at every chorus, to
development on the verses, back to return at both breakdowns. It fired 23 turbo replays,
matched 18 long-term patterns, and logged the two theme returns in the bottom lane. None of that
was scripted in advance. The event labels (section:chorus, cue:breakdown) came from
live detectors; the policy selected a phase in response.
Try the phrase-comparison experiment to see the underlying idea directly: a phrase leaves a pattern, and its return meets that stored shape. In the recorded session above, the director uses its own live detections to choose when to revisit earlier material.
What the director remembers, and what it writes down
Short-term memory holds the recent musical and visual context; a long-term store keeps session-scale patterns for roughly fifteen minutes with match-score-weighted recall, so a callback lands as a composed arrival (eased ~800 ms), not a cut. The ledger records each creative-phase change and its reason, every reflex replay, each long-memory match, and the lag and detector score behind a theme return. That is how the 2:38 return in the figure can be traced to material measured 2:04 earlier with an internal score of 0.87.
Give the picture a memory.
A fading response connects one moment to the next. A tonal reference gives a chord somewhere to move from and return to. A stored phrase makes repetition visible. Together, these ideas give audio reactivity a history to draw on as the music unfolds.
Change the motion memory · Hear harmony move · Compare a returning phrase