defMONing 102: extended field guide (iLKke et al.)
The extended, multi-author revision of iLKke's defMONing 101 for defmon — same reference core, plus precise timing semantics (fraMES), the full speed/timer key set, Super Commands, and long practical sections on the adsr-envelope, hard-restart and pulse width. Only the additions beyond 101 are summarized here.
Key claims#
fraMES and the speed column#
- "sidTAB consists of fraMES (smallest section of time in defMON). Each row represents one fraME by default. If you increase DL (step delay) by +1, you put one EMPTY fraME (row) after edited sidTAB step, so it takes 2 fraMES to proceed to another row."
- "Pattern speed column is set to 2 delay steps (DL) by default. This means it takes 2 delayed (3 actual) fraMES to proceed from one pattern row to another." — i.e. speed value N = N+1 ticks per step.
- sidTAB execution model: "SidTAB is running in circle from sidCALL specified in pattern (e.g. 00) to the bottom, to FF position, than back to 00 and so on, unless it reaches position jump (in JP) or STop command (in DL) or another sidCALL." Chunks "are only aesthetic separations."
DLextended:$00–$7Fstep delay in fraMES;$80–$FFinsert a SToP command (execute the row and delay forever); SPACE resets to$00.- Arranger jump syntax:
FF XX YY= jump to positionXXand repeatYYtimes;00inYY= infinite repeat. Patterns$00–$7Fare available.
Speed, BPM and multispeed keys#
- F2 (= SHIFT+F1): BPM reset — "sets speed directly to default value: $4CC7, 1/1". F2/F4/F6/F8 set multispeed timer values
$4CC7/$2663/$1331/$0998(1x/2x/4x/8x — one PAL frame and its halvings; see s-defmon-wiki-sync-and-stereo for the timer formula). - C=+F1 / C=+F2: speed +1 / −1 CPU cycle. C=+F3 / C=+F4: +80 / −80 cycles. C=+F5 / C=+F6: player call ratio 1/1 → 1/8 and back. C=+F7 / C=+F8: speed ×2 / ÷2.
- New navigation: CTRL+G/H/J/K put the cursor at row
$0/$4/$8/$Cof the pattern; "ctrl+GG" (CTRL+G twice) goes to the −1 step (see hard restart below). CTRL+cursor steps 1 step in patterns, 8 in the sidTAB. - New input keys vs 101: C=+X copy row (sidCALLs + note), C=+V paste row; two-sidCall override rule restated: "the rightmost sidTAB overwrites the leftmost" for shared columns.
- DinSYNC (scannerboy interface): CTRL+SHIFT+
>/ CTRL+SHIFT+<= MIDI/DIN-sync delay value up/down.
Super Commands (condensed; see s-defmon-wiki-supercommands)#
- CTRL+
XX(or CTRL+S+XX) set$00–$20steps edited at once; CTRL+R+XXrepeat each operation XX times; CTRL+W+Xwidth0–F(edit every Xth step); CTRL+Z+A "zone all" (all 3 patterns or the whole sidTAB); CTRL+RETURN exit. - Worked example: clone with SHIFT+N/U, CTRL+G twice to step one, hold CTRL and type
S 2 0→ edit-20-steps mode, transpose with>/<, CTRL+RETURN out.S 2 0 R Ctransposes an octave per keypress;Z A S 2 0transposes the whole song ("obviously this is a quite dangerous mode").
ADSR and the gate bit#
- Attack
$0quickest–$Fslowest (rise to max); Decay likewise (fall to sustain); Sustain "$0 is silence and $F is the loudest = the VOLUME (not the time)"; Release$0–$F(fall to zero; can start mid-attack: with a slow attack "the Release will start falling from whatever volume the ADSR is at"). - Two WG columns exist so the waveform is remembered while gating: set waveform + gate on with e.g.
WG WG AD SR=10 01 11 FA(triangle, gate on, ADSR$11FA); later a row with00in the second WG column releases the note — "it allows the waveform to be 'remembered' (in the first WG column) even if you turn the gate bit off in the second WG column." - Gate nibble extras:
+8test-bit/reset with gate 0,+9test-bit/reset with gate 1; sync/ringmod pairing: "based on channel pairing, 1+2, 2+3, 3+1… used in channel 1 means channel 3 modifies channel 1."
Hard restart and the ADSR bug#
- The bug: "sounds failing to trigger properly because the ADSR envelope of the previous sound on the same channel didn't clear yet. Sometimes it will drop a note, sometimes it will make it sound different." Worse when triggering rapidly; depends on ADSR values. You can dodge it without HR (Attack 1 instead of 0, Sustain below
$F) — but HR "still makes the drum sounds punchier." - Two components: resetting the gate bit, and a pre-envelope "ADHR" set up before the sound's real envelope. About 2 frames must pass after the HR line before triggering the sound — hence the DL wait, and the note triggers slightly late; defMON offers several compensations: trigger HRed sounds a line early (defMON has "a line before line 0" — the −1 step), set up the sound the line before and trigger the note later ("goto80 does this"), delay all non-HR sounds equally, or keep HRs as separate sidCalls triggered the line before (iLKke's preference).
- Gate-open alternative for machinegun beats: never close the gate, kill loudness via waveform
0or ultra-thin pulse — "sort of like overcompressing to death, but it sidesteps the use of ADSR completely and thus the ADSR bug as well." - Compiled HR methods (from CSDb and siddump analysis), rows as
DL W G ADSR:- old school:
1 - 0 0000/0 W 1 ADSR+NOTE - new school:
1 - 0 ADHR/0 - 9 ADSR/0 W 1 ----+NOTE - hybrid:
1 - 0 0000/0 - 1 ADSR/0 W - ---- - heatbeat:
0 - 9 ADSR/0 W 1 ----+NOTE… then1 - 0 ----/0 - 9 ----/0 W 1 ----+NOTE
- old school:
- Example ADHR values:
$0000hardest,$0F00most common,$0F18Drax,$0F20GRG,$0FF0Randall/Jammer,$F000Linus,$FF00Jeff. - "Sustain of F is especially buggy (try E then? :)"; "soft restart usually works best with big (>= 8) release values."
- Why the −1 pattern step exists: doing HR without it "requires that the sequence parsing code looks ahead… Such look ahead-parsing adds overhead to the code and consumes CPU that isn't strictly required. Original defMON was intended to be usable in demos/games, with low raster time consumption" (sid-player-routine).
Pulse width#
- "pulSEWIDTH ranges from $000 to $FFF (from 0% to 100%) in value of YXY and is set by XY in PW column. e.g. 83 in PW column sets pulSEWIDTH to 383."
- Closest usable values: 50% square (
$800) → PW$F7($7F7) or$08($808); 75% ($C00) →$FB/$0C; 25% ($400) →$F3/$04. "If pulSEWIDTH is set near to 0% or 100%, the pulse waveform is inaudible." (pulse-width-modulation)
Bit addition#
- WG values are additive:
07= ringmod+sync+gate;50= pulse+triangle ("pulse, and pulse table applied"); "$55 may be written as either 5401 or 5005 (in WGWG columns)."
Practical takeaways#
- Learn the fraME arithmetic: default speed 2 = 3 fraMES per step, and every DL value in the sidTAB is in the same unit — this is what makes defMON sidCalls portable between tempos and multispeed settings.
DL≥$80is the "hold this row forever" idiom — the natural way to end an instrument (sustain state) without looping.- The HR method table plus ADHR list is a ready-made hard-restart recipe book; because defMON has the −1 step, any of the four methods can be typed in directly, per instrument.
- For clean pulse tones remember the
YXYmirroring:$08≈ 50%,$04≈ 25%,$0C≈ 75%.
Notable quotes#
- "Sustain of F is especially buggy (try E then? :)"
- "defMON is designed to implement as little 'built in' functions as possible… That comes at a cost of course (less automation), but the benefit is increased flexibility."
Relevance to the wiki#
The deepest surviving defMON document: exact timing model, the complete speed-key table, and the best practical hard-restart treatment in the whole defMON corpus (methods, ADHR values by artist, compensation strategies). Prime source for defMON subsections on hard-restart, adsr-envelope and pulse-width-modulation.
Pages touched#
defmon, hard-restart, adsr-envelope, multispeed, pulse-width-modulation, ring-modulation-and-sync, sid-player-routine, siddump, frantic, goto80, tracker