ADSR envelope

aliases ADSR, envelope, attack decay sustain release
sources SID-Wizard 1.8 User Manual (summary) · 0 3 7 lab — techniques & theory (summary) · Little Sound Dj v9.2.6 Operating Manual (summary) · GoatTracker v2.72 readme (summary) · Creating Chiptunes with SID-Wizard, Second Edition (summary) · Composing in SID Factory II, Part 4 — Instruments (Chordian) · Lemon64 threads: SID and ADSR re-triggering? (2008) / Hard restart – what's the story? (2015) · Pan Docs — Audio Overview · Pan Docs — Audio Registers · Pan Docs — Audio Details · Intense Tech #18 — ADSR Makes Life Easier! (Defense Mechanism) · chipmusic.org — LSDJ FAQ thread (2010–2011) · Getting started with LSDj with Infu (course) · MOS 6581 Sound Interface Device (SID) datasheet — the text behind Appendix O · C64 Programmer's Reference Guide, ch. 4 — Programming Sound and Music on Your Commodore 64 (1982) · Charts and Tables for SID-Wizard 1.6 (document version 1.0, 2014) · Intense Tech #14 — Let's Appreciate Version 8 (Defense Mechanism) · Intense Tech #15 — Let's Mix It Up (and Down) (Defense Mechanism) · Intense Tech #21 — What's New in LSDj v9.2 (Defense Mechanism) · Furnace tracker — C64 (SID) system and instrument documentation · uCApps MIDIbox SID — Wavetable Sounds Tutorial #1 (Thorsten Klose) · chipmusic.org — What are the typical C64/SID sounds/instruments? (2015) · The SID Homepage — Interview with Bob Yannes (Andreas Varga, August 1996) · Remix64 — An Interview with Martin Galway (Neil Carr, 2001) · The SID Homepage — The creation of the SID chip (Christer Rindeblad) · realdmx: Johannes Bjerregaard's own player — the James Bond 3 demo (a Maniacs of Noise commission) and Myth · realdmx: Jonathan Dunn's Daley Thompson '88 and Ocean Loader 5 in Paul Hughes's Ocean music driver · realdmx: Rob Hubbard's driver — McSweeney's Monty on the Run disassembly and the Commando title · realdmx: two scene players with their own sources — Francois Prijt's Audial Arts 'zong player' v1/v2 (1991) and Adam Bulka's FAME 'Sound Routine f 4.1.0' (1988) · SIDin #7 — Inside Modules: Ivan Del Duca's music engine (Stefano Tognon, 2005) · SIDin #7 — xxlarge: Ninja's 256-byte cover of 'X large' analysed (Stefano Tognon, 2005) · SIDin #8 — Tiny Sid Compo, the 512-byte entries (Stefano Tognon, 2005) · SIDin #9 — Tiny Sid Compo, the 256-byte entries (Stefano Tognon, 2006) · SIDin #9 — Catweasel Mk4 follow-up: driver, hardware buffer, two 6581s and the filter (Stefano Tognon, 2006) · DUET research: SID-Wizard player.asm deep dive (summary) · DUET research: SID-Wizard 1.97 formats and player (summary) · defMONing 102: extended field guide (iLKke et al.) · defMONing 101: A defMON Operator Field Guide (iLKke, 2013) · defMON wiki — features, interface overview, seqED key map · chipmusic.org — the defMON megathread (2014–2026) · The CheeseCutter Guide — the recovered site manual (Wayback) · SIDin #13 — Inside JITT64: the player routine (Stefano Tognon, 2010) · SIDin #2 — David Whittaker's Lazy Jones music routine (Stefano Tognon, 2002) · Remix64 — An Interview with Anders Carlsson aka GOTO80 (Neil Carr, 2002)
created 2026-08-30 · updated 2026-08-31

Attack · Decay · Sustain · Release: the volume contour of a note. On the sid it is hardware — two registers per voice (attack/decay, sustain/release, one nybble each), started by the gate bit and released when the gate clears (source: s-sid-wizard-manual). Sample trackers implement it in software as instrument envelopes; the game-boy-apu has only a one-direction hardware ramp per channel (see In LSDj).

How the SID envelope behaves#

