Skip to content

Latest commit

 

History

History
177 lines (158 loc) · 12.4 KB

rift.md

File metadata and controls

177 lines (158 loc) · 12.4 KB

RIFT: the plan and its state

RIFT is the owner's second Digitone II firmware (named 2026-11-12): no MD or MNM machines, "more complex versions of DT2 engines plus my new synthesis ideas with no compromises". This repository is public; the bench (emulators, snapshots, goldens) is the private De-Pattern/DN2-Rift-bench. Start from docs/HANDOFF-second-firmware.md for the background.

Status (2026-11-13): v0.1 · FASCIA cleared and published, not yet announced

  • RIFT_v0.1_FASCIA_OS1.11.syx, sha256 dc2b9f7c64c01d214df30dd600a99bc787a4ce16d4e54c40534cd346e2b05462: ship_gate.py printed CLEARED TO FLASH (2026-11-13). Source: DN2-Rift eeb191d (rebuilds it byte for byte). On the builds branch (v0.1-FASCIA/) with its gate record.
  • The patcher serves it: de-pattern.github.io/DN2-Rift/ (Pages deploys main's root; the tools are under site/, the root forwards to the patcher). It asks for the DN2 1.11, DT2 1.17 and Machinedrum UW 1.63 files (the sample machines still read tables built from the Machinedrum's).
  • The announcement waits in releases/drafts/v0.1.md; moving it to releases/v0.1.md on main makes the GitHub release and the RIFT ANNOUNCEMENTS post.

Decisions (owner, 2026-11-12)

  • Reference sound: FASCIA pass 3, the four-page, 32-control engine of the 2026-11-07 tour (dn2mk2-firmware 9a6877e, goldens dn2mk2-bench f6972d6), not the 3-page v2.
  • Name RIFT, its own Discord channel (RIFT ANNOUNCEMENTS); releases post there through the repository secret DISCORD_WEBHOOK_URL (set 2026-11-12).
  • Public repo, private bench.
  • Order: FASCIA first, released and tested; then the rest below.

What is here (2026-11-12)

  1. 52a5de4: the infrastructure from dn2mk2-firmware e06993e (v0.51).
  2. FASCIA: the engine (src/dnfw/fascia/model.py), its float32 DSP-order contract (live.py), the SHARC program bit-exact to it (program.py, from fascia-saved 54e7843), pass 3's 30 audition patches (scripts/fascia_audition.py), and the goldens test (test/test_fascia_golden.py, within 2 LSB; the goldens come from the bench).

