← zidingz.com

Emission Time

A music video for Rachmaninoff's Third Piano Concerto in which every frame is computed from the recording, using the tools we built to locate a microphone from aircraft noise.

Zvon, first movement, 7:05 to 7:45. Rachmaninoff, Philadelphia Orchestra, Ormandy, 1939.

In doppler-geo the question was: given only a sound, where was the listener? An aircraft passing overhead leaves a falling curve in the spectrogram, and the shape of that curve pins down where you were standing. This project asks the same question of a piece of music with the same code. Where is the sound in pitch, where is it in harmony, and when was it emitted.

There is no footage and no hand animation. The film is one function:

frame(t) = Σ_s  w_s(t) · Scene_s(A, t)        A = Analysis(audio)

A is the aircraft toolkit retuned for a piano. Scene_s are four pictures. w_s decides which one you see. You can watch the sample clips, or run all four scenes live in the browser on any passage.

The recording

The film uses Rachmaninoff's own recording with the Philadelphia Orchestra under Eugene Ormandy, made on 4 Dec 1939 and 24 Feb 1940. The first movement runs 13:48. The transfer sits at A4 = 439.4 Hz, so it needed no pitch correction.

It is the right recording artistically and the wrong one legally. It is out of copyright in the EU, the UK and Canada, but US law protects recordings published between 1937 and 1946 for 100 years, so this one frees in 2041. The one unambiguously open source is a solo-piano recording of the ossia cadenza on Wikimedia Commons (CC BY 2.5), which the Disc clip and the fidelity experiment use. No complete Rach 3 with orchestra exists under a licence that allows a synced video: the modern one on IMSLP is CC BY-NC-ND.

From aircraft to piano

ToolFor aircraftFor the piano
STFT4 s windows, 20 to 500 HzTwo windows: 372 ms below A4, 93 ms above
WhiteningDivide out steady humSame, per bin, to drop the shellac surface noise
Log-frequency resamplingDoppler curves become shift-invariant templates3 bins per semitone; transposition becomes a shift
Viterbi ridgeFollows one propeller harmonic through a flyoverFollows the top voice
Template match on a gridScore every candidate position on a mapScore every triad on the Tonnetz; slide a 30 s template to find a theme's return
Retarded-time modelFit: when was the sound emitted, given when it was heardRun forwards as a picture

One window cannot do both jobs. Two adjacent keys at the bottom of the piano are 1.6 Hz apart, and a hammer strike lasts about 20 ms. Resolving the first needs a long window and resolving the second needs a short one. The seam at A4 is left visible in the spectrogram.

Four scenes

Zvon

88 emitters, one per piano key, laid out like a bell tower seen from above: big bells in the middle, angle by the circle of fifths. A pixel at distance r from an emitter shows what that emitter was doing at time t − r/c. This is the forward model from the Doppler fit, heard(), drawn instead of inverted.

Two consequences fall out. When the music stops, the screen keeps showing it until the last ring leaves the frame. And because group speed depends on wavelength, as it does for ocean swell, a chord struck together reaches the edge bass first: distance turns harmony into an arpeggio. A recording is the same thing on a longer baseline. This wavefront left Philadelphia in 1939.

Zvon at pianissimo: the opening of the first movement.

Sand

220,000 grains on a square Chladni plate. Each sounding key drives the plate mode whose eigenfrequency, which goes as m² + n², is nearest its pitch. Grains random-walk in proportion to how hard the plate is shaking under them, so they collect where it is still. The picture of a chord is the set of places it leaves alone.

Sand, the opening of the first movement.

Locator

The harmony is located on Euler's Tonnetz the way the microphone was located on a map. Every node glows with the energy of its pitch class, and a tracker with a continuity prior follows the best-matching triad. The lattice is a torus unrolled onto a plane, so the true position repeats for ever. Those repeats are the same aliasing as the mirrored strips in the Doppler maps.

Locator, the first 90 seconds. Left: whitened spectrogram with the ridge on the theme. Right: the Tonnetz and the track.

Disc

A spiral spectrogram with one turn per octave, so angle is pitch class and every octave of a note lies on one spoke. In log-frequency a harmonic series is a rigid shape, so every note is the same constellation, rotated: partials 1, 2 and 4 on one spoke, 3 at 210.6°, 5 at 115.9°, 7 at 290.6°. A slow engraving layer records everything heard so far.

Disc, on the CC BY cadenza recording.

Two things the data told us

Whitening deletes home

Whitening divides out anything steady. That is correct for propeller hum. In the first minute of this concerto the steady thing is the tonic: a D held under the theme. With whitening on, the locator read the opening as C♯ minor. On un-whitened spectra it reads D minor, then G minor, A, B♭ and F, which is plausible for the passage. So the spectrogram panel is whitened and the D is missing from it, and the map beside it uses a different input and knows where D is.

