Skip to content

Digitakt II base: chord recording back, voices' own sounds restored, with #2204 - #2477

Merged
repeat98 merged 25 commits into
repeat98:base/digitakt-ii-nextfrom
Claptom-music:base/dt2-chord-recording-again
Dec 3, 2026
Merged

repeat98 merged 25 commits into
repeat98:base/digitakt-ii-nextfrom
Claptom-music:base/dt2-chord-recording-again

Conversation

@Claptom-music

@Claptom-music Claptom-music commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What was wrong or hard

Chord recording (#2138) was merged into base/digitakt-ii-next and then held back (e18ca55eb): it still needed the unit cases and its release step. Since then the tester found that voice tracks kept the lead's copied sound (and machine) after VOICES went back to 1, and #2204 fixed other linked-voices bugs in the same voices.c.

This pull request brings chord recording back with the restore fix and #2204. Following the review, binding, package and pin are left to the combined base of the release.

What this changes

  • git revert e18ca55eb: chord recording as merged in Improvement: Digitakt II base: chords recorded across linked voices #2138 (voices.c, voices-record-entry.s, the live-record site 0x40048fb2 in base.json, its changelog).
  • Own sound back (voices.c): a voice track's own kit sound and pattern-track settings (+0x480..+0x48f) are kept in memory when it joins a group and put back when it leaves: the settings into the pattern they came from, the sound if the same kit is on. What was kept is never kept over while the track stays linked (VOICES 3 to 1 passes 2). A project load drops what was kept.
  • The loss, stated for musicians (changelog, VOICES.md): set VOICES back to 1 before saving, changing kit or loading a project; a project saved while linked keeps the voice tracks as copies of the lead, and patterns played while linked keep the lead's length, swing and speed on the voice tracks. The kit write stays in this release; VOICES.md says why (a voice step's trig defaults and timing come from its own pattern track).
  • Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204 merged in (still open on its own, with the review's points: no routing while regroup runs, here also no live recording; full SHA-256s). One way to find the kit's track sounds: KIT_SOUNDS = [0x80004704] + 0x34. If Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204 merges first, this diff shrinks to the chord-recording part.
  • Verification record: docs/verification/2026-11-30-digitakt-ii-voices-chord-recording-base.md (no binding or pin here).

How I checked it

Tested on a unit: base 616b05dd (package sha256 616b05ddb30079e705ea0aa2e9edd9e3fca31cdb6960976978d51f8318ef0ceb), the code of this head, in image 865cbe34 (SHA-256 865cbe341dd002c6d88f3a1daae3c93c27024e801743daa8cbef1784b1c84c6c), Digitakt II (MKII), OS 1.17, over USB, by the tester (Claptom-music): the pattern-change restore case. Every other case ran on image d3372d20 (base 42465f2a154da6cb364027b464ed57af9a50fcf38df1891644fac0c957eeb8b4), which differs from this head only in the restore fix below; earlier rounds on b8cff950 and 2b4850e1. Morpha on the lead in all of them.

Edge cases

Case Why this change makes it a risk How run Result
Chord recorded with the pattern running Pattern and live notes compete for voice tracks; frame and recorder race Unit, 2b4850e1 (and 800a4a6f for #2138) pass
A voice track's own trigs (a programmed chord on T2/T3) Voice steps play with the copied sound Unit, 67687eee and later pass
VOICES back to 1 after linking The kept sound is written back into the kit Unit, b8cff950, 2b4850e1; emulator: type bytes 0, 9 (linked), 0 pass
A kit reload while linked, then a chord Stock forgets the loaded sound Unit, d3372d20 pass
A sound lock on the lead, then a chord Same Unit, d3372d20 pass
MIDI chords Notes from MIDI take the voices' path Unit, d3372d20 pass
Load Project with different VOICES, the former voices played regroup takes the former voices from the previous project Unit, d3372d20 pass
SAVE PROJECT while linked, power cycle, VOICES 1 The own sounds live in memory only Unit, d3372d20 pass: the copies stay, as the changelog says
A pattern change while linked, VOICES 1 on the other pattern The settings must go back to their own pattern Unit: d3372d20 failed (both patterns kept the lead's); fixed, 865cbe34 pass: pattern A has its own again, pattern B keeps the lead's (documented)
A kit reload while linked, then VOICES 1 The kept sound and the kit Unit, d3372d20 pass: own sounds back
VOICES lowered while playing Former voices, note-offs, machine switch Unit, b6ee842b (#2204) and 2b4850e1 pass
The lead's LEVEL and mixer volume Shared level Unit, 094b8a09, 2b4850e1 pass
Every track at 1 Must change nothing Emulator, coupled, against 27dfadf8: first note identical sample for sample, level identical in every 50 ms window pass
A muted lead played from the keys Mutes in the voices' routing Unit, 27dfadf8 only not run: it sounds on a unit; not yet compared with stock
Two machine modules at once Registry slots and the voices' machine Not on a unit not run: no second machine module tested on a unit yet

Emulator for the pattern fix (cf_script): track 2's first TRIG default poked to 40 on A01, VOICES 3 on A01, then VOICES 1 on A02: A01 reads 40 again and A02 keeps the lead's; before the fix 100 on both.

Repository: npm run check -- --base upstream/base/digitakt-ii-next on head ef7df84e3 (current with base/digitakt-ii-next): every stage passed except test, whose failures are all time-outs on this computer (a Windows drive under WSL): change-scope, firmware-download, module-guides and octatrack-emulator/session at 5 s (the last two pass alone with a longer limit, checked on #2204), and three module-doctor cases whose doctor is cut off (ETIMEDOUT, 30-41 s here). None touch the base.

Guides

VOICES.md records the restore, its limits and why the kit write stays. Not run: npm run pr:ready, which merges main into a branch that targets base/digitakt-ii-next (as noted on #2130).

… 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
# Conflicts:
#	sdk/machines/digitakt-ii/elekloader/modwerk/VOICES.md
#	sdk/machines/digitakt-ii/elekloader/modwerk/voices.c
…ecording, restored sounds

The base of this branch (base/digitakt-ii-next with chord recording brought back, repeat98#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.
@repeat98

Copy link
Copy Markdown
Owner

Thanks for bringing chord recording back this way. The git revert of e18ca55eb is the right route, and the restore answers the report about voice tracks keeping the lead's sound.

Plan for the release: #2204, this one, #2446 and #2445 go into base/digitakt-ii-next, then one combined image and one unit round on that exact build. So, before this merges:

  1. Please drop the release step (c78b3ce38: base-binding.json, the vendored 1c2c2016 package, machine.json, machines.generated.json). Binding, package and pin happen once, on the combined base. Keep the verification record, without its Pin section.

  2. Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204's four points from the review of 26 November are still open on this head too, since it carries Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204's code: the routing while regroup runs (this branch makes that window longer, as regroup now copies up to seven sounds inside it), the full SHA-256s, the unit cases, and one way to find the kit's track sounds. Fix them on Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204, then merge it here again.

  3. Saving while linked loses the voices' own sounds. regroup writes the lead's sound and pattern-track settings over the voice tracks' own, and the originals live only in memory (own_sound, own_settings). After SAVE PROJECT while linked, a power cycle and VOICES back to 1, tracks 2 to n keep the lead's copies, and their own sound is gone for good. The same happens on pattern changes: the frame copy (copy_track_settings in core_voice_frame) writes the lead's length, swing and speed into every pattern played while linked, and restore_own puts back only the pattern that was on when the group formed.

    This is the question from the review on 26 November, now with a concrete cost: since a voice already loads the lead's sound note by note, can chord recording do without writing the voice tracks' kit sounds and pattern settings at all? For example, the recorded steps on voice tracks could name the lead's sound, the way key notes do now. Then there is nothing to keep, restore or lose. If the kit write has to stay, please say why, and make what is lost visible to the musician.

  4. Unit cases for the restore, on the image you test: SAVE PROJECT while linked, power cycle, VOICES back to 1; a pattern change while linked, then VOICES back to 1 on each pattern; a kit reload while linked, then VOICES back to 1.

Pull requests into base/digitakt-ii-next only get the description check in CI, so please paste the npm run check -- --base upstream/base/digitakt-ii-next result for the new head, as you did here.

The owner asked for the binding, the vendored package and the pin to come once, on the combined build of the next release, so base-binding.json, the machine page's core image size and the packages go back to 948be0c4. The verification record keeps the unit results of 1c2c2016 and says where the release step happens.

@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 quick turnaround. Here's where it stands at 67c25f12:

  • Settled: the release step is out. The binding, package and pin are back at 948be0c4, the verification record stays, and the check result for this head is in the description. Thanks.
  • Still open from my review earlier today: points 2 to 4. That's #2204's four points (fix them there, then merge it here again); saving while linked, where the voices' own sounds are still kept only in memory, so a project saved while linked loses them for good, and a pattern played while linked keeps the lead's length, swing and speed; and the unit cases for the restore (save while linked then a power cycle, a pattern change while linked, a kit reload while linked, each followed by VOICES back to 1).

Point 3 is the one to settle first. It decides whether point 4 tests a restore at all, or just confirms that the voice tracks' own sounds are never touched.

@Claptom-music Claptom-music changed the title Digitakt II base 1c2c2016: chord recording back, voices' own sounds restored, with #2204 Digitakt II base: chord recording back, voices' own sounds restored, with #2204 Dec 1, 2026
…into base/dt2-chord-recording-again

# Conflicts:
#	docs/verification/2026-11-30-digitakt-ii-voices-chord-recording-base.md
@Claptom-music

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Done on the new heads:

  1. The release step is out (binding, package, machine.json, generated registry). The verification record stays, without its Pin section, and names the tested base by its full SHA-256.
  2. Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204's four points are fixed there and merged here again: core_voice_event (and here core_voice_record) return while regroup runs (a regrouping flag set at its start, also by a project load, cleared after leads = found); VOICES.md lists every tested base and image by its full SHA-256; the kit's track sounds are found one way, KIT_SOUNDS = [0x80004704] + 0x34. The unit cases (kit reload while linked, a sound lock on the lead, MIDI chords, Load Project with different VOICES) passed on image d3372d20.
  3. The kit write stays for this release, by my choice, and the loss is written where a musician reads it (the changelog and VOICES.md: set VOICES back to 1 before saving, changing kit or loading a project). Why: a voice track's own steps take more than the sound from their own track. The note record's constructor (0x400d6d24) copies the trig defaults from the pattern track (+0x480, +0x481, +0x485 into the record's own row, and +0x489, +0x48a, +0x48b into +0x48, +0x44, +0x4c when a step sets none: the velocity and length that made the first recorded chords 9 dB louder without an envelope), and the step timing comes from the track's length, swing and speed (+0x48c..+0x48f). The sound and the defaults could be rewritten in each note, but timing cannot. I'd rather ship the version I tested and do the no-write version as its own change, with its own unit round.
  4. Your restore cases, on the unit: SAVE PROJECT while linked and a power cycle leave the copies (as documented); a kit reload while linked then VOICES 1 gives the own sounds back. The pattern case failed on d3372d20: lowering VOICES 3 to 1 passes 2, whose regroup kept the lead's copy over the own settings, and they went back only into the pattern on screen. Fixed (keep_own never keeps over; the settings go back into the pattern they came from) and checked in the emulator and on the unit with image 865cbe34: pattern A's voice track is back to its own velocity, pattern B keeps the lead's (the documented loss).

npm run check -- --base upstream/base/digitakt-ii-next on the new heads (#2204 e65a77382, this one ef7df84e3, both current with base/digitakt-ii-next): every stage passed except test, whose failures are all time-outs on this computer (a Windows drive under WSL): change-scope, firmware-download, module-guides and octatrack-emulator/session at 5 s, and the module-doctor cases whose doctor is cut off (ETIMEDOUT). The pin test passes now that the release step is out. (The full output is in the descriptions.)

@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 answers everything that was still open. At 2b58542f:

  • Settled: #2204's points are merged in here. Nothing is routed or recorded while regroup runs, the full SHA-256s are listed, and there is one way to find the kit's track sounds.
  • Settled: the kit write. Your reason holds: a voice step's trig defaults and timing come from its own pattern track, and a note can't carry the timing. The loss is now where a musician reads it: set VOICES back to 1 before saving, changing kit or loading a project. Doing it without the kit write can come later as its own change.
  • Settled: the restore cases on the unit. I'm glad the pattern case caught a real bug. In the code, keep_own no longer keeps over an earlier copy, and restore_own writes back into the pattern the settings came from. That matches the pass on image 865cbe34.

Nothing else is needed from you. This goes into the combined Digitakt II base, so the owner approves the merge.

@repeat98
repeat98 merged commit 885bea5 into repeat98:base/digitakt-ii-next Dec 3, 2026
2 checks passed
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