Skip to content

Base: FM engine take hooks for synth and cx-osc (69-90) - #2352

Open
ilia-murzinov wants to merge 42 commits into
repeat98:base/octatrack-nextfrom
ilia-murzinov:prop/cx-osc-fm-engine-hooks
Open

ilia-murzinov wants to merge 42 commits into
repeat98:base/octatrack-nextfrom
ilia-murzinov:prop/cx-osc-fm-engine-hooks

Conversation

@ilia-murzinov

@ilia-murzinov ilia-murzinov commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

What was wrong or hard: FM Synth and draft CX OSC detour the same 22 ColdFire engine sites. modules:compat reports 23 clashes. A compatibility.json row on main cannot pass CI without a catalog entry, and detours are not the long-term pattern anyway.

What this changes: Reserves hook indices 63-68 for owner hooks (#2261, #2271, ot_dsp_effects, CLYPS #1997). Adds twenty-two shared take events at indices 69-90 in events.json (sites and guards from the synth port), regenerates dispatch outputs, and declares synth and cx-osc machine-ports subscriptions so packages can migrate off overlapping Detours. Drops the proposals helper script.

How I checked it: events.py --check, hook_coverage.py, test_hook_coverage. Stock tails (OS 1.40C): all 22 FM guard hashes match Elekloader-pinned MAIN (164f3122…); full events.json registry 126/126 sites pass the same check build_core.py runs with --site-events; 21 FM tails jmp site+length; ev_playback_page_resolve jmp 0x40031ed6. npm run octatrack:base --beta with private 1.40C linked (“stock bytes as expected”); no --write, so committed octatrack-base.elemod drift is expected until owner regen after merge. Details in the verification doc.

Guides: nothing.

Verification: docs/verification/2026-11-28-cx-osc-fm-engine-hooks.md.

Supersedes closed docs-only #2349.

Tested on a unit: base da4a1fb69662a6b9, MKII, RAM boot of development twin; preflight ready on saved B04; STOP, PLAY and Part 1 to Part 2 to Part 1 with no modules installed; Quantizer 0.1.5 device try 45 s without crash (rolled back). FM Synth catalog 0.1.5 refused at verify (RUNTIME_EVENT, expected). FM Synth 0.1.6 migration package still crashes on commit (follow-up codex/fm-hook-migration, not this PR).

Edge cases

Case Why this change makes it a risk How run Result
RAM boot with FM hooks 69-90 Bad resolver tails previously VEC:04 in the base code area device boot dev build folder pass
Transport and Part switch, no modules New event dispatch must not break stock sequencer UI device do STOP, PLAY, part2, part1 pass
Second module install on hooks base Event row commit must not corrupt the loader device try Quantizer 0.1.5 pass
Legacy FM Synth package Detours overlap base-owned FM sites device try FM Synth 0.1.5 fail: verify RUNTIME_EVENT (expected until package migrates)
FM Synth 0.1.6 hooks package First subscriber on new call events 73/76/77 device try FM 0.1.6 build fail: USB commit crash 2276/2277 (package PR)

Follow-up

Test plan

  • events.py --check
  • hook_coverage.py
  • test_hook_coverage
  • Stock tail guards vs OS 1.40C (126/126 site guards; FM resolver jmp documented)
  • octatrack:base --beta link against private 1.40C (stock bytes OK; elemod regen deferred to owner --write after merge)

ilia-murzinov and others added 6 commits November 27, 2026 21:29
List seq in sdk/catalog.json, add qualification evidence, perf.py, thumbnail from /private/tmp/octabam-module-art, and module changelogs. UI captures and release-base procedure still needed before module:doctor is green.
Ship the qualified mwrm, device price and perf records from the MKII twin, and the library index update so module:doctor is green.
Lets author auto-release recognize the SEQ author by GitHub account ID.
…b 0.1.0-experimental)