The recapitulation is findable from audio alone

Sliding the opening's 30 seconds of harmony along the movement, as we slid Doppler templates along a recording, gives three matches: 0:04 (itself), 0:45 (the orchestra's restatement, score 0.71 to 0.82) and 12:32 (score 0.92). The last is the recapitulation. The other section boundaries in the script were read off loudness curves and have not been checked by ear.

Would better audio help?

Less than you would expect, and not in the way you would expect. We took the clean cadenza recording, degraded it one way at a time, re-ran the analysis and measured how far each feature moved from the clean reference.

DegradationKey envelopes (correlation)Same keys lit (Jaccard)Onsets (F1)Ridge within a semitone
low-pass 8000 Hz1.001.001.001.00
low-pass 5000 Hz1.001.001.001.00
low-pass 3000 Hz1.000.990.991.00
sample rate 11.025 kHz1.001.001.001.00
sample rate 8 kHz0.980.930.991.00
8-bit quantisation0.980.870.971.00
white noise, SNR 40 dB0.990.910.991.00
white noise, SNR 30 dB0.970.820.981.00
white noise, SNR 20 dB0.920.680.940.98
white noise, SNR 10 dB0.800.490.890.85
pink noise, SNR 20 dB0.850.570.940.88
MP3 32 kbps0.910.690.960.94
Opus 12 kbps0.790.480.870.81
wow ±0.3% speed0.960.790.970.96
wow ±1.0% speed0.840.580.960.77
added hall reverb, RT60 1.0 s0.920.680.960.81
added hall reverb, RT60 2.5 s0.900.660.950.83
heavy compression 8:10.950.710.870.90
other music mixed in at -12 dB0.770.510.910.56
other music mixed in at +0 dB0.450.300.820.21
78 rpm simulation (5.5 kHz, SNR 25 dB pink, wow 0.3%)0.860.580.950.94

The first column is what Zvon and Sand consume. Reference: 479 detected onsets in 2:51 of solo piano. A fifth metric, chroma similarity, stayed at 0.97 or above in every row but one; it is smoothed over most of a second and is too blunt to rank anything, so it is left out.

Four Zvon frames of the same instant, from clean and degraded audio
The same instant of the cadenza through Zvon, from four versions of the audio. The 78 rpm simulation is hard to tell from clean. Noise removes the fine rings from quiet high keys. The orchestra changes which emitters fire.

What this says:

Stereo and multichannel are a different kind of gain. They would not improve these numbers, but they add an observable the mono recording does not have: where on the stage each sound came from, which is the original doppler-geo question. We tried it on the one open stereo Rachmaninoff concerto recording we found (Concerto No. 2, Musopen, public domain). Its channels correlate at 0.987 and the energy-weighted pan spread is about 0.05 on a −1 to +1 scale, so it is close to mono and there was no azimuth to recover. A widely spaced or multi-microphone recording would be needed.

So the upgrade that matters is separation, and there are two ways to get it. One is a model that splits piano from orchestra; a research one exists. The other is to stop asking the audio which notes were played: align a score to the recording. Both are on the list of what to try next.

You can hear and see three of these degraded versions in the live renderer.

A version that can be published

The function does not care which piece it is given. The opening of the Second Concerto, eight tolling chords for the piano alone and then the orchestra, exists in a public-domain recording from Musopen. These two clips, and the four on the CC BY cadenza, carry no rights problem.

Zvon on the opening of Piano Concerto No. 2. Public-domain recording (Musopen).
The same eight chords on the plate.

The gallery has 14 clips in all, including the last minute of the Third's finale and the recapitulation the template search found.

In the browser

The offline renderer is numpy. Zvon took about 0.6 s per 1280 × 720 frame on 12 CPU threads. The same sum is a natural fragment shader: 88 texture lookups and cosines per pixel. Ported to WebGL2 it takes about 10 ms per frame at 1968 × 1107 on an M3 Pro laptop, which is the whole first movement in real time with headroom. Sand keeps 230,400 grain positions in a float texture and takes about 4 ms. Disc is about 4 ms. Locator is the Python tracker rewritten in JavaScript, about 8 ms on a 2D canvas.

The analysis is not ported. It runs once in Python and ships as 8-bit images, one row per key and one column per 20 ms; the whole first movement's key envelopes are a 192 KB PNG. The browser's own analyser node offers only linear frequency bins with a fixed window, which cannot resolve the bottom octaves. The audio element serves as the clock.

The live version makes the physics adjustable. Set dispersion to zero and a chord stays a chord all the way to the edge. Put the emitters in a line and chords turn into beams.

What is not right yet