The SID Music Workshop is built around the way classic C64 music players actually worked: a composition is not only a stream of notes. It is three note streams interpreted by a small, fast program that rewrites SID registers on every display refresh.
The MOS 6581/8580 exposes three independent voices. Each voice has a 16-bit frequency, 12-bit pulse width, control bits for gate/sync/ring modulation/test and four waveforms, plus a four-stage ADSR envelope. The voices can be routed through one shared multimode filter with 11-bit cutoff and four-bit resonance. The final register selects additive low-, band- and high-pass outputs and the four-bit master volume.
The oscillator equation is Fout = Fn × Fclk / 16777216. That makes PAL and NTSC frequency words different, which is why the workshop stores musical notes but shows clock-specific register values. The original datasheet also explicitly encourages changing oscillator frequency, pulse width and filter cutoff in real time—the key to expressive SID instruments.
Primary hardware references:
In a 1986 interview, Hubbard described software-defined programmable patches and a sequencer that could switch a voice from a bass sound to percussion a semiquaver later. He arranged the music so that many parts appeared to overlap while never requiring more than three simultaneous notes.
His player generated modulation in software instead of sacrificing a SID voice as an LFO. Delayed vibrato could combine with pitch bend, and a note could begin as noise before changing quickly to another waveform. The important principle is that a patch remains active after gate-on: the player's per-refresh work is part of the instrument.
Primary source: Rob Hubbard, Electronics & Music Maker, April 1986, pp. 80–82
Galway described making sure all three channels were active and using fast arpeggios, chorusing and echoes to imply more material. He also emphasized changing a note's properties after it had begun, enabling bends and evolving timbres.
His published 1987 Wizball source makes that concrete. It contains three music-stream interpreters, compact commands for calls, loops, transposition, patch loading and direct parameter changes, and separate structures for:
The score data freely switches patches and modulation structures inside a voice. This is closer to automation plus a tracker than to a static MIDI instrument.
Primary sources:
The workshop deliberately includes:
$D400–$D418 register view;SIDM_INIT once and SIDM_TICK at the machine refresh rate.The starter arrangement is original. It demonstrates the methods without copying melodies or data from commercial C64 music.
The browser preview uses generated wave buffers, a SID-style noise shift register, exact published ADSR time choices, per-tick pitch/wave/pulse changes, and different filter/saturation curves for the two chip families. This is deliberately a musical workbench preview, not a cycle-exact electrical simulation. Real 6581 filter curves vary between physical chips.
The exported crustyBASIC player is the hardware path: it uses the target's SID.FREQ, SID.ADSR, SID.CTRL, SID.PULSE_WIDTH, SID.GATE_*, SID.FILTER and SID.MASTER_VOLUME APIs. Its generated source is compiler-checked as part of development.