Skip to content

Improvement: Rytm base: a voice machine's knob with no parameter shows stock's empty box - #2402

Draft
chevyone wants to merge 2 commits into
repeat98:base/analog-rytm-mkii-nextfrom
chevyone:claude/rytm-voice-knob-none
Draft

chevyone wants to merge 2 commits into
repeat98:base/analog-rytm-mkii-nextfrom
chevyone:claude/rytm-voice-knob-none

Conversation

@chevyone

Copy link
Copy Markdown

For the Rytm cumulative base draft (#1934). Owner review: @repeat98.

What works: a digital voice machine can now say a knob has no parameter. Its SYNTH page then shows stock's dithered empty box there, as stock CY CLASSIC does for C, E and F, instead of an unlabelled dial. That knob takes no turn, no lock, no MIDI CC and no NRPN. Seen in rytm-emu; not run on a unit yet.

What it means musically: a machine with fewer than seven controls (HH ALLOY's 6-bit hi-hat has TUN DEC STK COL LEV) no longer shows dials that do nothing.

Who must act: the owner reviews this into base/analog-rytm-mkii-next. A unit run waits for the draft's hardware pass. HH ALLOY will use it in its own module PR, not this one.

Next step: merge into the draft, then a unit run of the case below with the draft's next test build.

How it works
  • Stock doesn't decide an absent knob from the parameter records. It uses each machine's SYNTH page table (0x40288028 + 36 x machine: a word, then the record id of knobs A..H, where 0 draws the dithered box and takes no turn). Slot 41's row names a record for all eight knobs, which is why empty names still gave dials.
  • struct mw_voice gains uint16_t none in place of its pad: same position and width, so existing modules build unchanged. Bit i marks sound index 9 + i (MW_VOICE_NONE(index)). LEV's bit is ignored.
  • At stock's one-time boot map build (jsr 0x40006cd8 at 0x400fb274, a new 6-byte site in add, guarded by SHA-256), mw_voice_records sets that knob's page id to 0 and the slot's record owner to −1, as stock's unowned records, and then runs stock's builder. The builder skips owners outside 0..62, so the knob's CC and NRPN map to nothing, as for CY CLASSIC. I read every other reader of the record owner in OS 1.74: they treat −1 as "no machine". The record keeps its id, so storage, other machines and the spare records 44..52 stay as they are.
  • The imported core-ar2 machines.c stays byte-exact (its hash is pinned). All of this is Modwerk's own base/voice.c, modwerk/voice.h and base.json.
  • Identities: send-bus 288d1d5c, voices d6d0f2b0 (+176 B .run each), plain 0b5b4ce1 unchanged. The packages are re-pinned, and machine.json budgets and the elekloader README sizes are updated.
Tests

rytm-emu (dtboot), voices development base from this branch (3168fcf2) with a local copy of HH ALLOY marking E, F, G (indices 16, 14, 12) as none. Image KN03 (not committed). Case knob-none (scratch project): pass.

  • The page draws dithered boxes on E, F, G.
  • CC 19/21/23 and turns of E, F, G leave the page as it was.
  • With a trig held in grid record, a turn of E adds no lock, and A (TUN) locks (inverted, +36).
  • TUN still takes CC 17 and a turn, and DEC a turn.
  • Choosing another machine and then HH ALLOY again (a sound apply) draws the boxes again.

Control image KN00, the same build with none = 0, fails exactly the "absent" expectations: dials move on CC and turn.

link-cc, link-func-nudge, link-global-menu, link-midi-out and link-nudge-and-back pass on the marked image. link-sound-note did not run here (numpy is missing for its audio step).

Not tested: a unit; a full kit load from a saved project with the machine; MIDI out of an absent knob (none is sent, since no record maps it).

Local npm run check (macOS): what this change touches passes (digi-build, rytm-base and kit-devices tests, test_machine_base's footprint and held-site checks). Still failing here, outside this change, on this Mac's host toolchain: test_volatile_service.py (clang's sprintf deprecation under -Werror), and mc-device/rytm-device host builds (ld: tapi error: malformed file). CI decides those.

What the guides lacked

The machine README said a slot's knob positions are fixed and talked only about records, so an "empty knob" looked like a record matter. It now says, under Digital voices, that stock reads absence from the page table, and how a voice marks a knob (mw_voice.none, name 0 rather than ""). Changelog: changelog/2026-11-28-rytm-voice-knob-none.md.

🤖 Generated with Claude Code

chevyone and others added 2 commits November 28, 2026 20:14
mw_voice.none (in place of its pad: same place and width, so existing
modules are unchanged) names sound indices with no parameter. At stock's
boot-time map build (site 0x400fb274, mw_voice_records) the base sets that
knob's id in the machine's SYNTH page table (0x40288028 + 36 m) to 0 and
the slot's record's owner to -1, so the page draws stock's dithered box,
as for CY CLASSIC's C, E and F, and no turn, lock, CC or NRPN reaches it.
Identities: send-bus 288d1d5c, voices d6d0f2b0, plain unchanged.

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

Plain (0b5b4ce1) is unchanged. +176 B .run in send-bus and voices.

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, this is a tidy change, and having stock's empty box on unused knobs will help every voice machine with fewer than seven controls.

I read the code and it looks right to me. The new boot site is guarded by its stock hash and no module patches it. none takes the old padding's place, so existing voices build unchanged. The page and the record owner are cleared only for the voice's own slot, and LEV is always left alone.

The one red check is the description, not the code. Two things to add:

  1. Edge cases: under a line "Edge cases", add the table | Case | Why this change makes it a risk | How run | Result | (test procedure, edge cases). npm run test:procedure writes the empty table. The cases you already list fit there: a sound apply after another machine, a lock on an absent knob, CC and NRPN to an absent knob, a full kit load from a saved project (not run), and MIDI out (not run).
  2. Guides: your "What the guides lacked" section is inside <details>, and the check looks for a line of its own, for example "Guides: the Rytm machine README now says stock reads an absent knob from the page table (Digital voices)."

The check reruns when you save the description. It can stay a draft until the base's next hardware pass. Before it goes into #1934, the unit run you describe needs to be recorded here, with the build it ran on.

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.

1 participant