valueattackdecay / release
02 ms6 ms
18 ms24 ms
216 ms48 ms
324 ms72 ms
438 ms114 ms
556 ms168 ms
668 ms204 ms
780 ms240 ms
8100 ms300 ms
9250 ms750 ms
A500 ms1.5 s
B800 ms2.4 s
C1 s3 s
D3 s9 s
E5 s15 s
F8 s24 s
  • What the times mean: attack is the time from zero to peak; decay and release times are quoted "from peak amplitude to zero", so a decay that only has to fall to a high sustain level ends sooner than the table says; release uses the decay rates; sustain is a level in 16 linear steps — 8 holds "one-half the peak amplitude", F the peak, 0 silence (source: s-mos-6581-datasheet). Register layout: attack is the high nybble of the first register (value = attack × 16 + decay), sustain the high nybble of the second (sustain × 16 + release) — in BASIC POKE S+5,88 is attack 5, decay 8 (source: s-c64-prg-chapter-4-sound).
  • The documented behaviour: "The cycling of the Envelope Generator can be altered at any point via the Gate bit … if the Gate bit is reset before the envelope has finished the ATTACK cycle, the RELEASE cycle will immediately begin, starting from whatever amplitude had been reached. If the envelope is then Gated again (before the RELEASE cycle has reached zero amplitude), another ATTACK cycle will begin, starting from whatever amplitude had been reached" — "complex amplitude envelopes via realtime software control" (source: s-mos-6581-datasheet). The envelope bug below is where the chip departs from this promise.
  • Note-off wins: the chip "drops everything it's doing when a note gates off and immediately starts fading it out, regardless of what volume level the attack or decay timers had actually reached" — with long attacks and short notes "the notes never really get started" (source: s-chordian-sf2-instruments).
  • All-zero ADSR gives "just a very short click" (source: s-goattracker-readme).
  • The envelope bug: re-gating while the envelope sits at maximum volume "will result in silence and lockup that lasts until the gatebit gets cleared again"; at least two frames of gate-off are needed, and the test bit does not help because it "doesn't affect the envelope generator at all" (source: s-lemon64-hard-restart-threads). This is why hard-restart exists. The designer's 1996 account of the envelope generator (below) describes the design, not this lock-up. The 8580 has "maybe more predictable ADSR envelope-handling" than the 6581 (source: s-witchmaster-creating-chiptunes-with-sid-wizard).
  • Sustain can only be lowered mid-note: from Furnace's sustain-macro documentation — "if you modify sustain level when envelope is in sustain phase it immediately changes, although you can only go down. for example, 9-to-8 and 8-to-8 both work, but 8-to-9 immediately mutes the channel"; attack, decay and release changes take effect at once in their own phase (source: s-furnace-c64-docs). The mechanism is in the designer's account below: the counter "would not count UP if the Sustain level were set higher" (source: s-sidmusic-yannes-interview).
  • The gate delay, measured from outside: on a MIDIbox SID a re-gated note's envelope started "up to ca. 30mS" late — the first 20 ms frame of a drum was inaudible — unless the release rate was 0; Dag Lem's reSID models it (source: s-ucapps-wavetable-sounds-tutorial-1); see hard-restart.

A composer's summary of the same bug, twenty years into using the chip — goto80 in 2002, asked what he dislikes about the SID: "I don't like the envelope-bugs — that the trigging of the sound, the attack, fucks up now and then (which hardrestarts kinda solves)" (source: s-remix64-goto80-interview).

How the silicon does it (Yannes, 1996)#

