Concept demo · working title
A song goes in. A drone show comes out.
Beats, bars and sections are found in your browser, 200 drones are choreographed to them, every move is collision-checked, and the show flies here in 3D.
Now playing: Ravenfall, an original track synthesized for this demo (CC0)
For the technical reader
Everything on this page runs client-side: no server, no model, no uploads. The pipeline is classic signal processing plus a provable assignment trick, with an independent checker that does not trust either.
Onset strength. A 1024-point FFT every 11.6 ms, pooled into log-magnitude bands Bn(b) = log(1 + 100·|Xn|b). Spectral flux keeps only rises:
o(n) = Σb max(0, Bn(b) − Bn−1(b))
then a 0.4 s moving-average detrend. A second envelope over bands below 110 Hz tracks kicks.
Tempo. Autocorrelation of o, weighted by a log-Gaussian prior so octave errors stay musical:
BPM* = argmaxτ r(τ) · exp(−½ (log2(BPM(τ)/115) / 0.9)2)
Beats come from Ellis-style dynamic programming, C(t) = o(t) + maxτ [C(t−τ) − α·log2(τ/p)], which trades onset strength against tempo regularity. Downbeats: the bar phase whose bar lines best line up with low-band onsets and structural novelty.
Sections and novelty. Beat-synchronous band features are z-scored, and a cosine self-similarity matrix Sij is built. A Gaussian-tapered checkerboard kernel K (16 beats) slides down its diagonal (Foote novelty):
N(i) = Σa,b K(a,b) · Si+a, i+b
plus a loudness-change term. Peaks are snapped to bar lines with sections at least ~6.5 s long. Long sections are split into ~10 s phrases so formations change with the music. A section is a drop when energy jumps after a dip.
Every formation is sampled so that any two points are at least Δ = 3 m apart. Between formations, drones are matched by the Hungarian algorithm, which minimizes the total squared distance (the CAPT objective of Turpin, Michael & Kumar):
π* = argminπ Σi ‖ai − bπ(i)‖2
Every drone then flies a straight line, and all drones share one easing clock, s(u) = 6u5 − 15u4 + 10u3:
xi(t) = ai + s(u)·(bi − ai), u = (t − t0)/T
Why that can’t collide. If swapping two drones’ targets made the cost lower, π* wouldn’t be optimal, so
‖ai−bi‖2 + ‖aj−bj‖2 ≤ ‖ai−bj‖2 + ‖aj−bi‖2 ⇔ (ai−aj)·(bi−bj) ≥ 0
The gap between two drones is d(s) = (1−s)·Δa + s·Δb, so
‖d(s)‖2 = (1−s)2‖Δa‖2 + s2‖Δb‖2 + 2s(1−s)·Δa·Δb ≥ ((1−s)2 + s2)·Δ2 ≥ Δ2/2
Every pair therefore stays at least Δ/√2 ≈ 2.12 m apart throughout every transition, above the 2.0 m limit, whatever the easing curve, as long as everyone shares it.
Speed and acceleration. The easing’s peak slope is s′ = 15/8 and its peak curvature is |s″| = 10/√3 ≈ 5.77. With d the longest move (and dz its vertical part), the transition time is
T = 1.08 · max(1.5 s, 1.875·d/vmax, 1.875·dz/vz,max, √(5.77·d/amax))
with vmax = 8 m/s, vz,max = 5 m/s and amax = 4 m/s². Transitions are timed to land on a section boundary, or to leave on the downbeat of a drop. Calm tracks get fewer, longer moves because the limits, not the music, set the pace.
What the proof doesn’t cover, and is checked numerically instead:
The generator is not trusted. The whole show is re-sampled at 20 Hz, and for every frame the checker finds all pairwise distances (spatial hash), finite-difference speed, vertical speed, acceleration and geofence. A second, separate implementation runs in Python on the exported positions: SciPy cKDTree pair queries plus NumPy differences. Both have to agree before a show is called clean.
| Track, 200 drones | min sep. (≥ 2.0 m) | speed (≤ 8) | vertical (≤ 5) | accel. (≤ 4) | geofence |
|---|---|---|---|---|---|
| Ravenfall · 67 s | 2.13 m | 6.7 m/s | 4.6 m/s | 3.0 m/s² | 0 exits |
| Still Water · 83 s | 2.15 m | 7.4 m/s | 4.5 m/s | 2.9 m/s² | 0 exits |
| Ignition · 101 s | 2.12 m | 7.0 m/s | 4.3 m/s | 3.2 m/s² | 0 exits |
| Undertow · 89 s | 2.16 m | 7.2 m/s | 4.6 m/s | 3.1 m/s² | 0 exits |
Python checker at 20 Hz on the shows generated by this page. The same pass at 50 and 300 drones: 12 of 12 shows clean.
Live mode never plans a path in the air. Before the show, a library of set pieces is built, and every ordered pair of them is checked, along with the crowd-swell overlay on each. Live sound, crowd and cue words only choose which set piece runs and when.
The live analyser polls a 2048-point FFT at a fixed 50 Hz, independent of frame rate. It computes the same flux onset as above, a running autocorrelation tempo, an adaptive beat threshold, and a drop detector: a sharp jump in loudness after a quieter stretch.
Music: four original tracks synthesized by a script for this demo, released CC0. three.js (MIT) for rendering.