v0.6.0
Tracker tunes: the .cts file, an XM tick engine, a live player, a chip bank and motif mcp
motif now plays tracker songs. A tune is one s-expression file with patterns, up to eight channels, XM's four columns per cell and an order list; its instruments are motif patches, its printer is canonical so a saved file reads and prints back byte for byte, a live player changes anything about it while it plays, and motif mcp lets an agent edit the same file the tracker editor does. This is the motif half of Crash The Stack's tracker mode: the game's soundtrack ships as three tunes in tunes/. The session and runtime modules from the May tracker branch land on master in the same release. Pre-1.0 minor: the new surface is additive, and nothing existing changes its output.
Changes
(motif tune): the.ctsmodel, a reader with validation (every error names pattern, row and channel), a canonical printer, and cell and row edits. Five tunes ship intunes/:spy.cts(96 BPM, 170 s),breaker.cts(140 BPM, 165 s) andgroove.cts(110 BPM, 166 s), the game's soundtrack, withdemo-columns.cts(every column, every effect, every starter instrument) andgrit-bass-test.cts.(motif tune compile): an XM tick walk (a tick is 2.5/tempo seconds, a row isspeedticks) with 0xy arpeggio, 1xx/2xx portamento, 3xx tone portamento, 4xy vibrato, Axy volume slide, Bxx position jump, Cxx set volume, Dxx pattern break, Fxx speed/tempo, note off, and XM's effect memories. The walk is resumable, so a render and the live player share one engine and render byte-identical. The module header lists what XM has that this release leaves out; the reader refuses those so a file cannot play wrong silently.(motif tune player), the runtime API:open-tune-playerwalks the tune a chunk ahead of the render and pushes each tick's rows into the C tracker layers, so an edit, a pattern swap, tempo and speed, a jump, channel volume, mute and solo, the bus mix, the compressor and an instrument's patch parameters are heard at the next tick (20 ms at 125 BPM).player-ramp!slides any numeric target over a time;player-positionanswers the row under the listener given the sink's depth;player-peaksis a per-channel level meter.- The C render loop gains a tracker channel layer kind: one voice per channel driven by a change-point tick table in a ring, envelope retrigger on every note, a render event per note-on carrying its duration, voice groups for layered instruments, and a per-layer peak. Chunked and one-shot renders stay bit-identical.
- Twelve synth kinds: chip-saw, chip-tri, chip-noise (a low cutoff is the periodic-noise register), chip-sub, the pitched drums chip-kick, chip-snare and chip-hat, fm4-pipe (a hollow reed), fm4-sax and fm4-alto (reed recipes with a breath that is a slow low-passed envelope, a formant, drive and a delayed vibrato, no breath on legato) and fm4-grit-bass (the YM2612 "Chemical Plant" bass: a feedback stack, a doubled carrier, an index that drops from 8 in 60 ms, 11-bit crush). With chip-pulse, fm4-bass, fm4-lead, fm4-bell, fm4-pad and karplus-strong that is the starter bank.
- Instrument layers:
layers: ((chip-sub octave: -1 volume: 0.5) ...)triggers extra patches with every note of the instrument, each at an octave offset and gain; groove's bass carries a sub layer. - Bus settings in the file: a shared reverb (
reverb: zitarev|revsc size: damp: mix:) fed per instrument bysend:0..1, withpan:-1..1 per instrument, and the mix-bus compressor every tune plays through ascomp: on|off threshold: ratio: attack: release: makeup:with today's values as the defaults (-12 dB, 4:1, 5/80 ms, +2 dB). A tune without a bus section sounds exactly as before;comp: offis a 1:1 ratio with no makeup. Send 0 renders byte-identical to no bus. motif tune print|check|info|render|ticks|nanscan FILE.motif mcp: a stdio MCP server with tune/load, print, check, inspect, set-cell, clear-cell, insert-row, delete-row, set-instrument, set-bus, set-order, transpose, render, diff and instruments. Every write is canonical and appends a history line.(motif core),(motif session)and(motif runtime)from the tracker branch: the session bundle round trip, the session->track compiler, the runtime event cursor, the playback stream wrapper and host parameter scheduling, withmotif test-session.motif test-tune: 153 checks over 24 fixture tunes, a non-canonical positive control, per-effect tick goldens, edits, render parity, the event stream, the bus, layers, the player and the compressor.- Graph constructors coerce their init parameters to flonums. A fixnum reached sigil-dsp's make-adsr through a tune file (the printer writes 1.0 as 1) and was misread, giving an infinite envelope; existing presets pass flonums and are unaffected. An idle bandlimited voice at 0 Hz no longer NaNs the mix (voices with no pitch are skipped).
- The canonical printer writes strings as raw UTF-8 (only " newline tab and CR escaped) and flonums at full precision.
Known regressions
None in existing output: fm-groove, ab-tracker and the five existing test subcommands render and pass as before. Limits of the tune engine in this release: karplus-strong re-plucks on every pitch change, so portamento and vibrato on it stutter; channel volume scales the voice output and the fm4 velocity input still reads 1.0; the reverb kind and size are fixed once a player is open (its mix and the compressor are live); tick-table sample positions are integers, so long tunes stay sample-exact; a channel plays at most eight different instruments (a ninth is refused at compile time).
Upgrade notes
motif mcp adds sigil-mcp ^0.18 (and through it sigil-http, sigil-tls and sigil-crypto) to the native configs only; the web config is unchanged. sigil deps install after relocking to ^0.6.0.
adf9792f89dd4763616a012d136e6c19d11d4316
This commit is older than the 20 that keep a page here, so it has none. It is in the clone.