bob-yannes's own description of the envelope generator, from his 1996 e-mail interview with andreas-varga (source: s-sidmusic-yannes-interview for every quotation in this section unless noted otherwise):

  • A counter: the envelope generator "was simply an 8-bit up/down counter which, when triggered by the Gate bit, counted from 0 to 255 at the Attack rate, from 255 down to the programmed Sustain value at the Decay rate, remained at the Sustain value until the Gate bit was cleared then counted down from the Sustain value to 0 at the Release rate."
  • Rates: "A programmable frequency divider was used to set the various rates (unfortunately I don't remember how many bits the divider was, either 12 or 16 bits). A small look-up table translated the 16 register-programmable values to the appropriate number to load into the frequency divider." Four bits per stage was a silicon compromise, "allowing the ADSR to be defined in two bytes instead of eight".
  • Why Table 2 looks arbitrary: "The actual numbers in the look-up table were arrived at subjectively by setting up typical patches on a Sequential Circuits Pro-1 and measuring the envelope times by ear (which is why the available rates seem strange)!" — the 2 / 8 / 16 / 24 / 38 ms … steps above are ear-measured synthesizer patches, not a formula.
  • Exponential decay and release, linear attack: "another look-up table on the output of the Envelope Generator would sequentially divide the clock to the Envelope Generator by two at specific counts in the Decay and Release cycles. This created a piece-wise linear approximation of an exponential … The Attack, however, was linear, but this sounded fine." — the datasheet's "exponential response".
  • Sustain: "A digital comparator was used for the Sustain function. The upper four bits of the Up/Down counter were compared to the programmed Sustain value and would stop the clock to the Envelope Generator when the counter counted down to the Sustain value. This created 16 linearly spaced sustain levels … sustain levels were adjustable in steps of 16."
  • Sustain only tracks downward: "the SID Envelope Generator would track the Sustain level if it was changed to a lower value during the Sustain portion of the envelope, however, it would not count UP if the Sustain level were set higher." — the reason behind the Furnace observation above (9-to-8 works, 8-to-9 mutes) and the limit on per-note sustain overrides such as SID-Wizard's $5x.
  • Amplitude: the 8-bit envelope output goes to the multiplying D/A "to modulate the amplitude of the selected Oscillator Waveform (to be technically accurate, actually the waveform was modulating the output of the Envelope Generator, but the result is the same)".
  • What the interview does not explain: the re-gating lock-up that hard-restart works around. Yannes describes the design, not the bug; the nearest statements are the sustain comparator stopping the clock only "when the counter counted down to the Sustain value" and the counter that "would not count UP". Do not cite the interview as the cause of the bug.
  • The composer's side of the same bug, before hard restart existed: martin-galway found that "Certain ADSR settings totally screw up and play too early – as I recalled it was with long attacks and long decays. The key-on/key-off circuitry had a problem, evidently. I called it the school band effect" and "simply had to stay away from certain ADSR settings" (source: s-remix64-galway-interview).
  • Christer Rindeblad's column credits the SID's "independent envelope-generator" with letting it "imitate an instrument more correct than other chips" (source: s-sidmusic-creation-of-the-sid-chip).

Worked examples#

  • The official presets (A D S R nybbles). Datasheet Appendix B: strings, brass and woodwind A 8 A 9 (500 ms attack, 300 ms decay to level 10, 750 ms release); drums, cymbals, gongs 0 9 0 9 — "decays to zero amplitude after the peak is reached, regardless of when GATE is cleared"; piano and harpsichord 0 9 0 0 — decays slowly while the key is held and drops "immediately" on release; organ 0 0 F 0; "backwards" A 0 F 3 — slow attack, quick stop, "very much like an instrument that has been recorded on tape then played backwards"; "the real power of SID lies in the ability to create original sounds rather than simulations" (source: s-mos-6581-datasheet). The Programmer's Reference Guide's chapter 4: violin 5 8 5 9 on sawtooth, xylophone 0 9 0 9 on triangle, piano 0 9 0 0 on a square wave, and 9 0 F 3 for a sound "unique to the music synthesizer itself" (source: s-c64-prg-chapter-4-sound).
  • GoatTracker readme: 09/00 "starts from full volume right away and fades to silence automatically" (longer decay = longer fade); 00/8A "goes very fast from full volume to sustain level 8", then release A after key-off; CC/AF rises slowly to maximum, decays slowly to sustain A, fades "very slowly" (source: s-goattracker-readme).
  • Chordian: 04 69 instant attack, a small decay bump down to level 6, long release 9; 00 a0 everything instant at a louder level A; 9b 2a slow fade-in, slower decay to a quiet 2, slow release (source: s-chordian-sf2-instruments).
  • SID-Wizard book: the Bazz bass uses 089A, its snare decay D, sustain E, release 9 ("the release parameter makes the biggest difference"), the arpeggio attack 8, release B (instrument-design).
  • From a register dump: rob-hubbard's Auf Wiedersehen Monty bass drum runs on 08F8 — attack 0, decay 8, sustain F, release 8 — with the gate released on its fourth frame so that the release does the fade (wavetable-programming; source: s-ucapps-wavetable-sounds-tutorial-1). A cover-band description of the classic lead: synth leads "start loud and sustains at about 80% of the volume" for "a nice guitar/piano like attack" — roughly sustain $C (source: s-chipmusic-typical-sid-sounds; the nybble is a derived value).