Six band-limited oscillators play one of 13 chords (CHD) in one of 9 voicings (VOI),
named on the knobs, strummed upwards (STR), zapped or scooped in pitch at the hit (PCH),
detuned (DET), saw to square to narrow pulse (WAV), through the track's analog filter.
Slot 39 on the base's digital voices. Host tests 31 pass; played on a MKII (RH01-RH06).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d source build

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ilia-murzinov
ilia-murzinov marked this pull request as ready for review November 27, 2026 22:00

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for turning the FM Synth and CX OSC clash into shared hooks. That's the right direction, and the table in the verification note makes it easy to follow. Three things before the owner can review it for the cumulative base:

  1. Hook numbers. 63-65 are already taken. On 27 Nov the owner put ot_lfo_pmtr_dest (#2261) at 63, ev_audio_step (#2271) at 64 and ot_dsp_effects at 65, and asked CLYPS (#1997) to move its three hooks to 66 and up. Please wait for that answer, then append these 22 after the last number taken. Claim them on the agent board with npm run pr:ready.
  2. Stock tails. A take hook whose tail is wrong can crash the unit, and CI has no firmware. Please rebuild the base from your own 1.40C to confirm every tail (including the two that continue at a different address), and quote the node scripts/base-size.mjs line. Then record a run of that base on a unit, with FM Synth, or CX OSC, on the new hooks (Change a base).
  3. Changelog. Add a changelog/<YYYY-MM-DD>-<topic>.md entry for the base change. And unless the base needs the helper script under proposals/ from now on, please drop it.

This changes FM Synth's adapter as well as CX OSC's, so the owner reviews it as FM Synth's author before it goes into base/octatrack-next.

Stop FX chooser name walks at unreadable descriptors so device:test finishes for machine-only packages; record steps 1-10 on eb667962 via twin 43ac2465.
Align TESTING.md, manifest and octamod with twin 43ac2465, procedure on eb667962, and author runs of CUE Undo and seq.work persistence; restamp performance and qualification sourceSha256.
@ilia-murzinov
ilia-murzinov force-pushed the prop/cx-osc-fm-engine-hooks branch from 051ee24 to e96b600 Compare November 27, 2026 23:27
@ilia-murzinov ilia-murzinov changed the title Base: FM engine take hooks for synth and cx-osc (63-84) Base: FM engine take hooks for synth and cx-osc (69-90) Nov 27, 2026
ilia-murzinov added a commit to ilia-murzinov/modwerk that referenced this pull request Nov 27, 2026
Record pinned MAIN verification (22/22 guards, resolver epilogue jmp) so
repeat98#2352 answers the maintenance-bot tails question without claiming a full
octatrack:base rebuild.
J E Montoro and others added 5 commits November 28, 2026 01:17
Three screens read over the link from RV07 (SY RAVE alone, RAM-booted), their
capture record, tests.documentation, and the edge-case table in TESTING.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	sdk/machines/analog-rytm-mkii/voice-modules.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the new commits. Turning the FM Synth and CX OSC clash into shared hooks is still the right direction, and the 1.40C guard check in the verification note is useful.

First, an apology: my earlier review gave you the wrong numbers for 63-65. The owner's actual assignment, on #2246 on 27 November, is:

  • 63: the Quadraverb program-area table
  • 64-66: the three CLYPS sequencer services (#1997)
  • 67, 68: #2261 and #2271, in the order they become ready

So 69-90 for your hooks can stay. Here is what's left before the owner can review this:

  1. Placeholders 63-68. Right now they name the wrong hook at each number, and they guess the kind and record shape of other people's hooks. If you keep reservation stubs, make them neutral entries with no shape (reserved, no subscribers) in the order above. Or leave 63-68 out and wait for those commits to land on this branch first. The owner decides which they'll accept.
  2. Global STOP and the MIDI note gates. In your proposal on #2246 you pointed out that a first-claimer take hook doesn't cover the STOP path, where every installed engine has to clear its own voices, or the MIDI note gates. Please say in the verification note how these 22 hooks handle those two cases when FM Synth and CX OSC are in the same set. If they don't handle them, say which hooks need a different kind.
  3. Changelog. Add changelog/2026-11-28-<topic>.md for the base.
  4. Rebuilt base. Rebuild with your own 1.40C (npm run octatrack:base -- --beta --write) and commit the base package, so the branch builds what it declares. Without that, CI and the next contributor see drift.
  5. Unit record. This changes what runs on the instrument. Run that rebuilt base on your MKII with FM Synth on the new hooks (a RAM trial is enough), plus the edge cases these sites touch: LFO depth, STOP while notes sound, and a Part change. Record the exact build in the description (test procedure).
  6. Claims. Run npm run pr:ready -- --base-branch base/octatrack-next. It claims 69-90 on the agent board, and it should also bring the incomplete checks back.

@repeat98

Copy link
Copy Markdown
Owner

This PR isn't in the 0.8.4 fold yet: two test_machine_events failures, and it would refuse FM Synth 0.1.5.

What the fold found (base/octatrack-next, 28 Nov 2026):

  • replaces names that don't exist in FM Synth: cx_lfo_* are po_lfo3, po_lfo3b and po_lfopage there, and po_fmsource is fm_source_dispatch.
  • Size mismatch: ev_midi_live_record_trig is 10 bytes; FM Synth's po_mtrig detour is 8.
  • Missing records: there are no records for the 22 mw_take_fm_* entries.
  • Missing port: the cx-osc port points at a draft folder that isn't in the repo.
  • FM Synth needs a release in step. Even with those fixed, the loader refuses FM Synth 0.1.5 on a base that owns these 22 sites, so FM Synth would have to subscribe to the new takes in the same base change.

Your numbering at 69-90 fits the agreed order: 63 ot_lfo_pmtr_dest, 64 reserved for ev_audio_step, 65 ot_dsp_effects, 66-68 for CLYPS. When it comes back, your own placeholder hooks ev_hook_reserved_66-68 with unused-hooks.json lines are the way to keep CLYPS's indices. Ping here when it's updated and we'll fold it in.

🤖 Generated with Claude Code

Qualify change belongs in Fix PR #TBD. Persistence notes RAM twin after eb667962 boot and SEQ kept on card.
@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

Addresses #2352 (comment) at tip 0442c525c:

  • synth machine-ports.json: LFO replaces → po_lfo3 / po_lfo3b / po_lfopage; frame source → fm_source_dispatch; all 22 mw_take_fm_* glue records added; po_mtrig retarget for the 10-byte site.
  • Upstream synth manifest: po_mtrig pad_to=10 (matches ev_midi_live_record_trig).
  • cx-osc port sources paths → sdk/octatrack/modules/cx-osc/… (catalog tree; files land with Module: CX OSC (experimental draft) #2293).

Still separate from this hooks PR: FM Synth package release that subscribes and drops the 22 detours so 0.1.5 loads on a base that owns these sites. cx-osc check_sources needs that listing on the branch before fold can see a full port.

Numbering: 69–90 takes, 63–68 placeholders per #2246 / unused-hooks.json. CLYPS 66–68 when it returns.

J E Montoro and others added 2 commits November 28, 2026 09:29
@repeat98

Copy link
Copy Markdown
Owner

Thanks, the fold fixes are in and the numbering fits. Three things before we fold it, on top of the FM Synth release in step:

  1. STOP and the MIDI note gates (73, 76, 77) can't be take hooks. With one taker, CX OSC would have to merge into FM Synth's handler, which makes one module depend on another. Please make them hooks that call every installed engine, so each clears its own voices.
  2. The cx-osc port should point at sdk/drafts/cx-osc/, where Module: CX OSC (experimental draft) #2293 now keeps it.
  3. The pad_to change in FM Synth's upstream manifest is Tim's module: it needs his OK on GitHub or Discord, linked here, or it ships in FM Synth's own release.

Then the rebuilt base, and one RAM trial on your unit with FM Synth on the new hooks, with the exact build named.

ilia-murzinov and others added 2 commits November 28, 2026 11:07
)

* Improvement: support larger module capture boot budget

* Improvement: support larger capture boot budget and list USB link failures

* Fix: include failed USB links in diagnostics problems

* Optional --boot-max for capture-module-ui; drop redundant diagnostics tweak.

Default captures keep the emulator boot budget; pass --boot-max only when a
dev image needs more. Document the flag beside the existing --max guidance.
repeat98 and others added 7 commits November 28, 2026 11:07
…epeat98#2368)

* Fix: effect modules no longer pin or cap their Octatrack effect id

An effect's id is only the one it prefers: the Modwerk base gives every effect its own at install (dsp.c choose),
up to its 128 ids. The tools still capped ids at 0x1f and refused two modules preferring one, the card image's rules.

- schema.py: no upper bound (0x00-0x03 stay refused); the registry refuses a shared id only on a stock effect's.
- registry.remix() refuses a card remix with an id past 0x1f (card_ids); ledger.check still refuses two on one id there.
- module-compat.py: a shared preferred id installs; a pinned id or two replacements of one stock effect still clash.
- module-contract.ts: effectId 4 to 127, the count read from elekloader/fx-ids.json (byte-identical to the base branch's).
- module-list.mjs, scaffold-module.mjs, module-doctor.mjs: no free-id search, no 0x04-0x1f cap, no "no id left" line;
  an id past 0x1f gets no FX2-slot guard (stock's table has none).
- Builder record fx-ids-preferred-builder.json: validation only, every module declaration loads as before.
- Guides: an effect id is preferred, not exclusive (module-guides README and effects.md, ADD_A_MODULE step 1).

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

* Packages rebuilt from source after the tools change; standalone and candidate recipes re-pinned

The isolated Docker build (modwerk-source-tools edb8c067) and modules:import move only module-build.json's source
commit and tree fingerprint: no package byte changes. The standalone (Play Modes, Tape Echo, Euclid) and candidate
(cc-map, Mute Modes) recipes pin schema.py's and registry.py's new hashes; octatrack:module-packages --check rebuilds
all 48 USB packages identically.

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

* Fix: keep the base's source untouched; the contract bounds an effect id by the Part's byte

elekloader/fx-ids.json is a base input (build_core.py hashes every .json in elekloader/ into the base's identity, and
pr:ready counts the folder as base work), so it stays on work/base-stream-release. The contract takes 4 to 127: a
Part stores the id as a signed byte, so no base can give more; the base's count stays its own (build_core.py FX_IDS).
schema.py's comment points there; the builder record and the recipes pin its new hash.

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

* Packages rebuilt from source again after schema.py's comment; only module-build.json's fingerprint moves

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…2369)

Not a budget to plan against: the new-module skill refuses audio work on
the ColdFire, per-frame work that could run less often, and renders dearer
than a stock track, and offers the light version before any code.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Expose TEMPO to the Octatrack device driver

* Add changelog for device driver TEMPO key

Required for improvement PR; enables host scripts to send the front-panel
TEMPO key via device.mjs.
…98#2342)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…epeat98#2367)

Co-authored-by: Off The Heezy Studio <361415392+offtheheezystudio@users.noreply.github.com>
@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

Threading #2352 (comment) at tip 36c8c71e1:

  1. 73 / 76 / 77 → call + notify (ev_fm_transport_stop, ev_midi_chromatic_on_gate, ev_midi_chromatic_off_gate): every engine handler runs; synth 40, cx-osc 45 in events.json. Synth machine-ports uses mw_fm_transport_stop / mw_midi_chromatic_*_gate (no replaces). Verification doc updated.

  2. cx-osc port → sdk/drafts/cx-osc/ sources only (matches Module: CX OSC (experimental draft) #2293 draft); dropped forward subscribe block on this base PR.

  3. po_mtrig pad_to: reverted upstream manifest edit on this branch; site coverage stays via retarget in machine-ports. Will land pad_to=10 in FM Synth release with Tim’s sign-off (GitHub/Discord link there).

Still on owner list: FM Synth package in step, rebuilt base + RAM trial with build ID named.

python3 sdk/machines/octatrack/events.py --check and hook_coverage.py green locally.

repeat98 and others added 3 commits November 28, 2026 11:19
Modwerk reviewed merge
Base: a5d4c2a
Head: 99c3cdf
Review: 6097216924
Approved by: repeat98 (67785539, maintainer)
Keep owner tables at indices 63-65, placeholders 66-68, and take/call hooks 69-90 for FM Synth and draft CX OSC machine ports.
@ilia-murzinov
ilia-murzinov force-pushed the prop/cx-osc-fm-engine-hooks branch from 36c8c71 to 0e9d3cf Compare November 28, 2026 10:27
@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

Rebased onto current base/octatrack-next (817bc050) as a single commit (0e9d3cf0).

events.json now keeps owner tables 63–65 (ot_lfo_pmtr_dest, ot_reserved_64, ot_dsp_effects), neutral placeholders 66–68, then the same FM take/call hooks 69–90. unused-hooks.json dropped stale ev_hook_reserved_63–65 lines. Changelog and verification note the index shift.

Local: events.py --check and hook_coverage.py pass.

repeat98 and others added 6 commits November 28, 2026 11:28
Modwerk reviewed merge
Base: a8fcfb9
Head: 76ffd9a
Review: 6097239882
Approved by: repeat98 (67785539, maintainer)
Retarget pad_to from guardLength; declare call-hook replaces; drop the ev_fm_amp_edit stock copy from the synth recipe.
* Workflow: read Cursor agent-transcripts in session review.

post-eval had no timing on Cursor; paths under agent-transcripts/ auto-select the cursor parser.

* Workflow: Cursor session review, share, and capped post-eval timing.

SEQ and SCOPE module-release sessions ran mostly in Cursor; share and review
were blind there, and overnight gaps made tool wall time useless for post-eval.

* Workflow: upload Cursor sessions before Worker lists cursor agent.

Fall back to claude-code with a tagged note when the API answers 422.

* Workflow: document SEQ/SCOPE/CX release session post-eval.

Measured prompts, tool wall time, friction themes, and follow-up backlog; local review only.

* Improvement: refuse qualify script edits in module PRs; warn on piped check.

SEQ/SCOPE release sessions carried octatrack-qualify.py in the module PR;
pr:ready now flags it like other shared gates. check prints a pipe exit trap.

* Improvement: gate scope, release-branch and fork hints for module PRs.

Codify refuse-qualify-in-module-pr, release/* catalog reminders, fork push visibility, check rerun hints, and DEVELOPER_WORKFLOW fork paragraph from SEQ release friction.

* Improvement: trim DEVELOPER_WORKFLOW fork line under doc size gate.

Keep fork-push hint in submit step; release notes stay in pr:ready.

* Workflow: keep check failure summary lines stable for CI.

Print pipe and rerun hints only when the check passed, so check.test.ts and GitHub logs still end with Failed: lines.

* Workflow: note folded repeat98#2375 improvements in post-eval changelog.

* Workflow: flatten post-eval changelog for heading gate.

Full session tables stay in PR repeat98#2374 body; changelog is prose only per scripts/changelog.mjs.
…epeat98#2373)

developerNames() scrubbed every name part of three or more letters, so a
developer whose Git name contains words like "The" or "Off" lost those
words throughout their shared transcripts. Common words join NOT_NAMES;
the full name and its distinctive parts are still removed.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Resolve standalone-recipes pins; take main build.py and schema.py; refresh synth recipe source hashes after machine-ports work.
@ilia-murzinov
ilia-murzinov marked this pull request as draft November 28, 2026 11:54
Refresh controller policies and committed elemod after hooks 69-90;
document stock guards, base --write, and unit A/B RAM boot on dev twin.
After octatrack:base --write the controller-linked identity is fd6e0e40; the six bound catalogue rows must name it so install and check agree.
Record the commit-phase crash and that FM behavior stays unproven until install completes.
@ilia-murzinov
ilia-murzinov marked this pull request as ready for review November 28, 2026 14:08
@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

Ready for review from my side. This comment records what is proven on hardware versus what stays in the FM Synth package follow-up (codex/fm-hook-migration, not this PR).

Hardware (MKII, OS 1.40C, dev twin da4a1fb69662a6b9…, 28 Nov 2026)

  • RAM boot of this branch’s development build: OK.
  • Preflight on saved B04: ready.
  • STOP, PLAY, Part 1 ↔ Part 2 with no modules installed: OK.
  • Quantizer 0.1.5 device try on the same twin: commits and runs 45 s without crash (rolled back, not kept).
  • FM Synth 0.1.5 catalog package: refused at verify with RUNTIME_EVENT (expected on a hooks-only base).
  • FM Synth 0.1.6 migration package: still fails during USB commit (2276/2277; earlier PC 0x40d9159c). That fix belongs in the package PR, not here.

Scope reminder

  • This PR adds base sites 69–90 and subscriptions in machine-ports; it does not ship an FM package that loads on the hooks base yet.
  • Details: docs/verification/2026-11-28-cx-osc-fm-engine-hooks.md (updated on prop/cx-osc-fm-engine-hooks at 0b15a39ed).

Before merge (owner)

  • Agent board: hook indices 69–90 may still need a clean claim relative to work/base-next-fold (Improvement: Octatrack base cumulative draft after 0.8.3 #2333); I have not re-run npm run pr:ready to green after the latest push.
  • base-size.mjs --write for beta identity aa00a60b… if that commit is part of the merge story.

FM behavior (STOP release, wide MIDI chromatic gates, LFO depth on a synth track) stays unproven until the 0.1.6 package commits successfully on this base.

This branch has not been deployed

No deployments
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.

3 participants