Repository navigation
Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine - #2204
Conversation
… track that leaves a group - SETTINGS > VOICES: the label is rewritten each time the menu asks for it (SETTINGS builds its rows once, so it kept the track that was on then), and the row draws an icon in the stock icons' place with the count beside it. - Lowering VOICES while notes ring: a former voice's note-off, which still names the lead, goes to the track that holds the note (it ended the lead's note of the same pitch instead, and the voice's note rang on), with the lead's machine until the note ends; the track's loaded-sound pointer is cleared so its next note loads its own sound. - VOICES.md and the 948be0c4 verification record: the release checks on 27dfadf8 and the emulator checks of this base.
…ices keep its machine until their own note; icon eyes
…); a leaving track gets its own back
|
Thanks, that's a good root-cause fix. Naming the lead's sound in the note-on ( Before it goes into
|
There was a problem hiding this comment.
Thanks for the unit note on the shared level and for the changelog entry. It's good to hear the chord follows the lead's LEVEL and mixer volume on a real unit.
The four points from the review on 26 November are still open on this head (0befcd0f), so here they are again:
- Routing while the groups change.
core_voice_eventstill keeps going whileregrouphasleadsat 0 andlead_ofhalf rebuilt (wheneverformersis set), so a lead's note in that moment can go to track 16 and be lost. Please make it return whileregroupruns, for example with a flag set at the start ofregroupand cleared afterleads = found. - Full SHA-256s of the tested base and image in
VOICES.md, the waybase-binding.jsongives948be0c4. - Unit cases on the image you test, added to the table:
- a kit load or reload while linked, then a chord from the keys;
- a sound lock on a lead's trig, then a chord from the keys;
- MIDI chords (still open: the recording would settle it);
- Load Project into a project with different VOICES settings, checking that the former voices play their own sound on their first note.
- #2138. Once this one is in, merge it into #2138 (merge, don't rebase) and use one way to find the kit's track sounds. Does #2138 still need to overwrite the voice tracks' kit sounds now that a voice loads the lead's sound note by note?
Pull requests into base/digitakt-ii-next get only the description check in CI, so please run npm run pr:ready on the new head and paste the result. Once these are in, I'll review it for the base.
There was a problem hiding this comment.
Thanks, this settles the review:
- Routing while the groups change:
regroupingnow stopscore_voice_eventfrom the start ofregroupuntilleads = found. Former voices are covered too. - Full hashes:
VOICES.mdnow lists every tested base and image by its full SHA-256. - Unit cases: a kit reload, a sound lock, MIDI chords, and Load Project into a project with every track at 1 all passed on
d3372d20. - #2138: it merged into
base/digitakt-ii-nexton 26 November, so that point no longer applies.
One small thing for later, which doesn't block this: lead_of and former_of are written between two volatile stores, and nothing in the language stops the compiler moving the plain lead_of stores past regrouping = 0. A compiler barrier (__asm__ volatile("" ::: "memory")) before clearing the flag would make the order certain.
This now waits for the owner's approval to go into the Digitakt II base.
…ecording, restored sounds The base of this branch (base/digitakt-ii-next with chord recording brought back, #2204 and the restore of a voice track's own sound), recorded by machine:base --write with the reviewed toolchain (18,852 bytes .run, 30,732 bytes .bss, 48 sites) and vendored for step 2's pin. It is byte for byte the base of the unit-tested images b8cff950 and 2b4850e1. The machine page's core image size follows; the verification record names the build and its checks.
…again Digitakt II base: chord recording back, voices' own sounds restored, with #2204
What was wrong or hard
The release checks of base
948be0c4(image27dfadf8, in #1999) found two linked-voices bugs and asked for an icon on the VOICES row:T9 VOICESon every track. SETTINGS builds its rows once, so the label kept the track that was on then.A first fix (
f702c908, test imagee0244b16) cleared each leaving voice's loaded-sound pointer. On the unit that caused a new bug, the synth randomly playing unedited: after VOICES 3, 1, 3 a key note on a voice loaded the voice's own sound with the lead's machine. The emulator reproduced it, and this PR fixes it at the root.What this changes
sdk/machines/digitakt-ii/elekloader/modwerk/voices.c,voices-entry.s(base only, no module):core_addrow) with its own draw: a 9x9 icon in the stock icons' place, the count right-aligned at x + 19 as before, and a label rewritten each time the menu asks for it (core_voice_row_label, then core'score_value_label).+0x3c), so stock loads the lead's sound there whenever the voice last loaded another, never the voice's own.core_voice_lead), takes note-offs naming the lead for a note it still holds, and its own note-on clears its pointer at0x8000470c, so that note loads its own sound.lead_ofstarts as none (it read as "track 1's voice" before the first project load).regroupruns,core_voice_eventroutes nothing (aregroupingflag set at its start and cleared afterleads = found), so a lead's note in that moment plays where stock sends it instead of going to track 16 (review of 26 and 30 November).0x80003340 + 2 t, the level the sound chip gets) are set to the lead's, and a track leaving the group gets its own back from the kit ([0x80004704] + 0x14 + 2 t). Added after the tester asked for the lead's mixer volume to lower its voices.Base
632bf110(.run16,944,.bss12,652, 47 sites;2ead25d6before the shared level).base-binding.jsonstill names948be0c4: the binding, package and pin are a release step for the owner, as for #2138.Records:
VOICES.md(design, the release checks, both fix rounds),docs/verification/2026-11-24-digitakt-ii-linked-voices-base.md(the release-check table for948be0c4),changelog/2026-11-25-digitakt-ii-voices-fixes.md.How I checked it
On a unit: Claptom-music tested image
b6ee842b(this base2ead25d6+ the Morpha package of27dfadf8) on a Digitakt II, OS 1.17, over USB. Covered: the icon and label on several tracks, the kick when lowering VOICES while playing, edits kept after VOICES 3, 1, 3, a held chord when VOICES drops, and a former voice played on its own. They reported it ready for review, with no case failing. The first round (e0244b16) is recorded inVOICES.md.The review's unit cases (reported by the tester, 1 December 2026, image
d3372d20, SHA-256d3372d2028941687702804defef5f220253d656c90c6eb4200dd7ce7c73ebdcb: this code with #2477's chord recording and Morpha): a kit reload while linked then a chord from the keys, a sound lock on the lead's trig then a chord, MIDI chords, and Load Project into a project with every track at 1 (the former voices' first notes are their own sounds): all pass.VOICES.mdnow lists every tested base and image by its full SHA-256.The shared level, on a unit (reported by the tester, image
094b8a09: this branch with #2138 and Morpha, and again on2b4850e1): the chord follows the lead's LEVEL and mixer volume, and tracks 2 and 3 return to their own levels at VOICES 1. Emulator: VOICES 3 with track 1's LEVEL at 0, a three-key chord is silent, where the build without it still played tracks 2 and 3; the same chord with LEVEL untouched plays both voices.Emulator (ColdFire panel probe and coupled ColdFire and sound-chip runs, same Morpha package):
27dfadf8andb6ee842b0x8000470ce0244b16: track 2 loaded its own sound. This base: the lead's values and pointer0x47db4310; coupled with Morpha27dfadf8: tracks 2 and 3 stay held, the voice stops abruptly. This base: all notes end; both fade with the lead's releaseVOICES.mdsdk/tests/test_machine_base.pypasses (25). The branch is merged with the currentbase/digitakt-ii-next(0befcd0fe; it differs from it only in the five files above).npm run check -- --base upstream/base/digitakt-ii-next: every stage passed excepttest, whose failures were time-outs on this computer (the checkout sits on a Windows drive under WSL). Rerun alone with--testTimeout=300000,module-guides.test.tsandoctatrack-emulator/session.test.mjspass. Twomodule-doctor.test.mjscases still fail: the doctor they start takes 30-41 s here against the test's own 30 s limit, so it is cut off with no output. They failed the same way before these changes, and no module is changed here. CI reruns them.What the guides lacked: the stock "load a sound only when it changed" rule (
0x8000470c) and thatfw_fillrectcounts a menu row's lines upward were undocumented. Both are now inVOICES.md.The release-check results for #1999's test table are in
docs/verification/2026-11-24-digitakt-ii-linked-voices-base.md.