In SID-Wizard#

  • Instrument setting ADSR; if Sustain = 8, MIDI velocity control is enabled.
  • ADHR: a second ADSR value applied during hard-restart.
  • Per-note overrides: effect-column small effects $2x (attack) and $3x (decay); instrument-column $5x (sustain level = note volume) and $6x (release time); big effects $05 (attack/decay register) and $06 (sustain/release register). Only one ADSR small effect per note unless you use the Extra player.
  • Note-off (RETURN) clears the gate and starts the release; Shift+RETURN writes a note-on ++ that retriggers the gate keeping slide and pulse; $3F in the instrument column ties the next note without retriggering the envelope (legato).

(sources: s-sid-wizard-manual, s-witchmaster-creating-chiptunes-with-sid-wizard)

Write order at note start (SW 1.97 player.asm)#

From m64's duet research (player.asm 1085–1141, 2011–2051; source: s-duet-research-sidwizard-deep):

  • At note start (tick 2) the player writes SR first, then AD; the hard-restart ADSR is written on the one or two frames before that, per the instrument's HR timer. The ADSR write is skipped entirely for legato, portamento and note-FX rows — a tied note keeps its running envelope.
  • The per-frame register write-out is deliberately ordered — SR, AD, frequency, pulse, then waveform — "keeping distance" between the ADSR writes and the waveform (gate) write for reliable note starts.
  • Gate-on ($7D in the note column) sets only the gate bit: the envelope re-attacks from its current level — nothing else (pitch, tables, ADSR) is touched.
  • Small-FX $2x/$3x/$5x/$6x merge one nibble with the instrument's ADSR bytes and write the register directly; big-FX $05/$06 write the raw byte. Either way the ghost the next note start uses is the instrument's own — pattern ADSR tweaks last one note.

In GoatTracker#

Attack/Decay and Sustain/Release are the first two instrument parameters (0 fastest, F slowest; sustain 0 silent, F loudest); 5XY/6XY set the registers from the pattern; --- is key off and +++ key on, ANDed with the wavetable's gate bit; the gate-off tick before a note is set by the HR/Gate timer (source: s-goattracker-readme).

In Furnace#

Instrument fields Attack/Decay/Sustain/Release 0–15; pattern effects 20xy (attack/decay) and 21xy (sustain/release), with 1E0y1E3y as older compatibility forms; one macro per nybble, applied per tick; and the pre-note Hard reset envelope in the chip configuration (furnace; source: s-furnace-c64-docs).

In defMON#

defMON has no instruments, so the envelope is simply two columns of the sidTAB — AD and SR — written on whichever table row you want them, beside the waveform and gate columns (sources: s-defmon-wiki-manual, s-defmon-wiki-defmoning-101). Its field guide states the register semantics in the words a beginner needs (source: s-defmon-wiki-defmoning-102):

  • Attack $0 is the quickest and $F the slowest rise to maximum; Decay likewise for the fall to sustain; Sustain is a level, not a time — "$0 is silence and $F is the loudest = the VOLUME (not the time)"; Release $0$F falls to zero.
  • Release can begin mid-attack: with a slow attack "the Release will start falling from whatever volume the ADSR had reached".
  • Gate and envelope are separable. A typical row is WG WG AD SR = 10 01 11 FA (triangle, gate on, ADSR $11FA), and a later row with 00 in the second WG column releases the note — but "the envelope will continue as programmed (in the AD SR column) even if you turn the gate bit off in the second WG column". The two WG columns are ORed before the write, so $55 can be typed 5401 or 5005 (source: s-chipmusic-defmon-thread).
  • The test bit (+8 with gate 0, +9 with gate 1) is not an envelope control: it "resets the oscillator that produces the waveform, and that is completely independent of the volume envelope generation" (frantic; source: s-chipmusic-defmon-thread).
  • Practitioners' notes from the same thread: sustain $F "is especially buggy (try E then?)", and a soft restart wants a release of $8 or more — the hard-restart page carries the full set of ADHR values.

