Skip to content

Fix: defer Octatrack DSP residency until project load completes - #1826

Closed
repeat98 wants to merge 12 commits into
base/octatrack-nextfrom
codex/octatrack-project-load-dsp-handoff
Closed

repeat98 wants to merge 12 commits into
base/octatrack-nextfrom
codex/octatrack-project-load-dsp-handoff

Conversation

@repeat98

Copy link
Copy Markdown
Owner

What went wrong

Loading FLEX07 could stop the audio frames before PLAY on the Octatrack MKII after six modules restored from the card. The failure reproduced after a restart with the same bytes in MODWERK0.SET. At the stall, the loader had queued a Spring Reverb bind for an effect that both projects already used.

What changed

Wait for the incoming project's effect map before planning automatic DSP residency changes from the live slots and bank. Existing transactions still advance, and unbound slots stay dry during the load. This keeps the same stock effects resident across the affected project change. The lower-level reason the last frame stopped remains open.

This draft targets the cumulative 0.7.10 branch in #1757.

Verification

  • On an Octatrack MKII, the patched 0.7.9 Tracks Post development build 1df94302 passed two fresh-boot FLEX07 loads with the same six packages, playback up to a sampled 67.3% CPU, and a reload that restored a stock effect.
  • The verification record describes the unpatched controls, the stall trace and the patched run.
  • npm run pr:ready passed. All seven 0.7.10 layouts matched native and browser images and passed the bootloader recovery checks. The isolated Octatrack source rebuild and base-bound check passed. All 41 published module package hashes are unchanged.

Hardware handoff

The exact 0.7.10 Tracks Post image from this draft, 0c3de938, still needs a unit run. Build Tracks Post from the original OS 1.40C on the next machine. On the scratch card, use Tape Echo, Euclid, LOFI2, Sidechain Compressor, POLY8 and Slow LFO prepared for that base. Start in TARGET and leave the same MODWERK0.SET in place across both boots. After the second restore, select FLEX07, check that frames continue before PLAY, then measure playback and try the 84–87% CPU range. Save the USB diagnostics log if the stall count advances.

Guides

The driving guide covered the scratch-card and USB procedures. The verification record adds the project-load comparison and the remaining hardware check.

Aquitronic

This comment was marked as outdated.

@repeat98 repeat98 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gate itself looks right to me. modwerk_fxmap_loading() is already used the same way in dsp.c and status.c, and fxmap.c clears the flag on every way out of a load (success, failure, nothing staged), so a failed load can't leave automatic residency stuck. As the description says, it avoids the trigger; the reason the last frame stopped is still open.

Before this leaves draft:

  1. Rebuild on the current base/octatrack-next. The PR conflicts with it and was built on the cumulative 0.7.10 from #1757 before 0.7.10 shipped: base-versions.json replaces 694ddc…, while shipped 0.7.10 is b1c76d06…. The base image, base-binding.json, base-sizes.json and the packages' requiredBase need regenerating on top of it.
  2. Add a 0.7.11 entry to base-versions.json. The diff overwrites the identities of the 0.7.10 entry instead. #1840 says this PR sets the version to 0.7.11, but this diff doesn't. #1861 makes the same in-place rewrite and is waiting on this PR's version change (comment there).
  3. Test on a unit with the image this branch builds. The runs in the verification record are on a 0.7.9 development build (1df94302). The image this PR produces (0c3de938 now, and it will change after the rebuild) is marked as still needing a unit run. A test record and edge-case table per docs/TEST_PROCEDURE.md would cover it.
  4. A host test for the gate. For example, automatic planning waits while a project loads and resumes once the map is sealed, with transactions already in flight still advancing.
  5. Unrelated changes in the diff. The merge from main brings #1813–#1815 (including the module-pr.yml change) into this PR. The actual change is about 10 files. Whichever of this and #1861 lands second will need to regenerate the base files again.

@repeat98

Copy link
Copy Markdown
Owner Author

Superseded by #1840. 0.7.10 shipped without this fix, so the gate from e91e360 was re-applied on shipped 0.7.10 as base 0.7.11, with a host regression (sdk/tests/test_project_load_residency.py) and the hardware run this handoff asked for: on the MKII with the six modules restored from the card, 0.7.11 loaded FLEX07 from TARGET 2 of 2 with the frames running and no extra loader work. The verification record moved along with it. Closing this one as superseded.

@repeat98 repeat98 closed this Nov 20, 2026
twwwy pushed a commit to twwwy/modwerk-beat_slicer that referenced this pull request Nov 20, 2026
…completes

On an MKII with six modules restored from the card, the first load of FLEX07
from TARGET stopped the DSP frames before PLAY (repeat98#1826, verification record of
19 November 2026). The residency observer (manager.c dl_residency_tick, via
build_core.py TRANSITION_EDITS) now plans automatic residency only once
fxmap.c says the project load is over: requests already in flight still
advance and unbound slots stay dry meanwhile.

Rebuilt on shipped 0.7.10 as base 0.7.11 (default layout bd1ed432,
tracks-post 239d55a4): npm run octatrack:base -- --beta --write, then
octatrack:module-packages -- --base-only and base-size --write. No lease
entry moved, so the base-bound packages and Analog BD recipe are unchanged.
The base page lists 0.7.11.

sdk/tests/test_project_load_residency.py builds the generated observer on the
host: all three modes fail without the gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants