SERVICE MANUAL SECTION 4 TONE GENERATOR

sideband

A six-operator FM synth, written in C, running in your browser’s audio thread.

MODEL
SIDEBAND
OPERATORS
6
ALGORITHMS
8
VOICES
8

4.1 OUTPUT MONITOR

NO SIGNAL — PRESS START, OR PLAY A KEY

FIG. 4-1 OSCILLOSCOPE 0.125 FS/div · triggered on rising zero crossing
FIG. 4-2 SPECTRUM log frequency · dBFS
OUT PEAK
—
COMPRESSOR
—
LIMITER
—
VOICES
0 / 8
SAMPLE RATE
—

4.2 VOICE

FACTORY VOICES

4.3 ALGORITHM

An algorithm is the wiring between the six operators. Numbered boxes are operators; a box on the bottom line is a carrier (you hear it), a box above feeds its sine into the one below as frequency modulation. OP6 has a feedback loop in every algorithm.

Feedback routes OP6 into itself (the loop with the arrow in every diagram). 0 is a pure sine; 7 approaches a sawtooth.

4.4 OPERATORS

Each operator is a sine oscillator with a level and a four-stage envelope: it rises to L1 at rate R1, moves to L2 at R2, settles on L3 at R3 while the key is held, and falls to L4 at R4 when you let go. Levels step 0.75 dB; rates run from 40 s (0) to 1.5 ms (99) for a full sweep.

4.5 NOTES

WHY C

C is the native language of synth firmware and DSP. The engine in src/sideband.c is freestanding C11: no libc, no libm, no heap. Every buffer is static, so the per-sample loop never allocates and always does a bounded amount of work. Sine comes from a 4096-point table built at start-up from a Taylor series; exp2 and log2 are short polynomials. Every edit you make while a note sounds is smoothed sample by sample, so faders never click. zig cc compiles it to WebAssembly, which runs inside an AudioWorklet, the browser’s real-time audio thread, 128 samples at a time. The page itself only draws and sends messages.

The same C file also compiles natively for the unit tests, and both builds give bit-identical samples for the same patch and notes.

HEARING SAFETY

  • A slow compressor evens out loudness: one note of a factory voice passes almost untouched, while dense chords and extreme patches are pulled down, so turning up for a quiet voice never makes a loud one jump out.
  • A peak limiter holds the synth at or below −3 dBFS.
  • After the volume control, a hard ceiling stops anything above −1 dBFS. Output never reaches 0 dBFS.
  • Volume starts at −12 dB and fades in from silence; it is never stored in a link.
  • Every value in a shared link is checked and clamped, in the page and again in the C engine.
  • ALL NOTES OFF fades every voice out over 5 ms, and pausing lets notes ring out first, so neither cuts a sound mid-wave.
  • The OUT PEAK, COMPRESSOR and LIMITER readouts are measured from the audio thread, not estimated.

PLAYING

  • Two octaves on the computer keyboard: Z–M with S D G H J, and Q–U with 2 3 5 6 7. - and = shift the octave.
  • Or click and touch the keys below. A MIDI keyboard works where the browser offers Web MIDI.
  • Eight voices. A ninth note takes over the oldest voice, released notes first.

COLOPHON

sideband is made in the tradition of 1980s six-operator FM synths and is not affiliated with any manufacturer. Set in IBM Plex, served by Google Fonts. See third-party notices. Built by Ramen Protocol with AI assistance (Claude). MIT licensed.

C3

Audio is off. Press START AUDIO or play a key.