In CheeseCutter#

CheeseCutter is unusual in letting a pattern set one envelope parameter at a time: sequence-command values A0–AF, B0–BF, C0–CF and D0–DF set attack, decay, sustain and release for the current note, while command-table entry 4 sets a whole ADSR. In the instrument, bytes A/B are the ADSR and byte C's high nibble picks how the gate is dropped before the next note — 0x note restart (gate off 3 frames before, waveform cleared 1 frame before), 4x soft restart (gate off 2 frames before, "usually works best (least buggy) with big (>= 8) release values"), 8x regular hard restart (gate off plus the hard-restart ADSR 2 frames before) and Ax the "Laxity restart", like 8x but "the AD part of the volume envelope is not touched"; the hard-restart ADSR itself is the first command-table row's two value bytes, 0F 00 by default (source: s-cheesecutter-guide; hard-restart).

In LSDj#

Pulse and noise instruments use ENV. — up to three amplitude/speed pairs (32/AD/10: rise from 3 to A at speed 2, decay to 1 at speed D, hold; speed 1 fastest, F slowest, 0 hold); the Exy command overrides amplitude x and release y (1–7 decrease, 9–F increase) per note, and the table envelope column draws arbitrary contours. Wave instruments only have four volume steps (0/25/50/100 %, E00E03) (source: s-lsdj-manual).

The hardware behind it (sources: s-pandocs-audio-overview, s-pandocs-audio-registers, s-pandocs-audio-details): CH1, CH2 and CH4 have a one-direction volume ramp, not an ADSR — NRx2 holds the initial volume (0–F, 16 steps), a direction bit and a pace of 1–7 ticks of 1/64 s per step (0 = no envelope); the slope cannot be set beyond that pace, and the envelope reaching 0 does not switch the channel off. A new NRx2 value only takes effect after a retrigger, and writing $00–$07 (initial volume 0, decreasing) switches the channel's DAC off with an audible pop — silence should be $08 (volume 0, DAC on) followed by a retrigger. The wave channel has no envelope at all, only the four NR32 levels. Anything with more than one stage — LSDj's three-pair ENV, the table envelope column, a speed above 7 — is therefore software rewriting the register tick by tick (inference from the two sources). Pan Docs also documents the "zombie mode": writing $08 to NRx2 while a channel plays raises its volume by one step on every model tested (15 writes = one step down), a manual volume control that drivers use.

LSDj's ADSR (8.1.0) and software volume (8.8.0) (source: s-intense-tech-18-adsr-makes-life-easier): the old envelope and the E command are one pair — initial volume 0–F, then 1–7 decrease (1 fastest, 7 slowest), 9–F increase (9 slowest, F fastest), 0/8 hold. The ADSR introduced in 8.1.0 chains such pairs: each stage is a volume and a length to hold it, the next stage decides whether the volume rises or falls to it, and the third stage fades to zero. 54/00/--: start at 5, decay at speed 4 to silence. 03/A2/71: from 0 quickly up (3) to A, down (2) to 7, fade (1). 74/07/43: start at 7, decay (4) to 0, rise slowly (7) to 4, fade (3). Until 8.8.0 pulse and noise volume was the hardware envelope, and every change reset the channel's sound with a click (and a momentary tone change on noise) — the write-then-retrigger behaviour of NRx2 described above; since 8.8.0 a software volume rewrites it click-free, the table volume column no longer clicks and K no longer clicks. Software speeds are finer: 1 extremely short, F a little longer than the old 7; best correspondence software → hardware: 00, 61, 82, 93, A4, B5, C67 — five speeds faster than the fastest hardware envelope, three slower; length 0 holds forever. A length of 1 in stage 2 or 3 is an instant decay; hi-hat and snare transients (6 down to 4, then fade) can last less than a tick at slow tempos, which a table cannot do. R changes the volume per retrig, so ADSR plus R makes a tremolo. Caveat: the BGB emulator has no software envelope in Game Boy mode — run it as Game Boy Color.

