Skip to content

digidice: a meloDICEr-style melody generator for Digitakt OS 1.54 (draft) - #676

Draft
todd-neale wants to merge 2 commits into
repeat98:mainfrom
todd-neale:digitakt-melodicer-research
Draft

todd-neale wants to merge 2 commits into
repeat98:mainfrom
todd-neale:digitakt-melodicer-research

Conversation

@todd-neale

@todd-neale todd-neale commented Oct 16, 2026 •

Copy link
Copy Markdown

Summary

digidice: a random melody generator for the Digitakt mk1 (OS 1.54), inspired by Vermona's meloDICEr. A double press on TRIG opens a page that rolls a melody into the active track, audio or MIDI, as ordinary trigs with NOTE, VEL and LEN. After that it is a normal pattern: play it, edit it, save it or copy it.

Knob Knob
A DENSITY how many notes E ROOT the key
B NOTE VALUE gap in steps (1, 2, 3, 4, 6, 8) F SCALE 8 scales, every note stays in it
C VARIATION gaps halve or double G RANGE scale notes above the root
D LEGATO note length; 127 ties H VEL velocity spread

YES rolls everything, LEFT only the rhythm, RIGHT only the notes; NO or another double press on TRIG closes. Turning a knob reshapes the current melody rather than replacing it, and raising DENSITY only adds notes. digidice keeps no clock: it writes trigs through the OS's own step setters from the UI task, and the sequencer plays them with the project's tempo, swing, track length and speed.

It is a draft (sdk/drafts/digidice), with the full module layout. It moves to sdk/digitakt/modules/ once it has run on a unit (author-hardware) and has an .elemod release for the browser builder to pin. The library tests require that pin for every Digitakt module. The steps are in its TESTING.md.

Files

  • sdk/drafts/digidice/:
    • modwerk.module.json and build.json
    • src/ (the mod, and the engine from the first commit)
    • tests/test_engine.c
    • README with a tutorial, TESTING, evidence/emulator.md
    • three emulator screenshots and a thumbnail
    • MIT licence
  • sdk/digitakt/research/pattern-write.md: what the emulator confirmed and what it did not (the undo snapshot).
  • From the first commit: sdk/digitakt/research/dtpeek.py.

No firmware, extracted code or tables, dumps or built images are included.

Testing

  • npm run check: passes (805 tests), with Python 3.14 first on PATH. macOS's Python 3.9 fails an existing f-string test on clean main too.
  • npm run module:doctor -- digidice, run with the folder in sdk/digitakt/modules/: manifest, category guide and module rules pass. The browser builder fails as expected, since no .elemod release exists yet.
  • Engine: 4,975,802 host checks, 0 failures under ASan and UBSan.
  • digiemu v0.4.1 (irpina) on OS 1.54, core 2.1 (report: sdk/drafts/digidice/evidence/emulator.md):
    • emu.fwcheck passes.
    • The page opens on a double press on TRIG (key flags 19/5); stock does nothing on that press.
    • Rolls, knob changes and closing all work, on audio and MIDI tracks.
    • With a 440 Hz test sample, the recorded audio plays the rolled notes at the right steps and pitches, and loops after 16 steps.
    • Beside other mods: it links beside any two of digihealth, DIGISLICER and NEIGHBOR. All four exceed core 2.1's 128 KiB by 1,532 bytes. Beside digihealth and DIGISLICER it passes emu.fwcheck, and the screens after closing are identical to stock's.
  • Emulator limitation: digiemu 0.4.1 lists OS 1.54 as untested, and there stock 1.54 itself stops its UI after CLEAR PATTERN (a heap fault). Each stop seen while testing was reproduced on stock before drawing a conclusion.
  • Hardware: not tested yet.

🤖 Generated with Claude Code

todd-neale and others added 2 commits October 16, 2026 12:06
Research for a meloDICEr-style random melody generator on the Digitakt
mk1 (OS 1.54): how a mod can write trigs, NOTE, VEL and LEN through the
OS's own per-step setters from the UI task, with the track layout, the
notification chain, the undo snapshot and a hardware checklist. Static
analysis only; nothing has run on a unit. dtpeek.py is a macOS/Linux
client for digihealth's read-only USB PEEK channel for those checks.

The digidice draft holds the generator engine: plain C99 with no libc,
two seeds so rhythm and notes can be rolled separately, and host tests
under ASan/UBSan. MIT licence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… OS 1.54

A double press on TRIG opens a page that rolls a random melody into the
active audio or MIDI track as ordinary trigs with NOTE, VEL and LEN,
written through the OS's own step setters from the UI task. Eight knobs
shape the rhythm and the notes; YES, LEFT and RIGHT roll everything, the
rhythm or the notes. It keeps no clock: the sequencer plays what it writes.

The draft keeps the full module layout (manifest, build.json, README,
TESTING, emulator report, screenshots, thumbnail, MIT licence) in
sdk/drafts/digidice until it has run on a unit and has an .elemod release
the browser builder can pin. Tested in the digiemu emulator on OS 1.54,
including recorded audio and a build beside digihealth and DIGISLICER.
The research note records what the emulator confirmed and what it did not.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@todd-neale todd-neale changed the title Add Digitakt pattern-write research and the digidice generator engine digidice: a meloDICEr-style melody generator for Digitakt OS 1.54 (draft) Oct 16, 2026

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant