Skip to content
Steane Patterns Documentation Open the simulator

Part 4 · Reading results · Chapter 11 · 6 min read

Listening to a shot

Every lit check plays a note and every shot ends in a verdict you can hear. You will be able to say which check made which sound, and what a cluster at the end means.

One check, one note

During playback each round becomes a chord. The notes are the checks that are lit in the row being shown: in the Raw view the checks that fired, in the Detections view the checks that changed. A note here is one tone from the browser's Web Audio oscillator, started by the page when the row appears and fading out within 0.4 seconds.

The pitch comes from the check's column. The six checks of a block, Z1 to Z3 and X1 to X3, are mapped onto the six degrees of a pentatonic scale, a scale of five distinct pitch classes, plus the octave. Block A uses 220 Hz as its base note and block B 440 Hz, one octave higher. The offsets are 0, 2, 4, 7, 9 and 12 semitones.

(11.1)

In words: is the frequency in hertz, the base note of the block (220 Hz for block A, 440 Hz for block B) and the offset in semitones for the check. Twelve semitones double the frequency; so block B sits exactly one octave above block A.

Check to note
CheckSemitonesWaveBlock A, HzBlock B, Hz
Z10triangle220.0440.0
Z22triangle246.9493.9
Z34triangle277.2554.4
X17sine329.6659.3
X29sine370.0740.0
X312sine440.0880.0
Figure 11.1Every check has one fixed pitch and one fixed waveform. Z checks are triangle waves, X checks are sine waves, so you can hear which kind fired.

Why a pentatonic scale, and why quieter rows

Up to twelve checks can fire at once, so every combination must sound acceptable. In the notes of src/js/audio.js, no two notes, within a block or across the two, are 1 or 11 semitones apart. Dense rounds sound busy but not harsh, and the sound thickens as grows.

A row of twelve notes would be much louder than a row of one. The page therefore gives every note in a row the same volume, scaled down by the square root of how many notes there are.

(11.2)

In words: is the gain of each note and the number of fired checks in the row. One note plays at 0.18; four notes at 0.09 each; all twelve at about 0.052 each. Independent tones add in energy, not in amplitude, so this keeps the overall loudness of a row roughly constant.

Audition · nothing plays until you press a play button

Block A
Block B

Pick fired checks, as if they were orange or blue cells in one round, then play the row.

The chord and the cluster

After the last row the page plays the verdict for the shot, using the decoder chosen in the panel (or no decoding). If both logical qubits are right, it plays a major chord: four sine tones at 262 Hz and 0, 4, 7 and 12 semitones above it, at volume 0.08 and for 0.9 seconds. If at least one is wrong, it plays a cluster: four sawtooth tones at offsets 0, 1, 6 and 11, at volume 0.04. Those intervals, a semitone, a tritone and a major seventh, are chosen to clash, and the sawtooth wave is bright and rough. The two verdicts differ in interval, waveform and brightness, not in loudness alone.

What is deliberately silent

A check that did not fire makes no sound, so a quiet round is silence, not a low hum. The decoder's pink rings are silent: sound reports what the hardware showed, not what the decoder believes. The noise events themselves are silent too. Only the lit checks and the final verdict can be heard, and nothing plays until you press Play in the simulator or one of the buttons above. The Sound checkbox in the simulator mutes it again.

Try it in the simulator

Open the simulator, press Play and listen to a few shots at p = 0.03. Notice which rounds are silent, how a pair of detections in consecutive rounds sounds as two repeats of one pitch, and what you hear at the end of a shot whose decoder failed.

Open the simulator with this setup
Check yourself

Which two checks play 440 Hz?

X3 of block A (12 semitones above 220 Hz) and Z1 of block B (0 semitones above 440 Hz).

Why does each note get quieter when more checks fire?

The volume is 0.18 divided by the square root of the number of notes, so a dense row does not become much louder than a sparse one.

What does the cluster tell you?

At least one of the two logical qubits was wrong after decoding with the selected decoder.

Sources

  1. W3C Audio Working Group (2021). Web Audio API, W3C Recommendation, 17 June 2021. www.w3.org/TR/2021/REC-webaudio-20210617/
    Supports: oscillators, waveform types and gain in the browser.
  2. Wikipedia. Pentatonic scale (a general reference, not a primary source). en.wikipedia.org/wiki/Pentatonic_scale
    Supports: the pentatonic scale.
  3. Wikipedia. Equal temperament (a general reference, not a primary source). en.wikipedia.org/wiki/Equal_temperament
    Supports: the semitone ratio of 2^(1/12) behind the frequencies.