Version 8's ADSR, as the version-8 tour describes it (source: s-intense-tech-14-lets-appreciate-version-8): three stages of two digits — the first 0–F a volume, the second 0–7 a duration, 0 holding that volume indefinitely. 51/00 behaves like the old envelope 51 (start at 5, decay quickly to 0); 24/67/32 starts at 2, rises fairly quickly to 6, decays more slowly to 3, then fades quickly to 0. RFx (retrig with falling volume) on top of an ADSR acts like a tremolo; E commands and the table volume column are unchanged and override the ADSR. The 0–7 duration range is the hardware envelope's pace; from 8.8.0 the software volume widened it to 1–F as described above. The mixing article reads the ADSR as "chaining E commands together" — a stage's second digit opens the next stage — with one advantage over a rising E: a fade-in can stop at a chosen lower maximum instead of climbing to F or to the next E; and in any version a table's volume column can mimic an ADSR at the price of a table (source: s-intense-tech-15-lets-mix-it-up-and-down). LSDj 9.2 adds an ENV visualiser for pulse and noise instruments and A,A tooltips on parameters; because 9.2 generates its envelopes in a new way, only the current BGB (1.5.9 or later), SameBoy, Gambatte and Emulicious reproduce pulse and noise volumes correctly — other emulators show "funny volume behavior" (source: s-intense-tech-21-whats-new-in-lsdj-92).

Two corroborations: nitro2k01 explained the click in 2011 as a hardware limit — changing the volume restarts the waveform's phase (source: s-chipmusic-lsdj-faq); and Infu's course teaches ENV as level + speed-to-next-level pairs with 0 = hold, 88/00/-- the default, 07/88/-- a fade-in and 18/C5/0- a rise from 1 to C at speed 8 then a fall to 0 at speed 5 — noting that the envelope was "previously and confusingly called 'ADSR'" in older versions (source: s-infu-getting-started-with-lsdj).

Envelope as sound design#

037-lab's advice: a lot of "chiptune magic" is envelope + waveform recipes — a fast attack with a short decay for plucks, a fast pitch drop for kicks, a few frames of noise before the tone for snares (source: s-037-lab). See instrument-design.

In sample trackers#

Impulse Tracker and FastTracker draw the envelope per instrument as nodes over ticks, with sustain loops — see instrument-envelopes.

