where's the beat?

7. audio visualization

Contents

On a projection screen, a circle can swell with the bass, turn once per beat, or disappear on the first beat of a breakdown. The first effect needs a measure of the bass level. To turn at a steady rate through a missing kick, the second needs a beat clock. To time the cut, the third needs to know where the bar begins and what is changing in the music. A waveform or a spectrum display can simply draw what it hears. audioMotion-analyzer is an open-source example of a browser spectrum display. [2, 39]

Mapping sound to motion

A simple mapping gives a visual property to a measured feature. For example, let the bass level set a circle’s radius and the hi-hats set its line width. projectM and its browser counterpart Butterchurn expose bass, midrange, and treble levels to MilkDrop-style animations. Averaging several readings smooths out jitter, at the cost of a slower response to a sharp hit. Meyda supplies browser measurements such as RMS and spectral centroid, the average frequency weighted by strength, often used as a measure of brightness. [40, 41]

Aguilera and colleagues built a system for EDM that follows how energy shifts between frequency bands. Rules track whether the music has entered or left a break. In their 3D animation work they link quick movements to the rhythm and describe using a section change to switch scenes or move the camera. [42, 43]

Where the clock comes from

With a loaded file, an app can analyze the track before the set and schedule its cuts against playback. Essentia’s RhythmExtractor2013 uses statistics from the whole recording to place beats. A DJ setup may already have a clock. Ableton Link shares tempo and phase between applications, Traktor lets a performer realign the downbeat, and Beat Link Trigger can read prepared phrase information from compatible equipment. With only a live audio feed, a tracker such as BTrack has to estimate the clock from what has played so far. [15, 44, 45, 46, 47]

When the audience sees it

The app may hear system audio through Windows loopback capture, which records what is being played through an output device, or through a browser share that includes audio. The sample time of a kick, the moment its beat is reported, and the moment a projector shows the flash are three different times. In a browser, Web Audio’s getOutputTimestamp() connects the audio output clock to the clock used for drawing. A screen refreshing 60 times per second has a new frame about every 16.7 ms. To measure the final offset, record a test click and its matching flash together and compare when each actually arrives. [16, 48, 49]