Skip to content

Module: CX OSC (experimental draft) - #2293

Draft
ilia-murzinov wants to merge 21 commits into
repeat98:mainfrom
ilia-murzinov:module/cx-osc
Draft

ilia-murzinov wants to merge 21 commits into
repeat98:mainfrom
ilia-murzinov:module/cx-osc

Conversation

@ilia-murzinov

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

Copy link
Copy Markdown
Contributor

A module or module update: Experimental draft sdk/drafts/cx-osc/, version 0.1.0-experimental. CX OSC is a complex oscillator on a FLEX track (signature CX,1). PLAYBACK has PTCH/RATO/INDX/FINE/FOLD/MIX; SRC SETUP has CAR/MOD/DEC/SYMM/FDBK/PWM. Ported from Tim Hastie's CX OSC at 256bcf4b in octabam modules/cxosc, with attribution in LICENSE-TIM and NOTICE. It registers through runtime.json and packages from the baked standalone/*.s sources. The configurator conflict with FM Synth remains. This PR stays draft while shared engine hooks are worked out on cumulative base draft #2246. No compatibility relation is proposed.

Shared-site hook proposal for #2246: modules:compat reports 23 findings against FM Synth at 22 distinct addresses. The findings identify stock engine paths both modules need to share:

  1. 0x40003ca4: read LFO depth for PMTR 30–34.
  2. 0x4000d03e: frame-builder's inlined LFO-depth read.
  3. 0x40031e62: LFO page descriptor for PMTR 34.
  4. 0x4000b51a: AMP release consumer.
  5. 0x4000b2c8: STOP/restart all-voices-off path.
  6. 0x4000c634: START command rewrite.
  7. 0x4000685c: voice-kill path.
  8. 0x4000e452: MIDI IN note gate.
  9. 0x4000de10: MIDI note-off gate.
  10. 0x400625e0: MIDI live recorder.
  11. 0x4006262a: MIDI recorder while a trig is held.
  12. 0x40051fce: octave UP/DOWN while a trig is held.
  13. 0x40059d56: AMP SETUP LEG staging.
  14. 0x4003685a: AMP SETUP drawer names and formatters.
  15. 0x400368ac: AMP SETUP widget enable nibbles.
  16. 0x40036946: AMP SETUP name enable nibbles.
  17. 0x4003ae40: AMP page-2 LEG editor.
  18. 0x4003ae40: synth copies stock bytes here and CX OSC patches the same bytes, so install order matters.
  19. 0x4003af0a: AMP LEG live-lane write.
  20. 0x400795ba: slot assignment for FINE when selecting CX/SYNTH.
  21. 0x40022686: file-browser selection used by synth-path FINE setup.
  22. 0x4000d514: frame-builder supplier/dispatch.
  23. 0x40031ece: PLAYBACK page resolver.

The adapter's machine-ports.json pins intentionally name sdk/octabam/modules/cx-osc/. draft-stage.mjs refreshes that generated mirror from the staged module, and machine_ports.py verifies the hashes there before using the recipe.

Tested on a unit: package f52815adb0d5cdb0f1926c519f8319ce4527f1adcc52313d502023fb306065ad, MKII OS 1.40C, RAM-booted development twin, 27 Nov 2026. device:test, device:price and stress evidence are from twin 46c30886a7e8f3f6. A fresh UI capture ran on twin 311bb670568f8e91, image SHA-256 92d2ba065fa82198f17a26a3efd1d3dac56e46ce1455048eb861a0517df0a48b: the unit accepted CX OSC on Part 2 T1, and the Part signature read CX version 1. The reviewed LCD frames are media/ot-location.png (chooser with SRC SETUP controls) and media/ot-playback.png; their hashes are in media/capture-hardware.json.

Edge cases

Case Why this change makes it a risk How run Result
FM Synth and CX OSC together Both patch shared engine sites module:doctor -- --draft cx-osc and modules:compat fail: 23 findings; keep the configurator conflict and do not combine them
CPU admission at higher instance counts Render load can exceed the Part budget device:test, device:cx-stress pass: three hot morph-zero instances admitted; further picks refused CPU FULL; stress report records up to 408 us
CX OSC selection and saved Part The chooser must write the machine signature to the selected track USB trial and signature read on Part 2 T1 pass: package accepted; signature CX, version 1; capture script restored the Part
Audio output and persistence Listening and saved-state behavior need a full project session listening, Keep, power cycle not run: needs a separate listening and persistence session
MIDI/chromatic load Note routing and release need a wire-rate run MIDI/chromatic stress not run: no MIDI flood run

Validation: verify.py passes 11 checks, test_cx_osc_load.py passes 3 tests, and test_cx_osc_port.py passes 7 tests. npm run module:dev -- cx-osc --build-only reproduces package SHA-256 f52815adb0d5cdb0f1926c519f8319ce4527f1adcc52313d502023fb306065ad (29,968 code/data bytes, 0 BSS, 74 relocations, 4 hooks, 34 stock-code sites). The draft doctor passes host tests, CPU price and frame cost; cross-compatibility remains red for the declared FM Synth conflict, and release evidence is still open. CI on the previous head passed; this update needs its new run.