Envelope tricks in the 1980s drivers#

  • A second sustain level in software (bjerregaard-player, 1989): after N frames the gate is dropped and re-raised in the same frame with AD = $00 and a new sustain nibble, so the SID re-attacks instantly to a lower (or higher) level; a separate timer then releases the gate regardless of note length ("2ND SUSTAIN", "AUTO SUSTAIN DELAY", "RELEASE TRIGGER" in the source's change log) (source: s-realdmx-bjerregaard-player).
  • Gate time as an instrument parameter: Ocean's 5-byte patches hold the gate on for N frames after note-on or release it N frames before the next note (GAP), with a second control byte for the release — a patch like $01,$00,$88,2,$42 gates no waveform and sounds only in release; almost all of Dunn's patches have AD $00 (source: s-realdmx-ocean-dunn-hughes-driver). FAME and Audial Arts do the same with a gate length in ticks or frames (source: s-realdmx-audial-arts-fame-players).
  • The whole envelope, once, for the whole tune (Whittaker's Lazy Jones, 1984): setAD writes AD $66 to both voices at init and sustain/release is never written at all, so it stays $00 — every note is the same fixed-length blip, articulated only by dropping and raising the gate ($20$21) when the note changes. With sustain 0 the envelope is the note length, whatever the step length says (source: s-sidin02-whittaker-lazy-jones; instrument-design).
  • The instant cut: Hubbard's driver ends a note (unless the "no release" bit is set) by clearing the gate and writing $00 to AD and SR — the fastest release rather than the instrument's (source: s-realdmx-hubbard-player).
  • Two SIDin cases (source: s-sidin07-inside-modules, s-sidin07-xxlarge): the modules driver (1988) keeps a control on and a control off byte per instrument and releases with an explicit pattern command ($83); xxlarge (under 256 bytes) writes sustain/release from a table but never attack/decay — "according to Ninja there where no more space to add this features" — so every note attacks at the register's power-on value.

AD and SR as programs (JITT64, 2010)#

Most drivers treat the envelope as two constants per instrument. jitt64's instrument is 5 bytes of hard-restart data (INSTR_HR ticks and flag, the HR ADSR, two HR control bytes) followed by sixteen table pointers, of which the first two are instrAD and instrSR — attack/decay and sustain/release each stepped from their own table per tick, beside the wave, frequency, pulse and filter tables. Patterns can also override them as one-shot commands (AD, SR, key on, key off, and a separate "gate SR"), which are decoded into a bit field and applied on the tick they appear (source: s-sidin13-inside-jitt64; instrument-tables).

Envelopes in the 256/512-byte players (2005)#

The tiny-sid-compo entries show how little of the envelope a tune needs, and that the bug still has to be handled at any size (sources: s-sidin08-tiny-sid-512b, s-sidin09-tiny-sid-256b):

  • AD only, SR = $00 (Frantic's New Kid On The Block, joint winner at 256 bytes): each 3-byte instrument holds an AD byte ($1c,$1b,$cd,$2b,$1a,$00,$ad), a control byte and the note duration, so the decay is the note shape and a silent instrument ($00, S*8) is a whole empty pattern in one byte.
  • SR only (4mat's Empty: $6f,$6f,$95,$ec,$a9,$79,$6e; A Life in Hell's Crue Gurl: $e9 for everything, "no Attack/Decay") — instant attack, the sustain level as the loudness, the release as the tail.
  • One value for both (Laxity's Repeat Me: AD = SR = $55) with the gate dropped at the end of every note — his "sort of hardrestart".
  • Explicit restarts: Laxity's Twone Five writes AD $0f, SR $00, control $00 two frames before each note ends; Crue Gurl drops the gate three frames early, sets the test bit ($08) two frames early and one frame of noise at $ff pitch with SR $e9; Frantic and 4mat write $08/$09 (test bit) before every note; Tognon's Random Ninja needed a $09 restart tick on its drum voice — "otherwise no sound is produced" (hard-restart).

The same articles' hardware footnote: on a catweasel Mk4 card with imprecise register timing, tunes with hard restart played and older ones "without a proper hardrestart" showed volume drop-outs Tognon recognised as the ADSR bug — the bug is where timing errors surface first (source: s-sidin09-catweasel-6581).

hard-restart · instrument-design · sid · instrument-tables · c64-programmers-reference-guide · furnace · bob-yannes · martin-galway

Sources#

s-sid-wizard-manual · s-037-lab · s-lsdj-manual · s-goattracker-readme · s-witchmaster-creating-chiptunes-with-sid-wizard · s-chordian-sf2-instruments · s-lemon64-hard-restart-threads · s-pandocs-audio-overview · s-pandocs-audio-registers · s-pandocs-audio-details · s-intense-tech-18-adsr-makes-life-easier · s-chipmusic-lsdj-faq · s-infu-getting-started-with-lsdj · s-mos-6581-datasheet · s-c64-prg-chapter-4-sound · s-sid-wizard-charts-and-tables · s-intense-tech-14-lets-appreciate-version-8 · s-intense-tech-15-lets-mix-it-up-and-down · s-intense-tech-21-whats-new-in-lsdj-92 · s-furnace-c64-docs · s-ucapps-wavetable-sounds-tutorial-1 · s-chipmusic-typical-sid-sounds · s-sidmusic-yannes-interview · s-remix64-galway-interview · s-sidmusic-creation-of-the-sid-chip · s-realdmx-bjerregaard-player · s-realdmx-ocean-dunn-hughes-driver · s-realdmx-hubbard-player · s-realdmx-audial-arts-fame-players · s-sidin07-inside-modules · s-sidin07-xxlarge · s-sidin08-tiny-sid-512b · s-sidin09-tiny-sid-256b · s-sidin09-catweasel-6581 · s-duet-research-sidwizard-deep · s-duet-research-sidwizard · s-defmon-wiki-defmoning-102 · s-defmon-wiki-defmoning-101 · s-defmon-wiki-manual · s-chipmusic-defmon-thread · s-cheesecutter-guide · s-sidin13-inside-jitt64 · s-sidin02-whittaker-lazy-jones · s-remix64-goto80-interview

source file wiki/concepts/adsr-envelope.md · graph