Skip to content

Improvement: Digitakt II base: chords recorded across linked voices - #2138

Merged
repeat98 merged 4 commits into
repeat98:base/digitakt-ii-nextfrom
Claptom-music:base/dt2-chord-recording
Nov 26, 2026
Merged

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

Conversation

@Claptom-music

Copy link
Copy Markdown
Contributor

What was wrong or hard

With linked voices (#2005), a chord played on a lead sounds across the group, but live recording put every note on the lead track: a recorded chord played back as one note at a time on one track. The tester asked for each chord note to land as a step on the track that plays it, editable afterwards like any step.

What this changes

Base work for the Digitakt II cumulative draft (#1999), on top of the released base 948be0c4 (#2130):

  • Recording. The base takes the sequencer's live-record routine (0x40048fb2, one new site in base.json, entry voices-record-entry.s). For a lead's note from the keys or MIDI, core_voice_record picks the group track that will play it and leaves a pending entry so the frame sends the note there. A note the frame has already played before the routine sees it (it happens on a unit with the pattern running) is recorded on the track playing it.
  • Sound on voice tracks. While linked, a voice track's own steps play. Its kit sound becomes a copy of the lead's, and so do its pattern track's TRIG defaults, length, swing and speed (+0x480..+0x48f). The copy is made in full when linking, then one voice and a sixth of the sound per frame, writing only what differs. Pointing a step's note record at the lead's sound was not enough: the note record's constructor (0x400d6d24) takes defaults from its own track.
  • Fill order. Notes from the keys and MIDI fill the group from the lead up, whatever the pattern plays there. The lead's pattern notes never land on a voice track with steps of its own.
  • VOICES.md describes all of it. Changelog: changelog/2026-11-24-digitakt-ii-chord-recording.md.

This needs a release step afterwards (binding, package, pin), as #2130 did for 948be0c4.

How I checked it

  • Unit, reported by the tester (Digitakt II, OS 1.17, Morpha on track 1, image 800a4a6f). With the pattern running and VOICES 3-4, chords recorded from the keys put a note on every linked track. The recorded notes sound like the lead. A recorded note on a voice track edits like any step. Page changes on a linked track don't lag. Timing is fine with quantize on. Live chords, knobs and FOLD work as before. Image 800a4a6f's base is package 25693ca2. A rebuild of this branch gives 98836956, which differs only in the recorded source hash of voices.c: two comments changed after the test.
  • Earlier unit images and what each showed: 11fa7318 (only tracks 1 and 3 recorded; the notes played unfiltered and without envelope) and f83435c3 (sound right, some tracks empty, page lag). Both are in VOICES.md.
  • Emulator (coupled ColdFire and sound chip):
    • Every track at 1: the project's pattern and the default note are unchanged.
    • A rotating test build with track 1 leading 3: two taps ring on two tracks.
    • Keyboard-mode recording puts the first note on track 1 and the second on track 2. In one run the frame played the second note before the record routine saw it, and it was still recorded on track 2. The old code would have skipped that note.
    • The emulator's sequencer stops after its first step, so recording while a pattern runs could only be checked on the unit.

Edge cases

Case Why this change makes it a risk How run Result
Every track at 1 Must change nothing Emulator: pattern and default note Pass: unchanged
Chord recorded with the pattern running Pattern notes and live notes compete for voice tracks; frame and recorder race Unit, 800a4a6f Pass, reported
A recorded voice-track step edited Steps must be ordinary steps Unit, 800a4a6f Pass, reported
Page changes on a linked track while playing The idle copy writes into the kit Unit, 800a4a6f (lagged on f83435c3) Pass, reported
MIDI chords, muted voices, a stock machine as the lead Not in the unit runs Not run Not tested

Guides

VOICES.md now records three things no guide said. The frame can play a live note before the live-record routine runs. A voice track's own steps take their defaults from their own pattern track. The DT2 emulator's sequencer plays only its first step, so pattern-running cases need a unit. Not run: npm run pr:ready, which merges main into a branch that targets base/digitakt-ii-next (as noted on #2130).

🤖 Generated with Claude Code

Claptom-music and others added 4 commits November 24, 2026 23:39
…plays it

A new guarded site at the sequencer's live-record routine (0x40048fb2, 6 bytes) lets core_voice_record change a
linked lead's track argument to the group track the note will play on, with a pending entry the frame uses to send
the note there (the routine runs before the frame plays the note). A note the group already holds is not recorded.
A voice track's own sequencer steps now play while linked, pointed at the lead's sound; its own key presses stay
silent. Emulator: three taps recorded on tracks 1, 2 and 3 and played there; every track at 1, the project's pattern
and the default note unchanged. Playback of recorded voice steps not checked (the emulator's sequencer stopped after
its first step).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… live notes fill from the lead

On a unit (11fa7318, the pattern running) recorded chord notes on voice tracks played louder, unfiltered and without
envelope, and of four linked tracks only 1 and 3 recorded. Pointing a voice step's note record at the lead's sound
was not enough: in the emulator a voice track's own note played 9 dB over the lead's and held flat, still so with
the kit sound copied, and like the lead (level and decay) only with the pattern track's TRIG defaults copied too
(+0x480..+0x48f, read by the note record's constructor). Voice tracks now copy the lead's kit sound and those track
settings when linking and one voice a frame. Notes from the keys and MIDI fill from the lead whatever the pattern
plays there; the lead's pattern notes play on the lead, or on a free voice track with no steps of its own. The
released linked-voices changelog entry is restored; the recording gets its own entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…voice's sound a sixth at a time

On a unit (f83435c3, the pattern running) recorded chords sounded like the lead, but some linked tracks recorded
nothing, and page changes on a linked track lagged. The live-record routine skipped a note the group already held,
which is also a note the frame had played before the routine saw it: the frame now marks such a note on the track it
chose, and the routine records it there. The idle copy compares a sixth of a voice's sound a frame, not all of it,
and writes a voice's targets only where they differ; the lag's cause is not confirmed. Emulator: the project's
pattern and the default note as before; two taps on a linked lead ring on two tracks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The author reported on a unit, with the pattern running and VOICES 3-4: chords from the keys put a note on every
linked track and sound like the lead, a recorded note on a voice track edits like any step, page changes on a linked
track no longer lag, timing is fine with quantize on, and live chords, knobs and Morpha's FOLD play as before.

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

Copy link
Copy Markdown
Owner

Thanks, this is the right place for it: base work on base/digitakt-ii-next, with the release step to follow like #2130. The record entry looks right to me, and so does the pending/fresh handshake between the record routine and the frame.

One behaviour change I want to be sure about before it joins the draft. Under #2005 a voice track's own sound and pattern stayed as they were and came back once VOICES returned to 1. Now, setting VOICES on a lead overwrites the kit sound of every track after it (machine, sample, filter, everything) and its pattern track's TRIG defaults, length, swing and speed. Back at 1 those stay overwritten, and a save keeps them. Is that intended, knowing players lose those tracks' own sounds? Either way it should say so where the setting is explained, not only in VOICES.md.

The unit record misses some cases this diff touches. Could you add them from your unit?

  • Save Project, reload and a power cycle with linked voices and a recorded chord: do the copied sounds, the copied track settings and the voice-track steps all come back?
  • A pattern change while linked. copy_track_settings writes into whichever pattern is current, so each pattern you visit gets its voice tracks' length, swing and speed changed. Is that expected, and does it play in time?
  • A kit load while linked.
  • MIDI chords. The new fill order and the pending path cover MIDI notes too, and they're still "not tested".
  • A muted voice track while you record a chord.

Two small things for the release step: say the base's .run, .bss and site count and the change since 948be0c4 (15,626 / 12,664 / 47), the way #2130's record does. And bring the guide's numbers up to date: sdk/machines/digitakt-ii/README.md still gives a footprint of 10,448 / 9,884, elekloader/README.md still says 22 sites, and the "Checked" section of VOICES.md still opens with "Emulator only … Not yet tested on a unit".

@repeat98
repeat98 marked this pull request as ready for review November 26, 2026 12:23
@repeat98
repeat98 merged commit 82085b9 into repeat98:base/digitakt-ii-next Nov 26, 2026
3 checks passed
@repeat98

Copy link
Copy Markdown
Owner

Merged into base/digitakt-ii-next, so chord recording is in the Digitakt II draft base. It reaches players only through the cumulative release (#1999), after unit testing. The open points from my 25 November comment move to that release step and still need you:

  • The behaviour change. Setting VOICES on a lead overwrites the following tracks' kit sounds and their pattern tracks' TRIG defaults, length, swing and speed. Going back to 1 doesn't restore them, and a save keeps them. Please confirm that's intended, and say so where players read about the VOICES setting, not only in VOICES.md.
  • Unit cases still owed: Save Project, reload and a power cycle with a recorded chord; a pattern change while linked (each pattern visited gets its voice tracks' settings changed); a kit load while linked; MIDI chords; a muted voice track while recording.
  • For the release record: the base's .run, .bss and site count against 948be0c4 (15,626 / 12,664 / 47), and the stale numbers in sdk/machines/digitakt-ii/README.md (10,448 / 9,884), elekloader/README.md (22 sites) and the opening of VOICES.md's "Checked" section.

@repeat98

Copy link
Copy Markdown
Owner

Update: chord recording is held back from the Digitakt II release that ships today (#1999), by the owner's decision. I reverted its merge on base/digitakt-ii-next in e18ca55eb, so the release is the tested 948be0c4 base. Nothing is lost: once the points in my last comment are done (the VOICES behaviour confirmed and explained, the five unit cases, the release step), revert e18ca55eb in a new pull request into base/digitakt-ii-next. Merging your branch again wouldn't re-apply it, because git counts it as merged already.

repeat98 added a commit that referenced this pull request Nov 26, 2026
This reverts merge 82085b9. #2138 still needs its release step (binding,
package, pin) and the unit cases on the PR. The cumulative base ships without it as the
released 948be0c4. To bring it back, revert this commit on base/digitakt-ii-next (a
re-merge of the branch would not re-apply it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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