defMON wiki — DIN/MIDI/LSDj/Nanoloop sync, stereo SID, manual BPM tables

author defMON wiki; defBPM by FTC (frantic)
date defbpm files dated 2013-03-02; wiki pages undated; fetched 2026-08-30
article DIN/MIDI/LSDj/Nanoloop sync / Stereo SID features / Manual BPM sync (defBPM)
source url https://defmon.vandervecken.com/ (DokuWiki pages `docs:scannerboysync`, `docs:stereo_sid_features`; `docs:defbpm.zip` download)
created 2026-08-30 · updated 2026-08-30

The defmon wiki's hardware pages: Scannerboy's user-port sync adapter (with the assembly code to drive it from your own programs), the 2SID stereo feature set, and frantic's defBPM calculator/tables (2013-03-02) that turn defMON's CPU-cycle timer into exact BPM values.

Key claims#

Scannerboy's sync interface (DIN/MIDI/LSDj/Nanoloop)#

  • The adapter connects to the C64 user port and lets defMON output: lsdj sync signal, Nanoloop sync signal, MIDI clock, DIN sync, and a "clock signal with adjustable resolution from 24ppqn to 2ppqn for Korg Volcas, TE Pocket Operators, Arturia Microbrute, MI Anushri etc". "It should also work with Prophet64."
  • Produced by Scannerboy "a few years ago"; try the defMON thread at chipmusic.org to get one; there is a GitHub repo (mstram/defmon-sync) for the adapter.
  • Driving it from your own code: set the user port to output (lda #$ff / sta $dd03), idle with $00 in $dd01, then use PLAY = bit 2 of $dd01 (1 while music plays) and SYNC = bit 3 (a complete pulse = set bit 3, then clear it): write #%00001100, call your player, then #%00000100; repeat per pulse; $00 to stop. "If I remember correctly, six pulses correspond to one step in the tracker sequence."
  • (Editor-side keys, delay parameter and the 6-ticks-per-2-steps speed rule are in the 2014-11-08 release notes — see s-defmon-wiki-releases: sync runs from F1/F3 to F7, delay $00–… via CTRL+SHIFT+DOT/COMMA, $04 recommended, goto80 used $05 against a TR-808; keep speed 2 per step or alternate 4 and 2 — a constraint that also rules how shuffle can be set up under sync.)

Stereo SID features (2SID)#

  • A separate seqLIST for the second SID — different sequences can play on SID 2. CTRL+ (the back-arrow key, not cursor) switches between the two seqLISTs; this only works after enabling stereo mode with CTRL+SHIFT+ (mono is the startup default; same combo toggles back).
  • Second-SID base address: shown in the status bar when stereo mode is on. CTRL+SHIFT+UPARROW toggles between $D4xx, $D5xx, $DExx and $DFxx; CTRL+C=+UPARROW steps the low byte in $20 increments ($00, $20, $40, $60, …). Warning: "If the base address for the second SID is not correctly set up and you start playing the tune, RAM may be corrupted and the program might even crash."
  • TLR's sid-detect2.prg (downloadable from the page) scans the machine for SID chips if you don't know your address.
  • The stereo config (mono/stereo + SID 2 base address) is saved in the worktune file. Caveat for tunes made before 2014-06-15: they may load as stereo unintentionally — toggle back to mono and re-save.
  • Limits: "There is currently no way of exporting/packing stereo tunes from defMON. Only the data for SID #1 will be included"; raster time for the two SIDs is shown in separate colors, and channel on/off toggling works for SID 2, both since version 2014-06-15.

defBPM: manual BPM sync tables (FTC, 2013-03-02)#

  • The zip contains bpm.html — a JavaScript "Commodore C64 BPM calc" — and BPM.xls/BPM.htm, a spreadsheet export of the same math as a lookup table.
  • The formula (from bpm.html): BPM = 60 × (clock / (timer + 1)) / (speed × steps-per-beat), with clock = 985248 Hz (PAL; NTSC = 1022727), and the inverse timer = clock / ((BPM/60) × speed × steps-per-beat) − 1. Defaults: timer $4CC7, speed 3, steps per beat 8.
  • This documents what defMON's timer is: the player is driven by a CPU-cycle countdown, and $4CC7 + 1 = 19656 cycles = exactly one PAL frame (hence the multispeed presets $4CC7/$2663/$1331/$0998 for 1x/2x/4x/8x in s-defmon-wiki-defmoning-102, and the ±1/±80-cycle and ×2/÷2 speed keys). Default tune tempo works out to ≈125.3 BPM at 3 ticks per step, 8 steps per beat.
  • The spreadsheet table: one row per BPM from 50 to 348, columns for 2, 3 and 4 ticks per sequence step, each cell the hex timer value for that BPM (Clockfreq 985248, StepsPerBeat 8 noted beside the table). E.g. BPM 50 at 2 ticks/step → $120A4; BPM 60 at 3 → $A05B; BPM 75 at 4 → $6036. Values above $FFFF (slow BPM × few ticks) exceed a 16-bit timer and are listed as pure math.
  • Usage: pick your BPM row and ticks-per-step column, then dial the timer in with the C=+F-key timer keys — "manual BPM sync" against gear with no sync cable, refined by ±1-cycle nudges.

Practical takeaways#

  • Sync chain choices: hardware clock out via Scannerboy's adapter (LSDJ, Nanoloop, MIDI, DIN, analog clock), machine-to-machine defSYNC over a serial cable (2020-10-08 version), or manual BPM matching via the timer tables — plus one-tick nudge keys (CTRL+F5/F7) for live correction.
  • For 2SID work: enable stereo before looking for the second seqLIST; set the base address before pressing play; remember stereo tunes can't be packed, so plan mono for releases and stereo for live sets.
  • Coders can sync any player to Scannerboy hardware with the four-line $dd01 recipe — the interface is not defMON-specific.

Notable quotes#

  • "As you have understood by now, it is really easy to use this interface from your own code. Horray for Scannerboy!!!" (sync page)

Relevance to the wiki#

Main source for the defMON section of sync (four distinct sync paths on one C64 editor), for the 2SID/stereo material on the defmon and sid pages, and the only precise documentation of defMON's cycle-timer tempo system — the mechanism behind its "adjustable BPM" claim, unusual among C64 editors which are otherwise frame-locked.

Pages touched#

defmon, sync, lsdj, sid, commodore-64, multispeed, frantic, goto80, chipmusic-org, shuffle-funktempo, live-tracking

source file wiki/summaries/s-defmon-wiki-sync-and-stereo.md · graph