Skip to content

Improvement: Octatrack machine voices book the bank's real effects, base 0.7.7 - #1666

Closed
repeat98 wants to merge 12 commits into
mainfrom
base/voice-booking-bank
Closed

repeat98 wants to merge 12 commits into
mainfrom
base/voice-booking-bank

Conversation

@repeat98

Copy link
Copy Markdown
Owner
  • What was wrong or hard: A machine's DSP voice booked every effect slot on its core at the dearest stock effect (DJ EQ, 342 cycles), whatever the bank used there. That left 384 cycles a sample for voices on core 0 and 829 on core 1, so BlackPyramids (535 executed instructions, 937 charged at 7/4) fit on no track, and Analog BD only on T1-T4. Effect picks have booked the bank's real effects since beta finding 34, but voices kept the worst case, because a track that keeps its machine across a bank change is never checked again (old == who in claim()).
  • What this changes:
    • dsp.c: a voice is charged beside the core's slots as the allocator books them (voice_slots: the bank's dearest Part set, each slot at least what the Parts and tracks name there, plus any committed or pending pick). With no effects on core 0, it keeps its whole 3,120 cycles for voices.
    • dsp.c make_way, called from modwerk_dsp_slot_floors at the start of every allocator plan: when what the loaded bank names no longer fits beside a core's voices (after a bank or project load), that core drops voices from its last track down until it does. machine_registry.c releases the track, which renders the stock silent source; charge() claims it again each UI tick and shows the DSP FULL box while it doesn't fit. A pick the bank does not name never takes a voice's room: it is refused as before. Stock effects are still never refused.
    • build_core.py: the allocator edit now reads the voices' charge after the floors, so it sees what make_way freed. --measure-voices (needs --dev and --dsp-loader) builds a development twin that admits voices without a cycle charge, so a voice with no hardware price yet can be measured with the meters.
    • The resident engines' private port follows: dsp.c's pin and hunk line numbers (+27 lines above its hunks, which are unchanged), the allocator's key bus price on the moved line, and the key bus check (modwerk_dsp_keybus_fits) books the slots as voices do (voice_slots; slot_charge is gone).
    • Beta base 0.7.7 (a383e0af; 0.7.6 is Octatrack base: DSP hook chains, so several packaged DSP machines share a hook site #1418's): regenerated with npm run octatrack:base -- --stock OS.bin --beta --write, +272 bytes since 0.7.5 (base-sizes.json). Analog BD's recipe recaptured against its symbols (only imageSha256 moves); the base-bound packages relinked (--base-only): their requiredBase, and Analog BD's and Output Matrix's bytes. Sidechain Compressor 0.2.1, held behind 0.2.2, links against the write lease, which moved 12 bytes: its package is now the controller the base's trust row was built from (as on 13 November), lagsBehind kept.
  • How I checked it: npm run pr:ready: everything passes except test_resident_engines, which fails the same way on main on this computer (Analog BD's engine unit is 1,004 words, the test expects 1,009) and is skipped in CI (no dsp_asm). The host tests (test_recipe.RuntimeSlotTests, DspLoaderTests): the existing voice tests run unchanged on a fixture with DJ EQ in every slot, and new ones cover four voices on an empty core 0, a bank load that drops T8's voice and keeps T5-T7 and core 1, a re-claim refused afterwards, and a pick the bank does not name being refused without touching voices. Disabling make_way fails two of them. Not tested on a unit: what still needs a twin on the unit is (1) a voice admitted beside a light bank playing without stalls, (2) a bank change to a heavier bank that drops voices: no stall, no DSP FULL on stock effects, the dropped tracks silent with the box, and (3) the timing between a dropped voice stopping and the new bank's effects starting.
  • What no check caught: the host tests compile dsp.c without the resident patch, so the port still calling the removed slot_charge showed only in the full base build. Not fixed here.
  • What the guides lacked or got wrong, and where I fixed it: MODULE_PERFORMANCE.md did not say how a machine's DSP voice is charged or how to measure one that can't be admitted yet; added a paragraph. The migration record still said voices book 342 a slot; corrected in place.

Related to #1542

🤖 Generated with Claude Code

repeat98 and others added 12 commits November 17, 2026 08:43
…nd give way at a bank load

A machine's DSP voice booked every effect slot of its core at the dearest stock effect (DJ EQ, 342), so core 0 had
384 cycles left for voices and core 1 829, whatever the bank used. Voices now book the slots as effect picks already
do: each slot at the dearest effect the bank's Parts and the tracks name there. Before the allocator plans a bank or
project load, a core whose bank no longer fits beside its voices drops them from its last track down; those tracks
render silence with the DSP FULL box until there is room. A pick the bank does not name never takes a voice's room.

build_core.py --measure-voices (with --dev and --dsp-loader) builds a development twin that admits voices without a
cycle charge, so a voice with no hardware price yet can be measured with the meters (#1542).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dsp.c grew by 27 lines above the resident patch's hunks, which are otherwise unchanged; its pin follows. The key bus
price now adds to the voices' charge where the allocator reads it, after the voices made way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The key bus tap is a per-core charge like a voice's engine: modwerk_dsp_keybus_fits now uses voice_slots, as
slot_charge is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…recipes and packages follow

Analog BD's recipe recaptured against the new base's symbols (only imageSha256 moves); the base-bound packages
relinked: their requiredBase, and Analog BD's and Output Matrix's bytes. 0.7.6 is taken by #1418.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The write lease it links against moved 12 bytes; its package is the controller the base's new trust row was built
from, as on 13 November. lagsBehind stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 17, 2026
repeat98 added a commit that referenced this pull request Nov 17, 2026
… base 0.7.7

Generated base files taken from #1666 until the regeneration with both changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 17, 2026
…ooking (b3be9a5f)

npm run octatrack:base -- --stock <OS 1.40C> --beta --write, then
octatrack:module-packages -- --base-only. Sidechain's held 0.2.1 (as #1666
relinked it, 49fec100) builds byte-identical under this base, so only its
requiredBase moved. octatrack:module-packages -- --check --stock: all 37
identical. Size: 802,108 of 851,712 container bytes, +672 since 0.7.5.
stock:branches: no entry into a site's interior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

This ships inside #1642 as base 0.7.7 (b3be9a5f), together with the delay skip (owner, 17 November): this branch was merged in unchanged and the base regenerated once with both. Merging #1642 brings these commits to main. On an MKII twin of the combined base, Analog BD took T5 and T6 on core 0 beside a light bank and played a minute without a stall; tests 2 and 3 are not run (see #1642).

🤖 Generated with Claude Code

repeat98 added a commit that referenced this pull request Nov 17, 2026
…achine voices book the bank's real effects (#1666) (#1642)

* Improvement: the Octatrack base skips the stock delay's filter and mix on tracks without a DELAY

Stock's delay routine filters and mixes all eight tracks' rings every frame, whatever their FX2. A track
whose delay gains have rested at dry only for 16,384 frames now skips both loops; its audio, state and
ring bytes stay bit-identical to stock's. Base 0.7.5.

Co-Authored-By: Claude <noreply@anthropic.com>

* WIP: the delay skip decides from the frame's own data (zero taps, zero filter state, zero send)

Not for merge as it stands: on the MKII the gain was within the meter's noise. The committed base assets
are still the first design's; regenerate before any use.

Co-Authored-By: Claude <noreply@anthropic.com>

* WIP: the delay routine leaves out the ring transfers of quiet tracks (three sites)

Emulator-proven for bytes only; the transfer order on a unit is unproven. Base assets stale.

Co-Authored-By: Claude <noreply@anthropic.com>

* Docs: the delay routine's A/B harness, what the unit measured, the changelog figure

Co-Authored-By: Claude <noreply@anthropic.com>

* Improvement: Octatrack machine voices book the bank's real effects, and give way at a bank load

A machine's DSP voice booked every effect slot of its core at the dearest stock effect (DJ EQ, 342), so core 0 had
384 cycles left for voices and core 1 829, whatever the bank used. Voices now book the slots as effect picks already
do: each slot at the dearest effect the bank's Parts and the tracks name there. Before the allocator plans a bank or
project load, a core whose bank no longer fits beside its voices drops them from its last track down; those tracks
render silence with the DSP FULL box until there is room. A pick the bank does not name never takes a voice's room.

build_core.py --measure-voices (with --dev and --dsp-loader) builds a development twin that admits voices without a
cycle charge, so a voice with no hardware price yet can be measured with the meters (#1542).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the migration record from growing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* The delay skip treats a ring and filter within -130 dBFS of zero as silence

Stock's filter never returns to rest once a delay has been sent to, so the
exact-zero test kept every fed track on stock's path. A word within 680
counts of zero (-130 dBFS) now counts as silent (owner, 17 November 2026).
The harness gets TOL=n, which lets audio, filter state and ring words differ
by up to n and reports the largest difference. Base 0.7.6 (main took 0.7.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay skip's comments, README and changelog describe the -130 dBFS floor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: the delay harness ends the emulator's peripheral write log, which grew 2 KB a frame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.7.6: regenerated, base-bound packages re-bound

npm run octatrack:base -- --stock <OS 1.40C> --beta --write: identity
4b463737, package a0b4c14f, fills deb59031. Output Matrix, CC Map, Recorder
Loop Fix and Analog BD relinked with --base-only; Sidechain's held 0.2.1
package builds byte-identical under this base (3024353d), so only its
requiredBase moved. octatrack:module-packages -- --check --stock: all 37
identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README records the floor build's emulator figures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.7.6: size record (801,696 of 851,712 container bytes, +260)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README warns that ot::Machine logs peripheral writes until told not to

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* The delay skip's silence floor is 2,048 (-120 dBFS)

On the MKII, 680 left two of three fed tracks on stock's full path: their
filters stuck at -1,404 (stock's default DELAY, also the harness's) and
-758/-700. 2,048 covers both (owner, 17 November 2026).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.7.6: regenerated with the 2,048 floor (75dfb030)

Base-bound packages relinked with --base-only; Sidechain's held 0.2.1 still
builds byte-identical (3024353d), so only its requiredBase moved. Size
record: 801,760 of 851,712 container bytes, +324 since 0.7.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README records the 2,048 build in the harness and on the MKII

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Re-anchor the resident port to the new dsp.c and allocator line

dsp.c grew by 27 lines above the resident patch's hunks, which are otherwise unchanged; its pin follows. The key bus
price now adds to the voices' charge where the allocator reads it, after the voices made way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Resident key bus check books the slots as voices do

The key bus tap is a per-core charge like a voice's engine: modwerk_dsp_keybus_fits now uses voice_slots, as
slot_charge is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README records the 2,048 build's soaks and a recording on the MKII

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Regenerate the beta base as 0.7.7 (a383e0af) with the voice booking; recipes and packages follow

Analog BD's recipe recaptured against the new base's symbols (only imageSha256 moves); the base-bound packages
relinked: their requiredBase, and Analog BD's and Output Matrix's bytes. 0.7.6 is taken by #1418.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Record base 0.7.7's size (+272 bytes since 0.7.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Relink Sidechain Compressor 0.2.1 (held behind 0.2.2) to base 0.7.7

The write lease it links against moved 12 bytes; its package is the controller the base's new trust row was built
from, as on 13 November. lagsBehind stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README records soaks on an older project (send cycling, Part changes, FX2 picks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.7.7: regenerated with the delay skip and the voice booking (b3be9a5f)

npm run octatrack:base -- --stock <OS 1.40C> --beta --write, then
octatrack:module-packages -- --base-only. Sidechain's held 0.2.1 (as #1666
relinked it, 49fec100) builds byte-identical under this base, so only its
requiredBase moved. octatrack:module-packages -- --check --stock: all 37
identical. Size: 802,108 of 851,712 container bytes, +672 since 0.7.5.
stock:branches: no entry into a site's interior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the delay harness README records the skip on the combined 0.7.7 twin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: a machine on a twin needs its whole package built for the twin, not the controller from rows/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Shipped in #1642 (squash 46b979d, base 0.7.7 b3be9a5f), which carries this branch unchanged. Closing as merged there; the branch is left as it is.

🤖 Generated with Claude Code

@repeat98 repeat98 closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant