Lesson 5
A whole instrument
Four lessons have each supplied one component. Putting them together takes a paragraph, and then a question arrives that none of the signal processing can answer: what is supposed to happen when you press a second key while the first is still sounding.
The assembly, which is the easy part
An oscillator produces a spectrum. A filter reshapes it. An amplifier sets its level. Envelopes move the filter and the amplifier over time, and an LFO can move anything. In a diagram:
oscillator → filter → amplifier → out, with an envelope on the filter's cutoff and another on the amplifier's gain.
That is a synthesizer. Not a simplified one, not a teaching model: the Minimoog is that, and so is almost every subtractive instrument since. The variations are in how many oscillators feed the filter, what kind of filter it is, how many modulation sources there are and what they are allowed to reach.
The chain above is one note
Here is the part that is easy to miss. Everything described so far can produce exactly one note at a time. An oscillator has one frequency. A filter has one cutoff. An envelope is at one point in its shape. Nothing in that chain has anywhere to put a second simultaneous pitch.
So a chord is not something you do to the chain. A chord is several complete copies of the chain, running at once, summed at the output. One copy is called a voice, and how many you have is what the word polyphony counts.
This is why voice count appears in specifications and why it costs money. Eight-voice polyphony means eight oscillators, eight filters and sixteen envelopes, all running whether or not you are using them. In 1978 that was eight circuit boards. Today it is CPU, but the arithmetic is the same shape.
Everything, plus a table
Keys latch. Set the voices to two, then hold three notes and watch the slots.
Voice slots, oldest first
Slots fill left to right in the order the notes arrived. When they are all busy, the next note has to come from somewhere.
Press play to see the trace
Press a key to start the engine.
What to do when they are all busy
Set the voice count to two and hold three notes. Something has to give, and what the figure does is take the oldest note back: it stops sounding, without you having released it. That is voice stealing, and every polyphonic instrument ever made does some version of it, because the alternative is to ignore the key you just pressed, which feels far worse.
Oldest-first is a policy rather than the truth. The reasonable options each have a cost:
Steal the oldest. The note most likely to be finished with is the one that has been sounding longest. Cheap, predictable, and it will cut off a held pedal tone under a fast melody.
Steal the quietest. Sounds smoothest, because a note already in its release stage is barely there. Needs per-voice level tracking, and can leave a stale note holding a slot for a long time.
Steal the newest. Trivial to implement and genuinely awful to play, because once the instrument is full, nothing you do afterwards makes any sound at all.
Steal by pitch. Protect the lowest note and the bass survives; protect the highest and the melody does. Both are defensible and both are somebody's idea of correct.
Why this lesson is different from the four before it
Nothing above involves any signal processing. There is no filter in a voice allocator and no oscillator: there is a table of what is currently sounding, a rule for choosing a slot, and a rule for what to do when there are none. It is bookkeeping.
That is worth saying plainly, because it is the first place in this course where the interesting behaviour of an instrument comes from a data structure rather than from acoustics. A synthesizer is not only a signal path. It is a signal path plus a policy about scarcity, and the policy is audible.
The figure's keys latch rather than being held, which is not how a keyboard works but is the only way to study this comfortably. Voice stealing is interesting precisely when you are asking for more than you have, and with momentary keys that state lasts exactly as long as your hand does.
Three consequences worth knowing
Monophonic instruments get to be expressive instead. With one voice there is no allocation problem, which frees up decisions: what happens when you play a new note before releasing the old one. Retrigger the envelope, or leave it running and just change the pitch? The second is called legato, and gliding between the two pitches rather than jumping is portamento. Neither idea even makes sense on a polyphonic instrument, because there the second note simply gets its own voice.
Unison spends voices on one note. Stack several voices on the same pitch, detune them slightly, and they beat against each other in the way Foundations lesson 3 describes. That shimmer is the supersaw, and it is expensive: eight voices of unison on a single key means an eight-voice synth is now monophonic.
Release times and voice count are linked. A long release holds a slot after you let go, so a lush pad exhausts a voice pool far faster than a staccato patch. If an instrument mysteriously starts cutting notes, the release setting is usually the culprit rather than the playing.