Skip to content

Improvement: Digitakt II base: added track machines and their sound-chip players - #1799

Merged
repeat98 merged 801 commits into
repeat98:base/digitakt-ii-nextfrom
Claptom-music:base/digitakt-ii-machines
Nov 22, 2026
Merged

repeat98 merged 801 commits into
repeat98:base/digitakt-ii-nextfrom
Claptom-music:base/digitakt-ii-machines

Conversation

@Claptom-music

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

Copy link
Copy Markdown
Contributor
  • What was wrong or hard: A Digitakt II module could not add a track machine: the machine list, kit loading and the SRC page know only the seven stock types, the sound chip renders only stock voices, and no Modwerk build could produce sound-chip code. A first machine module (Mikrotakt, a grain sampler) was developed on this base and used as its test machine; it is not submitted, but the base is what any later machine module needs.
  • What this changes: the Digitakt II base (OS 1.17), now a3ced45e:
    • Added machines. A base table core_machines (table 5, after core_mixer_pages; room 4): each record names a machine type 7-10 (claimed as machine:<type>), the stock type it stands for and its names. The base lists it in the machine menu, keeps it through kit and project load, saves it with the kit, and answers the SRC page's per-type sample-slot table as its stand-in, so its sample list scrolls and chooses.
    • Own knob names on the stand-in's parameters. The SRC page shows an added machine's knob names (and, optionally, value names); saving, trig locks, live recording, MIDI and the values the sound chip receives stay the stand-in's. New parameter rows were tried and dropped (MACHINES.md has the trace).
    • Sound chip: registries, not per-set code. The base's sound-chip code is the same for every set. A dispatcher at both of the render pass's stock player calls sends a voice of type 7-10 through that type's registry slot (one 48-bit slot each, which the whole-image builder fills today and a runtime loader can fill or clear later); an empty slot and every other voice go to the stock player, unchanged. A player's entry must lie in a code block of its own package, and a package may only play types it registers. The frame receiver keeps the receive site and calls four frame slots, so the machine wire and the sidechain prototype's receiver (now a frame receiver, planDt2Render's bridge) share it.
    • Selectors from the machines. Types 7-10 take the voice selector of the stock type each registered machine stands for, so a machine with no player plays as its stand-in. The stock table's seven words are read from the owner's verified OS at composition and checked by SHA-256; the repository keeps only its address, length and hash.
    • Idle without machines. With core_machines empty, the ColdFire writes no wire words, reads no types and copies no reply; the reply is read only while a page has set a view track. A set that registers no machine and carries no sound-chip part leaves section 7 stock.
    • One build path. scripts/link-image.mjs could not write a Digitakt II file (its seal); it now builds through dt2-link.ts, the kit's build plus composeDt2MachineBuild, which the site's preflight runs.
    • A SHARC assembler (src/engine/elektron/sharc-asm.ts, with tests), now with CALL and RTS, and blocks marked code or data.
  • How I checked it: npm run pr:ready: everything passes here except tests that wait a fixed time for a child process, which time out on this computer under load (two module-doctor.test.mjs cases still did when rerun alone, one of them before this change too); CI decides. Host tests with the owner's OS (MODWERK_DT2_STOCK, local only): dt2-link.test.ts builds the base alone and base + Mikrotakt through the site's builder and preflight and through link-image.mjs, and both give the same final SHA-256; dt2-render-build.test.ts covers an empty set, a machine with no player, two machines beside the stock types (one with a player: the same base code bytes and sites, only slots and selector words differ) and frame receivers. npm run test:procedure -- --base digitakt-ii --package <base + Mikrotakt> at c6f1d577: steps 1 and 3 passed; the unit steps are not run (no Digitakt II USB link the procedure drives yet). Emulator results and the unit run are in docs/verification/2026-11-19-digitakt-ii-machines-base.md and the table below, labelled separately.
  • Tested on a unit: base a3ced45e, @Claptom-music's Digitakt II (OS 1.17), images 838c1462 (base + Mikrotakt as the test machine) and a4b3cab2 (base alone), eight hands-and-ears cases in a new project, all pass (Edge cases below; the record in the verification file). The USB steps of the test procedure are not run: Digitakt II has no USB link the procedure drives yet.
  • Images: revision c6f1d577, base a3ced45e…; base alone a4b3cab2aa27357f1deae652186260dcc95bbe6ba565c83c0eda0b656b05f532; base + Mikrotakt (development build, type 7) 838c14622c410c1deff648cc2238817acfe9d5f00cd707676e77decacdf8b17a.
  • What the guides lacked or got wrong, and where I fixed it: MACHINES.md (the base's design notes) no longer reproduces the stock selector words and now describes the player and frame registries, selectors from the machines and the idle rule; sdk/machines/digitakt-ii/README.md and GOAL.md describe the sharc build field and the assembler. link-image.mjs's header says how it builds a Digitakt II set.

Edge cases

Case Why this change makes it a risk How run Result
Empty set (base alone) the base's frame work and sound-chip parts must not run without a machine host test (section 7 stays stock); emulator, base alone, SAMPLE on T1 pass (host); pass in the emulator (PCM da40d90b…, as stock)
A machine with no player its type must still get a defined selector host test with the owner's OS: its stand-in's selector, every player slot empty pass (host); not run in the emulator or on a unit: no such module yet
Two machines beside a stock track slots and selectors per type; the base code must not change with the set host test: types 7 (player) and 9 (no player) pass (host): same base code and sites
Stock SAMPLE through the new dispatcher every voice passes the dispatcher emulator, base + Mikrotakt, SAMPLE on T1, two trigs; unit, a SAMPLE track pass in the emulator: PCM byte-identical to stock (da40d90b…); pass on the unit (tester, by ear)
An added machine's player through its slot the player is now reached through a registry slot emulator, Mikrotakt chosen through the menu on T1; unit, Mikrotakt tracks pass in the emulator (plays through its player, no halt, no missing blocks); pass on the unit (tester)
Site and command-line builds the test procedure takes the command-line image dt2-link.test.ts with the owner's OS, both sets pass: same SHA-256
First and last tracks (T1, T16) and T9 each voice maps to its track's type unit, base + Mikrotakt on T1, T9 and T16 pass (tester)
Both stereo voices both render-pass calls go through the dispatcher unit, a stereo sample on T1 and T16 pass (tester: both channels)
Sample selection the SRC page's per-type slot table unit: knob D on a Mikrotakt track, scroll and choose pass (tester)
Pattern or tempo change during playback the wire reads the pattern's tempo and speeds every transfer unit: tempo change, then a pattern change, while Mikrotakt plays pass (tester: no freeze or dropout)
Kit reload with the module present and absent kits save types 7-10; a missing machine loads as SAMPLE unit: the project saved with Mikrotakt and reloaded; then the base-alone image and the same project pass (tester: present, Mikrotakt kept; absent, the track plays as SAMPLE, no crash)
Per-track length change (FUNC + PAGE, knob E) reported once: T2's trigs appeared on T1's new pages emulator, this base and the official OS; unit, a new project, T1 and T2 of different lengths, T1 extended pass in the emulator (same as the official OS); pass on the unit (tester: T2's trigs do not appear)
Two modules adding machines slots and selectors per type host test with two registered machines pass (host); no second machine module exists for a unit run

🤖 Generated with Claude Code

@github-actions github-actions Bot added the enhancement New feature or request label Nov 19, 2026
@repeat98

Copy link
Copy Markdown
Owner

One thing to add, and nothing else is wrong here: an "Edge cases" section in the description. Since today, every pull request that changes what runs on an instrument, drafts included, lists the edge cases its change creates.

Under a line "Edge cases", add a table with one row a case: what, why this change makes it a risk, how you ran it, and the result ("pass", "fail: …", or "not run: why", which is fine in a draft). With none, write "Edge cases: none, because …".

npm run test:procedure writes the table with suggestions for Octatrack modules and bases; for a Digitakt II base, copy the table from the guide and run the cases by hand. How to find the cases: the test procedure. The check runs again on your next push or description edit.

@repeat98

Copy link
Copy Markdown
Owner

The Edge cases table is in, and #1582 has merged. The current job failed before it reached the machine code because the scope step could not check out its base commit. Main has the fix in #1876.

This PR also changes the published Digitakt II base binding. Please retarget it to the existing base/digitakt-ii-next branch, merge current main, and regenerate from that target. The unit runs in the description used a later build. Please record the pinned build’s identity and results for machine selection on the sample page and playback across a pattern change before marking it ready.

@repeat98
repeat98 changed the base branch from main to base/digitakt-ii-next November 20, 2026 21:56
repeat98 and others added 18 commits November 20, 2026 22:58
…ikassfalg/coding/modwerk/.claude/worktrees/usb-audio-compiled-version into codex/usb-audio-0712-stage
…hed-install-tests

Fix: verify the published USB Audio install path during base staging
…sed nowhere (repeat98#1864)

* Improvement: module:doctor checks what a module costs installed and used nowhere

Above 0.2 points of the frame interrupt at rest (test procedure step 9) a release from 2026-11-20 fails unless it is a machine or answers ev_in_use; earlier releases are reported. Both figures are named constants for the owner to change.

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

* module-cpu-price test: no unused argument

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

* module:doctor at rest: one measure (device:price at rest), and a machine or effect passes only with its detours marked rests

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Stage Octatrack base 0.7.12 for configurable USB Audio
Octatrack base 0.7.12: stage shared USB Audio settings and reconnect
…blish

USB Audio 0.3.0-experimental: configurable layouts, Outbox routing and kept presets
* Digitone II link client: the runtime loader's upload transport for UploadSession

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

* Digitone II upload transport test: the base identity without the other stack's link.c

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

* Changelog: the Digitone II upload transport

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

* Validate complete Digitone II link replies

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: repeat98 <jannik.assfalg@gmail.com>
repeat98 and others added 11 commits November 22, 2026 15:22
…stics-nov22-findings

Docs: record Octatrack playback and USB staging observations on 0.7.13
…horter release notes

The SRC and full-screen captures now show five live grains (DENS 127, SPRY 50, SIZE 95, PAN 108), chosen by the
author. Machine list and SRC SETUP recaptured on 0.1.2: byte-identical to 0.1.0's.
…mance record, test summary

Review follow-up. Storage and memory entries now match the package header (28,944 bytes of code and data plus 2,864 of BSS); the deepest audio stack is 768 bytes by the same method as 0.1.1's 760. TESTING.md records the author's CPU-meter readings on the exact package (a 0.03 MB kick and a 1.55 MB sample, both 24-bit stereo, PTCH +24 and 0), limits the bit-identical claim to the comparison before the 3 dB cut, and no longer says a power cycle was run. The 0.1.0 measurements in evidence/performance.json are labelled historical. Catalogue regenerated.
…e list, drawing only on the sample page

Fixes found on a unit with the first machine module: the wire brings each track's
machine type from the kit (the dispatcher had reached the module's player on
track 1 only); both of the render pass's stock player calls reach a machine; the
SRC page's per-type sample-slot table answers an added machine as its stand-in
(its sample list scrolled and chose nothing); the sample view is counted at its
own draw call, so a module draws over it and no other page.

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

Copy link
Copy Markdown
Owner

Reviewed e5040080 against the Octatrack stack. The base owning the machine list and each module carrying its own player are the right choices. Please keep this in draft while addressing the following.

  1. The site cannot build the candidate. The binding selects 1a052a38, but the browser catalogue still serves 2f8a60d2. After regenerating the catalogue I ran six focused suites. 112 tests passed and the existing Digitakt II build-planning test failed with core: undefined for the released perform modules. Regenerate the catalogue overlay and vendored package for the combined base and rerun that test. The interface conflict from the earlier review is still present. Build test

  2. Give the installed base a stable player registry. The SHARC builder emits one comparison and a jump to each selected player's address. Adding or removing a player therefore changes the dispatcher in the firmware image. Have the base dispatch through registration slots that the whole-image builder can populate today and the runtime loader can populate or clear later. Validate that each entry belongs to executable code in its own package. The machine wire also takes the single receive site used by the sidechain prototype, so give both consumers a base-owned way to receive the frame. The USB transport can follow separately. Player dispatch

  3. Cover an empty registry and a machine with no custom player. With no machine installed, every normal audio transfer still calculates step lengths, reads all 16 machine types and copies the display reply. Gate that work on an active consumer. Conversely, a module can register a machine without a SHARC player. Selected alone, it leaves the stock seven-entry selector table in place even though its type is 7–10. With a player present, all added types receive SAMPLE's selector regardless of their declared stand-in. Derive the selectors from the registered machines. The source and design notes also reproduce the stock selector table. Read those words from the user's verified OS during composition and retain only the address, length and hash in the repository. Composition · Frame handler

  4. Qualify the image the musician would build. The browser adds the SHARC player during preflight. The CLI linker used by the test procedure writes only the main image. Share the composition step and check that the same inputs and version produce the same final SHA-256 through both paths. The dated verification record covers 2f8a60d2; the PR description names 8f3fedc9. After the fixes, run npm run test:procedure -- --base digitakt-ii --package <composed-image.syx> from the refreshed checkout. Record the revision, base and final image hashes, module set, and the result or reason for each skipped step. Put the dated record and edge cases on the cumulative draft. CLI output path · Test procedure for every machine

For the edge cases, two small fixture machines can exercise coexistence before a second musical module exists. Include an empty set, a machine with no player, and two machines alongside a stock track. On the named hardware build, cover first and last tracks plus the reported T9 failure, both stereo voices, sample selection, a pattern or tempo change during playback, and reloading a kit with its module present and absent. Keep the emulator results and the submitter's hands-and-ears results labelled separately. Steps that need a Digitakt II device link can say which tool is missing.

repeat98 and others added 12 commits November 22, 2026 17:43
…se/digitakt-ii-machines

# Conflicts:
#	sdk/digitakt-ii/core-profile/interface.json
Modwerk reviewed merge
Base: ad60020
Head: d9b7acc
Review: 6013342931
Approved by: repeat98 (67785539, maintainer)
…hines, idle without machines

The base's sound-chip code no longer changes with the set: the dispatcher jumps
through one registry slot per added type, and the frame receiver, which keeps
the receive site, calls four frame slots (a render plan's bridge registers
there instead of taking the site). Types 7-10 take the selector of the stock
type each registered machine stands for, read from the owner's verified OS at
composition; only the stock table's address, length and hash stay here. A
player must start in its own package's code and play a type its package
registers. With no machine registered the ColdFire writes no wire words and
reads no reply. link-image.mjs composes through the same step as the site.

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

The base built from the registry change (13,293 bytes .run). link-image.mjs could
not write a Digitakt II file at all (its OS carries a seal only the kit's writer
redoes); it now builds through dt2-link.ts, the kit's build plus the composition
the site's preflight runs. dt2-link.test.ts builds the same set both ways with
the owner's OS and compares the final SHA-256. machine-build.ts names its one
extensionless import's extension so Node scripts can load it.

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

Fix: verify rollbacks to published Elemod releases
…ollects without the OS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 marked this pull request as ready for review November 22, 2026 19:55
@repeat98
repeat98 merged commit 969a5f8 into repeat98:base/digitakt-ii-next Nov 22, 2026
5 of 6 checks passed
@repeat98

Copy link
Copy Markdown
Owner

This change is merged into base/digitakt-ii-next. The cumulative draft #1999 sees your board claims still linked here and stops at the claim check. Could you point the same claims at #1999 from your signed-in board account? These commands keep your attribution and work whether the board still shows this merged PR or has already retired its claims.

npm run board -- claim hook digitakt-ii/events/10 --branch base/digitakt-ii-next --pr 1999
npm run board -- claim hook digitakt-ii/tables/4-5 --branch base/digitakt-ii-next --pr 1999

Please reply when they are linked so I can rerun the cumulative check.

@Claptom-music

Copy link
Copy Markdown
Contributor Author

Done: both claims (hook digitakt-ii/events/10 and hook digitakt-ii/tables/4-5) are now linked to #1999 on base/digitakt-ii-next. You can rerun the cumulative check.

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.

6 participants