Guides: followed Propose a hook by listing every shared-site finding and its role here for the owner to review on #2246. CATALOG-SHIP.md now keeps the module unlisted until shared hooks resolve the overlap.

@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 port and for the careful provenance: Tim's licence, the NOTICE, the import pin and the dev-twin run are all in order, and checks are green. Three things before this can move past a draft:

  1. Remove the built package. sdk/drafts/cx-osc/cx-osc.mwrm is a built image, and built images never go into the repository (AGENTS.md, Setup and checks). Keep it on your computer; npm run module:dev -- cx-osc rebuilds it for anyone trying the branch.
  2. Remove pr-body-cx-osc.md from the repository root. The description belongs in the PR itself.
  3. The shared engine sites. CX OSC patches the same stock sites as FM Synth (the LFO depth site 0x40003ca4 and the others in runtime.json's rests), and your own limitations count 46 compat findings with it. A declared conflict hides the pair in the configurator, but modules:compat still refuses overlapping bytes once the module is listed, and a new group-owned entry is the last resort. The route is a shared hook or table on the Octatrack's cumulative base draft (#2246) that FM Synth and CX OSC both subscribe to (Propose a hook). Say in the PR which sites you need and what each does, and the owner can take it there.

Smaller: the machine-ports.json pins point at sdk/octabam/modules/cx-osc/, the generated copy, while the source lives in sdk/drafts/cx-osc/. Please check that is what the adapter expects. When the docs and listening pass are done, run npm run module:doctor -- --draft cx-osc and npm run pr:ready again.

@ilia-murzinov
ilia-murzinov force-pushed the module/cx-osc branch 3 times, most recently from f95d038 to b91d10f Compare November 27, 2026 13:47
@repeat98

Copy link
Copy Markdown
Owner

Thanks for the ship checklist, and for taking the built package out. It makes the plan easy to follow.

On the question it leaves for me: no, I won't add the group-owned FM Synth + CX OSC relation to compatibility.json for the 23 shared engine sites. The guide treats that kind of entry as a last resort, and here shared hooks are the better way. Two routes work:

  1. Base hooks. List the engine sites CX OSC needs (the frame builder, LFO depth and the rest) and what each one does, as a hook proposal on the Octatrack's cumulative base draft Octatrack base 0.8.3: CPU back from the Part read, USB Audio streams in the CPU limit, no USB DISK freeze, and four more #2246. FM Synth and CX OSC then both subscribe, and so can the next FM-style machine.
  2. One module. Both machines use Tim's engine, so CX OSC could ship as a machine inside FM Synth. That needs Tim's OK, since FM Synth is his.

With that settled, please take sdk/drafts/cx-osc/owner-compat-relation.json out, and the relation steps from CATALOG-SHIP.md (the checklist itself fits in the description). pr-body-cx-osc.md in the repository root is still there from the last review too. Then run npm run pr:ready and push. It's fine to keep it a draft while the hooks are worked out.

@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 taking out the compatibility relation and the stray description file. That settles the last review, and keeping this a draft while the shared engine hooks get worked out is fine.

Three small things before it moves on:

  1. The shared screenshot tool. This draft changes scripts/capture-module-ui.py, which every module uses. Please send that change as its own small Improvement: pull request with a changelog entry, so it can be reviewed apart from CX OSC (Fixes and improvements).
  2. CX OSC's own scripts. scripts/cx-osc-device-stress.py and scripts/cx-osc-ui-capture.py only serve this module. Please move them into sdk/drafts/cx-osc/scripts/, next to bake_standalone.py. A module brings no module-specific tooling into the shared folders.
  3. A local path. NEXT-SHIP.md names a folder on your own computer (/Users/…/modwerk-dev-twin-cxosc). Please swap it for a placeholder such as <twin build folder>.

The waiver request can wait until the hooks are settled. Then run npm run pr:ready and push.

@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

I’m taking route 1. The compatibility relation is removed, and CX OSC will stay draft until the shared engine sites move to the cumulative base draft #2246.

The detector reports 23 findings across 22 unique addresses. I’m writing the hook proposal against those exact sites now. Most are per-track take hooks. The global STOP path needs every installed engine notified, and the MIDI note gates need the base to combine the eligible track masks, so those need base dispatch behavior rather than a first-subscriber-wins take hook.

I’ll link the proposal here once it is on #2246. I won’t change Tim’s FM Synth source without his approval.

ilia-murzinov added a commit to ilia-murzinov/modwerk that referenced this pull request Nov 27, 2026
Records why compatibility.json cannot land on main before cx-osc is
catalogued, and points at owner-compat-relation.json on PR repeat98#2293.
ilia-murzinov added a commit to ilia-murzinov/modwerk that referenced this pull request Nov 27, 2026
Records why compatibility.json cannot land on main before cx-osc is
catalogued, and points at owner-compat-relation.json on PR repeat98#2293.
Buchla-style complex oscillator machine for FLEX with SETUP_ALL/FDBK
fixes, synth conflict and group-owned hook relation, host tests, and MKII
USB notes in TESTING.md.
Community changelog for cx-osc required a catalog entry; remove it for
the experimental draft. Name 0.1.0-experimental in TESTING.md so
modules:check passes.
device:price curve, device:test, cpuPrice 6, frame-costs, and evidence JSON; drop inactive compat relation until catalog listing.
Matches synth contribute shape, fixes module:dev table-owner refusal,
restores module-contract processing.method, and records octabam backport notes.
Restores global frame-costs.json so set-package.test matches draft scope.
counts() poked row count at 0x40079248 but left stock's second pea at 6, so SELECT MACHINE TYPE drew a blank sixth line. Patch visible to min(6, 5+n) and assert it in test_machine_registry.
Qualification, hardware PNGs, performance evidence, and changelog for
0.1.0-experimental. Owner must merge compatibility.json with catalog;
re-measure frame cost on medium pattern and Docker-import packages next.
Scope compile workdirs per module so cx-osc and synth can both link poly.s
in one Docker REQUESTED build. Bind qualification evidenceRevision to the
listing tip and note unit-away blocker in LISTING-STATUS.
Docker-isolated compile with cx-osc in catalog scope, development import
of requested-packages baseline, machine port manifest pin, and catalog USB
row plus 0.1.0-experimental.mwrm. Frame cost on medium pattern and
modules:generate still need the unit connected.
modules:check on CI needs sdk/machines/octatrack/frame-costs.json in sync
and cx-osc in src/catalog/module-documents.json so release notes validate.

@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 pushing on with the hook proposal. The latest commits went a step too far, though, so here's where it stands:

  1. Not in the library yet. CX OSC now has a catalog entry and a public package, but it still patches the same 22 engine sites as FM Synth. A conflict entry doesn't make that overlap acceptable (Cross-compatibility). It can be listed once the shared hooks are in the base and both machines subscribe. Until then, please take out the catalog entry, public/octatrack-modules/cx-osc/, and the generated package and document changes that come with them, and keep it a draft under sdk/drafts/cx-osc/.
  2. Files from earlier reviews are back. pr-body-cx-osc.md at the root, owner-compat-relation.json, a built cx-osc.mwrm in the module folder (built images never go into the repository), and the two CX scripts in the top-level scripts/ folder. Please remove them again or keep them inside the module folder.
  3. The machine-chooser fix is base work. The change to machine_registry.c (the empty sixth row) is a fix for everyone. Send it as its own commit to the Octatrack's current cumulative base draft #2333 (that replaced #2246), with what you saw on the unit. The engine hooks go there too. Hook numbers are handed out there: 63 is being added on that branch first and 64–66 are already given to CLYPS, so your hooks will need the numbers after those.

Then npm run pr:ready and push. It's fine to stay a draft while the hooks land.

Owner review on repeat98#2293: move back to sdk/drafts/cx-osc, drop catalog entry,
public package, changelog, and committed mwrm; remove pr-body helper and
top-level capture scripts; drop machine_registry viewport fix from module
scope; cite draft paths in machine-ports.
Refresh module-build.json fingerprints after merge and draft-only path.
@ilia-murzinov

Copy link
Copy Markdown
Contributor Author

Addresses review #2293 (review) at tip 2a07b7f52:

  1. Draft only again: sdk/drafts/cx-osc/ (moved back from sdk/octatrack/modules/). Removed catalog row, module-documents / changelog / public/octatrack-modules/cx-osc/, committed .mwrm, and cx-osc from REQUESTED compiler scope. machine-ports.json cites draft paths only.

  2. Cleanup: dropped root pr-body-cx-osc.md, owner-compat-relation.json, top-level scripts/cx-osc-*.py (now under sdk/drafts/cx-osc/scripts/).

  3. Base out of module PR: reverted machine_registry.c / test_machine_registry.c viewport fix to match main (belongs on cumulative base Improvement: Octatrack base cumulative draft after 0.8.3 #2333 / hooks Base: FM engine take hooks for synth and cx-osc (69-90) #2352 with unit notes). Chooser fix not re-submitted on this branch yet.

Merged origin/main. module-source test green locally; CI pending. Stays draft until #2352 hooks land and both machines subscribe.

@repeat98

Copy link
Copy Markdown
Owner

Thanks, that settles the last review. Two more things:

  1. The change to scripts/build-module-packages.py (two machines sharing a unit label) helps every module, so please send it as its own small Fix: pull request with a changelog entry, and revert it here along with the module-build.json hash it brings.
  2. This branch keeps CX OSC under sdk/drafts/cx-osc/, but Base: FM engine take hooks for synth and cx-osc (69-90) #2352's port points at sdk/octatrack/modules/cx-osc/. I'm asking on Base: FM engine take hooks for synth and cx-osc (69-90) #2352 to point at the draft paths until CX OSC is listed.

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.

2 participants