Signal and Sensation

The Chord Stab

A chord's shimmer is its tuning. In equal temperament the third of a C major is 13.7 cents sharp of 5:4, so the root's fifth harmonic and the third's fourth miss by 10.4 Hz and beat that fast, measured off the sound, swelling 15 dB. In just tuning the same pair sits dead still. A minor third beats faster, and a 250 ms stab still holds two and a half swells of it.

Open fullscreen →

What it is

A garage stab, and the tuning underneath it.

Three organ voices play a C chord, major or minor, and you pick how the chord is tuned. Just tuning puts the third at exactly 5:4 above the root and the fifth at 3:2. Equal temperament, which is every keyboard you have ever played, puts them at 2 to the power 4/12 and 7/12, so the third is 13.7 cents sharp of just and the fifth is 2.0 cents flat. Stab it and the chord hits on every beat at 130 with a 250 ms decay.

The top trace is the chord’s waveform. The strip below is the level at one frequency, the place where the root’s fifth harmonic and the third’s fourth harmonic land on each other. In just tuning that’s one frequency and the strip is a flat line. Tempered, the two partials miss by 10.4 Hz and the strip swells 15 dB ten times a second. That swell is the shimmer every tempered chord has and no just chord does, and this day measures how fast it goes.

The bars at the bottom are every partial of every note, and the lit ones are the places where partials from different notes coincide. Ice means they sit still. Ember means they beat.

How it works

Each voice is a periodic wave of seven drawbar harmonics, 1 through 6 and 8, at the levels a bright Hammond registration would give them. The core renders the same chord as a sum of sines and does the arithmetic on it, and the page renders the real oscillators in an OfflineAudioContext and measures those too, so there are two independent versions of every number.

The coincidences come from the ratios. For an equal tempered C major there are four pairs of partials within 25 Hz of each other, at 784, 1313, 1569 and 1969 Hz, and the arithmetic says they beat at 0.89, 10.38, 1.77 and 17.79 Hz. A 30 ms window watches the level at each one, and the rate the level swells at is read off the sound. It came out at 0.89, 10.39, 1.77 and 17.78 Hz. In just tuning all four pairs are the same frequency to the sixth decimal and the swell at each is 0.0 dB.

Roughness is one number for the whole chord: how much its level flutters in the 15 to 60 Hz band the ear hears as grit rather than as beats, against the mean level, as an RMS. A single sine reads 0.001%. Two equal sines 30 Hz apart read 43%.

The real oscillators agree with the sines to within a tenth in every cell: 10.38 Hz, 15.1 dB of swell and 2.55% roughness for the tempered major, 12.34 Hz, 28.7 dB and 8.43% for the tempered minor, and 0.00 Hz, 0.0 dB and 0.00% for the just major.

What surprised me

The minor chord broke the beat counter, and the way it broke is the finding.

In a major chord the third’s coincidence is a pair, two partials at 1313 Hz. In a minor chord the minor third, the major third above it and the fifth all meet on the same partial, so at 1563 Hz there are three of them: the root’s sixth, the third’s fifth and the fifth’s fourth. Tempered, they beat against each other at three rates at once, 14.1, 12.3 and 1.8 Hz. The beat counter I used for the major chord, the one from day 79 that counts dips through a threshold, read 9.0 Hz, which is a rate nothing in the chord is beating at. The slow 1.8 Hz swell drags the fast beats under the threshold for part of every cycle and the count lands in between. Reading the envelope’s own spectrum instead gives 12.34 Hz with 14.12 behind it, and on the clean pairs of the major chord it agrees with the counter to the second decimal. Three partials also swell 28 dB where two swell 15, because three can nearly cancel where two at different levels cannot.

The roughness number was wrong first time too, and wrong in a way I have hit before in this series. The level envelope was a 4 ms box hopped every 2 ms, and it read 2.4% on a just major chord. A just major chord has nothing to flutter at in that band, every one of its partials is a multiple of 65.4 Hz. The box window let the squared root through at 523 Hz, 27 dB down, and sampling the envelope 500 times a second folded that to 23 Hz, in band. It was aliasing, one layer up from where I normally look for it. It also read 1.1% at two seconds and 0.66% at three for the same chord, because the band was summed in bins 1.5 Hz apart whatever the length of the render. With a Hann window of 8 ms hopped every half millisecond and bins spaced by the render length it reads 0.00% at two, three and four seconds.

With the instrument fixed, the roughness story isn’t the one I expected. A tempered major chord is 2.5% rough and a just one is exactly smooth, so on a major chord everything you hear as grit is temperament. A minor chord is 7.5% rough in just tuning and about 8.3% tempered, the exact figure moving a tenth or two with how long you measure because the 14 Hz beat sits right at the band’s edge. Almost all of its roughness is its own fundamentals, 50 Hz apart, which is inside the roughness band whatever you do to the tuning. The tempered beats at 12 and 14 Hz are too slow to count as roughness. They are shimmer, and they sit on top of a chord that was already rough.

And the stab. I expected a 250 ms decay to hide the beat, and it does not. The tempered third’s swell is 15.1 dB with or without the decay, and a 250 ms stab holds 2.6 of them, so every garage stab you have heard shimmers ten times a second for as long as it lasts.

What I would do next

Move the chord around. This is all at C4, and the beat rates scale with the frequency of the coincidence, so the same chord an octave up beats twice as fast and a stab in the bass barely beats at all. A page that plays the same stab across four octaves and reports the rate at each would say where on the keyboard the shimmer turns into grit.

Then a seventh. A dominant seventh chord in equal temperament has a seventh 31 cents sharp of the 7:4 it stands for, which is the biggest miss in the chord by far, and I want to see what a coincidence that far off looks like in the strip.