Six 4-operator FM channels and the Master System’s PSG, emulated register by register. Pick an algorithm, shape each operator’s envelope, and hear the patch change.
All sound labsGame Boy · NES · Master System · Mega Drive · C64 · SNESFM and PSG mixed, left and right together.
Furnace-style, ten channels: FM 1–6 and PSG 1–4. Click the grid and play the piano keys. Space plays the pattern, Enter the song.
| Row |
|---|
in this pattern · 03 playing now · bar and ×count: plays in the song (blue: among the most used) · faded: never played · struck: makes no sound (hover for why)
Songs taken from games keep each vibrato or slide as a list of pitch offsets (per tick: FM frequency steps (more is higher), PSG period steps (more is lower)); a note picks one, shown as ~NN after its instrument. Shaded: the part that repeats.
OFF), = a note release (===).00xy 01xx 02xx 03xx 04xy | Arpeggio, slides, portamento, vibrato |
08xy 80xx | FM panning (x left, y right; or linear) |
09xx 0Fxx 0Axy FAxy | Speeds, volume slide, fast volume slide |
0Bxx 0Dxx FFxx | Jump, next pattern at row, stop |
10xy | LFO: x on/off, y speed |
11xx 12xx–15xx 16xy | Feedback, operator level, multiplier |
17xx | DAC mode on FM 6 (samples) |
19xx–1Dxx 50xy–5Fxx | Attack, AM, SL, RR, DT, RS, SSG, DR, D2R |
61xx 62xx 63xx | Algorithm, LFO FM and AM depth |
20xy | PSG noise mode |
E1xy E2xy E5xx EAxx ECxx EDxx | Note slides, fine pitch, legato, cut, delay |
Each channel is four operators wired by one of eight algorithms. Carriers (outlined) are heard; modulators bend the carriers’ phase.
The SN76489 inside the VDP: three square waves and noise, written through port $7F.
Register $2B bit 7 turns FM channel 6 into an 8-bit DAC; the CPU (or a stream) then writes samples to $2A.
Keys Z S X D C V… and Q 2 W 3 E R… play two octaves on the chosen channel.
Both YM2612 banks ($000–$0FF through ports $4000/$4001, $100–$1FF through $4002/$4003) and the PSG. Click a byte to edit it; recent writes glow.
Six short steps from one sine wave to a four-operator patch. Each step plays on a chip of its own, so the song and the panels above are not touched.
Each operator is a sine generator with its own envelope. Its phase advances by (fnum × 2^block / 2 + detune) × multiple every chip sample (clock / 144, about 53.3 kHz), so a tone is fnum × 2^(block−1) × clock / 144 / 2^20 Hz. The sine comes from a log-sine table and an exponent table, the way the chip computes it.
An algorithm decides which operators modulate which. Algorithm 0 is a chain of four (one carrier, rich and bright); algorithm 7 is four parallel sines (an organ). Operator 1 can feed back into itself for buzzier tones.
Attack rate, decay rate to the sustain level, a second decay rate while held, and a release rate. Rates are 5-bit (release 4-bit) and speed up with pitch when rate scaling is on. The envelope is stepped every three chip samples; every four rate steps halve the time.
Not emulated: SSG-EG envelope shapes, the timers, the DAC’s 9-bit ladder distortion, and the test register.
A channel’s sound is the sum of its carriers. A carrier on its own is a sine; a modulator feeding it shifts its sine’s phase back and forth at the modulator’s frequency, which bends the wave and adds harmonics. How far it bends depends on the modulator’s level, which harmonics on the ratio of the two frequencies (their multiples), and an envelope on the modulator makes that change over the note. Drawn by the chip, each three cycles of A4: