The time between two writes to a sound register can be part of the sound. reSID, written by Dag Lem, models the SID chip at the level of its internal clocked operations rather than treating each note as a request for a generic synthesiser sound.
It is a library, not a complete C64 emulator. A surrounding program must supply the processor activity, register writes and other behaviour needed to play a tune. The project’s README identifies integration with VICE and SIDPLAY.
Measure what the chip does
The comments in the envelope implementation describe sampling the SID’s readable envelope output and using linked timers to measure elapsed cycles. They also explain why a rate calculated from the manual’s rounded times may not give the exact observed count.
That makes the implementation useful as a record of investigation. Its measurements, explanations and proposed reasons are not interchangeable: a possible account of a design choice remains a hypothesis even when a measured rate is well supported. (Lem, envelope.cc, rate-counter commentary.)
The hard-restart problem shows why such detail matters. A delayed envelope transition can change the attack of a note. A player that starts a fresh idealised envelope at every note would hide behaviour that musicians had to work around on the physical chip.
Digital timing meets analogue sound
The README also describes modelling the filter as a circuit, alongside the clocked digital parts. Reproducing the register values alone does not describe the entire audible result. Chip revisions and analogue characteristics matter too.
That is why emulator settings distinguish chip models and filter adjustments. VICE’s documentation also distinguishes sampling methods and exposes filter-bias controls. Chip emulation and conversion to the host’s audio sampling rate are related parts of the playback system.
A component in music tools
GoatTracker uses reSID to let a composer hear C64 music while working on another computer. The editor, music player and chip model have different jobs: editing events, executing the playroutine and producing the sound implied by its writes.
Keeping those jobs visible helps explain both the value and the limits of the library. Faithful chip behaviour is one necessary part of reproducing a performance; the surrounding software must also deliver the right work at the right times.
Sources
- Dag Lem, reSID README and AUTHORS: original project description, preserved in the libsidplayfp repository.
- Dag Lem, envelope.cc: implementation and measurement commentary.
- VICE manual, SID settings: the consuming emulator’s chip and engine controls.