Skip to content

Improvement: Modwerk's own core for the Digitakt II base - #2398

Draft
repeat98 wants to merge 5 commits into
mainfrom
base/dt2-own-core
Draft

repeat98 wants to merge 5 commits into
mainfrom
base/dt2-own-core

Conversation

@repeat98

@repeat98 repeat98 commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

What this is: the Digitakt II base's core parts (core-dt2/: PERSONALIZE, frame and key-LED events, value rows, and the kit and project data store) and its header (include/digitakt-mk2/core.h) are now Modwerk's own source (GPL-2.0-or-later), at the same paths. This stacks on the hook bus draft (#2392) and moves to main after it.

  • Works (software, with the stock OS 1.17): the base rebuilds as a60c529b and passes its check against the hook-bus base d7ec4d3c. All 47 sites, every export, import, weak symbol, collection and contribution, and the id and version are identical, field for field. All 6 Digitakt II modules build alone on the page and match off the page, and so do Chord Arp + Euclidean Scale + Track Names and Perform Direct + Perform Levels. A new host test pins the saved-data formats: the kit area is 4B A2 BD + 64 bytes + 79 zeros for Euclidean Scale, with layout id 0xA2BD and CRC check 0x29B1, and it covers mismatch, foreign and blank areas, kit copies through the shadows, and the project-data container. test_machine_base.py, the elekloader tests (457), modules:check and elekloader:check pass. The full npm run check passed before the rebase onto the relicensed bus.
  • Not tested: nothing has run on a Digitakt II, and no real project saved with today's base has been loaded. To check: boot, SETTINGS and PERSONALIZE rows, Euclidean Scale settings through SAVE PROJECT and a power cycle, KIT SAVE and LOAD, pattern copy/paste, PASTE KIT and undo, Chord Arp's archive, projects crossing between today's base and this one both ways, and the official OS opening them.
  • Musically: nothing should change; saved kits and projects keep their format.
  • Who acts: a tester with a Digitakt II runs the list above.
  • Guides: docs/MACHINE_RECIPE.md and the Digitakt II README still described the base as built from the imported core-dt2 source; both now say it runs on Modwerk's own core with core-dt2 1.1's interface. Merging main showed one more gap: two branches that each define the same module-level name in a test file merge without a conflict, and the second silently replaces the first (OWN_CORE in sdk/tests/test_machine_base.py, now DT2_CORE and MC_CORE).

Edge cases

Case Why this change makes it a risk How run Result
all 6 modules alone, Chord Arp + Euclidean Scale + Track Names, Perform Direct + Perform Levels the core every module links against is new code site build path with the stock OS, on and off the page pass
kit data save and load (Euclidean Scale), mismatch, foreign and blank areas the kit-data store is new code; saved kits must keep their format host test store-test.c with the spec's vectors pass
kit copy, PASTE KIT, undo, +Drive the memcpy hook and shadows are new code host test (logic) not run on a unit: no Digitakt II run yet
projects saved on today's base opened on this one and back, and on the official OS project-data container and kit areas not run not run: no Digitakt II run yet
SAVE PROJECT and a power cycle with Euclidean Scale and Chord Arp persistence through the new store not run not run: no Digitakt II run yet
PERSONALIZE and SETTINGS rows, key LEDs new event code not run not run: no Digitakt II run yet
Details
  • The kit-data unpack stops at the first block that doesn't fit, as pack does. That can't happen today: 64 of 143 bytes are used.
  • The copies/ mechanism is gone (KIT_ROOM 146 in the core's own mod.json). The base check's reference is now the hook-bus base, so core 1.1's additions are checked too.
  • test_machine_base.py: the "unchanged import" test became an own-source test, and the kit-room test checks the new constants. Every other imported file stays pinned.
  • The core's mod.json still carries its 14 sites' stock bytes as hex, as before; moving them to length + SHA-256 needs an SDK change.
  • Open: a project-data load counts a conflict for a non-zero header gap even when no module saves project data. That needs one real project file to confirm stock leaves the gap zero.

🤖 Generated with Claude Code

repeat98 and others added 4 commits November 28, 2026 19:43
The rest of core-dt2 (the PERSONALIZE, frame and key-LED events, the value
rows, the kit and project data store and the memcpy hook, its mod.json) and
include/digitakt-mk2/core.h are now Modwerk's own source (GPL-2.0-or-later,
author Modwerk) at the same paths, written from a behavioural specification
of core-dt2 1.1's interface and saved formats. Every export, import, weak
symbol, contribution, collection, site (all 47), target, id and version of
the built package equals 371564c4's; only internal symbols, sections and
build sources differ. The saved kit area (4B, layout id, blocks, zeros) and
the ELKP project gap are unchanged.

Identity, recorded with machine:base --write: Digitakt II 1.17
371564c4 -> e02f3f96 (.run 15,574, .bss 12,236). The old packages stay.

base.json: the core's own mod.json carries KIT_ROOM 146, so the copy and
copies are gone; reference.file is now the 371564c4 package, keeping also
version and target, so the 1.1 additions are checked on every build.

Tests: the imported files the source-unchanged and kit-room tests inspected
are gone, so test_machine_base.py now pins that every DT2 core source is
Modwerk's (OWN_CORE, GPL-2.0-or-later header), that KIT_ROOM is 146 and
equals store.c's area (store.s refuses another), and runs the store on the
host (core-dt2/tests/store-test.c) with the format's byte vectors. Every
other imported file stays pinned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
One dated record names e02f3f96 from the previous commit, licence
GPL-2.0-or-later, as the new package says; 371564c4 and 948be0c4 and their
records stay, so older evidence still relinks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rebuilt on the relicensed hook bus: a60c529b (code as e02f3f96). The base
check now keeps every item of d7ec4d3c, the hook-bus base this core
replaces (same code as 371564c4, only licence lines differ).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@repeat98
repeat98 changed the base branch from base/hookbus to main November 28, 2026 19:16
@repeat98

Copy link
Copy Markdown
Owner Author

One PR per device now. This PR targets main and carries Modwerk's own hook bus for this machine (from the closed #2392) together with its core, so a tester can build and test this device from this branch alone. Until one of the Digitakt II, Rytm and Model:Cycles PRs merges, the diff also shows the shared bus files for the other two.

@Claptom-music

Copy link
Copy Markdown
Contributor

Tested on a Digitakt II, OS 1.17, with base a60c529b (rebuilt from 0b2bb96 with the pinned toolchain: identical to the committed package), Chord Arp, Euclidean Scale and Track Names.

  • New base image OC1: SHA-256 e9d0f6f6d057371e187f840fb2fb1bd0a730b8832b686164814bd075ec7ae340
  • Today's base d7ec4d3c, same modules, image TD1: SHA-256 706bc92ce4966e24b0cdcf9fc5b3a1a97ddbfceab5d59f1258485a02572e5327
  • Module packages (same on both): chord-arp e700ed98, euclidean-scale ed9db2ea, track-names e1e6c7d0
Check Result
Boot, SETTINGS and PERSONALIZE rows, key LEDs pass
Euclidean Scale and Chord Arp (lock, ROOT=TRIG) through SAVE PROJECT and a power cycle pass
KIT SAVE and KIT LOAD (Euclidean Scale) pass
Pattern copy/paste, PASTE KIT and undo pass for Chord Arp; Euclidean Scale's rerolled trig pitches differ in the pasted pattern (see below)
Project saved on d7ec4d3c opened on a60c529b pass
Project saved on a60c529b opened on d7ec4d3c pass
Both projects opened on the official OS 1.17 pass

The pitch difference after a pattern copy is the same on today's base d7ec4d3c (TD1), so it is not from this change. It comes from Euclidean Scale's design: each reroll is derived from the pattern slot number (reroll_random in pitch.c keys on pattern, track and step), so the same settings give a different melody in another slot. The module package is byte-identical on both bases.

@btzz5w8w5d-star

Copy link
Copy Markdown
Contributor

@repeat98 I'd like your OK to flash Modwerk base images on my Digitakt II (OS 1.17) so it can be the second unit for this PR and Claptom's open base PRs.

What I'm asking: permission for the custom-image flashes below, each sent with the stock OS upgrade (Transfer over USB, YES on the unit), one at a time. I'll restore stock 1.17 at the end, or at the first fault. Nothing has been flashed yet.

Already done, no flash involved:

Order and images (version label, SHA-256):

# Image Purpose
1 AI01 main d7ec4d3c, base only — 33b19e041a74bb8c9f29c807b24804b58fa990f7074560d596699d4078d5286d pinned base on a second unit
2 AI02 main d7ec4d3c + Chord Arp, Euclidean Scale, Track Names — 4f4a9e048eaf982cc3f5592114b3dcb836da45206d969efe9f4c3d516a49469f #2398's reference ("today's base")
3 AI03 #2398 a60c529b + the same three — d25390641022ceb28d88bbaa95095baada8fb55078e64bddc48f93cda3ddfdb4 #2398's checklist, projects crossing both ways with AI02, official OS opens them
4 AI04 #2204 632bf110, base only — 2b0dd32ea9c7b71d074a3ef3d86b280ba4565c98bcacf4bbf863e8bd57778996 VOICES row and routing without Morpha
5 AI05 #2445 22a85ada, base only — 5f3fc0af375ae1360455e4d5535f122d01690da8bc6b2ff2543519c2a0923da4 no effect installed: no FX page, sound unchanged
6 AI06 #2446 543dccb7, base only — d9548e00235cdd7dba809cda7e2ac6f6fd1a9a8fd0dc90f5fa9108b3fd75bdd6 no filter module: stock FLTR list, kits load

Development bases and Claptom's private test modules (FX Probe, the type-7 filter routine, Morpha) are not in this request.

Questions:

  1. OK to flash 1–6 in that order?
  2. Is a base-only image the right second-unit evidence for Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204, Digitakt II base: the effect slot (core_fx) and the FX page #2445 and Improvement: Digitakt II base: module filter types on the FLTR page (core_filters) #2446, or do you want them with a module (e.g. Morpha for Fix: Digitakt II linked voices: VOICES row label and icon, voices keep the lead's sound and machine #2204)?
Details

main's Model:Cycles core (#2394) and this branch each defined a module-level OWN_CORE in
sdk/tests/test_machine_base.py; the merge kept both, so the second replaced the first. The sets
are now DT2_CORE and MC_CORE, each test checks its own, and still_imported checks both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@repeat98

Copy link
Copy Markdown
Owner Author

@Claptom-music this is ready for its unit round, as we agreed: on its own, before the combined image for the next release.

What it is: the Digitakt II base on Modwerk's own core. I merged main into it today. The base still builds byte for byte as a60c529b (a60c529bc40b1ba1012e18b2609fb65f220f4e65c03740360cb86fbba577a484), and every site, export, import and table matches the base on main today (d7ec4d3c). Musically nothing should change, and saved kits and projects keep their format. It has never run on a Digitakt II.

Please run, on a scratch project first, with your usual modules (at least Euclidean Scale and Chord Arp, which save data):

  1. Boot; the SETTINGS and PERSONALIZE rows; the key LEDs.
  2. Euclidean Scale settings through SAVE PROJECT and a power cycle.
  3. KIT SAVE and KIT LOAD; pattern copy and paste; PASTE KIT and undo.
  4. Chord Arp's saved data through SAVE PROJECT and a power cycle.
  5. A project saved on d7ec4d3c opened on this base, and one saved on this base opened on d7ec4d3c.
  6. The official OS opening a project saved on this base.

Then the same on a copy of a real project. Please add the image's full SHA-256 and each case's result to the table in the description. If anything fails, stop and tell me before going on; it stays out of the release until it passes.

Once this passes, it joins the combined image with #2204, #2477, #2445 and #2446.

@btzz5w8w5d-star

btzz5w8w5d-star commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Second Digitakt II: the reference base boots, with and without modules. Boot and module-screen checks only, no functional validation. Run on my unit (bought new, shipped with OS 1.15C), on 30 November 2026.

  • Base tested: main's pinned reference base d7ec4d3c, not this PR's candidate a60c529b. The candidate has not run on my unit yet.
  • What "pass" means here: the image installs and boots, and each module's page or row opens. Nothing was played, saved or reloaded.
Step Image (SHA-256) Result
Stock recovery: FUNC + TRIG 4, Transfer 1.10.4 "SysEx Transfer – Recovery mode", stock .syx over MIDI DIN (Scarlett 6i6) stock OS 1.17 26c22f6652625ac2cfd47f7ee970d388ed8b6427dae3563c0a6a2f2d334350d5 pass: from 1.15C, finished and restarted by itself; SETTINGS > SYSTEM shows 1.17
AI01: base d7ec4d3c alone, via Transfer over USB, YES on the unit 33b19e041a74bb8c9f29c807b24804b58fa990f7074560d596699d4078d5286d boots to the normal screen; back on USB MIDI (PID 0x012B). Nothing else checked
AI02: base d7ec4d3c + Chord Arp, Euclidean Scale, Track Names 4f4a9e048eaf982cc3f5592114b3dcb836da45206d969efe9f4c3d516a49469f boots; module screens present: SETTINGS > CHORD ARP opens, FUNC + AMP shows EUC and the Scale page, SETUP has RENAME

Not tested (functional validation): SAVE PROJECT and a power cycle, KIT SAVE and LOAD, pattern copy/paste, projects crossing bases, how the modules sound.

Details

@btzz5w8w5d-star

Copy link
Copy Markdown
Contributor

@Claptom-music You told me only two tests are needed from a second unit right now. Which two, exactly? I'll run them on my Digitakt II next, and only those.

Ready on my side, built at this PR's current head 2450f0f92 (base still a60c529b):

  • reference image: main base d7ec4d3c + Chord Arp, Euclidean Scale, Track Names, 4f4a9e048eaf982cc3f5592114b3dcb836da45206d969efe9f4c3d516a49469f (already on the unit, boots)
  • candidate image: base a60c529b + the same three, 1396243637af2e53a2ce6825f618d7be202299f126b1644108a301422c10939e (not flashed yet)
  • stock recovery over MIDI DIN is proven on this unit.

My guess is cases 5 and 6 from Jannik's list: projects crossing d7ec4d3c ↔ a60c529b both ways, and the official OS opening a project saved on a60c529b. Those need both images on one unit. If you meant others (or a copy of a real project), tell me and I'll do those instead. I'll post the results here with the image SHA-256s, kept separate from your run.

Note on image identity

The candidate image differs from the one I built at 0b2bb96d3 (d2539064…) although the base is byte-identical: the module packages carry their source commit. Your OC1 (e9d0f6f6…) will differ from mine for the same reason and because of the version label.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for checking stock recovery first and for keeping your results separate. Yes, please go ahead with the candidate image (base a60c529b + Chord Arp, Euclidean Scale and Track Names, 13962436…), and run only these, on a scratch project first:

  1. A project saved on d7ec4d3c opened on a60c529b, and one saved on a60c529b opened on d7ec4d3c.
  2. The official OS 1.17 opening a project saved on a60c529b.

Claptom's run on 29 November already covers the rest on a first unit. Post each result here with the image's SHA-256, and restore stock 1.17 at the first fault. Please hold off on separate images for #2204, #2445, #2446 and #2477: they go into one combined image for the next unit round.

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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants