Repository navigation
Improvement: versioned Octatrack source-machine START callbacks - #1029
Conversation
# Conflicts: # docs/module-guides/machines.md # sdk/machines/octatrack/base-binding.json # src/engine/assets/octatrack-base-variants.json # src/engine/assets/octatrack-base.elemod # src/engine/assets/octatrack-module-packages.json
Hook index 37 is held for ot_machine_starts (#1029) by a reserved entry (events.json "kind": "reserved", room 0): the loader's room check and the site's package check refuse any word there, and #1029's entry replaces it when it merges, so neither hook renumbers whichever merges first. A PERSONALIZE row now names the stock row it goes after (after, 1-15; MODWERK_PERSONALIZE_AFTER_* in modwerk_events.h): MUTE MODE after PREVIEW WITHOUT FX, as in the card build and octabam. Rows on the same anchor keep the table's order, unanchored rows go after stock's fifteenth, LED BRIGHTNESS stays last, and an anchor past 15 refuses its contribution. Checked against 1.40C (privately, addresses only): the three tables and the window's list state are read only by the window's renderer, row count and key handler (0x40068e00-0x40069074), so moving stock rows down is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hey @ex1010 please pull the latest changes to make sure your agent uses the inter-agent message board. |
|
This hook would also fix #1051, an Octatrack DSP stop when a playing track leaves Analog BD for FLEX. The root cause, traced in The cause. A module machine that keeps stock's START gets stock's FLEX voice started on every trig, with the machine's bytes read as FLEX settings. A bank or Part change then makes the track FLEX without The consequence for this PR. Machines without a START record keep that behaviour after this lands (the PR notes FM Synth's fallback stays). Once this merges, Analog BD, and probably FM Synth, should contribute a START record so stock never starts that voice. I'll prepare the Analog BD side locally against this branch and offer it to its author after this merges. |
|
Thanks @ex1010, I reviewed the code and it looks right to me. The shim replays Unit run on my MKII, a One thing before I can merge: #1077 (the boot guard) just merged and regenerated the base, so this conflicts now. Could you merge main, regenerate through the supported generators and run Two small things, neither blocking:
|
|
Update on my earlier note: this hook won't fix #1051 after all. The builder arms the retrig after the START handler runs, so the handler fires too early to prevent it. #1091 fixed it in the base instead and is merged, so no Analog BD follow-up is coming from me. Nothing here needs to change for that. |
|
Thanks @repeat98 for the review and MKII check! Following up on your two notes, I've pushed 42568597.
Fixed: table updates now clear refusals for departed descriptors while retaining them for live owners. The regression covers all eight tracks, partial/full removal and descriptor-address reuse before the replacement's first accepted START.
The SDK now rejects START callbacks unless they are relocated, typed ELF function entries within Main, including #1091, is merged; all seven base layouts were regenerated through the supported generators. The current Module PR checks run is awaiting maintainer approval. |
Problem and change: Source machines with custom controls need an independent sample-START callback. This PR adds
ot_machine_starts: a separate versioned 16-byte record naming its same-packageot_machinesdescriptor and a standard three-argument callback. It supplies the shared SDK prerequisite for FRACT's machine migration in #926 without replacing the shared FLEX handler-table cell.The machine descriptor remains ABI 1/80 bytes (88 with SETUP_PAGE). Selection happens before stock pushes the arguments, preserving Mute Modes' trig gate and the selected stock/FM/legacy fallback. Missing, duplicate, malformed or DSP-unpaid START ownership refuses and suppresses that owner's previous voice until an accepted START or removal of that descriptor. Both machine and START tables admit eight records. The new START table uses hook 37. Admission checks extents, SETUP_PAGE overlap, same-package ownership, alignment and reconstructed-image relocation before publication; Part/UI and paused-context retention remain.
Maintainer review follow-ups:
STT_FUNCwholly within.text, and requires its pointer word to self-relocate. C supplies that metadata; assembly callbacks must use.typeand.size. Real linked assembly and C-builder tests reject read-only/writable/BSS data, object data inside.text, function-typed data outside.text, interior/odd/out-of-image targets, a missing relocation and a missing ELF map; a valid function at image offset zero is accepted.Current integration:
425685975eb3e1e32ac64eb043e174b0b65591bcincludes main886098f5de8bd7e187d0b80910114ac38b7eecd5. It retains boot/bank guards, assignment/live-parameter reload, LFO naming, base-update trial/write safety and #1091's stale FLEX voice/retrig stop before a machine's own render (including START refusal) and an absent machine's silent render. #1091 fixes #1051 independently of this START hook; the earlier proposed Analog BD follow-up has been withdrawn. No module's audio implementation is changed here.Validation on 4256859:
npm run pr:readyreports Ready against main886098f5. SDK: 498 tests, 12 skipped; recipe tests: 39 passed; app tests: 2763 passed, one skipped, 340 files. Lint/typecheck/bundle, catalogue, compatibility/pairs, licences, changelog and board checks pass. Node 24.22.0, Python 3.12.2 and pinned DSP tools.57c82d5e92bebe8786dc94c42a711a8ec347e7423a43b44b7e31e2ad9dd9f79c; private.binSHA-256:90f1d774bfcffd5b102c6e9a64ea64c4085d1caf693285c0bb56fecf23f134bd. All five base-bound packages passed stock-byte scans and were regenerated against the current base links. All five actual payload files retain their previous SHA-256 values; the package manifest differs from809c06e6only in five required-base identities. Controller-policy source bindings were regenerated by the supported tool.sha256:3b40aa253afa03508735107cdaefac0d4116824da50059a6a2ba61e5d11ef56d, pass both export verifiers: Octatrack artifacts, complete source inventory and version pins match; all 28 current source-only release exports reproduce. One fresh build per family, with tracked-source-only, read-only, no-network, resource-limited mounts; no firmware or private history mounted.809c06e6, before generated-base refresh, was examined in three bounded pages: 19 distinct AST fragments / 19 fresh requests, no service errors, all three configured Stage 0 checks pass. Zero flags / 19 uncertainties, all investigated, including omitted records. No defect was confirmed among the investigated signals. Coverage remains partial: one production-registry C parser blocker, checked manually with its red/green lifecycle regressions, and five static-only exclusions. Generated-base/binding updates followed this pass and are not API-reviewed; their separate seven-layout and source-export proofs are above. The earlier full-PR advisory remains a separate partial review of809c06e6. No source/context fix followed the successful advisory pages, so no unchanged paid recheck was run.Reported hardware evidence: repeat98's MKII check used a
--devtwin of 9d8748c, beta flags, no controller rows, base prefixa384a952, RAM-booted from flashedd15d3e2d. He reported successful boot/playback and Part 1 → 2 → 1 while playing, no new DSP stall or skipped frames, and frame max 65%. He confirmed the selector jump and reviewed the replayed lookup, flags and Mute Modes gate. No installed module opted into START, so this is evidence for the existing fallback path on that named earlier build. Custom START execution remains host-tested; the report does not qualify this later rebuilt base or a callback timing limit. This contributor performed no hardware installation or flashing during the refresh. No firmware, extracted stock code/tables, dumps or complete OS images are committed.Guides:
docs/module-guides/machines.mddocuments refusal cleanup, typed/relocated callback requirements and the build-time/runtime distinction while preserving interrupt/ABI obligations, Mute Modes and eight-record capacity.sdk/runtime/loader/README.mdexplains ELF provenance, assembly declarations and preserving recipe spans only after unchanged image/payload checks. The verification record records the hardening cases and their limits. The changelog describes both fixes. Hook 37's agent-board claim is current; the inbox and open Octatrack questions/findings are empty.GitHub status: Head
42568597is mergeable against main886098f5; GitHub reports no conflicts. The current Module PR checks run isaction_required, awaiting maintainer approval. CI is not green and requiredmodule-pr-okhas not run. Local Ready and both clean-source builds/export checks above pass. The PR remains open for the owner to merge; no merge or auto-merge was requested.