Interactive C64 SID audio tutorial
Hello! This application provides a built-in 6502 assembler and SID emulator for runnable examples. The SID file is dynamically built from the editor contents, so you can change things and hear the result. We will build a simple sound engine in incremental steps.
Each channel has a control byte which determines its wave type.
76543210
||||||||
|||||||+- Gate
||||||+-- Sync
|||||+--- Ringmod
||||+---- Test
|||+----- Triangle
||+------ Sawtooth
|+------- Pulse
+-------- Noise
These 2 bytes make a 16-bit value which is added to a phase accumulator. The higher the value, the higher the channel's pitch.
Only bits 0-3 of the second (high) byte are used, making a 12-bit value. $800 (the midpoint) is a square wave.
76543210
||||||||
||||++++- Decay
++++----- Attack
76543210
||||||||
||||++++- Release
++++----- Sustain
Only bits 0-3 of the first (low) byte are used, making a 12-bit value.
76543210
||||||||
|||||||+- Voice 1
||||||+-- Voice 2
|||||+--- Voice 3
||||+---- External input
++++----- Resonance
76543210
||||||||
||||++++- Volume
|||+----- Lowpass
||+------ Bandpass
|+------- Highpass
+-------- Mute voice 3
A: xx; X: xx, Y: xx, PC: xxxx, SP: xx, nv--dizc