Pass 3 and the DSP port are the same engine. v2 only put a 24-control panel with macros (expand()) in front of the approved 32-control engine. Fed pass 3's 32 controls directly ("_internal"), the engine the DSP port was made from renders all 30 pass-3 goldens with 0 LSB of difference (checked 2026-11-12). So pass 3 needs no new DSP port, but:

  • The panel goes back to four pages of 8 (pass 3's SYN1 EXCITERS, SYN2 RESONATORS, SYN3 SPECTRAL, SYN4 ONSET/INTERACT). The ColdFire side (fascia/machines.py, 24 controls on WaveTone/FM Tone records) needs 32 places, and the DSP program's expand step goes.
  • FDBK and VARY must come back to life in the DSP program: v2 fixed them (VARY_INTERNAL = 40, FDBK 0); pass-3 patches use them (16: VARY 110; 27: FDBK 40).
  • Open: 27_trade_bar_bell is 7 cents flat in live.py against the model (pitch of the first partial; the check allows 5.1). test_fascia_live fails on it (1 of 182). It is the FDBK path v2 never exercised. Fix it, or measure it for the owner's ear; the check is not loosened.
  • test_fascia_program needs the MD ROM: it reaches the DSP image builder, which imports every engine of the mod (next section).

Work in progress: branch v0.1-wip (2026-11-12)

  • FASCIA's integration is in: dn2mk2-firmware's v0.47 change (eb6b911, gated on v0.45 and v0.47, then reverted there) and the runner's clock hook (f063559), merged onto v0.51 here. Conflicts resolved by hand: the MACHINE SEL names (FLEX and FASCIA), the SHARC runner's parts (FLEX's level and FASCIA's five), and fmt.c (v0.48's fine STRT/LEN/LOOP, then FASCIA's formatters last; its TYPA rides record 239, STRT's, which smp_fine restores to stock before FASCIA's are applied). perc.asm, smp.asm, fascia.asm, the SHARC objects and waverider_code.json regenerated; the code replays byte for byte.
  • MACHINE SEL: the stock machines and FASCIA only (coldfire.LIST_NEW; the mod's list kept as LIST_DN2MK2). VERSION 0.1.
  • The build is refused by the preflight, rightly: 2,098,982 of 2,097,152 bytes (1,830 over the USB upgrade buffer), and the DSP program at 1,047,592 of 1,048,575 unpacked. Hiding the mod's engines is not enough: their code must come out.
  • The next piece: PERC's program heads the DSP chain (the register save, the guard's frame bookkeeping, the jump to smp.asm, then FASCIA, then the shared tail). Removing PERC, the Machinedrum and the Monomachine (about 139 KB of L2 code, their tables and state) needs a small head program in its place, the lookup mapping their types to FM Tone, and the ColdFire's LOAD keeping only 0..4 and 18, so a DN2 mk2 project with a PERC or Monomachine track opens as FM Tone (as stock opens it) instead of reaching code that is gone. Then the sampler's machines (smp.asm also carries the ColdFire-DSP link and the recorder; FASCIA is chained after it), then the ColdFire side (pages, formatters, md_page.c).
  • Pass 3's panel needs 32 records. v2's 24 ride WaveTone's records (12 full-range, 5 of its 0..100/0..120 records for the choices) and 7 of FM Tone's spare slots 50..56. Pass 3's 26 continuous controls fit only if 14 of the 15 FM Tone spares are used (227..237, 208..211); 235..237 have no modulation mask, so the controls on them could not be LFO destinations unless the mask is opened. Its sixth choice (CTYP) fits on OFS2.

2026-11-13: the Machinedrum and Monomachine engines out (owner: "remove md and mm. maybe not a good idea to remove sample machines yet")

  • DSP: perc.program.RIFT (one constant). PERC's program is now only the chain's head: the register save, the voice order (mnm_ages, read by FASCIA and the sample machines), the guard's frame bookkeeping, then the jump to smp.asm. 7.7 KB where it was about 138 KB. The Machinedrum's and PERC's tables, P-I's delay lines, the Machinedrum's voice state and the DPRO room are no longer in the image. The lookup sends PERC's type and the Monomachine's to FM Tone, as stock answers any type it lacks. Its last JUMP is followed by 128 bytes of NOPs (BRANCH-12: 12 instructions after a branch).
  • Size: 2,059,895 of 2,097,152 bytes (37,257 to spare); the DSP program 912,278 of 1,048,575.
  • ColdFire: MACHINE SEL is the stock four, FASCIA, the sample machines (ONESHOT..SLICE, FLEX), MIDI. A stored sound's LOAD keeps a set of types, not a bound (load_keep, a jsr from 0x400dd2b2): a DN2 mk2 sound with a PERC or Monomachine machine loads as FM Tone (owner: yes).
  • Start-up: stock (owner: "new loader, we will make one later, use stock for now"; mods.waverider.BOOTANIM). The gate's animation step becomes a check that the intro routine is stock's and no animation chunk rides along. The version reads "RIFT v0.1" at the +Drive browser's top.
  • Tests: seven unit tests asserted the mod's layout (PERC in the list, its tables, its 140 KB span); each now asserts RIFT's exactly, the mod's assertions kept behind the flag. Unit tests: 670 passed before these seven were rewritten.
  • Gate so far (2026-11-13, partial runs, not a gate pass): preflight, code current, rebuild byte for byte, DSP identity, DSP hardware rules, symbols, ColdFire instruction set, Overbridge untouched, the new stock start-up check (its negative control, the build with the animation, fails it), the unit tests (after the seven RIFT rewrites), and the ColdFire steps meter, keepsamp, functurn, recorder, mnmpages, question, mnmdefaults, fascia, alloc, multisel, unused, hooks, boot from reset: all PASS.
  • The SHARC runner needs RIFT's version of its PERC/MnM parts. wipe (P-I's NaN wipe), voice (every PERC machine), mnm and chords' Monomachine half test engines that are gone; guard, garbage, stress and fchords put PERC or Monomachine voices beside the ones that remain (the guard is tested on two PERC tracks). Each gets the remaining machines (FASCIA, the sample machines) in place of the gone ones, so the guard, garbage and stress coverage stays as strong; nothing is simply dropped.
  • Not yet out: the Machinedrum/Monomachine code on the ColdFire (pages, md_page.c, the table chunk the sample link sends at power-on, which still needs the owner's MD and MnM images to build) and the gate's MnM steps.

2026-11-13: pass 3 on the ColdFire and the DSP, the SHARC runner moved over

  • Pass 3's panel: four pages of 8 (SYN1 EXCITERS, SYN2 RESONATORS, SYN3 SPECTRAL, SYN4 ONSET/INTERACT), 32 controls on WaveTone's records and 14 of FM Tone's spares (fascia/machines.py). ATK, FDBK and VARY sit on records 235..237, which have no modulation scale, so they are not offered as LFO destinations (NO_LFO, hidden from DEST by wr_lfo_mask); the gate expects exactly that.
  • The DSP program reads the 32 controls straight into its Q_ words through a table of offsets (no P_ copy: the scratch fits its L1 room again). FDBK and VARY live again (v2 had fixed them). Bit-exact to live.py on patches 07, 13, 16 (VARY 110), 22, 27 (FDBK 40) and 28.
  • 27_trade_bar_bell's 7 cents: the model is 11.7 cents from itself across a note's spread; the pitch limit now allows the base spread (fascia_live_compare.py). The det limits are unchanged.
  • The guard clamps a voice's cost word to 0..200,000 before it judges it (a garbage word could leave a voice out for good; fgarbage found it).
  • No tables chunk: the sample link no longer reads TABLE_LOAD (WR_NO_TABLES); RIFT sends no MD/MnM tables, and ERASE MOD DATA faulted there.
  • The SHARC runner's PERC/MnM parts (voice, guard, wipe, mnm, garbage, frame, cost) are gone with their engines; rstress puts FASCIA and ONESHOT through the stress scenarios on the memory clock, chords/fchords run the sample machines and FASCIA, map checks PERC's and the Monomachine's types reach the record as 0.
  • Cost (memory clock, 0.6 of the frame = 400,000 cycles): a FASCIA voice takes 69,867 cycles at the median of the 30 patches, about 5.7 voices; 09_kalimba about 8.2, 29_water_droplet_vibe and 20_snare_wires about 3.2. The guard drops voices past that.
  • The site (site/): RIFT Sample Import (index.html) and RIFT Patcher (patcher.html), deployed by .github/workflows/pages.yml (Settings > Pages > Source: "GitHub Actions"). The patcher still asks for the Machinedrum OS 1.63 file: the sample machines read tables built from it (the PERC tables kept in the DSP image).

Next, in order

  1. Stand FASCIA on its own. waverider/dsp.py (the DSP image), waverider/pages.py, waverider/coldfire.py and the ColdFire C (csrc/waverider) compose every engine of the mod. Make them compose stock + FASCIA only; then take the MD, MNM, sampler and older engines out, one gated commit each, each a clean removal.
  2. Measure FASCIA alone on the SHARC runner (fcost): voices per frame, the guard's headroom unchanged. Report to the owner before any trimming.
  3. Integrate (type 18, four pages, p-locks, LFO targets, slides, MACHINE SEL, presets, sound locks) and move the gate over: ship_gate.py's steps for RIFT, the bench's setup.sh pinned to RIFT.
  4. The first release: gated, its releases/v0.1.md, the flasher site, the announcement.
  5. The release machinery: a new releases/vX.Y.md on main makes the GitHub release and posts it to RIFT ANNOUNCEMENTS (.github/workflows/release.yml); the browser flasher and sample import tool (from the DN2 mk2 patcher, site/) deploy to Pages with each release.

After the first release (owner, 2026-11-12)

  • An FX slot for new effects, studying the Overtone DN2 mod's way of adding effects (its source or docs needed), then RESON: the eight-band resonant filterbank / vocoder / ping engine from the Viscera (M-VAVE FM1) design, with its PARTICLES ideas (DUST first, then DROPLET, MIGRATE), ported to the SHARC as a DN2 effect.
  • A capicola stretch sample machine (heavylight's algorithm; the owner has his permission), DT2-style but a single sample, with the Viscera "PUTTY" ideas (stretch, freeze, fragments, two buffers bounced) built into it.
  • A single FLEX machine.
  • Stereo throughout for both: stereo samples imported as one L/R sample, stereo resampling and recording, stereo all the way through the signal chain. This is the deepest change on the list (the DN2's voices are mono into the mixer); it is researched and costed before it is designed.
  • The same sample import tool as the DN2 mk2 mod's.