diff --git a/changelog/2026-11-19-digitone-ii-base.md b/changelog/2026-11-19-digitone-ii-base.md new file mode 100644 index 0000000000..a32468d152 --- /dev/null +++ b/changelog/2026-11-19-digitone-ii-base.md @@ -0,0 +1 @@ +Digitone II: the first Modwerk base for OS 1.12. It reuses the Digitakt II base's source at the Digitone II's addresses and builds from your own OS file with `npm run machine:base`. It ran on a unit with its hooks, and projects kept their changes across a power cycle. It is not on the site yet. diff --git a/changelog/2026-11-19-digitone-ii-site-base.md b/changelog/2026-11-19-digitone-ii-site-base.md new file mode 100644 index 0000000000..04dcae3edc --- /dev/null +++ b/changelog/2026-11-19-digitone-ii-site-base.md @@ -0,0 +1 @@ +Digitone II: beta users can build Modwerk's Digitone II base on its machine page from their own OS 1.12 file, the base that ran on a unit. There are no modules yet, and downloads stay off until the owner turns them on. Its builds count in the usage statistics like every other machine's. diff --git a/changelog/2026-11-19-elektron-update-fit.md b/changelog/2026-11-19-elektron-update-fit.md new file mode 100644 index 0000000000..2ba4c4a4cc --- /dev/null +++ b/changelog/2026-11-19-elektron-update-fit.md @@ -0,0 +1 @@ +Elektron firmware builds: Modwerk now has a second, smaller packer for the OS, and builds for a unit that refuses large upgrades (the Digitone II, at about 2 MiB) are packed with it so they fit. Other machines' builds do not change. diff --git a/changelog/2026-11-20-digitone-ii-fit-by-name.md b/changelog/2026-11-20-digitone-ii-fit-by-name.md new file mode 100644 index 0000000000..ced3591fdf --- /dev/null +++ b/changelog/2026-11-20-digitone-ii-fit-by-name.md @@ -0,0 +1 @@ +Fixed: a Digitone II build from the site is packed to fit the unit's update limit again; it had gone out at full size, and the unit refused it at about 98 %. diff --git a/changelog/2026-11-20-digitone-ii-fx-proposal.md b/changelog/2026-11-20-digitone-ii-fx-proposal.md new file mode 100644 index 0000000000..8ebe2cbb19 --- /dev/null +++ b/changelog/2026-11-20-digitone-ii-fx-proposal.md @@ -0,0 +1 @@ +Docs: a proposal for Digitone II effect modules: a send bus in the base fed from the ColdFire's audio rings, the Rytm's effect record, a second FX page, and Tape Echo first. diff --git a/changelog/2026-11-23-digitone-ii-sdk-guide.md b/changelog/2026-11-23-digitone-ii-sdk-guide.md new file mode 100644 index 0000000000..82e6a2cf6c --- /dev/null +++ b/changelog/2026-11-23-digitone-ii-sdk-guide.md @@ -0,0 +1 @@ +The Digitone II has an SDK guide for module developers: the base's hooks, which voice plays which track and when it holds a note, the frame budget measured on a unit, the panel's key codes, how stock builds its parameter pages and how a module page fits their grid. `ev_frame_params`'s contract now says it hands over voice slots, not tracks. diff --git a/docs/MACHINE_RECIPE.md b/docs/MACHINE_RECIPE.md index 24ce6e6b54..87ec33b9ac 100644 --- a/docs/MACHINE_RECIPE.md +++ b/docs/MACHINE_RECIPE.md @@ -42,7 +42,7 @@ Read this before you plan a core, a base or the first modules for any machine ot | Analog Four MKII | research | elekloader core-a4 0.2 | not started | none known | as the Rytm: same platform | | Digitakt II | preview | Modwerk base from core-dt2 1.1's source (elekloader#221 at `0df8409`), with sequencer and project hooks | started: the site builds the [pinned base](../sdk/machines/digitakt-ii/elekloader/README.md) `8650bb8a` (`e88273ed`, which passed on one unit on 17 November 2026, with kit data ended before the project archive); downloads off. The USB link is not started (SysEx over USB MIDI, from the Rytm's) | digikit (emulator only) | the exact build on a second unit, then the USB link ([goal](../sdk/machines/digitakt-ii/GOAL.md)) | | Syntakt | research | Modwerk boot probe | not started | digiemu's port (open upstream pull request; emulator only) | the core stage, planned as the base | -| Digitone II | research | core-dn2 0.3, with the Digitakt II 1.1 additions, in toonst's elekloader fork: boots and its six UI events run on units (18 November 2026) | started: Modwerk's builder carries the device (`machine:base` and the site's kit, 19 November 2026) | digikit (the author's; emulator only) | the Modwerk base, reusing the Digitakt II's with its own recipe as the Rytm MKI does, then flashing from the site and the link ([goal](../sdk/machines/digitone-ii/GOAL.md)) | +| Digitone II | preview | core-dn2 0.3, with the Digitakt II 1.1 additions, in toonst's elekloader fork: boots and its six UI events run on units (18 November 2026) | started: Modwerk's builder carries the device (`machine:base` and the site's kit), and `machine:base` builds a base from the Digitakt II's source at core-dn2 0.3's addresses (19 November 2026), which ran on a unit and is bound (`base-binding.json`, the site's catalog); the page builds it for beta users, and Modwerk's packer keeps images under the unit's 2 MiB update limit | digikit (the author's; emulator only) | the Modwerk base, reusing the Digitakt II's with its own recipe as the Rytm MKI does, then flashing from the site and the link ([goal](../sdk/machines/digitone-ii/GOAL.md)) | | Model:Cycles | research | Modwerk base from core-mc 0.3's source (Elekloader v0.11.0) plus a key-LED hook ([events.json](../sdk/machines/model-cycles/events.json)) | started: built by `npm run machine:base`; runs on a unit with a test module on the LED hook; the USB link started over USB MIDI SysEx: in every base the identity, the audio load, a diagnostics log in the Octatrack's layout and the Octatrack's runtime loader (modules on trial, kept, undone, refused while playing), on a unit flashed with the release base (24 November 2026); development bases add memory reads, keys, encoder turns and a RAM boot ([LINK.md](../sdk/machines/model-cycles/LINK.md)); the site builds the pinned base from the owner's OS file as a local preview, downloads off; the MCP's `device_status` reads its identity, `device_load` the audio load, `device_log` the log, and its trial tools load modules (24 November 2026) | digiemu (emulator only) | the first module, Control All Config ([guide](../sdk/machines/model-cycles/README.md)) | | Analog Keys | research | none | not started | none known | the machine steps first ([add a machine](ADD_A_MACHINE.md)) | | Zoom MultiStomp | preview (MS-70CDR); research (MS-50G, MS-60B, G1on) | MIDISTOMP on the MS-70CDR; the MS-50G and MS-60B need builds from their own OS | browser base build and flash over Web MIDI. Shared MCP status and load tools use the same link. Load needs the MIDISTOMP SysEx load reply. | Ziddle (emulator only) | Prove a RAM-only effect trial and rollback on the MS-70CDR before wiring review, trial, Keep and Undo. See the [plan](ZOOM_MULTISTOMP.md#plan). | diff --git a/docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md b/docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md new file mode 100644 index 0000000000..3f2b8c994a --- /dev/null +++ b/docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md @@ -0,0 +1,20 @@ +# Digitone II: Modwerk's base boots, runs its hooks and keeps a project across a power cycle, 19 November 2026 + +Modwerk's Digitone II base (`sdk/machines/digitone-ii/elekloader/`, #1760) on OS 1.12, flashed with Elektron Transfer, then stock restored. Contributor's Digitone II (@prodbysmolec), results as observed on the unit and reported. + +- **Stock file:** `Digitone_II_OS1.12.syx`, `7e5b8a73…2ceb35`. Elektron Transfer 1.10.3 on macOS. +- **Base:** `npm run machine:base -- digitone-ii` (m68k-elf GCC 16.2.0, binutils 2.47, the kit-pinned Elekloader checkout `3b31ef3` with the device Modwerk's builder carries): package `7a60d82ebdf30d9e6013f6ab391d4666ea92b6d4a7c7d11f679ad8c958b4bf99` (.boot 50, .run 3,656, .bss 3,120 bytes; 14 sites). +- **First images refused:** linked and packed by the pinned kit, the images were 2,725,280 and 2,724,768 bytes of `.syx` (flash end 0x28cfa0, about 2.15 MB of container). Transfer sent each to 99 %, and the unit stopped the upgrade there and kept running its OS. Elekloader 0.11's Digitone II profile caps an update at 0x200000 decoded bytes (`update_max`, "measured on a unit"); the images that ran on 18 November were about 1.92 MB. +- **Images that ran:** the same base linked by Elekloader 0.11.0's patcher, whose packer packs the main OS smaller (1,164,092 stored bytes instead of 1,395,648), each verified (sections 2, 4, 5, 7 and 8 byte for byte, the in-place depack, flash end about 0x2546xx). Their main OS is the one Modwerk's own linker writes, byte for byte: + - base + `hello-marker-dn2` 1.0 + `hooks-check-dn2` 0.1 (toonst's builds of #1743): `.syx` `87c4dbb3e3f99cb6c3ea9583458503d7ff7c0cbef1059da74cd3f90aa77a7aa2`, main OS `699e1698…`. + - base alone: `.syx` `a83ee7740fb8c8815c38950049f4b105dda0bd72e701c72d69f4773491948ad8`, main OS `20d418e9…`. +- **On the unit, base + examples:** it flashed and booted. The marker square showed top right and blinked (`ev_draw`, `ev_tick`); key presses grew a bar and encoder turns moved one (`ev_key`, `ev_enc`); HOOK TEST was in SETTINGS and grew the third bar, and in PERSONALIZE and grew the fourth (`ev_settings`, `ev_personalize`); TEMPO grew the fifth. A project loaded and played normally; a small change was saved, the unit powered off and on, and the project loaded with the change; several kits loaded and sounded normal. +- **On the unit, base alone:** it flashed; no marker, no HOOK TEST, the unit behaved as stock. +- **Stock 1.12** flashed back over USB and the unit ran normally. +- **Not tested:** the frame, key-LED, project-data and kit-data hooks with a subscriber (no mod uses them yet), the startup-menu recovery over MIDI DIN, long sessions, listening beyond normal playback. Images packed by the pinned kit were refused as too large, so a site build needs a packer and a size check that keep the update under the unit's limit. + +## The same build, packed by Modwerk's optimal packer (#1761) + +- **Image:** the refused kit-packed base + `hello-marker-dn2` + `hooks-check-dn2` image, put through `fitUpdate`: its main OS packed again by `packOptimal`, which uses the offset-reuse code as Elektron's stock stream does; written and sealed by the kit's writer, the kit's verify passed. 2,002,808 bytes decoded (limit 2,097,152); `.syx` `ed19b2f9c80286b801ae59f09df6c1726e595a7c40119316f29c0af5168bca44`; main OS `699e1698…`, the same as the image above. +- **On the unit:** Transfer sent it whole and the unit booted it. The marker showed; key presses grew the first bar, and before arming TEMPO did too; HOOK TEST in SETTINGS and PERSONALIZE ran and grew their bars, and after PERSONALIZE TEMPO grew its bar; sound normal. +- **Stock 1.12** flashed back over USB afterwards and the unit ran normally. diff --git a/migrations/0102_usage_digitone_ii.sql b/migrations/0102_usage_digitone_ii.sql new file mode 100644 index 0000000000..02c5acecbf --- /dev/null +++ b/migrations/0102_usage_digitone_ii.sql @@ -0,0 +1,14 @@ +-- Count Digitone II beta builds (owner, board, 20 November 2026): widen the closed machine enum again, as 0083 did, +-- keeping every existing row and inventing no historical attribution. It also lists model-cycles, which 0104 (#2125) +-- adds: each rebuild of this table lists every machine either adds, so the two apply in any order without losing a machine. +CREATE TABLE usage_device_daily_expanded ( + day TEXT NOT NULL, + device TEXT NOT NULL CHECK(device IN ('octatrack','digitakt','digitone','digitakt-ii','analog-rytm-mkii','digitone-ii','model-cycles')), + builds INTEGER NOT NULL DEFAULT 0, + builds_failed INTEGER NOT NULL DEFAULT 0, + downloads INTEGER NOT NULL DEFAULT 0, + PRIMARY KEY(day,device) +); +INSERT INTO usage_device_daily_expanded SELECT day,device,builds,builds_failed,downloads FROM usage_device_daily; +DROP TABLE usage_device_daily; +ALTER TABLE usage_device_daily_expanded RENAME TO usage_device_daily; diff --git a/scripts/elekloader-update.ts b/scripts/elekloader-update.ts index c6fa944f6f..ff3b80040c 100644 --- a/scripts/elekloader-update.ts +++ b/scripts/elekloader-update.ts @@ -29,7 +29,7 @@ export { mergeCatalogOverlay } from './elekloader-vendor.ts' /** The kit protocol src/engine/elekloader/digi-build.ts is written for. */ export const KIT_PROTOCOL = 1 /** The devices Modwerk builds for: digi-build.ts's DEVICE, the machine folders under sdk/. */ -export const DEVICES: Record = { 'digitakt-mk1': 'digitakt', 'digitakt-mk2': 'digitakt-ii', 'digitone-mk1': 'digitone', 'analog-rytm-mk2': 'analog-rytm-mkii', 'model-cycles': 'model-cycles' } +export const DEVICES: Record = { 'digitakt-mk1': 'digitakt', 'digitakt-mk2': 'digitakt-ii', 'digitone-mk1': 'digitone', 'analog-rytm-mk2': 'analog-rytm-mkii', 'digitone-mk2': 'digitone-ii', 'model-cycles': 'model-cycles' } /** The kit files Modwerk vendors; the zip's dist/, tools/build.ts and examples/ are for sites without a bundler. */ const VENDORED = (name: string) => name.startsWith('src/') || ['tools/kit.ts', 'LICENSE', 'NOTICE', 'README.md', 'kit.json'].includes(name) diff --git a/scripts/elekloader-vendor.ts b/scripts/elekloader-vendor.ts index fd1ff78f8e..1762fb5caa 100644 --- a/scripts/elekloader-vendor.ts +++ b/scripts/elekloader-vendor.ts @@ -14,6 +14,7 @@ import { fileURLToPath } from 'node:url' import type { Plugin } from 'vite' import { parseCatalog, type Catalog } from '../vendor/elekloader/kit/src/kit/catalog.ts' import { devices } from '../vendor/elekloader/kit/src/devices.ts' +import { carryDevices } from '../src/engine/elekloader/carried-devices.ts' import { oddJumpsInFiles, type PackageFile } from '../src/engine/elektron/odd-jumps.ts' export const ELEKLOADER_SITE = 'elekloader/' @@ -128,13 +129,14 @@ export async function readVendoredElekloader(root: string): Promise<{ lock: Lock const catalog = parseCatalog(site.catalog) const pins = [...catalog.cores, ...catalog.mods], assets: [string, Buffer][] = [[ELEKLOADER_SITE + 'catalog.json', raw]] const packages: PackageFile[] = [], odd: string[] = [] + carryDevices() for (const pin of pins) { const data = await readFile(resolve(dir, pin.file)).catch(() => undefined) if (!data) bad.push('missing: ' + pin.file) else if (sha(data) !== pin.sha256) bad.push('not the pinned file: ' + pin.file) else { assets.push([ELEKLOADER_SITE + pin.file, data]) - // Where the pin's machine runs code, from the kit's own profile of that firmware. + // Where the pin's machine runs code, from the kit's own profile of that firmware, or the one Modwerk's builder carries. const device = devices().find(device => device.key === pin.device), release = device?.releases.find(release => release.version === pin.os) if (device && release) packages.push({ name: pin.file, bytes: data, firmware: pin.device + ' ' + pin.os, machine: { mainLoad: device.mainLoad, mainLength: release.mainLen, areas: [...Object.values(device.areas), device.ddr, device.sramCode] } }) else odd.push(pin.file + ': the kit has no profile of ' + pin.device + ' ' + pin.os + ', so its jumps cannot be checked') diff --git a/sdk/digitone-ii/core-profile/interface.json b/sdk/digitone-ii/core-profile/interface.json new file mode 100644 index 0000000000..3d80d6b7af --- /dev/null +++ b/sdk/digitone-ii/core-profile/interface.json @@ -0,0 +1,160 @@ +{ + "schemaVersion": 1, + "machine": "digitone-ii", + "interface": "1.1", + "status": "Modwerk's Digitone II base for OS 1.12: the Digitakt II base's core-dt2 1.1 source at the Digitone II's addresses (plain variant), selected by the SHA-256 in sdk/machines/digitone-ii/base-binding.json. No SRAM code area, no sequencer events and no project archive: those are the Digitakt II base's additions.", + "events": [ + { + "name": "ev_tick", + "when": "the UI compose check, approximately 30 Hz", + "handler": "void f(void *ctrl); set ctrl + 0x20 to 1 to request redraw; not an audio-rate clock" + }, + { + "name": "ev_draw", + "when": "after the OS composes the 128x64 screen", + "handler": "void f(void *bmp, void *ctrl)" + }, + { + "name": "ev_key", + "when": "a UI key event", + "handler": "int f(void *brain, void *event); nonzero consumes the event" + }, + { + "name": "ev_enc", + "when": "a UI encoder event", + "handler": "int f(void *brain, void *event); nonzero consumes the event" + }, + { + "name": "ev_settings", + "when": "building the SETTINGS menu", + "handler": "void f(void *menu)" + }, + { + "name": "ev_personalize", + "when": "building the PERSONALIZE menu", + "handler": "void f(void *menu)" + }, + { + "name": "ev_frame_params", + "since": "1.1", + "when": "once a frame, in the frame interrupt, before the stock modulators add their values", + "handler": "void f(int16_t *values, int stride); voice slot k's Sound parameter j at values[stride * k + j], 16 slots, stride 101 (OS 1.12 keeps one array per voice: a chord uses several slots, a slot changes tracks); add to it, held in the parameter's range; the kit and the pages are untouched", + "site": { + "os": "1.12", + "address": "0x40027196", + "instructions": 1, + "sha256": "8f4626d425f213c0f0f9f81054e40a51bad034eaa6b154d51fe969ae4a521a8d" + }, + "order": "lower order first (shipped mods use 10-90); every handler sees the values the earlier ones left" + }, + { + "name": "ev_key_leds", + "since": "1.1", + "when": "every UI frame, after the frame clears the key LEDs and before the stock views set theirs (UI task)", + "handler": "void f(void *mgr); set an LED with fw_led_set(mgr, logical, 2, value); the first setter of an LED wins, so a handler's LED stays over the stock view's", + "site": { + "os": "1.12", + "address": "0x4002c87a", + "instructions": 2, + "sha256": "3988e55cba5c51c557dcb530885eba6f789018b4345baccd49ebce731fd6f68e" + }, + "order": "lower order first (shipped mods use 10-90); the first handler to set an LED keeps it" + } + ], + "tables": [ + { + "name": "core_projdata", + "since": "1.1", + "entry": 4, + "room": 4, + "purpose": "Pointers to core_projdata_t descriptors {tag[4], size, data, loaded}: each mod's block in the project file's header gap (+0x1c to +0x200), saved with every project save and loaded back. Reader: core's store (project save and load sites). A mod claims projdata:.", + "sites": [ + { + "os": "1.12", + "address": "0x400e18be", + "instructions": 1, + "sha256": "be28bf581aa32f87a3306f04738f1dbdb4b28489865cd0d88145466f2740333c", + "role": "project save" + }, + { + "os": "1.12", + "address": "0x400e1928", + "instructions": 1, + "sha256": "39d8feaa0cf09fbdc868baea4e44be238666cbfcbf350883559c99085034a789", + "role": "project load" + } + ] + }, + { + "name": "core_kitdata", + "since": "1.1", + "entry": 4, + "room": 4, + "purpose": "Pointers to core_kitdata_t descriptors {tag[4], size, data, changed}: each mod's block per kit (128 kits), after each kit record's end mark, saved with the project and SAVE KIT, loaded back and copied with the firmware's kit copies. All mods share 337 bytes a kit record (core_kitdata_room()); a block that does not fit is left out. Reader: core's store. A mod claims kitdata:.", + "sites": [ + { + "os": "1.12", + "address": "0x400de0d4", + "instructions": 1, + "sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "role": "kit save" + }, + { + "os": "1.12", + "address": "0x400ddddc", + "instructions": 1, + "sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "role": "kit load" + }, + { + "os": "1.12", + "address": "0x40134770", + "instructions": 3, + "sha256": "a48eab821488cf202e892b5cad063488c972824e57c3d851ab402463dc0f5657", + "role": "memcpy: follows kit copies in RAM (pattern copy and paste, PASTE KIT, undo)" + } + ] + } + ], + "exports": [ + { + "name": "core_additem", + "prototype": "void core_additem(menu, row)", + "purpose": "Add a SETTINGS or PERSONALIZE row from the corresponding event handler." + }, + { + "name": "core_addvalue", + "since": "1.1", + "prototype": "void core_addvalue(void *menu, const core_value_t *row)", + "purpose": "Add a PERSONALIZE or SETTINGS row that shows a label and, on the right as LED INTENSITY does, values[get()]; from ev_personalize or ev_settings." + }, + { + "name": "core_kit_on", + "since": "1.1", + "prototype": "int core_kit_on(void)", + "purpose": "The kit on (the pattern on's), -1 for none." + }, + { + "name": "core_kitdata_room", + "since": "1.1", + "prototype": "uint32_t core_kitdata_room(void)", + "purpose": "Bytes a kit record holds for the mods' blocks (337)." + }, + { + "name": "core_store_conflicts", + "since": "1.1", + "prototype": "volatile uint32_t core_store_conflicts", + "purpose": "How many times a save or a load met bytes in the mods' areas that are not core's; core left them as they were." + }, + { + "name": "fw_*", + "since": "1.1", + "prototype": "fw_led_set, fw_invalidate, fw_textbox, fw_font_menu, fw_op_new (the base's exports)", + "purpose": "Firmware locations at the Digitone II OS 1.12 addresses in sdk/machines/digitone-ii/elekloader/base.json's recipe. Use these from the UI task." + } + ], + "claims": [], + "memory": { + "area": "0x47f00000-0x47f40000" + } +} diff --git a/sdk/digitone-ii/modules/README.md b/sdk/digitone-ii/modules/README.md new file mode 100644 index 0000000000..46e6e5ae82 --- /dev/null +++ b/sdk/digitone-ii/modules/README.md @@ -0,0 +1,5 @@ +# Digitone II modules + +Each folder here is a library module for Digitone II OS 1.12 on Modwerk's Digitone II base (core 1.1). The first is [Voice Spread](voice-spread/): its two value rows in SETTINGS > PERSONALIZE set the pattern for module settings, and it acts on the voices through the base's `ev_frame_params`, which on the Digitone II hands over the 16 voices, not the tracks. Downloads stay off until the owner turns them on. + +Create one with `npm run module:new -- my-mod --machine digitone-ii --author your-github-login`; see [the Digitone II goal](../../machines/digitone-ii/GOAL.md) and [base](../../machines/digitone-ii/elekloader/README.md). diff --git a/sdk/digitone-ii/modules/voice-spread/LICENSE b/sdk/digitone-ii/modules/voice-spread/LICENSE new file mode 100644 index 0000000000..f288702d2f --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/sdk/digitone-ii/modules/voice-spread/README.md b/sdk/digitone-ii/modules/voice-spread/README.md new file mode 100644 index 0000000000..fce6e3579c --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/README.md @@ -0,0 +1,68 @@ +# Voice Spread — Digitone II + +A Digitone II mod by @prodbysmolec. Version 0.1.0-experimental, for OS 1.12 on Modwerk's Digitone II base (core 1.1). It ran on a Digitone II from RAM; see [TESTING.md](TESTING.md) for what was run and what was not. The screenshot is from the unit's screen, read over the base's USB link. + +## Overview + +The Digitone II plays each note on a voice of its own, and a chord takes several. Voice Spread gives every voice a fixed place in the stereo field: neighbouring voices go to opposite sides, and the first voices a chord takes land far apart, so two or three notes already sound wide. FILTER SPREAD also moves each voice's filter frequency a few steps up or down, so the notes of a chord differ slightly in brightness. + +- Acts on the live voices only: kits, sounds and saved patterns stay exactly as they are. +- OFF gives the stock sound back at once. +- One setting for the whole project, saved with it. +- Uses two base hooks (`ev_personalize`, `ev_frame_params`) and patches no stock site. + +## Controls + +Two rows at the end of SETTINGS > PERSONALIZE. LEFT and RIGHT change the value, as on the stock rows there. + +| Row | Values | What it does | +| --- | --- | --- | +| VOICE SPREAD | OFF, 25, 50, 75, 100 | How far the voices are spread, in percent of the full width. At 100 the outermost voices sit hard left and right. | +| FILTER SPREAD | OFF, LOW, MID, HIGH | How far each voice's filter frequency moves: at most 4, 10 or 20 of the 127 steps, by a different amount and direction for each voice. | + +## Usage + +- Pads and chords on a polyphonic track: VOICE SPREAD 50 or more. +- Chords that sound too static: FILTER SPREAD LOW. +- A mono check of the mix: both OFF, and the stock sound is back. + +### Quick tutorial + +1. Install a build of the Digitone II base that contains Voice Spread. +2. Press SETTINGS, open PERSONALIZE and move down to VOICE SPREAD. +3. Press RIGHT until it shows 75, then play a chord on a polyphonic track: its notes spread from left to right. +4. Move down to FILTER SPREAD and choose LOW: the notes differ slightly in brightness. +5. Save the project to keep the setting. + +## Compatibility and limitations + +- Digitone II, OS 1.12, on Modwerk's Digitone II base 1.1. It patches no stock site and claims only its project data (`projdata:VSPR`). +- The spread follows the voices, not the tracks: every track's notes are spread, and a mono track's notes can land on different voices and so on different sides from note to note. +- The offset is added to the track's own pan and held in the pan's range. A track panned hard to one side therefore spreads to one side only. +- The default filter frequency is the top of the range, so there FILTER SPREAD can only close voices, never open them. +- The setting is per project, not per track or per kit. A project saved without the module loads with both rows OFF. +- Parameter locks and the stock LFOs still move pan and filter; Voice Spread adds its offset before the stock modulators add theirs. + +### Stock flows this module touches + +None. It adds two rows to the end of SETTINGS > PERSONALIZE, which the base shares between modules, and changes no stock row, page or gesture. + +## How it works + +The base calls `ev_frame_params` once a frame (1,500 times a second) in the frame interrupt, with the parameter values of the 16 voices, 101 to a voice, after the stock smoother and before the stock modulators. On the Digitone II these values belong to the voices, not the tracks. Voice Spread adds a fixed offset of its own to each voice's pan (Sound parameter 89) and filter frequency (Sound parameter 67) and holds the result between 0 and 127. The places, in eighths of the full width, are −8, +8, −4, +4, −6, +6, −2, +2 and then the odd eighths, so neighbouring voices are on opposite sides and the offsets of all 16 voices add up to zero. The filter uses the same places in another order, so a voice's side and its brightness do not follow each other. + +The two rows are value rows from the base (`core_addvalue`). The setting is four bytes in the project file's header (`core_projdata`, tag `VSPR`): a version and the two levels. + +## Tests and measurements + +The evidence tier is `author-hardware`. [TESTING.md](TESTING.md) lists what was run on the unit and what was not. Memory: 852 bytes of the base's shared area, measured from the linked image. Load: read from the code; at most 16 voices × two additions and two range checks per frame. + +## Authorship and licences + +Original work by @prodbysmolec, GPL-3.0-or-later ([LICENSE](LICENSE)). The Sound parameter indices and the voice layout were read from the unit's memory over Modwerk's Digitone II link; no firmware bytes are in this folder. + +## Screens and audio + +![SETTINGS > PERSONALIZE with VOICE SPREAD at 75](media/personalize.png) + +The two rows at the end of SETTINGS > PERSONALIZE, read from a Digitone II's screen over Modwerk's USB link. No audio recording is published: the module only moves each voice's pan and filter frequency, which the screen and the parameter readings in [TESTING.md](TESTING.md) show. diff --git a/sdk/digitone-ii/modules/voice-spread/TESTING.md b/sdk/digitone-ii/modules/voice-spread/TESTING.md new file mode 100644 index 0000000000..1bd5cff1e7 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/TESTING.md @@ -0,0 +1,32 @@ +# Voice Spread testing + +## On a unit (prodbysmolec, 23 November 2026) + +Digitone II, stock OS 1.12 (`Digitone_II_OS1.12.syx`, sha256 `7e5b8a733d4ab1fd…`). This folder's source compiled with GCC 16.2.0 `m68k-elf` (`scripts/build-elemod-packages.mjs`, the local toolchain, not yet the pinned Docker image), linked by Elekloader 0.11.0's patcher with Modwerk's Digitone II development base (`modwerk-base-digitone-ii-dev-70f7a8dc`: the plain base 1.1 plus the USB link) for OS 1.12. Recipe `1.12.json` sha256 `582ac4a6d13297aab2b60470520513635475711e3178f88f03f2a09f7d88ec60`, source tree `80b9bcc61e938fec…` (the build inventory's `sourceTreeSha256`, at the module's C sources of this commit). Image sha256 `5193559275f5656e9dafd88790bd27ee0d1dd7b9322a08f122b1a13e2fcc4270`. Booted from RAM over the link (`dn2_link.py ramboot`); nothing was written to the flash. + +| Check | How | Result | +| --- | --- | --- | +| The rows appear | SETTINGS > PERSONALIZE, screen read over the link | VOICE SPREAD and FILTER SPREAD are the last two rows, label left and value right as on the stock rows ([screenshot](media/personalize.png)). | +| LEFT and RIGHT step the values | link key presses | OFF → 25 → 50 → 75 → 100 and OFF → LOW → MID → HIGH; the row redraws at once. | +| Rows in plain SETTINGS (first build) | the same, from `ev_settings` | The value was drawn over the label; the rows moved to PERSONALIZE, where `core_addvalue` lays them out as designed. | +| The offsets reach the voices | VOICE SPREAD 100, FILTER SPREAD HIGH; the smoothed voice values (0x800068e4 + 0x22 + 202 × voice) and the frame records sent to the DSP (0x80005e60 + 0xda + 146 × voice) read over the link | Pan of voices 0–15: 0x0100, 0x7f00, 0x2080, 0x5f80, 0x10c0, 0x6f40, 0x3040, 0x4fc0, 0x08e0, 0x7720, 0x2860, 0x57a0, 0x18a0, 0x6760, 0x3820, 0x47e0 (centre 0x4000 plus the expected offsets, held in range). Filter frequency from 0x7f00 down to 0x6b00 on the voices with a downward offset, 0x7f00 on the others. The records sent to the DSP match the smoothed values. Read on the build before the label change (image `e705f01e…`), whose `spread.c` is the same. | +| The kit is untouched | the voice arrays the stock writer fills (0x80003b12 + 202 × voice) | Pan stays 0x4000 and the filter 0x7f00 there: the offset is only in the live copy. | +| Heard | chords on track 1 over USB MIDI: 100, then OFF, then 100 | Not yet reported. | + +The `%` sign is not in the menu font (a first build showed a wrong glyph), so the values are plain numbers. + +## The released package + +`sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod`, sha256 `9ce8ff19564deedd1531f60a3b4d2be3f898aab0a8e243db1d6aa20a3a17f0f5`, exported from the pinned Docker toolchain (`scripts/build-elemod-isolated.sh`, GCC 16.2.0, image `85394501…`) at commit `a78057606` (recipe sha256 `78d301ad…`, source tree `b163786f…`). Linked with the development base by Elekloader 0.11.0's patcher, it gives the same main OS, byte for byte (sha256 `493992eb8a335d40…`), as the locally compiled module the unit ran, so the unit results above hold for this package. + +## Host test + +`cc -std=c11 -Wall -Wextra -Werror src/spread.c tests/spread_test.c && ./a.out` prints `voice-spread: ok`. It checks that OFF adds nothing, that each level's offsets sum to zero, that neighbouring voices go to opposite sides, the 100 % and HIGH limits, that values are held in range at both ends, and that no other parameter changes. + +## Not tested + +- Saving the project with the module and loading it again after a power cycle (the setting's `core_projdata` block), and loading a project saved without it. +- A build with the plain base (no link) and the pinned toolchain image; flashing. +- Parameter locks and LFOs on pan and filter frequency together with the spread. +- CPU load on the unit: the work per frame is bounded (16 voices) and was read from the code, not measured. +- Running beside another Digitone II module: none exists yet. diff --git a/sdk/digitone-ii/modules/voice-spread/build.json b/sdk/digitone-ii/modules/voice-spread/build.json new file mode 100644 index 0000000000..6bae1f4705 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/build.json @@ -0,0 +1,55 @@ +{ + "schemaVersion": 1, + "sources": [ + "src/main.c", + "src/spread.c" + ], + "defsym": {}, + "cflags": [ + "-Wextra", + "-Werror" + ], + "weak": [], + "subscribe": [ + { + "event": "ev_personalize", + "fn": "voice_spread_personalize", + "order": 50 + }, + { + "event": "ev_frame_params", + "fn": "voice_spread_frame", + "order": 50 + } + ], + "contribute": [ + { + "to": "core_projdata", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_projdata", + 0 + ] + ] + } + ], + "collections": {}, + "copied": [], + "regions": [], + "claims": [ + "projdata:VSPR" + ], + "requires": [], + "derive": null, + "releases": { + "1.12": { + "defsym": {}, + "cflags": [], + "sites": [] + } + } +} diff --git a/sdk/digitone-ii/modules/voice-spread/media/capture.json b/sdk/digitone-ii/modules/voice-spread/media/capture.json new file mode 100644 index 0000000000..835c89f647 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/media/capture.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 1, + "machine": "digitone-ii", + "moduleId": "voice-spread", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "5193559275f5656e9dafd88790bd27ee0d1dd7b9322a08f122b1a13e2fcc4270", + "firmware": "1.12", + "build": "Modwerk Digitone II development base 1.1 (modwerk-base-digitone-ii-dev-70f7a8dc) + voice-spread from this folder, GCC 16.2.0 m68k-elf, linked by Elekloader 0.11.0's patcher", + "emulator": "none: a Digitone II's screen read over the base's USB link (dn2_link.py screen --png), 128x64 frame shown 3x", + "capturedAt": "2026-11-23", + "setup": "Booted from RAM over the link; SETTINGS > PERSONALIZE, scrolled to the end, VOICE SPREAD stepped to 75 with RIGHT.", + "captures": [ + { + "path": "media/personalize.png", + "sha256": "4544b8853096d1c93235da5120c72168957c10f3c045013d8c849f2127d1d38d", + "plan": "press SAVEPROJ; UP x10; DOWN x6; YES; DOWN x11; RIGHT x3; screen --png", + "frame": "PERSONALIZE with VOICE SPREAD 75" + } + ] +} diff --git a/sdk/digitone-ii/modules/voice-spread/media/personalize.png b/sdk/digitone-ii/modules/voice-spread/media/personalize.png new file mode 100644 index 0000000000..e0d005d311 Binary files /dev/null and b/sdk/digitone-ii/modules/voice-spread/media/personalize.png differ diff --git a/sdk/digitone-ii/modules/voice-spread/media/thumbnail.svg b/sdk/digitone-ii/modules/voice-spread/media/thumbnail.svg new file mode 100644 index 0000000000..0d61c5fb7a --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/media/thumbnail.svg @@ -0,0 +1,9 @@ + + + + + +VOICE SPREAD +L +R + diff --git a/sdk/digitone-ii/modules/voice-spread/modwerk.module.json b/sdk/digitone-ii/modules/voice-spread/modwerk.module.json new file mode 100644 index 0000000000..2be3c9e832 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/modwerk.module.json @@ -0,0 +1,178 @@ +{ + "schemaVersion": 3, + "id": "voice-spread", + "name": "Voice Spread", + "version": "0.1.0-experimental", + "machine": "digitone-ii", + "category": "playback", + "exclusive": false, + "author": { + "github": "prodbysmolec", + "credits": [ + "prodbysmolec" + ] + }, + "maintainers": [ + "prodbysmolec" + ], + "presentation": { + "label": "VOICE SPREAD", + "family": "Voice spread", + "summary": "Spreads the voices of a chord across the stereo field, and their filters a little apart.", + "overview": "The Digitone II plays each note of a chord on its own voice. Voice Spread gives every voice a fixed place of its own: neighbouring voices go to opposite sides, so two or three notes already sound wide. FILTER SPREAD also opens or closes each voice's filter frequency a few steps, so the notes of a chord differ slightly in brightness. It acts on the live voices only: kits, sounds and what is saved stay as they are, and OFF gives the stock sound back at once.", + "highlights": [ + "Wide chords without per-track pan tricks", + "Optional filter spread for a looser, more analog chord", + "Saved with the project; OFF restores the stock sound exactly" + ], + "usage": [ + "Install a build of the Digitone II base that contains Voice Spread.", + "Press SETTINGS, open PERSONALIZE and move down to VOICE SPREAD.", + "Press RIGHT until it shows 75, then play a chord on a polyphonic track: its notes spread from left to right.", + "Move down to FILTER SPREAD and choose LOW: the notes differ slightly in brightness.", + "Save the project to keep the setting." + ] + }, + "access": { + "location": "SETTINGS > PERSONALIZE: the rows VOICE SPREAD and FILTER SPREAD.", + "steps": [ + "Press SETTINGS and open PERSONALIZE.", + "Move to VOICE SPREAD and press LEFT or RIGHT to choose OFF, 25, 50, 75 or 100 (percent of the full width).", + "Move to FILTER SPREAD and choose OFF, LOW, MID or HIGH.", + "Save the project to keep the setting." + ], + "screenshots": [ + "media/personalize.png" + ] + }, + "controls": [ + { + "name": "VOICE SPREAD", + "default": 0, + "doc": "SETTINGS > PERSONALIZE row. How far the 16 voices are spread across the stereo field, in percent of the full width; at 100 % the outermost voices sit hard left and right. Added to each voice's pan every frame, held in the pan's range; kits and sounds stay unchanged. Saved with the project (OFF for a project saved without it).", + "labels": [ + "OFF", + "25", + "50", + "75", + "100" + ] + }, + { + "name": "FILTER SPREAD", + "default": 0, + "doc": "SETTINGS > PERSONALIZE row. How far each voice's filter frequency moves up or down: LOW 4, MID 10, HIGH 20 of the 127 steps, a different amount and direction per voice. Saved with the project.", + "labels": [ + "OFF", + "LOW", + "MID", + "HIGH" + ] + } + ], + "compatibility": { + "releases": [ + "1.12" + ], + "requires": [], + "conflicts": [], + "limitations": [ + "Acts on all 16 voices, whichever track plays them: a mono track's notes can land on different voices and so on different sides.", + "The pan offset adds to the track's own pan and is held in its range; with a track already panned hard, the spread reaches only one side." + ] + }, + "platform": { + "kind": "elemod", + "core": "1.1", + "build": "build.json", + "events": [ + "ev_personalize", + "ev_frame_params" + ], + "claims": [ + "projdata:VSPR" + ] + }, + "resources": { + "memoryBytes": 852, + "fastBytes": null, + "load": { + "display": "16 voices \u00d7 two bounded additions a frame", + "method": "static", + "conditions": "Read from the code, not measured on a unit: once a frame (1,500 a second) in the frame interrupt, at most 16 voices, each with two additions and two range checks; nothing while both rows are OFF. Memory measured from the linked image (base 1.1 alone 6,776 bytes, with this module 7,628)." + } + }, + "evidence": { + "tier": "author-hardware", + "moduleVersion": "0.1.0-experimental", + "sourceSha256": "b163786f8922a5eee7616979f823b6c2de76a3ebe3510969b5d1c91e4977bb2f", + "reports": [ + "TESTING.md" + ], + "hardware": { + "model": "Digitone II", + "release": "1.12", + "testedOn": "2026-11-23", + "tester": "prodbysmolec", + "durationMinutes": null, + "summary": "Image 51935592... (this source, GCC 16.2.0, with the Digitone II development base 1.1) booted from RAM over the link: both rows appear at the end of SETTINGS > PERSONALIZE and step with LEFT and RIGHT; at VOICE SPREAD 100 and FILTER SPREAD HIGH the 16 voices' pan and filter values, and the frame records sent to the DSP, carry the expected offsets, held in range, while the kit's own values stay unchanged.", + "limitations": [ + "Booted from RAM with the development base, not flashed. The unit ran the locally compiled module; the pinned package links to the same main OS byte for byte.", + "Not tested: project save and reload of the setting, parameter locks and LFOs on pan and filter, CPU load on the unit." + ] + }, + "verifiedBy": null + }, + "tests": { + "report": "TESTING.md", + "summary": "Ran on a Digitone II from RAM on 2026-11-23: the rows work and the offsets reach the voices and the DSP records. Host test of the arithmetic passes. See TESTING.md.", + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Install a build of the Digitone II base that contains Voice Spread.", + "Press SETTINGS, open PERSONALIZE and move down to VOICE SPREAD.", + "Press RIGHT until it shows 75, then play a chord on a polyphonic track: its notes spread from left to right.", + "Move down to FILTER SPREAD and choose LOW: the notes differ slightly in brightness.", + "Save the project to keep the setting." + ] + }, + "screenshots": [ + "media/personalize.png" + ], + "captureRecord": "media/capture.json" + } + }, + "license": { + "spdx": "GPL-3.0-or-later", + "file": "LICENSE", + "declaration": "Original work by prodbysmolec." + }, + "media": [ + { + "path": "media/thumbnail.svg", + "kind": "thumbnail", + "caption": "Voice Spread thumbnail", + "alt": "Eight voices of a chord fanned out from the centre to left and right", + "credit": "prodbysmolec", + "license": "GPL-3.0-or-later", + "source": "Original artwork for this module." + }, + { + "path": "media/personalize.png", + "kind": "screenshot", + "caption": "SETTINGS > PERSONALIZE with VOICE SPREAD at 75 (unit screen)", + "alt": "Digitone II PERSONALIZE menu with the VOICE SPREAD row selected, value 75", + "credit": "prodbysmolec", + "license": "GPL-3.0-or-later", + "source": "Read from a Digitone II's screen over Modwerk's USB link with this module; no firmware content other than the screen.", + "capture": { + "type": "hardware", + "release": "1.12", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "5193559275f5656e9dafd88790bd27ee0d1dd7b9322a08f122b1a13e2fcc4270", + "setup": "Development base 1.1 with this module, booted from RAM; SETTINGS > PERSONALIZE, VOICE SPREAD set to 75; dn2_link.py screen --png." + } + } + ] +} diff --git a/sdk/digitone-ii/modules/voice-spread/src/main.c b/sdk/digitone-ii/modules/voice-spread/src/main.c new file mode 100644 index 0000000000..b9a1881254 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/src/main.c @@ -0,0 +1,78 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +// Voice Spread for the Digitone II: spreads the voices of a chord across the stereo field and, +// if wanted, their filter frequencies a little apart. Two rows in SETTINGS > PERSONALIZE set it for the project. +// +// The Digitone II base's ev_frame_params hands over the values of the 16 voice slots (not the +// tracks: OS 1.12 keeps one 101-value parameter array per voice), once a frame and before the stock +// modulators add theirs. Each slot gets a fixed offset of its own, so the notes of a chord, which +// take different slots, sit at different places. A track's kit, its pages and what is saved stay +// untouched: the offset is added to the live copy every frame and taken away by turning it off. + +#include +#include "../../../../machines/digitakt-ii/include/digitakt-mk2/core.h" + +#include "spread.h" + +// The project's setting, saved in the project file's header through core_projdata. +static struct vs_setting saved; +static volatile uint8_t pan_level, filter_level; + +static void loaded(int found) +{ + struct vs_setting s = saved; + if (!found || s.version != VS_VERSION) { + s.pan = 0; + s.filter = 0; + } + pan_level = s.pan < VS_PAN_LEVELS ? s.pan : 0; + filter_level = s.filter < VS_FILTER_LEVELS ? s.filter : 0; + saved.version = VS_VERSION; + saved.pan = pan_level; + saved.filter = filter_level; +} + +const core_projdata_t voice_spread_projdata = { + .tag = {'V', 'S', 'P', 'R'}, + .size = sizeof saved, + .data = &saved, + .loaded = loaded, +}; + +static const char *const pan_values[VS_PAN_LEVELS] = {"OFF", "25", "50", "75", "100"}; +static const char *const filter_values[VS_FILTER_LEVELS] = {"OFF", "LOW", "MID", "HIGH"}; + +static uint32_t get_pan(void) { return pan_level; } +static uint32_t get_filter(void) { return filter_level; } + +static void set_pan(uint32_t value) +{ + pan_level = (uint8_t)value; + saved.version = VS_VERSION; + saved.pan = (uint8_t)value; +} + +static void set_filter(uint32_t value) +{ + filter_level = (uint8_t)value; + saved.version = VS_VERSION; + saved.filter = (uint8_t)value; +} + +static const core_value_t pan_row = {"VOICE SPREAD", pan_values, VS_PAN_LEVELS, get_pan, set_pan}; +static const core_value_t filter_row = {"FILTER SPREAD", filter_values, VS_FILTER_LEVELS, get_filter, set_filter}; + +// ev_personalize: while the stock OS builds SETTINGS > PERSONALIZE. +void voice_spread_personalize(void *menu) +{ + core_addvalue(menu, &pan_row); + core_addvalue(menu, &filter_row); +} + +// ev_frame_params: interrupt level, once a frame. Slot k's value j at values[stride * k + j]. +void voice_spread_frame(int16_t *values, int stride) +{ + const unsigned int pan = pan_level, filter = filter_level; + if (pan == 0 && filter == 0) + return; + vs_apply(values, stride, pan, filter); +} diff --git a/sdk/digitone-ii/modules/voice-spread/src/spread.c b/sdk/digitone-ii/modules/voice-spread/src/spread.c new file mode 100644 index 0000000000..fb40678fe3 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/src/spread.c @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "spread.h" + +// Where each slot sits, in eighths of the full width: neighbouring slots go to opposite sides and +// the first slots a chord takes land far apart, so two or three notes already spread wide. +static const int8_t place[VS_SLOTS] = {-8, 8, -4, 4, -6, 6, -2, 2, -7, 7, -3, 3, -5, 5, -1, 1}; + +// Pan: 100 % takes the outermost slots to hard left and right (63 of the 64 steps from the centre). +static const int16_t pan_step[VS_PAN_LEVELS] = {0, 504, 1008, 1512, 2016}; +// Filter frequency: at most 4, 10 or 20 of the 127 steps up or down. +static const int16_t filter_step[VS_FILTER_LEVELS] = {0, 128, 320, 640}; + +int vs_pan_offset(unsigned int slot, unsigned int level) +{ + return level < VS_PAN_LEVELS ? place[slot & (VS_SLOTS - 1)] * pan_step[level] : 0; +} + +// The filter takes the places in another order, so a slot's side and its brightness do not follow each other. +int vs_filter_offset(unsigned int slot, unsigned int level) +{ + return level < VS_FILTER_LEVELS ? place[(slot + 5) & (VS_SLOTS - 1)] * filter_step[level] : 0; +} + +static int16_t held(int value) +{ + return (int16_t)(value < 0 ? 0 : value > VS_MAX ? VS_MAX : value); +} + +void vs_apply(int16_t *values, int stride, unsigned int pan, unsigned int filter) +{ + for (unsigned int slot = 0; slot < VS_SLOTS; ++slot) { + int16_t *v = values + stride * (int)slot; + if (pan) + v[VS_PAN] = held(v[VS_PAN] + vs_pan_offset(slot, pan)); + if (filter) + v[VS_FILTER_FREQ] = held(v[VS_FILTER_FREQ] + vs_filter_offset(slot, filter)); + } +} diff --git a/sdk/digitone-ii/modules/voice-spread/src/spread.h b/sdk/digitone-ii/modules/voice-spread/src/spread.h new file mode 100644 index 0000000000..b50c4343a8 --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/src/spread.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +// Voice Spread's arithmetic, apart from the hooks so the host test builds it. +#ifndef VOICE_SPREAD_H +#define VOICE_SPREAD_H +#include + +#define VS_VERSION 1 +#define VS_PAN_LEVELS 5 +#define VS_FILTER_LEVELS 4 +#define VS_SLOTS 16 + +// OS 1.12's Sound parameter indices (the stock descriptor table's array index), values in 8.8. +#define VS_FILTER_FREQ 67 +#define VS_PAN 89 +#define VS_MAX 0x7f00 // 127.0, the top of both parameters + +struct vs_setting { + uint8_t version, pan, filter, spare; +}; + +// The offset a slot takes at each level, in 8.8 parameter units. +int vs_pan_offset(unsigned int slot, unsigned int level); +int vs_filter_offset(unsigned int slot, unsigned int level); +void vs_apply(int16_t *values, int stride, unsigned int pan, unsigned int filter); + +#endif diff --git a/sdk/digitone-ii/modules/voice-spread/tests/spread_test.c b/sdk/digitone-ii/modules/voice-spread/tests/spread_test.c new file mode 100644 index 0000000000..5c67c3d18a --- /dev/null +++ b/sdk/digitone-ii/modules/voice-spread/tests/spread_test.c @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +// Host test of Voice Spread's arithmetic: cc -std=c11 -Wall -Wextra -Werror src/spread.c tests/spread_test.c +#include +#include +#include "../src/spread.h" + +#define STRIDE 101 + +static int16_t voices[VS_SLOTS * STRIDE]; + +static void fill(int16_t pan, int16_t freq) +{ + for (int k = 0; k < VS_SLOTS; ++k) { + for (int j = 0; j < STRIDE; ++j) + voices[k * STRIDE + j] = (int16_t)(j * 3); + voices[k * STRIDE + VS_PAN] = pan; + voices[k * STRIDE + VS_FILTER_FREQ] = freq; + } +} + +int main(void) +{ + // OFF adds nothing, at every slot. + for (unsigned int k = 0; k < VS_SLOTS; ++k) + assert(vs_pan_offset(k, 0) == 0 && vs_filter_offset(k, 0) == 0); + + // The offsets are symmetric: every level's slots sum to zero, so the chord's centre stays where the track is. + for (unsigned int level = 0; level < VS_PAN_LEVELS; ++level) { + int sum = 0; + for (unsigned int k = 0; k < VS_SLOTS; ++k) sum += vs_pan_offset(k, level); + assert(sum == 0); + } + // Neighbouring slots go to opposite sides; at 100 % the first two reach 63 steps from the centre. + assert(vs_pan_offset(0, 4) == -63 * 256 && vs_pan_offset(1, 4) == 63 * 256); + for (unsigned int k = 0; k < VS_SLOTS; k += 2) + assert(vs_pan_offset(k, 2) == -vs_pan_offset(k + 1, 2)); + // Filter: at most 20 steps. + for (unsigned int k = 0; k < VS_SLOTS; ++k) { + const int f = vs_filter_offset(k, 3); + assert(f >= -20 * 256 && f <= 20 * 256); + } + // Out-of-range levels add nothing. + assert(vs_pan_offset(3, VS_PAN_LEVELS) == 0 && vs_filter_offset(3, VS_FILTER_LEVELS) == 0); + + // Centred pan at 100 %: hard left and right are held in range (0 and 127.0), the rest untouched. + fill(0x4000, 0x7f00); + vs_apply(voices, STRIDE, 4, 3); + assert(voices[0 * STRIDE + VS_PAN] == 0x0100); + assert(voices[1 * STRIDE + VS_PAN] == 0x7f00); + for (int k = 0; k < VS_SLOTS; ++k) { + const int16_t p = voices[k * STRIDE + VS_PAN], f = voices[k * STRIDE + VS_FILTER_FREQ]; + assert(p >= 0 && p <= VS_MAX && f >= 0 && f <= VS_MAX); + for (int j = 0; j < STRIDE; ++j) + if (j != VS_PAN && j != VS_FILTER_FREQ) assert(voices[k * STRIDE + j] == j * 3); + } + // A track panned hard left: the spread stops at 0, never wraps. + fill(0x0000, 0x0000); + vs_apply(voices, STRIDE, 4, 3); + for (int k = 0; k < VS_SLOTS; ++k) + assert(voices[k * STRIDE + VS_PAN] >= 0 && voices[k * STRIDE + VS_FILTER_FREQ] >= 0); + // Pan only: the filter stays. + fill(0x4000, 0x3000); + vs_apply(voices, STRIDE, 2, 0); + for (int k = 0; k < VS_SLOTS; ++k) assert(voices[k * STRIDE + VS_FILTER_FREQ] == 0x3000); + puts("voice-spread: ok"); + return 0; +} diff --git a/sdk/imports/elekloader-modwerk-base-digitone-ii-2026-11-19.json b/sdk/imports/elekloader-modwerk-base-digitone-ii-2026-11-19.json new file mode 100644 index 0000000000..9bec070831 --- /dev/null +++ b/sdk/imports/elekloader-modwerk-base-digitone-ii-2026-11-19.json @@ -0,0 +1,22 @@ +{ + "schema": 1, + "kind": "elekloader-catalog", + "revision": "modwerk-base-digitone-ii-2026-11-19", + "cores": [ + { + "file": "modwerk-base-digitone-ii-7a60d82e.elemod", + "sha256": "7a60d82ebdf30d9e6013f6ab391d4666ea92b6d4a7c7d11f679ad8c958b4bf99", + "id": "core", + "version": "1.1", + "device": "digitone-mk2", + "os": "1.12", + "license": "GPL-2.0-or-later", + "source": { + "repo": "repeat98/modwerk", + "commit": "56305feb18be2f52c5d2107993c518a923259ecb", + "path": "sdk/imports/packages/modwerk-base-digitone-ii/modwerk-base-digitone-ii-7a60d82e.elemod" + } + } + ], + "mods": [] +} diff --git a/sdk/imports/elekloader-voice-spread-2026-11-23.json b/sdk/imports/elekloader-voice-spread-2026-11-23.json new file mode 100644 index 0000000000..dbc6f91c78 --- /dev/null +++ b/sdk/imports/elekloader-voice-spread-2026-11-23.json @@ -0,0 +1,34 @@ +{ + "schema": 1, + "kind": "elekloader-catalog", + "revision": "voice-spread-2026-11-23", + "about": "Modwerk source-only Voice Spread package for Digitone II OS 1.12, compiled from sdk/digitone-ii/modules/voice-spread with the pinned toolchain.", + "cores": [], + "mods": [ + { + "file": "voice-spread-0.1.0-experimental-os1.12.elemod", + "sha256": "9ce8ff19564deedd1531f60a3b4d2be3f898aab0a8e243db1d6aa20a3a17f0f5", + "id": "voice-spread", + "version": "0.1.0-experimental", + "device": "digitone-mk2", + "os": "1.12", + "license": "GPL-3.0-or-later", + "source": { + "repo": "repeat98/modwerk", + "commit": "d072aae591ab530566ef47bb5914f22943cdd6f2", + "path": "sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod" + }, + "title": "Voice Spread", + "requires": [ + "core" + ], + "conflicts": [], + "summary": "Spreads the voices of a chord across the stereo field, and their filters a little apart.", + "description": "Spreads the voices of a chord across the stereo field, and their filters a little apart.", + "category": "Playback", + "author": "prodbysmolec", + "needs_core": "1.1", + "on_unit": "The author ran this source (locally compiled; the pinned package links to the same main OS byte for byte) on a Digitone II on OS 1.12 on 2026-11-23, booted from RAM with the development base; see TESTING.md." + } + ] +} diff --git a/sdk/imports/packages/modwerk-base-digitone-ii/modwerk-base-digitone-ii-7a60d82e.elemod b/sdk/imports/packages/modwerk-base-digitone-ii/modwerk-base-digitone-ii-7a60d82e.elemod new file mode 100644 index 0000000000..c8d89b2b38 --- /dev/null +++ b/sdk/imports/packages/modwerk-base-digitone-ii/modwerk-base-digitone-ii-7a60d82e.elemod @@ -0,0 +1,1799 @@ +{ + "elemod": 2, + "id": "core", + "version": "1.1", + "title": "core", + "description": "The boot copier and the hook bus for the Digitakt II: every other mod needs it. From 1.1 also each frame's per-track parameter values before the stock modulators (ev_frame_params), the key-LED frame before the stock views (ev_key_leds), the mods' project data and kit data, saved and loaded with the project and its kits and copied with the kits (core_projdata, core_kitdata), and value rows for PERSONALIZE and SETTINGS (core_addvalue). On its own it changes nothing the unit does. Modwerk's Digitone II copy (OS 1.12): no .fast area, since SRAM is not qualified there, so no fast.s, core_fast or its copier.", + "category": "Framework", + "author": "irpina", + "license": "GPL-2.0-or-later", + "target": { + "device": "digitone-mk2", + "product": "Digitone II", + "os": "1.12", + "syx_sha256": "7e5b8a733d4ab1fdf7e5d22757f7d8eddaa3cbf71d0858874a791844c02ceb35", + "section3_sha256": "a098f620019b2ad38fd7e0397df39501fb1cf6bc26d0283915f34c49446fdf1a", + "section3_len": 3196288 + }, + "sections": { + ".boot": { + "align": 4, + "len": 50, + "parts": [ + [ + "hex", + "41f90000000043f900000000203c0000000022d8538066fa43f900000000203c0000000067064299538066fa4ef9400019b0" + ] + ] + }, + ".run": { + "align": 4, + "len": 3656, + "parts": [ + [ + "hex", + "2f0a45f900000000201a670c2f2f000820404e90588f60f0245f" + ], + [ + "stock", + "0x4011d5d4", + 10 + ], + [ + "stock", + "0x40025c34", + 8 + ], + [ + "hex", + "4eb94011d60a508f2f0a45f900000000201a67102f2f00082f2f001020404e90508f60ec245f4e752f0a45f9000000006126245f4a8066064ef94002c5c84e752f0a45f900000000610e245f4a8066064ef94002c55c4e75201a6712" + ], + [ + "stock", + "0x40049d1a", + 8 + ], + [ + "hex", + "20404e90508f4a8067ea4e752f0b47f900000000201b670a2f0a20404e90588f60f2265f2052487800024ef94009ff8e4e56ffc0" + ], + [ + "stock", + "0x40001792", + 8 + ], + [ + "stock", + "0x4000f7f2", + 8 + ], + [ + "hex", + "41eeffc0429042a80004203c4018de3e2140000820132140000c41eeffd0208a42a80004203c4018de3e21400008202b00042140000c41eeffe0429042a80004203c4018de3e21400008202b00082140000c41eefff0208a42a80004203c4018de3e21400008202b000c2140000c" + ], + [ + "stock", + "0x4014e98a", + 8 + ], + [ + "hex", + "0544588f2400" + ], + [ + "stock", + "0x40059d22", + 8 + ], + [ + "stock", + "0x400f6f4e", + 8 + ], + [ + "hex", + "486effd0486effc02f02" + ], + [ + "stock", + "0x40059d36", + 8 + ], + [ + "stock", + "0x40016630", + 8 + ], + [ + "hex", + "40116bee508f" + ], + [ + "stock", + "0x4008733e", + 10 + ], + [ + "hex", + "47f900000000201b670a2f0c20404e90588f60f2" + ], + [ + "stock", + "0x4007bea2", + 8 + ], + [ + "hex", + "00804e752f0a45f900000000201a671848780065222f000c0681000000222f0120404e90508f60e4245f4ef9400db3902f2f00044eb94002c3c6588f2f0a45f900000000201a670c2f2f000820404e90588f60f0245f205f2f024ed04210d08c00005d71000028af00000151446488d02f0b2f0a4eb900000000508f223cbacef00c" + ], + [ + "stock", + "0x40186de4", + 8 + ], + [ + "hex", + "00000000508f223cbacef00c4e7526bcbeefbace" + ], + [ + "stock", + "0x4000125c", + 8 + ], + [ + "hex", + "2f0b4eb900000000" + ], + [ + "stock", + "0x40001276", + 10 + ], + [ + "hex", + "4e752f0b4eb900000000588f203cbeefbace4e75" + ], + [ + "stock", + "0x40083612", + 8 + ], + [ + "hex", + "5d716712" + ], + [ + "stock", + "0x4003d640", + 8 + ], + [ + "hex", + "202f000c4ef94013477c" + ], + [ + "stock", + "0x4004e9e6", + 8 + ], + [ + "hex", + "2f2f000c61e04fef000c2f00" + ], + [ + "stock", + "0x4004e9e6", + 8 + ], + [ + "hex", + "4eb900000000508f201f4e754e56ffc0" + ], + [ + "stock", + "0x40001792", + 8 + ], + [ + "stock", + "0x4000f7f2", + 8 + ], + [ + "hex", + "41eeffc0740320ae001042a80004203c4018de3e21400008201b2140000c41e8001053826ae0" + ], + [ + "stock", + "0x4014e98a", + 8 + ], + [ + "hex", + "0544588f2400" + ], + [ + "stock", + "0x40059d22", + 8 + ], + [ + "stock", + "0x400f6f4e", + 8 + ], + [ + "hex", + "486effd0486effc02f02" + ], + [ + "stock", + "0x40059d36", + 8 + ], + [ + "stock", + "0x40016630", + 8 + ], + [ + "hex", + "40116bee508f" + ], + [ + "stock", + "0x4008733e", + 12 + ], + [ + "hex", + "fffc2f022408226e000822512251486effff2f11" + ], + [ + "stock", + "0x400148d0", + 8 + ], + [ + "stock", + "0x400365fe", + 14 + ], + [ + "stock", + "0x401503d2", + 8 + ], + [ + "hex", + "5c004a390000000067103039000000004cd75c004fef00184e752879000000004a8c677072ff47f9000000004def001843ef0010200c204c5880244914d8b08866fa2f6c000400141019e188b3802200ee89e1880281000001fe2041d1fc000000003210b3803200bdc966dc286b0004588b4a8c66ba4a4066027001720133c00000000013c1000000004cd75c004fef00184e7570ff720133c00000000013c100000000" + ], + [ + "stock", + "0x401a2104", + 8 + ], + [ + "hex", + "041c263900000000282f" + ], + [ + "stock", + "0x4000fd14", + 8 + ], + [ + "hex", + "670c200a204ad0834218b08866fa14bc004b4ebaff28e088154000014ebaff1e207900000000154000024a886740240ad68a568245f9000000002228000420039082b28062284a816718200422424c01080020680008d1c02008d08112d8b08866fa206a0004d481588a4a8866cc" + ], + [ + "stock", + "0x400160cc", + 10 + ], + [ + "stock", + "0x400059aa", + 8 + ], + [ + "stock", + "0x4000e716", + 8 + ], + [ + "hex", + "4a8a6700008c7192240a724b5682b28067000084d5f90000000042842079000000004a88674e47f900000000222800042003206800084c010800d1c04a84673e200a9082b280623a20024a81670a2242d08110d9b3c066fa24002004205b2068000c4a8867082f002f034e90508f20534a8866b8" + ], + [ + "stock", + "0x40005a4c", + 10 + ], + [ + "hex", + "4a81670a2008d0814218b1c066fa428060cc428242846086382a00014ebafe18d5f900000000b1844a4457c4790444846000ff6c4feffff4207900000000" + ], + [ + "stock", + "0x40001796", + 8 + ], + [ + "hex", + "4a886754240a06820000020043ea001c52894a29ffff66000082b3c266f243ea001c4219b3c266fa203c454c4b502540001c45ea002047f9000000002228000422412002908a43e9000cb3c06314206b0004588b4a88" + ], + [ + "stock", + "0x40025912", + 12 + ], + [ + "hex", + "2008224a588012d8b1c066fa254100044a816714205343ea0008206800082008d08112d8b08866fa206b0004588b45f218084a8866a460be203c454c4b50b0aa001c6700ff784cd70c0452b900000000" + ], + [ + "stock", + "0x400017da", + 8 + ], + [ + "stock", + "0x4000af64", + 8 + ], + [ + "hex", + "0018242b001c0c82454c4b50671a200b06800000020041eb001c52884a28ffff660000b2b08866f22079000000004a886772260b06830000020049f900000000202800044a80670c20680008d0884218b1c066fa24540c82454c4b50662c41eb0020203c000001e0221051804a81671a22680004b3c06212b292673241f09808200372079088b2806dde4280206a000c4a8867062f004e90588f206c0004588c4a88669c" + ], + [ + "stock", + "0x4000afc6", + 10 + ], + [ + "hex", + "202a0004b3c0640220094a80672243f0080850882009226a000812d8b1c066fa2454700160b852b9000000006000ff4c700160aa20390000000057804e7520790000000020504a88670c20280138727fb28065024e7570ff" + ], + [ + "stock", + "0x40005352", + 8 + ], + [ + "hex", + "0010223900000000226f000cb282620000ca2002908141f9000000004c5000014c5000004a81660000b2727fb280650000aa22004ab9000000006728d3f9000000002039000000002049d089b088671a4a1867f877912043764bb688670c52b900000000241f261f4e7576ffb681663041f900000000428141e80158b4a8fea8672e52817608b68166ee4ab90000000067d24219b08967cc4219b08966f460c42f49" + ], + [ + "stock", + "0x40007856", + 10 + ], + [ + "hex", + "6000fc1e4ab90000000067acc2fc01582039000000002041d1fc00000000d08812d8b1c0679212d8b1c066f4608a72ff6000ff564fefffec" + ], + [ + "stock", + "0x4002c31c", + 8 + ], + [ + "hex", + "223900000000226f001cb282620001282002908141f9000000004c5000014c5000004a8166000110727fb2806500010822004ab900000000676ad3f9000000002039000000002049d089b08867124a1867f87991764bb684676452b900000000161178ffb881671e7183744bb480670293c94cd7041c2f49001c2f41" + ], + [ + "stock", + "0x400d95fc", + 8 + ], + [ + "hex", + "fbec7383784bb881673641f900000000b490671641e80158b1fc0000000066f04cd7041c4fef00144e75429041e80158b1fc0000000066d860e676ffb68166ae428141f90000000041e80158b4a8fea8676652817608b68166ee73b900000000760745f900000000204152882808c88341ef00132f440010283c000001584c014800c2fc015813d000000000258248002041d1fc000000004ab900000000678010d9b0896700ff7a10d9b08966f26000ff7072ff6000fef8c2fc01582041d1fc000000004ab90000000066d46000ff524fefffe8226f001c207900000000" + ], + [ + "stock", + "0x40036bb0", + 8 + ], + [ + "hex", + "b1c96200011c2009908845f9000000004c5200014c5200004a8166000104727fb280650000fc2200b1c2620000fa2002908845f9000000004c5200034c5200004a83660000e2767fb680650000da4ab900000000670000b2b489670000ac4879000000002f00" + ], + [ + "stock", + "0x401219e6", + 8 + ], + [ + "hex", + "4ebafa06508f70ff222f001041f900000000226f000cb08167144cd7040c2f4800202f41001c4fef00186000fa6c45f9000000002f4a0014428045f90000000045ea0158b3eafea8675a52807208b28066ee71b9000000007407246f001422005281c282243c000001584c002800c0fc01582589280013c1000000002240d3fc000000004ab900000000670e203900000000d08812d8b08866fa" + ], + [ + "stock", + "0x40036bf0", + 10 + ], + [ + "hex", + "c0fc01582240d3fc0000000060d272ff6000ff044ab90000000067dab48967d645f90000000042802f4a0014204a41e80158b4a8fea8673252807608b68066ee52814a8166b0b3d2671045ea0158b5fc0000000067a0b3d266f0429245ea0158b5fc0000000066ee608cc0fc0158204070ffd1fc00000000b0816700ff184cd7040c2f4800202f41001c4fef00186000f9640000" + ], + [ + "stock", + "0x40001894", + 10 + ], + [ + "hex", + "242f0014245020522068000c4e90d4804a826d3a205220280008b4806d04240053822068000c4e90b082670c2052" + ], + [ + "stock", + "0x40030ac4", + 8 + ], + [ + "hex", + "588f246a0004" + ], + [ + "stock", + "0x400967b6", + 14 + ], + [ + "hex", + "00000000428260c2" + ], + [ + "stock", + "0x4001b00e", + 10 + ], + [ + "stock", + "0x4008a378", + 8 + ], + [ + "hex", + "b0a800086504245f4e75206800042f300c00" + ], + [ + "stock", + "0x4008d948", + 10 + ], + [ + "hex", + "00285480" + ], + [ + "stock", + "0x400bd54a", + 8 + ], + [ + "hex", + "00132f084879000000002f2f002c4eb900000000" + ], + [ + "stock", + "0x40125d5c", + 8 + ], + [ + "hex", + "487800084eb900000000588f4a80670a206f00084aa8000866024e75222f0004204020af0008214100042f004879000000002f014eb900000000" + ], + [ + "stock", + "0x400120b4", + 8 + ], + [ + "hex", + "0000102120423063408450a560c670e781089129a14ab16bc18cd1ade1cef1ef123102103273225252b5429472f762d693398318b37ba35ad3bdc39cf3ffe3de246234430420140164e674c744a45485a56ab54b85289509e5eef5cfc5acd58d365326721611063076d766f6569546b4b75ba77a97198738f7dfe7fed79dc7bc48c458e5688678a70840186128023823c9ccd9ede98ef9af89489969a90ab92b5af54ad47ab76a961a710a503a332a12dbfdcbdcfbbfeb9e9b798b58bb3bab1a6ca67c874ce45cc52c223c030c601c41edaefd8fcdecddcdad2abd0b8d689d497e976eb65ed54ef43e132e321e510e70ff9fefbedfddcffcbf1baf3a9f598f78918881a9b1caa1ebd10cc12df14ee16f108000a130c220e3500440257046606783b99398a3fbb3dac33dd31ce37ff35e02b1129022f332d24235521462777256b5eaa5cb95a88589f56ee54fd52cc50d34e224c314a004817466644754244405a7dbb7fa879997b8e75ff77ec71dd73c26d336f2069116b06657767646155634d94cc96df90ee92f99c889e9b98aa9ab584448657806682718c008e1388228a3cb7ddb5ceb3ffb1e8bf99bd8abbbbb9a4a755a546a377a160af11ad02ab33a92fd2eed0fdd6ccd4dbdaaad8b9de88dc97c266c075c644c453ca22c831ce00cc1ef1fff3ecf5ddf7caf9bbfba8fd99ff86e177e364e555e742e933eb20ed11ef000000000000000000000000000000000" + ] + ] + }, + ".bss": { + "align": 4, + "size": 3120 + } + }, + "symbols": { + "FRAME_STRIDE": [ + "abs", + 101 + ], + "LEDS_CLEAR": [ + "abs", + 1073923014 + ], + "MODS_STOCK": [ + "abs", + 1074639760 + ], + "PATTERN_OBJ": [ + "abs", + 1147439312 + ], + "KIT_ROOM": [ + "abs", + 337 + ], + "KIT_PAD": [ + "abs", + 10415 + ], + "KIT_SIZE": [ + "abs", + 23921 + ], + "FW_KITS": [ + "abs", + 1108398220 + ], + "MEMCPY": [ + "abs", + 1075005296 + ], + "FW_STR_NEW": [ + "abs", + 1075636920 + ], + "FW_LED_SET": [ + "abs", + 1073922840 + ], + "FW_INVALIDATE": [ + "abs", + 1074907802 + ], + "FW_FONT_MENU": [ + "abs", + 1076446992 + ], + "FW_TEXTBOX": [ + "abs", + 1074878792 + ], + "VBR_FN": [ + "abs", + 1073748400 + ], + "NO_DTIM0": [ + "abs", + 1 + ], + "SETTINGS_RET": [ + "abs", + 1074397070 + ], + "FN_MGR": [ + "abs", + 1075371582 + ], + "MENU_ADD": [ + "abs", + 1074883566 + ], + "ITEM_CTOR": [ + "abs", + 1074885560 + ], + "OP_NEW": [ + "abs", + 1074922820 + ], + "ENCDISP": [ + "abs", + 1073923420 + ], + "KEYDISP": [ + "abs", + 1073923528 + ], + "DRAWALL": [ + "abs", + 1074910730 + ], + "dispatch": [ + ".run", + 132 + ], + "layout": [ + ".run", + 872 + ], + "layout_known": [ + ".bss", + 3114 + ], + "layout_id": [ + ".bss", + 3116 + ], + "pack": [ + ".run", + 1044 + ], + "unpack": [ + ".run", + 1188 + ], + "shadow": [ + ".bss", + 362 + ], + "shadow_next": [ + ".bss", + 360 + ], + "tmp.0": [ + ".bss", + 20 + ], + "select": [ + ".run", + 2884 + ], + "change": [ + ".run", + 2886 + ], + "draw": [ + ".run", + 2976 + ], + "callbacks": [ + ".run", + 3640 + ], + "core_projdata_load": [ + ".run", + 1584 + ], + "core_draw": [ + ".run", + 36 + ], + "core_zero": [ + ".bss", + 0 + ], + "core_memcpy": [ + ".run", + 626 + ], + "core_store_layout": [ + ".run", + 514 + ], + "core_key": [ + ".run", + 84 + ], + "fw_led_set": [ + "abs", + 1073922840 + ], + "core_kit_on": [ + ".run", + 1830 + ], + "fw_invalidate": [ + "abs", + 1074907802 + ], + "core_value_label": [ + ".run", + 826 + ], + "boot": [ + ".boot", + 0 + ], + "core_kit_load": [ + ".run", + 554 + ], + "core_proj_save": [ + ".run", + 574 + ], + "core_addrow": [ + ".run", + 696 + ], + "core_kit_save": [ + ".run", + 534 + ], + "fw_font_menu": [ + "abs", + 1076446992 + ], + "core_store_conflicts": [ + ".bss", + 16 + ], + "fw_op_new": [ + "abs", + 1074922820 + ], + "fw_textbox": [ + "abs", + 1074878792 + ], + "core_tick": [ + ".run", + 0 + ], + "core_frame": [ + ".run", + 426 + ], + "core_enc": [ + ".run", + 108 + ], + "core_projdata_save": [ + ".run", + 1382 + ], + "core_addvalue": [ + ".run", + 3062 + ], + "core_settings": [ + ".run", + 156 + ], + "core_kit_copied": [ + ".run", + 2440 + ], + "core_key_leds": [ + ".run", + 470 + ], + "core_kitdata_room": [ + ".run", + 1820 + ], + "core_kitdata_load": [ + ".run", + 2088 + ], + "core_proj_load": [ + ".run", + 608 + ], + "core_personalize": [ + ".run", + 394 + ], + "core_kitdata_save": [ + ".run", + 1858 + ], + "core_additem": [ + ".run", + 192 + ] + }, + "exports": [ + "boot", + "core_additem", + "core_addrow", + "core_addvalue", + "core_draw", + "core_enc", + "core_frame", + "core_key", + "core_key_leds", + "core_kit_copied", + "core_kit_load", + "core_kit_on", + "core_kit_save", + "core_kitdata_load", + "core_kitdata_room", + "core_kitdata_save", + "core_memcpy", + "core_personalize", + "core_proj_load", + "core_proj_save", + "core_projdata_load", + "core_projdata_save", + "core_settings", + "core_store_conflicts", + "core_store_layout", + "core_tick", + "core_value_label", + "core_zero", + "fw_font_menu", + "fw_invalidate", + "fw_led_set", + "fw_op_new", + "fw_textbox" + ], + "imports": [ + "__bss_start", + "__bss_words", + "__run_load", + "__run_start", + "__run_words", + "core_kitdata", + "core_projdata", + "ev_draw", + "ev_enc", + "ev_frame_params", + "ev_key", + "ev_key_leds", + "ev_personalize", + "ev_settings", + "ev_tick" + ], + "weak": [], + "relocs": [ + [ + ".boot", + 2, + "abs32", + "sym:__run_load", + 0 + ], + [ + ".boot", + 8, + "abs32", + "sym:__run_start", + 0 + ], + [ + ".boot", + 14, + "abs32", + "sym:__run_words", + 0 + ], + [ + ".boot", + 26, + "abs32", + "sym:__bss_start", + 0 + ], + [ + ".boot", + 32, + "abs32", + "sym:__bss_words", + 0 + ], + [ + ".run", + 4, + "abs32", + "sym:ev_tick", + 0 + ], + [ + ".run", + 56, + "abs32", + "sym:ev_draw", + 0 + ], + [ + ".run", + 88, + "abs32", + "sym:ev_key", + 0 + ], + [ + ".run", + 112, + "abs32", + "sym:ev_enc", + 0 + ], + [ + ".run", + 160, + "abs32", + "sym:ev_settings", + 0 + ], + [ + ".run", + 396, + "abs32", + "sym:ev_personalize", + 0 + ], + [ + ".run", + 430, + "abs32", + "sym:ev_frame_params", + 0 + ], + [ + ".run", + 486, + "abs32", + "sym:ev_key_leds", + 0 + ], + [ + ".run", + 540, + "abs32", + "sec:.run", + 1858 + ], + [ + ".run", + 560, + "abs32", + "sec:.run", + 2088 + ], + [ + ".run", + 592, + "abs32", + "sec:.run", + 1382 + ], + [ + ".run", + 612, + "abs32", + "sec:.run", + 1584 + ], + [ + ".run", + 686, + "abs32", + "sec:.run", + 2440 + ], + [ + ".run", + 882, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 890, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 906, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 918, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 972, + "abs32", + "sec:.run", + 3128 + ], + [ + ".run", + 1006, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 1012, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 1032, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 1038, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 1054, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1102, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1122, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1226, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1234, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1244, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1364, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1388, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1456, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1574, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1636, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1654, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1808, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1822, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1832, + "abs32", + "sec:.run", + 530 + ], + [ + ".run", + 1868, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 1888, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 1918, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1926, + "abs32", + "sec:.run", + 522 + ], + [ + ".run", + 1932, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1960, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1978, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2004, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2042, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2054, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2062, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2102, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 2122, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2152, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2160, + "abs32", + "sec:.run", + 522 + ], + [ + ".run", + 2166, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2192, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 2244, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2258, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2282, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2300, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2324, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2332, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2368, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2380, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2386, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2424, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2430, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2450, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 2474, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2514, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2542, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2558, + "abs32", + "sec:.bss", + 20 + ], + [ + ".run", + 2586, + "abs32", + "sec:.bss", + 20 + ], + [ + ".run", + 2620, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2632, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2656, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2692, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2700, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2706, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2714, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2744, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2758, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2770, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2816, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2834, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2852, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2968, + "abs32", + "abs", + 1074907802 + ], + [ + ".run", + 3040, + "abs32", + "abs", + 1076446992 + ], + [ + ".run", + 3050, + "abs32", + "abs", + 1074878792 + ], + [ + ".run", + 3068, + "abs32", + "abs", + 1074922820 + ], + [ + ".run", + 3108, + "abs32", + "sec:.run", + 3640 + ], + [ + ".run", + 3116, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 3640, + "abs32", + "sec:.run", + 826 + ], + [ + ".run", + 3644, + "abs32", + "sec:.run", + 2884 + ], + [ + ".run", + 3648, + "abs32", + "sec:.run", + 2976 + ], + [ + ".run", + 3652, + "abs32", + "sec:.run", + 2886 + ] + ], + "sites": [ + { + "addr": "0x40000538", + "len": 6, + "stock_sha256": "f0c5fc0afd892b3ec3f8803e1d875a2a22c6bb4e2cb987adc582cf8dea48c28a", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:boot", + 0 + ] + ] + }, + { + "addr": "0x4002e464", + "len": 6, + "stock_sha256": "8abc5b3d8941b94f9ec93c348112bcaf09510582ab72977a407b9ce1e213a459", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_tick", + 0 + ] + ] + }, + { + "addr": "0x4002e4ca", + "len": 6, + "stock_sha256": "51e3665db347990c1500cab5b2766706e47605e08a3a01c721fc1958f75c27ab", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_draw", + 0 + ] + ] + }, + { + "addr": "0x4002f20c", + "len": 6, + "stock_sha256": "d1e1f5dd2afbbcebc50c89fdcf5fd704a0a26f28becdcada110ab0c2d14626fc", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_key", + 0 + ] + ] + }, + { + "addr": "0x4002f256", + "len": 6, + "stock_sha256": "786bc53e108e78a53f3bfc32fc57bd91569f6702c55a9566747386c873b91d4a", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_enc", + 0 + ] + ] + }, + { + "addr": "0x4009ff88", + "len": 6, + "stock_sha256": "c7589861366d298dd3e07f1f5ebce25db0435f9cad638eae321d68e7542f6c74", + "new": "4ef900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_settings", + 0 + ] + ] + }, + { + "addr": "0x400987a2", + "len": 6, + "stock_sha256": "10552f30e94896a18c635b43b0f16452187a5e3db5b661ba3255c1ecb054fd50", + "new": "4ef900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_personalize", + 0 + ] + ] + }, + { + "addr": "0x40027196", + "len": 6, + "stock_sha256": "8f4626d425f213c0f0f9f81054e40a51bad034eaa6b154d51fe969ae4a521a8d", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_frame", + 0 + ] + ] + }, + { + "addr": "0x4002c87a", + "len": 6, + "stock_sha256": "3988e55cba5c51c557dcb530885eba6f789018b4345baccd49ebce731fd6f68e", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_key_leds", + 0 + ] + ] + }, + { + "addr": "0x400de0d4", + "len": 6, + "stock_sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_kit_save", + 0 + ] + ] + }, + { + "addr": "0x400ddddc", + "len": 6, + "stock_sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_kit_load", + 0 + ] + ] + }, + { + "addr": "0x400e18be", + "len": 6, + "stock_sha256": "be28bf581aa32f87a3306f04738f1dbdb4b28489865cd0d88145466f2740333c", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_proj_save", + 0 + ] + ] + }, + { + "addr": "0x400e1928", + "len": 6, + "stock_sha256": "39d8feaa0cf09fbdc868baea4e44be238666cbfcbf350883559c99085034a789", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_proj_load", + 0 + ] + ] + }, + { + "addr": "0x40134770", + "len": 12, + "stock_sha256": "a48eab821488cf202e892b5cad063488c972824e57c3d851ab402463dc0f5657", + "new": "4ef9000000004e714e714e71", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_memcpy", + 0 + ] + ] + } + ], + "collections": { + "ev_tick": { + "entry": 4 + }, + "ev_draw": { + "entry": 4 + }, + "ev_key": { + "entry": 4 + }, + "ev_enc": { + "entry": 4 + }, + "ev_settings": { + "entry": 4 + }, + "ev_personalize": { + "entry": 4 + }, + "ev_frame_params": { + "entry": 4 + }, + "ev_key_leds": { + "entry": 4 + }, + "core_projdata": { + "entry": 4 + }, + "core_kitdata": { + "entry": 4 + } + }, + "contribute": [], + "copied": [], + "resources": {}, + "requires": [], + "conflicts": [], + "build": { + "sources": { + "core.s": "dd0074e9b08a254838feae6215404e775ba7ef7aa2afbcce1e5c24794eebddc5", + "settings.s": "8fa715d46d6dbe239bed6d8d0ea4a0c3100c068b39869c938b402f2d6a15a380", + "personalize.s": "10372f64d233a1cc3c5abcb202084c3a8707e17e8d656038754c44a3e7554111", + "fw.s": "ae8bfc9a7f5778162be93fb1aa499e0ad1d7b515cbba52ba6b22b03588458cac", + "frame.s": "92fdd15abac49c2f802cd623af6a841327b3e32b53967795ade3188f46652c14", + "leds.s": "bbccdf836c4ef7cc27b78f8bbc3c3dcce10fa691e0d6a34b6a30c1d7d2375d87", + "store.s": "499d5ad2e71609075fd7461f6081504d91acf0c16aa77b267550af7ec417999b", + "store.c": "442ec9e88128519d5b446d1627b52ec05afdcefda564012734f5fa9430a4a5a4", + "rows.s": "00d971f3ba2372a08c209023edd45458a72ec3a73e56920fb440b82b7327ee4c", + "rows.c": "d6b5b85e86f38d9429c17a1b48ac4a77169583954c56b0707ce11c2821acc58e" + } + }, + "signature": null +} diff --git a/sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod b/sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod new file mode 100644 index 0000000000..46027950ea --- /dev/null +++ b/sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod @@ -0,0 +1,571 @@ +{ + "elemod": 2, + "id": "voice-spread", + "version": "0.1.0-experimental", + "title": "Voice Spread", + "description": "Spreads the voices of a chord across the stereo field, and their filters a little apart.", + "category": "playback", + "author": "prodbysmolec", + "license": "GPL-3.0-or-later", + "target": { + "device": "digitone-mk2", + "product": "Digitone II", + "os": "1.12", + "syx_sha256": "7e5b8a733d4ab1fdf7e5d22757f7d8eddaa3cbf71d0858874a791844c02ceb35", + "section3_sha256": "a098f620019b2ad38fd7e0397df39501fb1cf6bc26d0283915f34c49446fdf1a", + "section3_len": 3196288 + }, + "sections": { + ".run": { + "align": 4, + "len": 787, + "parts": [ + [ + "hex", + "2f024aaf00086634420013c000000000420013c000000000700141f900000000241f13d00000000041f90000000013c00000000013d0000000004e7571b90000000053804a80670c4202420013c20000000060be1039000000003040103900000000340873827404b481640291c83408738013c2000000007403b48164944200609071b9000000004e7571b9000000004e757201202f000413c00000000013c00000000013c1000000004e757201202f000413c00000000013c00000000013c1000000004e752f0a4879000000002f2f000c45f9000000004e924879000000002f2f00144e924fef0010245f4e751039000000001239000000002f02240084814a02671a738171802f012f002f2f00142f2f00144eb9000000004fef0010241f4e750000222f00087004b081651e700fc0af000441f9000000001030080041f9000000004880c1f01a004e7542804e752f027003222f000cb0816524202f0008740f5a80c08241f900000000241f1030080041f9000000004880c1f01a004e75241f42804e754fefffe0226f002448d71c7c222f00282a3c00000000262f002c47f90000000045e90086d281282f0030204b43e900b24a8366704a8466345288b1c566fa4cd71c7c4fef00204e7542404a826d0a0c8200007f006e78300234805288d3c1d5c1b1fc0000000067d64a83663870057c0f908bd088c08675527c03bc8465ca1033080049f9000000004880c1f44a00d48060b6424032804a8466d2d5c15288d3c1b1c5679a71517404b4836510141049f9000000004882c5f43a00d0824a806dd20c8000007f006fcc303c7f0060c6303c7f006084000000000000000000000000000400000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000565350520000000400000000000000000000008001400280000001f803f005e807e0f808fc04fa06fe02f907fd03fb05ff0146494c5445522053505245414400564f49434520535052454144004f4646004c4f57004d494400484947480032350035300037350031303000" + ] + ] + }, + ".bss": { + "align": 4, + "size": 8 + } + }, + "symbols": { + "loaded": [ + ".run", + 0 + ], + "pan_level": [ + ".bss", + 1 + ], + "filter_level": [ + ".bss", + 0 + ], + "saved": [ + ".bss", + 2 + ], + "get_pan": [ + ".run", + 130 + ], + "get_filter": [ + ".run", + 138 + ], + "set_pan": [ + ".run", + 146 + ], + "set_filter": [ + ".run", + 172 + ], + "pan_row": [ + ".run", + 624 + ], + "filter_row": [ + ".run", + 604 + ], + "filter_values": [ + ".run", + 644 + ], + "pan_values": [ + ".run", + 660 + ], + "place": [ + ".run", + 714 + ], + "pan_step": [ + ".run", + 704 + ], + "filter_step": [ + ".run", + 696 + ], + "vs_pan_offset": [ + ".run", + 292 + ], + "vs_filter_offset": [ + ".run", + 336 + ], + "vs_apply": [ + ".run", + 390 + ], + "voice_spread_projdata": [ + ".run", + 680 + ], + "voice_spread_frame": [ + ".run", + 238 + ], + "voice_spread_personalize": [ + ".run", + 198 + ] + }, + "exports": [ + "voice_spread_frame", + "voice_spread_personalize", + "voice_spread_projdata", + "vs_apply", + "vs_filter_offset", + "vs_pan_offset" + ], + "imports": [ + "core_addvalue" + ], + "weak": [], + "relocs": [ + [ + ".run", + 12, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 20, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 28, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 36, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 42, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 48, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 54, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 62, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 78, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 86, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 94, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 116, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 132, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 140, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 154, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 160, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 166, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 180, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 186, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 192, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 202, + "abs32", + "sec:.run", + 624 + ], + [ + ".run", + 212, + "abs32", + "sym:core_addvalue", + 0 + ], + [ + ".run", + 220, + "abs32", + "sec:.run", + 604 + ], + [ + ".run", + 240, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 246, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 278, + "abs32", + "sec:.run", + 390 + ], + [ + ".run", + 310, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 320, + "abs32", + "sec:.run", + 704 + ], + [ + ".run", + 360, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 372, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 408, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 418, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 488, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 522, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 566, + "abs32", + "sec:.run", + 704 + ], + [ + ".run", + 604, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 608, + "abs32", + "sec:.run", + 644 + ], + [ + ".run", + 616, + "abs32", + "sec:.run", + 138 + ], + [ + ".run", + 620, + "abs32", + "sec:.run", + 172 + ], + [ + ".run", + 624, + "abs32", + "sec:.run", + 744 + ], + [ + ".run", + 628, + "abs32", + "sec:.run", + 660 + ], + [ + ".run", + 636, + "abs32", + "sec:.run", + 130 + ], + [ + ".run", + 640, + "abs32", + "sec:.run", + 146 + ], + [ + ".run", + 644, + "abs32", + "sec:.run", + 757 + ], + [ + ".run", + 648, + "abs32", + "sec:.run", + 761 + ], + [ + ".run", + 652, + "abs32", + "sec:.run", + 765 + ], + [ + ".run", + 656, + "abs32", + "sec:.run", + 769 + ], + [ + ".run", + 660, + "abs32", + "sec:.run", + 757 + ], + [ + ".run", + 664, + "abs32", + "sec:.run", + 774 + ], + [ + ".run", + 668, + "abs32", + "sec:.run", + 777 + ], + [ + ".run", + 672, + "abs32", + "sec:.run", + 780 + ], + [ + ".run", + 676, + "abs32", + "sec:.run", + 783 + ], + [ + ".run", + 688, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 692, + "abs32", + "sec:.run", + 0 + ] + ], + "sites": [], + "collections": {}, + "contribute": [ + { + "to": "ev_personalize", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_personalize", + 0 + ] + ], + "claims": [] + }, + { + "to": "ev_frame_params", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_frame", + 0 + ] + ], + "claims": [] + }, + { + "to": "core_projdata", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_projdata", + 0 + ] + ], + "claims": [] + } + ], + "copied": [], + "resources": { + "regions": [], + "names": [ + "projdata:VSPR" + ], + "core": "1.1" + }, + "requires": [ + "core" + ], + "conflicts": [], + "signature": null +} diff --git a/sdk/imports/voice-spread-2026-11-23.json b/sdk/imports/voice-spread-2026-11-23.json new file mode 100644 index 0000000000..1c3102fc47 --- /dev/null +++ b/sdk/imports/voice-spread-2026-11-23.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 1, + "module": "digitone-ii/voice-spread", + "version": "0.1.0-experimental", + "date": "2026-11-23", + "changes": [ + "First release for Digitone II OS 1.12: two rows at the end of SETTINGS > PERSONALIZE spread the voices of a chord across the stereo field (VOICE SPREAD) and their filter frequencies a little apart (FILTER SPREAD)." + ], + "runtimeSourceSha256": "b163786f8922a5eee7616979f823b6c2de76a3ebe3510969b5d1c91e4977bb2f", + "packages": [ + { + "os": "1.12", + "path": "sdk/imports/packages/voice-spread/voice-spread-0.1.0-experimental-os1.12.elemod", + "sha256": "9ce8ff19564deedd1531f60a3b4d2be3f898aab0a8e243db1d6aa20a3a17f0f5" + } + ], + "stockPolicy": "No firmware or stock-derived code/tables are present. Addresses, lengths and SHA-256 guards are metadata; exported instructions and sections are authored module code. Local materialized recipes and firmware are never committed.", + "evidence": "sdk/digitone-ii/modules/voice-spread/TESTING.md", + "requires": [] +} diff --git a/sdk/machines/digitone-ii/FX.md b/sdk/machines/digitone-ii/FX.md new file mode 100644 index 0000000000..b6b5c1231a --- /dev/null +++ b/sdk/machines/digitone-ii/FX.md @@ -0,0 +1,45 @@ +# Digitone II effects: a proposal (draft) + +How effect modules could reach a Digitone II's sound, from what the unit showed on 20 November 2026. A proposal for +the owner's review, not built yet. The Analog Rytm MKII's send effects are the model +([`modwerk/fx.h`](../analog-rytm-mkii/include/modwerk/fx.h), its base's `sendbus.c`): the same record, the same +idea of a base that owns the bus, the page and the work area while each module adds one record. + +## What the unit showed + +- **Audio on the ColdFire.** The SHARC+ renders the sound, but the ColdFire exchanges audio with it over the SSI + (I2S) by DMA: 32 sample frames a frame interrupt (1,500 a second), 16 slots of 24-bit samples. What the SHARC + sends (RX) carries the mix and tracks, as the USB audio streams do; what the ColdFire sends back (TX) reaches the + output, as USB audio in does (slot 0 left, 1 right). RX holds no trace of TX: an effect fed from RX cannot feed + back ([research notes](../../../docs/DIGITONE_II_OS_RESEARCH.md)). +- **It is cheap.** A stereo echo costs about 4 % of a frame; the Octatrack Tape Echo's ColdFire variant, ported to + these rings in a research build, about 8 % (peaks near 10 %), and the UI tick never fell behind. It was heard on a + unit: tape character, clean (the developer). +- **Levels.** RX arrives at USB level, well below the output's: the return needs gain (about +18 dB for the echo). + +## Proposed + +1. **A send bus in the base**, in the frame interrupt (`ev_frame_params`, after stock): its input the main mix from + RX slots 0/1 to start with (summed to mono for a send effect), its return added into TX slots 0/1 with LEV. The + base saves and restores the EMAC state around it and owns the TX slots while an effect runs. +2. **The Rytm's record, unchanged where it can be:** an effect module contributes one `struct mw_fx` to `mw_fx` + (name, eight controls A-H, `reset`, `render`, the work area words). Differences the Digitone II needs: + - a work area far larger than `MW_FX_WORK` (8,192 words): the DDR above the loader's pool has megabytes; a tape + needs about 1.4 MB. Proposal: a Digitone II limit in its own header, or `MW_FX_ABI` 2 with a 32-bit limit; + - 48 kHz blocks of 32 samples, as on the Rytm without `MW_FX_24K`. +3. **The page: FX held + DOWN** opens a second FX page (stock does nothing with it on the FX page; checked on a + unit). FUNC + A chooses the effect among the build's records, A-H its controls, FUNC + E LEV, as on the Rytm. + Kept in the kit (the core's kit data) as the Rytm keeps them. +4. **First module: Tape Echo**, ported from the Octatrack's ColdFire variant with its author's OK (Discord, + 20 November 2026), its controls TIME, FDBK, WOW, AGE, SYNC, MIX as there. +5. **Runtime loading** of an effect module (a trial over the link) needs the loader to dispatch the bus's render to + a runtime package; until then effect modules are built into the image by the site's builder. + +## Open questions for the owner + +- The work-area limit: a Digitone II header, or a second `mw_fx` ABI? +- Per-track sends (as the Rytm's SEND page) need the tracks' own audio: RX carries mono track slots, whose mapping is + not measured yet. Start with the main mix only, or wait for sends? +- The bus rides USB audio in: a computer sending USB audio shares TX slots 0/1. Mix the return into what stock put + there, or take the slots while an effect runs? +- The FX + DOWN page, or another entry point? diff --git a/sdk/machines/digitone-ii/GOAL.md b/sdk/machines/digitone-ii/GOAL.md index 15c4a2a601..5657d1b91d 100644 --- a/sdk/machines/digitone-ii/GOAL.md +++ b/sdk/machines/digitone-ii/GOAL.md @@ -1,6 +1,6 @@ # Digitone II: the goal -What the Digitone II's contributors are building, in what order, and how to take a piece. The [OS research](../../../docs/DIGITONE_II_OS_RESEARCH.md) has the addresses and unit runs. The [agent board](../../../docs/AGENT_BOARD.md) shows who is working on what (`npm run board -- list`). +What the Digitone II's contributors are building, in what order, and how to take a piece. The [OS research](../../../docs/DIGITONE_II_OS_RESEARCH.md) has the addresses and unit runs, and the [SDK guide](README.md) what a module developer needs: the hooks, the voices, the frame budget and the pages. The [agent board](../../../docs/AGENT_BOARD.md) shows who is working on what (`npm run board -- list`). ## The goal @@ -8,14 +8,14 @@ A Digitone II owner opens the machine page, builds the Modwerk base in the brows This is the Octatrack's stack ([machine recipe](../../../docs/MACHINE_RECIPE.md)). The Digitone II shares the Digitakt II's platform, so it extends the Digitakt II's pieces ([its goal](../digitakt-ii/GOAL.md)) and never builds a second set. Core work for the Digitone II happens here, in its Modwerk base. -## Where it stands (18 November 2026) +## Where it stands (23 November 2026) | Piece | State | Where to look | | --- | --- | --- | -| Machine steps | Format, rebuild and boot done: modified OS 1.12 builds (toonst's core-dn2 0.3) booted on two units, and stock 1.12 restored them | [OS research](../../../docs/DIGITONE_II_OS_RESEARCH.md#step-3-on-a-unit) | +| Machine steps | All five done: modified OS 1.12 builds booted on two units and stock 1.12 restored them; Modwerk's base (core 1.1) runs on a unit; the first module, [Voice Spread](../../digitone-ii/modules/voice-spread/), ran on a unit from RAM (23 November 2026). The machine is a `preview` | [OS research](../../../docs/DIGITONE_II_OS_RESEARCH.md#step-3-on-a-unit), [Voice Spread's tests](../../digitone-ii/modules/voice-spread/TESTING.md) | | Build path | Started: Modwerk's linker (`LINK_DEVICES`, `ELE3_DEVICES`) knows OS 1.12 and links core-dn2 0.3 and 0.4, alone and with elekloader's examples, to the same main OS as elekloader, byte for byte. It takes the core's DSP bridge and refuses mods with DSP code. The pinned Elekloader kit stays as it is (owner, 19 November 2026): Modwerk's builder carries the device ([`device.json`](elekloader/device.json)), which `npm run machine:base` registers with the kit's Python SDK and the site with the browser kit; both read stock 1.12 and rewrite it, sealed, byte for byte. What is left is the base itself | [`elemod.ts`](../../../src/engine/elektron/elemod.ts), [`machine-base.py`](../../../scripts/machine-base.py), [`carried-devices.ts`](../../../src/engine/elekloader/carried-devices.ts) | -| Base | Not started | the Rytm MKI's [`base.json`](../analog-rytm-mki/elekloader/base.json) is the model | -| Flashing from the site | Not started. Today the owner sends a `.syx` with Elektron Transfer | the MS-70CDR's [`ZoomBaseDialog.tsx`](../../../src/components/ZoomBaseDialog.tsx) in [`BaseDialogFrame.tsx`](../../../src/components/BaseDialogFrame.tsx) | +| Base | Started: the Digitakt II base's core-dt2 1.1 source at core-dn2 0.3's Digitone II addresses, with copies of three files; `npm run machine:base` builds it. It ran on a unit with its hooks, and a project kept a change across a power cycle ([19 November 2026](../../../docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md)), and about five hours of playing. `base-binding.json` records that identity (`7a60d82e`), its package is in the site's catalog, and the machine's SDK profile ([`core-profile`](../../digitone-ii/core-profile/interface.json), budgets) describes it. Modwerk's packer keeps its images under the unit's 2 MiB update limit | [`elekloader/`](elekloader/README.md) | +| Flashing from the site | Started: the unit refuses an upgrade over about 2 MiB decoded (`update_max` in [`device.json`](elekloader/device.json)), so `fitUpdate` packs a larger build's main OS again with Modwerk's optimal packer, under the limit, and refuses one that still does not fit. The machine page builds the base alone for beta users (a core build preview, no module yet; downloads off until the owner turns them on); the OS upgrade over USB MIDI (`os-upgrade.ts`) ran on a unit and is not on the page yet. Today the owner sends a `.syx` with Elektron Transfer | [`fit-update.ts`](../../../src/engine/elekloader/fit-update.ts); the MS-70CDR's [`ZoomBaseDialog.tsx`](../../../src/components/ZoomBaseDialog.tsx) in [`BaseDialogFrame.tsx`](../../../src/components/BaseDialogFrame.tsx) | | USB link and diagnostics | Not started | the Rytm's [link](../analog-rytm-mkii/LINK.md), the Octatrack's [`diag.c`](../octatrack/elekloader/diag.c) and [`device-log.ts`](../../../src/engine/elekloader/device-log.ts) | | Loading without a reflash | Not started | [porting the runtime loader](../../runtime/loader/README.md#porting-to-another-machine) | | Base updates over USB | Not started | [two-slot base](../../../docs/OCTATRACK_TWO_SLOT_BASE.md) | diff --git a/sdk/machines/digitone-ii/README.md b/sdk/machines/digitone-ii/README.md new file mode 100644 index 0000000000..9ef4e3b90c --- /dev/null +++ b/sdk/machines/digitone-ii/README.md @@ -0,0 +1,96 @@ +# Digitone II SDK + +**Platform:** elemod · **OS:** 1.12 · **Base:** core 1.1 (the Digitakt II base, [goal](GOAL.md)) · **Modules:** [`sdk/digitone-ii/modules/`](../../digitone-ii/modules/) + +What a module developer needs on the Digitone II: the base's hooks, what the unit showed about its voices, its frame budget and its pages, and how a module page fits the stock ones. Every address is OS 1.12's and was read on a unit over the development link unless it says otherwise. Addresses, sizes and behaviour only: no stock bytes. + +## Modwerk stack + +The Digitone II follows the Octatrack's stack ([recipe](../../../docs/MACHINE_RECIPE.md)). Where it stands: the base, the Digitakt II base's core-dt2 1.1 source at the Digitone II's addresses ([`elekloader/`](elekloader/README.md)), runs on a unit and is the cumulative draft #1767; the USB link and the runtime loader are in review; flashing from the site, base updates over USB and the machine page are not built ([goal](GOAL.md)). Its contract is [`sdk/digitone-ii/core-profile/interface.json`](../../digitone-ii/core-profile/interface.json): a module uses those events, tables and exports and nothing else. The development link (SysEx over USB MIDI: memory reads, key presses, screenshots, RAM boots) is in review (#1763, #1842); the reads below were made with it. + +## Core hooks + +| Event | When | Handler | +| --- | --- | --- | +| `ev_tick` | the UI compose check, about 30 Hz | `void f(void *ctrl)`; set `ctrl + 0x20` to 1 to have the frame composed again | +| `ev_draw` | after stock composed the 128×64 frame | `void f(void *bmp, void *ctrl)` | +| `ev_key`, `ev_enc` | a panel key or an encoder | `int f(void *brain, char *event)`; nonzero takes it | +| `ev_settings`, `ev_personalize` | building those menus | `void f(void *menu)`; add rows with `core_addvalue` | +| `ev_frame_params` | once a frame (1,500 a second), in the frame interrupt, before the stock modulators | `void f(int16_t *values, int stride)` | +| `ev_key_leds` | every UI frame | `void f(void *mgr)` | + +Tables: `core_projdata` (a block in the project file's header) and `core_kitdata` (a block per kit, 128 kits). The kit blocks of every module share the room a kit record has: 337 bytes, `core_kitdata_room()`. Keep yours small and say its size in the README. + +### `ev_frame_params` hands over voices, not tracks + +`values[stride * k + j]` is Sound parameter `j` of **voice slot `k`** (16 slots, stride 101, values in 8.8: 127.0 is `0x7f00`). OS 1.12 keeps one parameter array per voice: a polyphonic track's chord uses several slots, and a slot changes tracks from note to note. The values are the smoothed copy stock sends on (`0x800068e4 + 0x22 + 202 * k`). What a handler adds reaches the records sent to the DSP (`0x80005e60 + 0xda + 146 * k`) in the same frame, and the kit's own values (`0x80003b12 + 202 * k`) stay as they were (Voice Spread's tests, #2003). Hold every result in the parameter's range. + +## Voices + +Seen on a unit, 23 November 2026, playing notes over USB MIDI on tracks 1-4: + +| What | Where | Notes | +| --- | --- | --- | +| A voice's track | `uint32_t` at `0x80005308 + 4 * k` | 0-15; it stays at the last track after the note ends | +| Voices holding a note | `uint32_t` at `0x80005348` | bit `k` set from note on to note off: its rising edge is a note on that slot, its falling edge the release | +| A voice's Sound | pointer at `0x800052a8 + 4 * k` | into the kit in RAM; stock copies the Sound's 101 values to the voice when it takes it | + +These are stock's RAM, not part of the base's contract yet: a module that reads them names them in its README, and the first two modules that need them should propose them as a base export ([propose a hook](../../../docs/module-guides/README.md#propose-a-hook-on-the-digitakt-digitone-or-digitakt-ii)). The voice that holds the active track is not known, nor where stock keeps the active track itself: a module that needs it today follows TRK + TRIG in `ev_key`. + +### Sound parameter indices + +The index `j` above is the array index in stock's parameter descriptors (a table of 60-byte entries; each holds the group, the index, min, max and default in 8.8, the MIDI CC, the long, page and short names and the value's formatter). The 101 values are taken: LFO1-3 1-24 (eight each: speed, multiplier, fade, destination, waveform, start phase or slew, mode, depth), the machine's own 25-65 (which depends on the machine), filter 66-79 (type 66, frequency 67, resonance 68, envelope depth 69, delay to key tracking 70-79), amp 80-92 (envelope 80-85, delay send 86, reverb 87, chorus 88, pan 89, volume 90, 91-92), portamento 93-94, 95-99 bit reduction and routing. There is no free run for a module's own parameters: keep them in project or kit data. + +## Frame budget + +Measured on a unit with a bench module in `ev_frame_params` (23 November 2026). DTIM0 (`0xfc07000c`) counts freely at about 132 MHz; a frame is about 88,000 counts (667 µs, periods 84,600-93,600). DTIM2 counts too, at about a sixth of that; DTIM3 is a tick timer, not a free count. + +| Work in the hook | Counts a frame | Share | +| --- | --- | --- | +| the hook alone | about 370 | 0.4 % | +| one simple LFO on each of the 16 slots | about 1,100 | 1.3 % | +| 8 a slot | about 4,000 | 4.6 % | +| 64 a slot | about 28,300 | 32 %, still stable | +| 128 a slot | about 56,000 (projected) | hung the unit | + +So stock leaves roughly 30-60 % of a frame. A module's per-voice work should stay in the low single percent; measure yours the same way and give the figure in `resources.load`. + +## Panel input + +`ev_key` and `ev_enc` get stock's event: the key or encoder at `event + 12` (`int32_t`) and at `event + 16` a key's flags (1 press, `0x10` release) or a turn's delta (one per detent). Key codes: TRIG PAGE 1, SYN 2, FLTR 3, AMP 4, FX 5, MOD 6, PERFORM 7, SAVE PROJ 8, TAP TEMPO 9, YES 10, UP 11, NO 12, LEFT 13, DOWN 14, RIGHT 15, TRK 16, FUNC 17, KB SETUP 18, REC 19, PLAY 20, STOP 21, PAGE 22, PTN 23, SONG 24, TRIG 1-16 25-40; encoders A-H 1-8, LEVEL 9. A handler that takes a press should also take its release, and one that lets stock have the press must let it have the release. + +## Pages + +### How stock builds them + +- **Page records**: 37 records of 44 bytes at `0x42433c00`, filled at boot: a short name ("LFO2"), a title ("MOD"), eight control ids (A-H) and a word. MOD's are records 4, 5 and 6 (LFO1-3). The getter at `0x400c25d8` answers ids above 36 with an empty record before the table. +- **Controls are descriptors**: a control id is the descriptor's index (321 entries, LFO1's controls 75-83, LFO2's 85-93, LFO3's 95-103). Stock reads that table directly in more than fifty places, so a module cannot add descriptors. +- **A page key's sub-pages** are a vector of record ids in its page view (the current page view at `*(void **)0x44648980 + 0xbc`; its key at `+0x88`, the vector at `+0x7c`, `+0x80`, `+0x84`): MOD's is `[4, 5, 6]`. The title "MOD (n/3)", UP and DOWN and the position marker on the right all follow that vector. + +Seen on a unit (a probe module, RAM boot, 23 November 2026): with MOD's vector pointed at 4, 16 and 300 ids, stock titled the pages "MOD (n/4)" up to "MOD (n/300)", DOWN and UP stepped through all of them (past 256), stopping at the ends. Two sub-pages that share a record also share its controls' state (some stayed blank), so a new page needs a record of its own. Pointing a stock vector at a module's array was a probe only: stock may grow or free it. + +**What a real extra sub-page needs from the base** (not built; a proposal for the base draft): a hook at the record getter's site that answers ids from 37 up with records modules contribute, the base adding those ids to the page key's vector where stock builds it, and an export that draws a stock control's look with a value the module supplies. Without descriptors, such a page's controls cannot be locked, sent as MIDI CCs or modulated by stock's LFOs. The 20 callers of the record getter have not all been checked for arrays indexed by record id. + +### The screen + +`ev_draw` runs after stock composed the frame. The composed frame's buffer is at `*(uint8_t **)0x402a10c8`: 128×64, column by column, eight bytes a column, the top eight rows in the last byte, bit 0 the topmost. Stock's text routine and fonts are not exported to modules: draw with your own. + +### Laying a page out like stock's + +Measured from the unit's screens (OS 1.12, the MOD, FLTR and AMP pages): + +| Element | Where | +| --- | --- | +| Pattern box ("A01") | x 0-14, y 0-9 | +| Title bar | x 17-127, y 0-9, lit with dark text from x 19, y 2; one corner pixel off at each end | +| Track box ("SYN 3") | x 0-14, y 13-36; LEV meter x 0-14, y 40-56, its label at y 59 | +| Controls | centres at x 33, 59, 86, 111; A-D y 13-29, E-H y 40-56 (17 pixels square) | +| Labels | 5 pixels tall, centred under the control, at y 32 and y 59 | +| Position marker | the right edge, x 125-127 | +| Envelopes | over A-D, x 21-124, y 13-29: one-pixel lines, 3×3 hollow nodes at the corners, dotted guides at the stage edges | + +A page drawn over a stock page can leave stock's left column (pattern box, track box, LEV) as stock drew it and repaint only x 16-127 below the title bar, so the pattern and track shown stay right without the module knowing them. Show a control's number for about a second after it is turned, as stock does. + +## Build and recovery + +Build a module with `node scripts/build-elemod-packages.mjs --output DIR --source-commit SHA --drafts --module digitone-ii:` and link it with the base for your own OS 1.12 file ([goal](GOAL.md)). A RAM boot over the development link leaves the flash as it was; a power cycle brings the flashed OS back. Hold FUNC while powering on and choose OS UPGRADE to restore stock 1.12 over MIDI DIN. diff --git a/sdk/machines/digitone-ii/base-binding.json b/sdk/machines/digitone-ii/base-binding.json new file mode 100644 index 0000000000..c71007b52d --- /dev/null +++ b/sdk/machines/digitone-ii/base-binding.json @@ -0,0 +1,23 @@ +{ + "schema": 1, + "identity": "7a60d82ebdf30d9e6013f6ab391d4666ea92b6d4a7c7d11f679ad8c958b4bf99", + "package": "core-1.1.elemod", + "sections": { + ".boot": 50, + ".run": 3656, + ".bss": 3120 + }, + "sites": 14, + "built": { + "kit": "3b31ef3c0e43c810e3acd0be6257e2484b20fc40", + "toolchain": { + "cross": "m68k-elf-", + "gcc": "16.2.0", + "binutils": "2.47" + }, + "stock": "7e5b8a733d4ab1fdf7e5d22757f7d8eddaa3cbf71d0858874a791844c02ceb35" + }, + "variants": { + "plain": "7a60d82ebdf30d9e6013f6ab391d4666ea92b6d4a7c7d11f679ad8c958b4bf99" + } +} diff --git a/sdk/machines/digitone-ii/elekloader/README.md b/sdk/machines/digitone-ii/elekloader/README.md new file mode 100644 index 0000000000..235ced38c7 --- /dev/null +++ b/sdk/machines/digitone-ii/elekloader/README.md @@ -0,0 +1,35 @@ +# Digitone II base + +Modwerk's base for the Digitone II on OS 1.12 ([recipe](../../../../docs/MACHINE_RECIPE.md), [goal](../GOAL.md)): the +Digitakt II base's core-dt2 1.1 source, built for the Digitone II, as the Rytm MKI's base reuses the MKII's (owner, +19 November 2026). Nothing here is a second core. `base.json` names the Digitakt II's elekloader folder as its +`source`, so core-dt2's files come from [`../../digitakt-ii/elekloader/`](../../digitakt-ii/elekloader/) and stay +exact. On top of that: + +- **`device.json`**: the Digitone II device, which the pinned Elekloader kit lacks; `machine:base` and the site's + builder carry it. +- **`recipe`**: the Digitone II's device, its 24 addresses (`defsym`) and 14 sites, in place of mod.json's. They are + the addresses core-dn2 0.3 (toonst's elekloader fork at `3d7c2e3`, GPL-2.0-or-later) builds this same source with, + and its builds ran on two units ([evidence](../../../../docs/verification/2026-11-18-digitone-ii-core-on-a-unit.md)). + A site names the stock bytes it replaces by length and SHA-256; the build reads them from your OS. +- **`copies/`**: Digitone II copies of three core-dt2 files. `base.json` names each one's original and its SHA-256, + and the build refuses once the original changes, so a copy is redone, never left behind: + - `mod.json`: OS 1.12, and no `.fast` area (no `fast.s`, `core_fast` or its copier on `ev_tick`): SRAM is not + qualified on this OS, so the device has no SRAM code area. + - `store.s`: the kit loader holds the record in a2 and the kit's RAM in a3, the other way round from the + Digitakt II. + - `store.c`: a kit record leaves 337 bytes after its end mark (`KIT_ROOM`), so the room buffer holds 340. + +One variant, `plain`: none of the Digitakt II base's sequencer and project additions (`add`), whose Digitone II sites +are not found yet. No DSP bridge either: the base links mods for the ColdFire only, and Modwerk's linker refuses a mod +that brings DSP code. + +## Build it + +```sh +npm run machine:base -- digitone-ii --stock /private/Digitone_II_OS1.12.syx +``` + +It matches [`base-binding.json`](../base-binding.json), the identity that ran on a unit; a deliberate change records a new one with `--write` once that build has run on a unit. The site builds the same package from its catalog (`sdk/imports/elekloader-modwerk-base-digitone-ii-2026-11-19.json`). + +GPL-2.0-or-later, as core-dt2 (irpina); the copies say what they change. diff --git a/sdk/machines/digitone-ii/elekloader/base.json b/sdk/machines/digitone-ii/elekloader/base.json new file mode 100644 index 0000000000..92b5782f64 --- /dev/null +++ b/sdk/machines/digitone-ii/elekloader/base.json @@ -0,0 +1,174 @@ +{ + "schema": 1, + "about": "Modwerk's Digitone II OS 1.12 base, built by npm run machine:base -- digitone-ii: the Digitakt II base's core-dt2 1.1 source (source names that folder) with the Digitone II's addresses and sites (recipe), and Digitone II copies of three of its files (copies: each names the core-dt2 file and SHA-256 it was made from, and the build refuses when that file has changed): mod.json for OS 1.12 without the .fast area, since SRAM is not qualified on this OS; store.s, whose kit load has its registers the other way round; and store.c, whose kit room is larger. The addresses are the ones core-dn2 0.3 (toonst's elekloader fork at 3d7c2e3, GPL-2.0-or-later) builds this source with, and its images ran on a unit (docs/verification/2026-11-18-digitone-ii-core-on-a-unit.md). One variant, plain: none of the Digitakt II base's sequencer and project additions, whose Digitone II sites are not found yet. The device is carried by Modwerk's builder (device.json). Every site names the stock bytes it replaces by length and SHA-256; the build fills them from the user's OS.", + "source": "digitakt-ii", + "core": "core-dt2", + "include": "sdk/machines/digitakt-ii/include", + "os": "1.12", + "toolchain": { + "cross": "m68k-elf-", + "gcc": "16.2.0", + "binutils": "2.47" + }, + "variants": { + "plain": { + "add": false + } + }, + "copies": [ + { + "path": "core-dt2/mod.json", + "from": "core-dt2/mod.json", + "sha256": "c5de5851c1e01343f5287a27c3d2707e3b811b3003e5e6040d5ee7a69b01d9b1" + }, + { + "path": "core-dt2/store.s", + "from": "core-dt2/store.s", + "sha256": "541a32f664c9a2554e26fb63c610189a4deb158528c5698b2946d0a56c6b51c0" + }, + { + "path": "core-dt2/store.c", + "from": "core-dt2/store.c", + "sha256": "9bed2c3bceabfd7abf377d3f060061d02394fff367be7866aa166f2c271d4f9b" + } + ], + "recipe": { + "device": "digitone-mk2", + "defsym": { + "DRAWALL": "0x4011d60a", + "KEYDISP": "0x4002c5c8", + "ENCDISP": "0x4002c55c", + "OP_NEW": "0x40120544", + "ITEM_CTOR": "0x401173b8", + "MENU_ADD": "0x40116bee", + "FN_MGR": "0x4018de3e", + "SETTINGS_RET": "0x4009ff8e", + "NO_DTIM0": "1", + "VBR_FN": "0x400019b0", + "FW_TEXTBOX": "0x40115948", + "FW_FONT_MENU": "0x40294710", + "FW_INVALIDATE": "0x4011ca9a", + "FW_LED_SET": "0x4002c318", + "FW_STR_NEW": "0x401ceab8", + "MEMCPY": "0x40134770", + "FW_KITS": "0x4210d08c", + "KIT_SIZE": "0x5d71", + "KIT_PAD": "0x28af", + "KIT_ROOM": "337", + "PATTERN_OBJ": "0x446488d0", + "MODS_STOCK": "0x400db390", + "LEDS_CLEAR": "0x4002c3c6", + "FRAME_STRIDE": "101" + }, + "sites": [ + { + "addr": "0x40000538", + "len": 6, + "stockSha256": "f0c5fc0afd892b3ec3f8803e1d875a2a22c6bb4e2cb987adc582cf8dea48c28a", + "op": "jsr", + "target": "boot" + }, + { + "addr": "0x4002e464", + "len": 6, + "stockSha256": "8abc5b3d8941b94f9ec93c348112bcaf09510582ab72977a407b9ce1e213a459", + "op": "jsr", + "target": "core_tick" + }, + { + "addr": "0x4002e4ca", + "len": 6, + "stockSha256": "51e3665db347990c1500cab5b2766706e47605e08a3a01c721fc1958f75c27ab", + "op": "jsr", + "target": "core_draw" + }, + { + "addr": "0x4002f20c", + "len": 6, + "stockSha256": "d1e1f5dd2afbbcebc50c89fdcf5fd704a0a26f28becdcada110ab0c2d14626fc", + "op": "jsr", + "target": "core_key" + }, + { + "addr": "0x4002f256", + "len": 6, + "stockSha256": "786bc53e108e78a53f3bfc32fc57bd91569f6702c55a9566747386c873b91d4a", + "op": "jsr", + "target": "core_enc" + }, + { + "addr": "0x4009ff88", + "len": 6, + "stockSha256": "c7589861366d298dd3e07f1f5ebce25db0435f9cad638eae321d68e7542f6c74", + "op": "jmp", + "target": "core_settings" + }, + { + "addr": "0x400987a2", + "len": 6, + "stockSha256": "10552f30e94896a18c635b43b0f16452187a5e3db5b661ba3255c1ecb054fd50", + "op": "jmp", + "target": "core_personalize" + }, + { + "addr": "0x40027196", + "len": 6, + "stockSha256": "8f4626d425f213c0f0f9f81054e40a51bad034eaa6b154d51fe969ae4a521a8d", + "op": "jsr", + "target": "core_frame" + }, + { + "addr": "0x4002c87a", + "len": 6, + "stockSha256": "3988e55cba5c51c557dcb530885eba6f789018b4345baccd49ebce731fd6f68e", + "op": "jsr", + "target": "core_key_leds" + }, + { + "addr": "0x400de0d4", + "len": 6, + "stockSha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "op": "jsr", + "target": "core_kit_save" + }, + { + "addr": "0x400ddddc", + "len": 6, + "stockSha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "op": "jsr", + "target": "core_kit_load" + }, + { + "addr": "0x400e18be", + "len": 6, + "stockSha256": "be28bf581aa32f87a3306f04738f1dbdb4b28489865cd0d88145466f2740333c", + "op": "jsr", + "target": "core_proj_save" + }, + { + "addr": "0x400e1928", + "len": 6, + "stockSha256": "39d8feaa0cf09fbdc868baea4e44be238666cbfcbf350883559c99085034a789", + "op": "jsr", + "target": "core_proj_load" + }, + { + "addr": "0x40134770", + "len": 12, + "stockSha256": "a48eab821488cf202e892b5cad063488c972824e57c3d851ab402463dc0f5657", + "op": "jmp", + "target": "core_memcpy" + } + ] + }, + "reference": { + "file": "vendor/elekloader/catalog/core-1.0.elemod", + "sha256": "95303655a9358f581b485acb68b884b394a577f5d0b373f0a3e5957c8d0ca72c", + "keeps": [ + "id", + "weak", + "requires", + "conflicts" + ] + } +} diff --git a/sdk/machines/digitone-ii/elekloader/copies/core-dt2/mod.json b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/mod.json new file mode 100644 index 0000000000..823833cf20 --- /dev/null +++ b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/mod.json @@ -0,0 +1,147 @@ +{ + "id": "core", + "version": "1.1", + "license": "GPL-2.0-or-later", + "title": "core", + "category": "Framework", + "author": "irpina", + "description": "The boot copier and the hook bus for the Digitakt II: every other mod needs it. From 1.1 also each frame's per-track parameter values before the stock modulators (ev_frame_params), the key-LED frame before the stock views (ev_key_leds), the mods' project data and kit data, saved and loaded with the project and its kits and copied with the kits (core_projdata, core_kitdata), and value rows for PERSONALIZE and SETTINGS (core_addvalue). On its own it changes nothing the unit does. Modwerk's Digitone II copy (OS 1.12): no .fast area, since SRAM is not qualified there, so no fast.s, core_fast or its copier.", + "device": "digitakt-mk2", + "os": "1.12", + "sources": [ + "../core/core.s", + "../core/settings.s", + "personalize.s", + "fw.s", + "frame.s", + "leds.s", + "store.s", + "store.c", + "rows.s", + "rows.c" + ], + "defsym": { + "DRAWALL": "0x4011bc96", + "KEYDISP": "0x40030bd0", + "ENCDISP": "0x40030b64", + "OP_NEW": "0x4011ebd0", + "ITEM_CTOR": "0x40115a44", + "MENU_ADD": "0x4011527a", + "FN_MGR": "0x4019d8a8", + "SETTINGS_RET": "0x400a5eb2", + "NO_DTIM0": "1", + "VBR_FN": "0x400019b0", + "FW_TEXTBOX": "0x40113fd4", + "FW_FONT_MENU": "0x402a9be0", + "FW_INVALIDATE": "0x4011b126", + "FW_LED_SET": "0x400308e0", + "FW_STR_NEW": "0x401e7e7a", + "MEMCPY": "0x40136388", + "FW_KITS": "0x426532b8", + "KIT_SIZE": "0x5574", + "KIT_PAD": "0x573e", + "KIT_ROOM": "194", + "PATTERN_OBJ": "0x44f370a0", + "MODS_STOCK": "0x400d9508", + "LEDS_CLEAR": "0x4003098e", + "FRAME_STRIDE": "71" + }, + "sites": [ + { + "addr": "0x40000538", + "stock": "4eb9400019b0", + "op": "jsr", + "target": "boot" + }, + { + "addr": "0x40032ad4", + "stock": "4eb94011bc60", + "op": "jsr", + "target": "core_tick" + }, + { + "addr": "0x40032b3a", + "stock": "4eb94011bc96", + "op": "jsr", + "target": "core_draw" + }, + { + "addr": "0x40033d94", + "stock": "4eb940030bd0", + "op": "jsr", + "target": "core_key" + }, + { + "addr": "0x40033dde", + "stock": "4eb940030b64", + "op": "jsr", + "target": "core_enc" + }, + { + "addr": "0x400a5eac", + "stock": "205248780002", + "op": "jmp", + "target": "core_settings" + }, + { + "addr": "0x4009e2a2", + "stock": "4cef7c7c0018", + "op": "jmp", + "target": "core_personalize" + }, + { + "addr": "0x4002e90c", + "stock": "4eb9400d9508", + "op": "jsr", + "target": "core_frame" + }, + { + "addr": "0x400311a2", + "stock": "4ebaf7ea2f02", + "op": "jsr", + "target": "core_key_leds" + }, + { + "addr": "0x400dbee4", + "stock": "223cbacef00c", + "op": "jsr", + "target": "core_kit_save" + }, + { + "addr": "0x400db8be", + "stock": "223cbacef00c", + "op": "jsr", + "target": "core_kit_load" + }, + { + "addr": "0x400df932", + "stock": "26bcbeefbace", + "op": "jsr", + "target": "core_proj_save" + }, + { + "addr": "0x400df99c", + "stock": "203cbeefbace", + "op": "jsr", + "target": "core_proj_load" + }, + { + "addr": "0x40136388", + "stock": "226f0004206f0008202f000c", + "op": "jmp", + "target": "core_memcpy" + } + ], + "collections": { + "ev_tick": 4, + "ev_draw": 4, + "ev_key": 4, + "ev_enc": 4, + "ev_settings": 4, + "ev_personalize": 4, + "ev_frame_params": 4, + "ev_key_leds": 4, + "core_projdata": 4, + "core_kitdata": 4 + } +} diff --git a/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.c b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.c new file mode 100644 index 0000000000..060652adde --- /dev/null +++ b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.c @@ -0,0 +1,295 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* core-dt2 1.1: the mods' project data and kit data (store.s calls these from + * the firmware's saves, loads and kit copies; the format: docs/ADAPTING.md, + * "Project data, kit data and value rows (core-dt2 1.1, Digitakt II)"). + * + * Both live in bytes of the saved project the stock OS writes as zeros and + * never reads, so a project saved with mods loads on the stock OS, which + * keeps them when it saves a project it loaded. Core writes them only where + * they hold zeros or its own data, and takes only its own: anything else + * (another tool's, a later OS's) is left as it is and counted. */ +#include "digitakt-mk2/core.h" + +extern const uint32_t core_store_layout[]; /* store.s: kits, kit size, pad, room, pattern object */ +extern const core_projdata_t *const core_projdata[]; +extern const core_kitdata_t *const core_kitdata[]; + +volatile uint32_t core_store_conflicts; + +#define KITS (core_store_layout[0]) +#define KIT_STRIDE (core_store_layout[1]) +#define KIT_PAD (core_store_layout[2]) +#define KIT_ROOM (core_store_layout[3]) +#define PATTERN_OBJ (core_store_layout[4]) + +/* ---- project data: the header's gap, as on core-dn1: 'ELKP', then per block its + * tag, its size and its bytes, then a zero tag ---- */ +#define GAP 0x1c +#define GAP_END 0x200 +#define PROJ_MAGIC 0x454c4b50u /* 'ELKP' */ + +static uint32_t get32(const uint8_t *p) +{ + return (uint32_t)p[0] << 24 | (uint32_t)p[1] << 16 | (uint32_t)p[2] << 8 | p[3]; +} + +static void put32(uint8_t *p, uint32_t v) +{ + p[0] = (uint8_t)(v >> 24), p[1] = (uint8_t)(v >> 16), p[2] = (uint8_t)(v >> 8), p[3] = (uint8_t)v; +} + +static int blank(const uint8_t *p, uint32_t n) +{ + while (n--) + if (*p++) + return 0; + return 1; +} + +static void copy(uint8_t *to, const uint8_t *from, uint32_t n) +{ + while (n--) + *to++ = *from++; +} + +static void zero(uint8_t *to, uint32_t n) +{ + while (n--) + *to++ = 0; +} + +void core_projdata_save(uint8_t *file) +{ + uint8_t *p = file + GAP, *end = file + GAP_END; + if (!core_projdata[0]) + return; /* no mod keeps project data: the bytes as the OS left them */ + if (!blank(p, GAP_END - GAP) && get32(p) != PROJ_MAGIC) { + core_store_conflicts++; + return; + } + zero(p, GAP_END - GAP); + put32(p, PROJ_MAGIC); + p += 4; + for (const core_projdata_t *const *d = core_projdata; *d; d++) { + uint32_t n = (*d)->size; + if ((uint32_t)(end - p) < n + 12) /* tag, size, bytes and the zero tag after */ + continue; /* does not fit: left out */ + copy(p, (const uint8_t *)(*d)->tag, 4); + put32(p + 4, n); + copy(p + 8, (*d)->data, n); + p += 8 + n; + } +} + +void core_projdata_load(const uint8_t *file) +{ + const uint8_t *gap = file + GAP, *end = file + GAP_END; + int ours = get32(gap) == PROJ_MAGIC; + if (!ours && !blank(gap, GAP_END - GAP)) + core_store_conflicts++; + for (const core_projdata_t *const *d = core_projdata; *d; d++) { + const uint8_t *p = gap + 4; + int found = 0; + zero((*d)->data, (*d)->size); + while (ours && end - p >= 8 && get32(p)) { + uint32_t n = get32(p + 4); + if ((uint32_t)(end - p - 8) < n) + break; /* runs past the gap: corrupt, stop */ + if (get32(p) == get32((const uint8_t *)(*d)->tag)) { + copy((*d)->data, p + 8, n < (*d)->size ? n : (*d)->size); + found = 1; + break; + } + p += 8 + n; + } + if ((*d)->loaded) + (*d)->loaded(found); + } +} + +/* ---- kit data: after each kit record's end mark, a mark, the layout's id and the + * blocks in the table's order; a block that does not fit is left out ---- */ +#define KIT_MARK 0x4b /* 'K' */ +#define KIT_HEAD 3 +#define SHADOWS 8 +#define ROOM_MAX 340 /* KIT_ROOM: the bytes after a kit record's end mark (Digitone II: 337) */ + +static uint16_t layout_id; +static uint8_t layout_known; + +/* A CRC-16 of each block's tag and size, in the table's order: kit data saved by + * another set of kit-data mods is not taken for this one's. Never 0. */ +static uint16_t layout(void) +{ + if (!layout_known) { + uint16_t c = 0xffff; + for (const core_kitdata_t *const *d = core_kitdata; *d; d++) { + uint8_t b[8]; + copy(b, (const uint8_t *)(*d)->tag, 4); + put32(b + 4, (*d)->size); + for (int i = 0; i < 8; i++) { + c ^= (uint16_t)(b[i] << 8); + for (int k = 0; k < 8; k++) + c = (uint16_t)(c & 0x8000 ? (c << 1) ^ 0x1021 : c << 1); + } + } + layout_id = c ? c : 1; + layout_known = 1; + } + return layout_id; +} + +uint32_t core_kitdata_room(void) +{ + return KIT_ROOM - KIT_HEAD; +} + +static int core_kit_index(const void *kit) +{ + uint32_t off = (uint32_t)kit - KITS; + if ((uint32_t)kit < KITS || off % KIT_STRIDE || off / KIT_STRIDE >= CORE_KITS) + return -1; + return (int)(off / KIT_STRIDE); +} + +int core_kit_on(void) +{ + uint32_t o = *(volatile uint32_t *)PATTERN_OBJ, n; + if (!o) + return -1; + n = *(volatile uint32_t *)(o + 0x138); + return n < CORE_KITS ? (int)n : -1; +} + +/* kit's blocks into out (KIT_ROOM bytes), or from in; in 0: zeros, found 0 */ +static void pack(int kit, uint8_t *out) +{ + uint8_t *p = out + KIT_HEAD, *end = out + KIT_ROOM; + zero(out, KIT_ROOM); + out[0] = KIT_MARK; + out[1] = (uint8_t)(layout() >> 8), out[2] = (uint8_t)layout(); + for (const core_kitdata_t *const *d = core_kitdata; *d; d++) { + uint32_t n = (*d)->size; + if ((uint32_t)(end - p) < n) + break; + copy(p, (const uint8_t *)(*d)->data + (uint32_t)kit * n, n); + p += n; + } +} + +static void unpack(int kit, const uint8_t *in) +{ + int ok = in && in[0] == KIT_MARK && (uint16_t)(in[1] << 8 | in[2]) == layout(); + const uint8_t *p = in ? in + KIT_HEAD : 0, *end = in ? in + KIT_ROOM : 0; + for (const core_kitdata_t *const *d = core_kitdata; *d; d++) { + uint32_t n = (*d)->size; + uint8_t *to = (uint8_t *)(*d)->data + (uint32_t)kit * n; + int found = ok && (uint32_t)(end - p) >= n; + if (found) { + copy(to, p, n); + p += n; + } else { + zero(to, n); + } + if ((*d)->changed) + (*d)->changed(kit, found); + } +} + +static int ours(const uint8_t *area) +{ + return area[0] == KIT_MARK; +} + +/* Buffers outside the project's kits that hold a kit (the clipboard, the undo copy, + * a kit loaded from the +Drive before it is copied in): their blocks, packed. */ +static struct { + uint32_t addr; + uint8_t bytes[ROOM_MAX]; +} shadow[SHADOWS]; +static uint8_t shadow_next; + +static uint8_t *shadow_of(uint32_t addr) +{ + for (int i = 0; i < SHADOWS; i++) + if (shadow[i].addr == addr) + return shadow[i].bytes; + return 0; +} + +static uint8_t *shadow_new(uint32_t addr) +{ + uint8_t *s = shadow_of(addr); + if (!s) { + shadow[shadow_next].addr = addr; + s = shadow[shadow_next].bytes; + shadow_next = (uint8_t)((shadow_next + 1) % SHADOWS); + } + return s; +} + +static void shadow_drop(uint32_t addr) +{ + for (int i = 0; i < SHADOWS; i++) + if (shadow[i].addr == addr) + shadow[i].addr = 0; +} + +void core_kitdata_save(uint8_t *record, const uint8_t *kit) +{ + uint8_t *area = record + KIT_PAD; + int n = core_kit_index(kit); + const uint8_t *s; + if (!core_kitdata[0]) + return; + if (!blank(area, KIT_ROOM) && !ours(area)) { + core_store_conflicts++; + return; + } + if (n >= 0) + pack(n, area); + else if ((s = shadow_of((uint32_t)kit)) != 0) + copy(area, s, KIT_ROOM); + else + zero(area, KIT_ROOM); /* a kit core knows nothing of */ +} + +void core_kitdata_load(const uint8_t *kit, const uint8_t *record) +{ + const uint8_t *area = record + KIT_PAD; + int n = core_kit_index(kit); + if (!core_kitdata[0]) + return; + if (!blank(area, KIT_ROOM) && !ours(area)) + core_store_conflicts++; + if (n >= 0) + unpack(n, ours(area) ? area : 0); + else if (ours(area)) + copy(shadow_new((uint32_t)kit), area, KIT_ROOM); + else + shadow_drop((uint32_t)kit); +} + +void core_kit_copied(uint8_t *dst, const uint8_t *src) +{ + static uint8_t tmp[ROOM_MAX]; /* not on the stack: memcpy runs on small task stacks too */ + int d = core_kit_index(dst), s = core_kit_index(src); + const uint8_t *from = 0; + if (!core_kitdata[0] || dst == src) + return; + if (s >= 0) { + pack(s, tmp); + from = tmp; + } else { + from = shadow_of((uint32_t)src); + } + if (d >= 0) { + if (from) + unpack(d, from); + return; /* from a buffer core never saw filled: the kit's blocks stay */ + } + if (from) + copy(shadow_new((uint32_t)dst), from, KIT_ROOM); + else + shadow_drop((uint32_t)dst); +} diff --git a/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.s b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.s new file mode 100644 index 0000000000..12756d60ec --- /dev/null +++ b/sdk/machines/digitone-ii/elekloader/copies/core-dt2/store.s @@ -0,0 +1,86 @@ +| SPDX-License-Identifier: GPL-2.0-or-later +| core-dt2 1.1: where the project's saves, loads and kit copies call core for +| the mods' project and kit data (store.c). ColdFire V4; assemble with +| -mcpu=54455. OS 1.17; Modwerk's Digitone II copy for OS 1.12 swaps the kit load's registers. The format and the firmware's routines: +| docs/ADAPTING.md, "Project data, kit data and value rows (core-dt2 1.1, Digitakt II)". +| +| The sites, each a whole instruction the shim runs too: +| kit save move.l #0xbacef00c,d1, before the kit serializer (0x400dbdca) +| writes the record's end mark (0x400dbee4): a2 the record, a3 +| the kit's RAM +| kit load the same instruction in the kit loader (0x400db898), after the +| record's version check (0x400db8be): a2 the kit's RAM, a3 the +| record +| project save move.l #0xbeefbace,(a3), the file's mark, in the save +| (0x400df66c) at 0x400df932: a3 the file; d0 is live after +| project load move.l #0xbeefbace,d0, the load's (0x400df95a) check of the +| mark at 0x400df99c: a3 the file +| memcpy its first 12 bytes (0x40136388), three loads of its +| arguments, by jmp: a copy of a kit's size (KIT_SIZE) also +| calls core_kit_copied(dst, src); every other copy goes on +| into memcpy at once + .section .run, "ax" + .globl core_kit_save, core_kit_load, core_proj_save, core_proj_load, core_memcpy + .globl core_store_layout + +| The device's layout, for store.c: the kit table, its stride, the bytes of a +| kit record after its end mark (offset, length), the pattern object's +| pointer (the pattern on at +0x138). +core_store_layout: + .long FW_KITS, KIT_SIZE, KIT_PAD, KIT_ROOM, PATTERN_OBJ + +core_kit_save: + move.l %a3, -(%sp) + move.l %a2, -(%sp) + jsr core_kitdata_save | (record, kit) + addq.l #8, %sp + move.l #0xbacef00c, %d1 | the instruction the site replaced + rts + +core_kit_load: + move.l %a2, -(%sp) | Digitone II: a2 the record, a3 the kit's RAM (the Digitakt II's + move.l %a3, -(%sp) | the other way round) + jsr core_kitdata_load | (kit, record) + addq.l #8, %sp + move.l #0xbacef00c, %d1 + rts + +core_proj_save: + move.l #0xbeefbace, (%a3) | the instruction the site replaced + lea -16(%sp), %sp + movem.l %d0-%d1/%a0-%a1, (%sp) + move.l %a3, -(%sp) + jsr core_projdata_save | (file) + addq.l #4, %sp + movem.l (%sp), %d0-%d1/%a0-%a1 + lea 16(%sp), %sp + rts + +core_proj_load: + move.l %a3, -(%sp) + jsr core_projdata_load | (file) + addq.l #4, %sp + move.l #0xbeefbace, %d0 + rts + +| memcpy(dst, src, n): the cost of every other copy is the compare and the branch. +core_memcpy: + move.l 12(%sp), %d0 + cmpi.l #KIT_SIZE, %d0 + beq.s 1f +2: movea.l 4(%sp), %a1 | the three instructions the site replaced + movea.l 8(%sp), %a0 + move.l 12(%sp), %d0 + jmp MEMCPY + 12 +1: move.l 12(%sp), -(%sp) | a kit: the copy, then the call + move.l 12(%sp), -(%sp) + move.l 12(%sp), -(%sp) + bsr.s 2b + lea 12(%sp), %sp + move.l %d0, -(%sp) | memcpy's result + move.l 12(%sp), -(%sp) | src + move.l 12(%sp), -(%sp) | dst + jsr core_kit_copied + addq.l #8, %sp + move.l (%sp)+, %d0 + rts diff --git a/sdk/machines/digitone-ii/elekloader/device.json b/sdk/machines/digitone-ii/elekloader/device.json index df2eb4d2f8..70336881bd 100644 --- a/sdk/machines/digitone-ii/elekloader/device.json +++ b/sdk/machines/digitone-ii/elekloader/device.json @@ -1,6 +1,6 @@ { "schema": 1, - "about": "The Digitone II device Modwerk's builder carries, because the pinned Elekloader kit has none (owner, 19 November 2026): npm run machine:base registers it with the kit's Python SDK, and the site's builder with the browser kit (src/engine/elekloader/carried-devices.ts). The Digitakt II's platform with its own SysEx id, release and seal seed, the 256 KB DDR area and no SRAM code area (SRAM is not qualified on this OS): docs/DIGITONE_II_OS_RESEARCH.md. Numbers given as hex are strings.", + "about": "The Digitone II device Modwerk's builder carries, because the pinned Elekloader kit has none (owner, 19 November 2026): npm run machine:base registers it with the kit's Python SDK, and the site's builder with the browser kit (src/engine/elekloader/carried-devices.ts). The Digitakt II's platform with its own SysEx id, release and seal seed, the 256 KB DDR area and no SRAM code area (SRAM is not qualified on this OS): docs/DIGITONE_II_OS_RESEARCH.md. update_max is the most an OS upgrade may hold once decoded (its 8-byte preamble and the container): the unit refused images of about 2.15 MB at 99 % and took ones of about 1.92 MB (docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md), and Elekloader 0.11 caps it at 0x200000. Numbers given as hex are strings.", "device": { "key": "digitone-mk2", "name": "Digitone II", @@ -18,18 +18,40 @@ "stage": "0x40400000", "flash_at": "0x80000", "flash_limit": "0x380000", + "update_max": "0x200000", "trailer": "hmac", - "hmac_key_from": [2, "Multiplier"], + "hmac_key_from": [ + 2, + "Multiplier" + ], "isa": "coldfire", "areas": { - "ddr": ["0x47f00000", "0x47f40000"] + "ddr": [ + "0x47f00000", + "0x47f40000" + ] }, - "ddr": ["0x47f00000", "0x47f40000"], + "ddr": [ + "0x47f00000", + "0x47f40000" + ], "recovery": "hold FUNC while powering on for the STARTUP menu, press TRIG 4 (OS UPGRADE), then send the stock .syx over MIDI (not USB)", "toolchain": { "prefix": "m68k-elf-", - "asflags": ["-mcpu=54455"], - "cflags": ["-mcpu=54455", "-O2", "-ffreestanding", "-fno-builtin", "-nostdlib", "-fno-pic", "-fno-pie", "-fomit-frame-pointer", "-Wall"] + "asflags": [ + "-mcpu=54455" + ], + "cflags": [ + "-mcpu=54455", + "-O2", + "-ffreestanding", + "-fno-builtin", + "-nostdlib", + "-fno-pic", + "-fno-pie", + "-fomit-frame-pointer", + "-Wall" + ] } } } diff --git a/sdk/machines/digitone-ii/machine.json b/sdk/machines/digitone-ii/machine.json index df41dbf170..54715766e1 100644 --- a/sdk/machines/digitone-ii/machine.json +++ b/sdk/machines/digitone-ii/machine.json @@ -3,8 +3,8 @@ "id": "digitone-ii", "order": 50, "name": "Digitone II", - "status": "research", - "summary": "Shares the Digitakt II platform and its sealed OS file. OS 1.12 rebuilds byte for byte, and modified builds boot on units: core-dn2 0.3's six UI events ran on a unit, and stock 1.12 restores it.", + "status": "preview", + "summary": "Experimental OS 1.12 support on the Modwerk Digitone II base (core 1.1). Voice Spread is the first module. Downloads stay disabled.", "firmware": { "releases": [ { @@ -17,15 +17,18 @@ ] } ], - "flash": "Normal OS updates use Elektron Transfer with the owner's own stock OS file. Modwerk has no Digitone II build path yet and downloads stay disabled.", + "flash": "Normal OS updates use Elektron Transfer with the owner's own stock OS file. The page builds Modwerk's Digitone II base alone from that file (beta); downloads stay disabled until the owner turns them on.", "recovery": "Hold FUNC while powering on, choose TRIG 4 (OS UPGRADE), then send the owner's stock .syx over MIDI DIN; recovery mode does not use USB. Checked on toonst's unit with stock 1.12 (23 October 2026, elekloader's build guide); on a second unit only the normal Transfer update back to stock 1.12 was tried (18 November 2026)." }, "steps": { "format": "done", "rebuild": "done", "boot": "done", - "core": "started", - "mods": "open" + "core": "done", + "mods": "done" + }, + "stack": { + "base": "started" }, "research": [ { @@ -49,6 +52,37 @@ "note": "prodbysmolec's unit: stock 1.12 with core-dn2 0.3 and hello-marker, then hooks-check-dn2, built with toonst's elekloader at 3d7c2e3 and flashed with Transfer; boot, normal playback, all six UI events and the return to stock 1.12 observed." } ], + "sdk": { + "platform": "elemod", + "modules": "sdk/digitone-ii/modules", + "catalog": null, + "guide": "sdk/machines/digitone-ii/GOAL.md", + "core": { + "version": "1.1", + "path": "sdk/digitone-ii/core-profile" + }, + "toolchain": "m68k-elf GCC and binutils and the pinned Elekloader kit with the device Modwerk's builder carries; builds start from the owner's exact OS 1.12 .syx.", + "budgets": [ + { + "name": "Shared mod memory", + "unit": "bytes", + "value": 262144, + "note": "Digitone II DDR region 0x47F00000–0x47F40000, shared by the base and linked mods." + }, + { + "name": "Core image", + "unit": "bytes", + "value": 6776, + "note": "Pinned Modwerk base: 3,656 bytes .run plus 3,120 bytes .bss. The linker measures each selected set." + }, + { + "name": "Per-event subscriptions", + "unit": "slots", + "value": 4, + "note": "The Modwerk base allocates four hook entries per shared event collection." + } + ] + }, "art": { "body": "compact", "encoders": 8, diff --git a/sdk/tests/test_machine_base.py b/sdk/tests/test_machine_base.py index ccd520a791..2e506d9f5e 100644 --- a/sdk/tests/test_machine_base.py +++ b/sdk/tests/test_machine_base.py @@ -525,5 +525,23 @@ def __init__(self, **kw): self.assertEqual(device.hmac_key_from, (2, b"Multiplier")) self.assertEqual(device.releases["1.12"]["main_len"], 3196288) + def test_digitone_ii_copies_change_only_what_their_readme_says(self): + import difflib + original = APP / "sdk/machines/digitakt-ii/elekloader/core-dt2" + copy = APP / "sdk/machines/digitone-ii/elekloader/copies/core-dt2" + def changed(name): + diff = difflib.ndiff(original.joinpath(name).read_text().splitlines(), copy.joinpath(name).read_text().splitlines()) + return [line[2:] for line in diff if line[:2] in ("- ", "+ ")] + self.assertEqual([line for line in changed("store.c") if "ROOM_MAX" not in line], []) + store = [line for line in changed("store.s") if not line.lstrip().startswith("|")] + self.assertEqual(sorted(line.split("|")[0].strip() for line in store), sorted(["move.l %a3, -(%sp)", "move.l %a2, -(%sp)"] * 2)) + mod, dt2 = json.loads(copy.joinpath("mod.json").read_text()), json.loads(original.joinpath("mod.json").read_text()) + self.assertEqual(mod["os"], "1.12") + self.assertEqual(mod["sources"], [source for source in dt2["sources"] if source != "../core/fast.s"]) + self.assertNotIn("subscribe", mod) + self.assertEqual(mod["collections"], {name: room for name, room in dt2["collections"].items() if name != "core_fast"}) + self.assertEqual({key: value for key, value in mod.items() if key not in ("os", "sources", "collections", "description")}, + {key: value for key, value in dt2.items() if key not in ("os", "sources", "collections", "description", "subscribe")}) + if __name__ == "__main__": unittest.main() diff --git a/src/App.tsx b/src/App.tsx index 7ec7cc5acb..7d84241cb2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -699,7 +699,7 @@ export default function App() { {(configuration || machineView === 'configuration' || route.startsWith('module-set')) && } }> {projectsRoute ? : faqRoute ? : route === 'credits' ? : route === 'base' ? : overviewRoute ? : !ready ?
Opening your workspace…
: <> - {onLibrary ? setQuery('')} onBrowse={rememberBrowse} device={allMachines ? undefined : currentDevice} machinePicker={phoneLayout ? undefined : machinePicker} phone={phoneLayout} resultsSlot={resultsSlot} query={query} category={libraryCategory as ModuleCategory | undefined} octatrackModules={visibleModules} family={family} onFamilyChange={setFamily} sort={sort} onSortChange={setSort} statistics={statistics} octatrackBlocks={addBlockMap} onSwapOctatrack={swapModule} comparison={comparison} onCompare={toggleComparison} onOpenComparison={() => setCompareOpen(true)} viewedModuleVersions={viewedModuleVersions} moduleBaseline={moduleBaseline} octatrackSelected={selectedIds} onToggleOctatrack={toggleModule} digiSelected={digiSelected} onToggleDigi={(device, id) => workspace.toggleModule(id, device)} zoomSelected={zoomSelected} onToggleZoom={(device, id) => workspace.toggleModule(id, device)} onClearSearch={() => { setQuery(''); setFamily('all') }}> + {onLibrary ? setQuery('')} onBrowse={rememberBrowse} device={allMachines ? undefined : currentDevice} machinePicker={phoneLayout ? undefined : machinePicker} phone={phoneLayout} resultsSlot={resultsSlot} query={query} category={libraryCategory as ModuleCategory | undefined} octatrackModules={visibleModules} family={family} onFamilyChange={setFamily} sort={sort} onSortChange={setSort} statistics={statistics} octatrackBlocks={addBlockMap} onSwapOctatrack={swapModule} comparison={comparison} onCompare={toggleComparison} onOpenComparison={() => setCompareOpen(true)} viewedModuleVersions={viewedModuleVersions} moduleBaseline={moduleBaseline} octatrackSelected={selectedIds} onToggleOctatrack={toggleModule} digiSelected={digiSelected} onToggleDigi={(device, id) => workspace.toggleModule(id, device)} zoomSelected={zoomSelected} onToggleZoom={(device, id) => workspace.toggleModule(id, device)} onClearSearch={() => { setQuery(''); setFamily('all') }}> {!allMachines && currentDevice.id === 'octatrack' && !!catalog.filter((item,index,items)=>!MODULES.some(module=>module.id===item.module_id)&&items.findIndex(other=>other.module_id===item.module_id)===index).length &&

Community modules

{catalog.filter((item,index,items)=>!MODULES.some(module=>module.id===item.module_id)&&items.findIndex(other=>other.module_id===item.module_id)===index).sort((a,b)=>compareModules({id:a.module_id,name:a.title,authorName:a.author,addedAt:a.added_at??undefined,updatedAt:a.updated_at??undefined},{id:b.module_id,name:b.title,authorName:b.author,addedAt:b.added_at??undefined,updatedAt:b.updated_at??undefined},sort,statistics)).map(item=>)}
}
: digiDevice && digiMod ? toggleMachineModule(digiMod.id)} /> : zoomEffect ? toggleMachineModule(zoomEffect.id)} /> : digiDevice && machineView === 'configuration' ? machineActive && setReportingConfiguration({ machine: digiDevice.id, id: machineActive.id })} device={digiDevice} configuration={machineActive} configurations={machineConfigurations} onSelect={id => { workspace.selectConfiguration(id) }} onDialog={setConfigDialog} onToggle={toggleMachineModule} onImport={item => workspace.importConfiguration(item.name,item.moduleIds,false,item.moduleVersions,digiDevice.id,undefined,undefined,undefined,item.storageLock)} onStorageLock={workspace.saveStorageLock} /> : missingRoute?

{pausedModule ? 'Module temporarily unavailable' : 'Page not found'}

{pausedModule ? pausedModule.name + ' is temporarily unavailable.' : 'This module or page is not in the current catalog.'}

Open module library
:zoomHub? setZoomInstall(true)} {...isZoomSetDevice(zoomHub.device.id) ? { sets: configurationsFor(zoomHub.device.id), selectedId: activeFor(zoomHub.device.id)?.id, onSelect: (id: string) => { workspace.selectConfiguration(id); window.location.assign(zoomHubHref(zoomHub.device.id, 'set')) }, onNew: () => newConfiguration(zoomHub.device.id), onSetAction: setAction, onToggle: (effect: string) => workspace.toggleModule(effect, zoomHub.device.id) } : {}} />:hubRoute?hubPage:route==='module-sets'||route.startsWith('module-set/')?(octatrackUi ? {workspace.importConfiguration(name,ids);window.location.assign('#configuration')}}/> : {workspace.importConfiguration(name,ids);window.location.assign('#configuration')}}/>):forumRoute ? {const device=config.device??'octatrack';workspace.importConfiguration(config.name,config.moduleIds,config.keepStockFx2,config.moduleVersions,device,config.usbAudio);openEditedSet(device)}}/> : developerRoute ? : accountRoute ? betaInvitationRoute ? : : route === 'privacy' ? : ['impressum','community-rules','modding-guidelines','report-content'].includes(route) ? : route.startsWith('submit') ? : adminRoute ? : communityModule ? : detailModule ? swapModule(detailModule.id, removeIds)} usbAudio={active?.usbAudio} configurationName={active?.name} configurationId={active?.id} onConfigureUsbAudio={configureUsbAudio} onToggle={() => toggleModule(detailModule.id)} /> : null} diff --git a/src/community/module-changelogs.test.ts b/src/community/module-changelogs.test.ts index 45ee586f8a..1d9ae4a1cb 100644 --- a/src/community/module-changelogs.test.ts +++ b/src/community/module-changelogs.test.ts @@ -22,7 +22,7 @@ describe('module release notes', () => { it('covers every current catalog release across every instrument', () => { const notes = parseModuleChangelogs(data, COMMUNITY_MODULES) expect(Object.keys(notes).length).toBe(COMMUNITY_MODULES.length) - expect(new Set(COMMUNITY_MODULES.map(module => module.machine))).toEqual(new Set(['octatrack', 'digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'zoom-ms-70cdr'])) + expect(new Set(COMMUNITY_MODULES.map(module => module.machine))).toEqual(new Set(['octatrack', 'digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'digitone-ii', 'zoom-ms-70cdr'])) }) it('rejects an updated catalog version without matching written notes', () => { diff --git a/src/community/module-changelogs/digitone-ii-voice-spread.json b/src/community/module-changelogs/digitone-ii-voice-spread.json new file mode 100644 index 0000000000..d77b6459a6 --- /dev/null +++ b/src/community/module-changelogs/digitone-ii-voice-spread.json @@ -0,0 +1,12 @@ +[ + { + "version": "0.1.0-experimental", + "date": "2026-11-23", + "changes": [ + "First release for Digitone II OS 1.12.", + "VOICE SPREAD (SETTINGS > PERSONALIZE) spreads the voices of a chord across the stereo field.", + "FILTER SPREAD moves each voice's filter frequency a little apart.", + "Saved with the project; OFF restores the stock sound at once." + ] + } +] diff --git a/src/community/service.test.ts b/src/community/service.test.ts index 60e521fc68..37b2cf59cd 100644 --- a/src/community/service.test.ts +++ b/src/community/service.test.ts @@ -35,6 +35,7 @@ async function fixture(){ db.exec(readFileSync(new URL('../../migrations/0009_module_downloads.sql',import.meta.url),'utf8')) db.exec(readFileSync(new URL('../../migrations/0042_usage_breakdowns.sql',import.meta.url),'utf8')) db.exec(readFileSync(new URL('../../migrations/0083_usage_machine_coverage.sql',import.meta.url),'utf8')) + db.exec(readFileSync(new URL('../../migrations/0102_usage_digitone_ii.sql',import.meta.url),'utf8')) db.exec(readFileSync(new URL('../../migrations/0104_usage_model_cycles.sql',import.meta.url),'utf8')) db.exec(readFileSync(new URL('../../migrations/0051_support_and_hourly_usage.sql',import.meta.url),'utf8')) db.exec(readFileSync(new URL('../../migrations/0052_module_first_download.sql',import.meta.url),'utf8')) @@ -831,16 +832,16 @@ describe('usage breakdowns: failed builds, machines and weekly module trends',() const {call,db,admin}=await fixture(),failed={...usageEvent('build_failed'),device:'digitakt'} expect((await call('/usage/events','POST',failed)).status).toBe(200) expect((await call('/usage/events','POST',failed)).status).toBe(200) // A repeated event ID adds nothing, here either. - for(const [event,device] of [['build_succeeded','digitakt'],['build_succeeded','octatrack'],['firmware_download_requested','digitone']])expect((await call('/usage/events','POST',{...usageEvent(event),device})).status).toBe(200) + for(const [event,device] of [['build_succeeded','digitakt'],['build_succeeded','octatrack'],['firmware_download_requested','digitone'],['build_succeeded','digitone-ii']])expect((await call('/usage/events','POST',{...usageEvent(event),device})).status).toBe(200) expect((await call('/usage/events','POST',usageEvent('build_succeeded'))).status).toBe(200) // Older pages send no machine. // A machine only on builds and downloads, from the closed supported list. for(const body of [{...usageEvent(),device:'octatrack'},{...usageEvent('build_succeeded'),device:'syntakt'},{...usageEvent('build_succeeded'),device:1}])expect((await call('/usage/events','POST',body)).status).toBe(400) const today=new Date().toISOString().slice(0,10) - expect(db.prepare('SELECT builds,builds_failed,downloads FROM usage_daily WHERE day=?').get(today)).toEqual({builds:3,builds_failed:1,downloads:1}) + expect(db.prepare('SELECT builds,builds_failed,downloads FROM usage_daily WHERE day=?').get(today)).toEqual({builds:4,builds_failed:1,downloads:1}) const result=await (await call('/admin/statistics?days=7','GET',undefined,'',undefined,admin)).json() - expect(result.rows[0]).toMatchObject({builds:3,builds_failed:1,downloads:1}) + expect(result.rows[0]).toMatchObject({builds:4,builds_failed:1,downloads:1}) expect(result.breakdownsStarted).toMatch(/^\d{4}-\d{2}-\d{2}T/) - expect(result.devices).toEqual([{device:'octatrack',builds:1,builds_failed:0,downloads:0},{device:'digitakt',builds:1,builds_failed:1,downloads:0},{device:'digitone',builds:0,builds_failed:0,downloads:1},{device:'digitakt-ii',builds:0,builds_failed:0,downloads:0},{device:'analog-rytm-mkii',builds:0,builds_failed:0,downloads:0},{device:'model-cycles',builds:0,builds_failed:0,downloads:0}]) + expect(result.devices).toEqual([{device:'octatrack',builds:1,builds_failed:0,downloads:0},{device:'digitakt',builds:1,builds_failed:1,downloads:0},{device:'digitone',builds:0,builds_failed:0,downloads:1},{device:'digitakt-ii',builds:0,builds_failed:0,downloads:0},{device:'analog-rytm-mkii',builds:0,builds_failed:0,downloads:0},{device:'digitone-ii',builds:1,builds_failed:0,downloads:0},{device:'model-cycles',builds:0,builds_failed:0,downloads:0}]) expect(JSON.stringify(db.prepare('SELECT * FROM usage_device_daily').all())).not.toContain(failed.visitor) }) it('accepts a machine on identifier-free counts and keeps daily module counts for weekly trends',async()=>{ diff --git a/src/community/usage-contract.ts b/src/community/usage-contract.ts index 8d1c54972d..b394f5a238 100644 --- a/src/community/usage-contract.ts +++ b/src/community/usage-contract.ts @@ -6,7 +6,7 @@ export type UsageEvent = typeof USAGE_EVENTS[number] export const ANNOUNCEMENT_COUNTS = { announcement_shown: 'shown', announcement_opened: 'opened', announcement_dismissed: 'dismissed' } as const export type AnnouncementCountEvent = keyof typeof ANNOUNCEMENT_COUNTS /** Machines that build firmware here. Builds, failed builds and download requests may name one; nothing else does. */ -export const USAGE_DEVICES = ['octatrack', 'digitakt', 'digitone', 'digitakt-ii', 'analog-rytm-mkii', 'model-cycles'] as const +export const USAGE_DEVICES = ['octatrack', 'digitakt', 'digitone', 'digitakt-ii', 'analog-rytm-mkii', 'digitone-ii', 'model-cycles'] as const export type UsageDevice = typeof USAGE_DEVICES[number] export const DEVICE_EVENTS: readonly UsageEvent[] = ['build_succeeded', 'build_failed', 'firmware_download_requested'] export type DiscordInviteCounts = { discord_member_shown: number; discord_member_joins: number; discord_member_dismissals: number; discord_visitor_shown: number; discord_visitor_signups: number; discord_visitor_joins: number; discord_visitor_dismissals: number; discord_welcome_joins: number } diff --git a/src/community/usage-machine-migration.test.ts b/src/community/usage-machine-migration.test.ts index 89d38989bf..7ef6144d65 100644 --- a/src/community/usage-machine-migration.test.ts +++ b/src/community/usage-machine-migration.test.ts @@ -1,4 +1,4 @@ -import { readFileSync } from 'node:fs' +import { readdirSync, readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' import { testDatabase } from './test-server' import { USAGE_DEVICES } from './usage-contract' @@ -9,6 +9,7 @@ describe('machine attribution coverage', () => { expect([...USAGE_DEVICES].sort()).toEqual(['octatrack', ...Object.keys(DIGI_DOWNLOADS_ENABLED)].sort()) expect(DIGI_DOWNLOADS_ENABLED['digitakt-ii']).toBe(false) expect(DIGI_DOWNLOADS_ENABLED['analog-rytm-mkii']).toBe(true) + expect(DIGI_DOWNLOADS_ENABLED['digitone-ii']).toBe(false) }) it('preserves legacy rows while expanding the SQLite constraint', () => { const { db } = testDatabase() @@ -20,8 +21,25 @@ describe('machine attribution coverage', () => { db.exec(readFileSync(new URL('../../migrations/0083_usage_machine_coverage.sql', import.meta.url), 'utf8')) db.exec(readFileSync(new URL('../../migrations/0104_usage_model_cycles.sql', import.meta.url), 'utf8')) expect(db.prepare('SELECT * FROM usage_device_daily').all()).toEqual([{ day: '2026-10-01', device: 'octatrack', builds: 12, builds_failed: 2, downloads: 9 }]) - for (const device of USAGE_DEVICES) db.prepare("INSERT INTO usage_device_daily(day,device) VALUES('2026-10-02',?)").run(device) - expect(() => db.prepare("INSERT INTO usage_device_daily(day,device) VALUES('2026-10-02','unknown')").run()).toThrow() + for (const device of USAGE_DEVICES.filter(device => device !== 'digitone-ii')) db.prepare("INSERT INTO usage_device_daily(day,device) VALUES('2026-10-02',?)").run(device) + expect(() => db.prepare("INSERT INTO usage_device_daily(day,device) VALUES('2026-10-02','digitone-ii')").run()).toThrow() + db.prepare("UPDATE usage_device_daily SET builds=3,builds_failed=1,downloads=2 WHERE day='2026-10-02' AND device='analog-rytm-mkii'").run() + const before = db.prepare('SELECT * FROM usage_device_daily ORDER BY day,device').all() + db.exec(readFileSync(new URL('../../migrations/0102_usage_digitone_ii.sql', import.meta.url), 'utf8')) + expect(db.prepare('SELECT * FROM usage_device_daily ORDER BY day,device').all()).toEqual(before) + db.prepare("INSERT INTO usage_device_daily(day,device,builds) VALUES('2026-10-03','digitone-ii',1)").run() + expect(db.prepare("SELECT builds FROM usage_device_daily WHERE device='digitone-ii'").all()).toEqual([{ builds: 1 }]) + expect(() => db.prepare("INSERT INTO usage_device_daily(day,device) VALUES('2026-10-03','unknown')").run()).toThrow() } finally { db.close() } }) + it('keeps every machine in the latest rebuild of the table, whichever migration lands last', () => { + // Two branches each widened the closed list for their own machine (0102 Digitone II, 0104 Model:Cycles). Deploy applies + // the later number even after the earlier one, so the last rebuild must still list every machine the site counts. + const folder = new URL('../../migrations/', import.meta.url) + const checks = readdirSync(folder).filter(name => name.endsWith('.sql')).sort() + .map(name => /CREATE TABLE usage_device_daily\w* \([\s\S]*?CHECK\(device IN \(([^)]*)\)\)/.exec(readFileSync(new URL(name, folder), 'utf8'))?.[1]) + .filter((list): list is string => Boolean(list)) + const latest = checks.at(-1)!.split(',').map(value => value.trim().replace(/^'|'$/g, '')) + expect(latest).toEqual(expect.arrayContaining([...USAGE_DEVICES])) + }) }) diff --git a/src/components/DigiBuildPanel.tsx b/src/components/DigiBuildPanel.tsx index a198c3f25e..96c7939cd5 100644 --- a/src/components/DigiBuildPanel.tsx +++ b/src/components/DigiBuildPanel.tsx @@ -89,7 +89,7 @@ export function DigiBuildPanel({ device, firmware, moduleIds, storage, onExport, {result && downloadsEnabled && setRecoveryKnown(checked ? result.sha256 : '')}/>}
- {busy ? : result && downloadsEnabled ? : null} + {busy ? : result && downloadsEnabled ? : null} {!busy && (state.phase === 'ready' || state.phase === 'failed' || state.phase === 'built' ? : )} diff --git a/src/components/LibraryDiscovery.test.ts b/src/components/LibraryDiscovery.test.ts index e722850d5b..5628e9ec20 100644 --- a/src/components/LibraryDiscovery.test.ts +++ b/src/components/LibraryDiscovery.test.ts @@ -28,7 +28,7 @@ const buttonNamed = (name: string) => [...document.querySelectorAll('button')].f const noop = () => {} const library = { query: '', octatrackModules: AVAILABLE_MODULES, octatrackSelected: [], onToggleOctatrack: noop, - digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'model-cycles': [] }, onToggleDigi: noop, + digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'digitone-ii': [], 'model-cycles': [] }, onToggleDigi: noop, family: 'all', onFamilyChange: noop, sort: 'updated', onSortChange: noop, statistics: null, comparison: [], onCompare: noop, onOpenComparison: noop, viewedModuleVersions: {}, moduleBaseline: null, diff --git a/src/components/LibraryResultsBar.test.ts b/src/components/LibraryResultsBar.test.ts index 8fc2774cb6..ea913425d8 100644 --- a/src/components/LibraryResultsBar.test.ts +++ b/src/components/LibraryResultsBar.test.ts @@ -35,7 +35,7 @@ describe('phone library results bar', () => { it('replaces the desktop filter row on phones', () => { const props = { - query: '', octatrackModules: AVAILABLE_MODULES, octatrackSelected: [], onToggleOctatrack: noop, digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'model-cycles': [] }, onToggleDigi: noop, + query: '', octatrackModules: AVAILABLE_MODULES, octatrackSelected: [], onToggleOctatrack: noop, digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'digitone-ii': [], 'model-cycles': [] }, onToggleDigi: noop, family: 'all', onFamilyChange: noop, sort: 'updated', onSortChange: noop, statistics: null, comparison: [], onCompare: noop, onOpenComparison: noop, viewedModuleVersions: {}, moduleBaseline: null, device: DEVICES_BY_ID.octatrack, } diff --git a/src/components/UsbAudioConfigurator.test.ts b/src/components/UsbAudioConfigurator.test.ts index babb80bed0..592afbe56b 100644 --- a/src/components/UsbAudioConfigurator.test.ts +++ b/src/components/UsbAudioConfigurator.test.ts @@ -23,7 +23,7 @@ describe('USB Audio setup before adding', () => { it('offers configuration instead of quick-add from the library and comparison', () => { const action = publishedUsbAudioPackage ? 'Add USB Audio to configuration' : 'Configure USB Audio' expect(card()).toContain(`aria-label="${action}"`) - const comparison = render(createElement(ModuleComparison, { ids: [USB_AUDIO_MODULE], selected: [], digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'model-cycles': [] }, onToggle: noop, onToggleDigi: noop, onClose: noop })) + const comparison = render(createElement(ModuleComparison, { ids: [USB_AUDIO_MODULE], selected: [], digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'digitone-ii': [], 'model-cycles': [] }, onToggle: noop, onToggleDigi: noop, onClose: noop })) expect(comparison).toContain(publishedUsbAudioPackage ? '>Add USB Audio' : '>Configure USB Audio') }) it('offers the published install action and the controls for that release', () => { diff --git a/src/components/faq-content.tsx b/src/components/faq-content.tsx index 1298a9706d..65f251c870 100644 --- a/src/components/faq-content.tsx +++ b/src/components/faq-content.tsx @@ -550,12 +550,12 @@ function syxMachine(machine: 'digi' | 'rytm'): FaqSection[] { { id: 'digi-recovery', title: `How do I recover a ${rytm ? 'Analog Rytm MKII' : 'Digitakt or Digitone'} that will not boot?`, - keywords: 'digitakt ii digitone keys analog rytm mkii recovery restore stock startup midi din sysex transfer usb failed boot brick func trig 4', + keywords: 'digitakt ii digitone ii keys analog rytm mkii recovery restore stock startup midi din sysex transfer usb failed boot brick func trig 4', answer: <>

While an update is running, keep the power on. If it has finished and the machine doesn’t start, install Elektron’s original OS from the startup menu:

  1. Connect a MIDI interface to the machine’s DIN MIDI ports. USB can’t carry this update: the startup menu never appears over USB.
  2. -
  3. {rytm ? <>Hold FUNC while you switch the machine on and choose OS UPGRADE (TRIG 4). : <>Open the startup menu and choose its OS upgrade, as your model’s manual describes. On a Digitakt II: hold FUNC while you switch it on, then choose OS UPGRADE (TRIG 4).}
  4. +
  5. {rytm ? <>Hold FUNC while you switch the machine on and choose OS UPGRADE (TRIG 4). : <>Open the startup menu and choose its OS upgrade, as your model’s manual describes. On a Digitakt II or Digitone II: hold FUNC while you switch it on, then choose OS UPGRADE (TRIG 4).}
  6. In Elektron Transfer, open SYSEX TRANSFER, choose OS upgrade via device startup menu and send the original .syx.

Recovery is not guaranteed. If the startup menu doesn’t appear or the original OS won’t install, contact Elektron support.

diff --git a/src/components/recovery-faq.ts b/src/components/recovery-faq.ts index 0ca8faea89..03080c78bf 100644 --- a/src/components/recovery-faq.ts +++ b/src/components/recovery-faq.ts @@ -10,5 +10,6 @@ export const RECOVERY_FAQ: Record = { 'digitakt-ii': 'digi-recovery', digitone: 'digi-recovery', 'analog-rytm-mkii': 'digi-recovery', + 'digitone-ii': 'digi-recovery', 'model-cycles': 'cycles-recovery', } diff --git a/src/devices/MachinePages.tsx b/src/devices/MachinePages.tsx index a561e7aaec..6f2656004b 100644 --- a/src/devices/MachinePages.tsx +++ b/src/devices/MachinePages.tsx @@ -136,12 +136,14 @@ type AllMachinesLibraryProps = { // One mounted library keeps its machine picker, heading and controls in place while the collection changes. // On phones the machine picker sits in the category row and the results bar renders into resultsSlot, beneath it. type MachineLibraryProps = AllMachinesLibraryProps & { + /** Beta users also see the core build previews that are beta only (protocol.ts). */ + betaUi?: boolean; device?: DeviceProfile; children?: ReactNode; categoryNav?: ReactNode; onClearSearch?: () => void; onClearQuery?: () => void phone?: boolean; resultsSlot?: HTMLElement | null; octatrackCatalogue?: readonly FirmwareModule[] buildHref?: string; buildLabel?: string; buildText?: string } -export function MachineLibrary({ device, query, category, octatrackModules: octatrack, octatrackSelected, onToggleOctatrack, digiSelected, onToggleDigi, zoomSelected = {}, onToggleZoom, family, onFamilyChange, sort, onSortChange, statistics, octatrackBlocks, onSwapOctatrack, comparison, onCompare, onOpenComparison, viewedModuleVersions, moduleBaseline, machinePicker, categoryNav, children, onClearSearch, onClearQuery, onBrowse, phone = false, resultsSlot, octatrackCatalogue = AVAILABLE_MODULES, buildHref, buildLabel, buildText }: MachineLibraryProps) { +export function MachineLibrary({ device, query, category, octatrackModules: octatrack, octatrackSelected, onToggleOctatrack, digiSelected, onToggleDigi, zoomSelected = {}, onToggleZoom, family, onFamilyChange, sort, onSortChange, statistics, octatrackBlocks, onSwapOctatrack, comparison, onCompare, onOpenComparison, viewedModuleVersions, moduleBaseline, machinePicker, categoryNav, children, onClearSearch, onClearQuery, onBrowse, phone = false, resultsSlot, octatrackCatalogue = AVAILABLE_MODULES, buildHref, buildLabel, buildText, betaUi = false }: MachineLibraryProps) { const w = useSetWords() const heading = useRef(null) const term = query.toLowerCase().trim() @@ -218,7 +220,7 @@ export function MachineLibrary({ device, query, category, octatrackModules: octa {device &&

{device.id === 'octatrack' ? 'This catalog follows an experimental build. Review each module before preparing a ' + w.set + '.' : 'Built from each author’s pinned public release, with credit and licence.'}

} {device && device.id !== 'octatrack' && } {!device &&
No mods yetHelp open the next machine
{DEVICES.filter(machine => machine.status === 'research' || machine.status === 'open').map(machine => {machine.name}{machine.variants && {machine.variants.join(' · ')}})}
} - : device && } + : device && } {!phone && projectLink}
} @@ -301,10 +303,10 @@ function StackLadder({ device }: { device: DeviceProfile }) { } // Machines without mods: the library page becomes an invitation to open the first one. -export function EmptyMachine({ device, machinePicker, embedded = false }: { device: DeviceProfile; machinePicker?: ReactNode; embedded?: boolean }) { - const repository = issueRepository(), mobile = useMobileWorkspace() +export function EmptyMachine({ device, machinePicker, embedded = false, betaUi = false }: { device: DeviceProfile; machinePicker?: ReactNode; embedded?: boolean; betaUi?: boolean }) { + const repository = issueRepository(), mobile = useMobileWorkspace(), community = useCommunity() const page = FAMILY_PAGE[device.family], ready = readyForMods(device), steps = deviceSteps(device) - const preview = coreBuildPreviewOpen(device.id, hasBetaUi(useCommunity().session)) && !!device.sdk + const preview = coreBuildPreviewOpen(device.id, betaUi || hasBetaUi(community.session)) && !!device.sdk return (
{machinePicker &&
{machinePicker}
} diff --git a/src/devices/digi-mods.ts b/src/devices/digi-mods.ts index 2787eedce1..483212a01f 100644 --- a/src/devices/digi-mods.ts +++ b/src/devices/digi-mods.ts @@ -9,7 +9,7 @@ import type { ElemodPlatform, ModwerkModule } from '../catalog/module-contract-v import { displayName, type ModuleContributor } from '../catalog/module-authors' import { moduleReleasedAt } from '../catalog/module-releases' -export type DigiMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' +export type DigiMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' export type DigiMod = { id: string @@ -44,7 +44,7 @@ export type DigiMod = { // The Modwerk core is not built yet; until it is measured, the estimate reserves room for it. export const CORE_RESERVE_BYTES = 4096 const profile = (id: DigiMachine) => (MACHINES as MachineProfile[]).find(machine => machine.id === id)!.sdk! -export const DIGI_CORES: Record = Object.fromEntries((['digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'model-cycles'] as const).map(id => { +export const DIGI_CORES: Record = Object.fromEntries((['digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'digitone-ii', 'model-cycles'] as const).map(id => { const sdk = profile(id) return [id, { version: sdk.core?.version ?? '', ramBytes: sdk.budgets.find(budget => budget.name === 'Core image')?.value ?? CORE_RESERVE_BYTES, areaBytes: sdk.budgets.find(budget => budget.name === 'Shared mod memory')!.value, slots: sdk.budgets.filter(budget => budget.unit === 'slots').map(budget => budget.value + ' ' + budget.name.toLowerCase()).join(' · ') }] })) as Record diff --git a/src/devices/library-parity.test.ts b/src/devices/library-parity.test.ts index 4986269ca9..2d000e8a2f 100644 --- a/src/devices/library-parity.test.ts +++ b/src/devices/library-parity.test.ts @@ -18,13 +18,13 @@ const AllMachinesLibrary = MachineLibrary type DigiDevice = NonNullable[0]['device']> & { id: DigiMod['device'] } type DigiProps = { device: DigiDevice; selectedIds: string[]; onToggle: (id: string) => void } & Omit[0], 'device' | 'octatrackModules' | 'octatrackSelected' | 'onToggleOctatrack' | 'digiSelected' | 'onToggleDigi' | 'viewedModuleVersions' | 'moduleBaseline'> function DigiLibrary({ device, selectedIds, onToggle, ...rest }: DigiProps) { - return createElement(MachineLibrary, { ...rest, device, octatrackModules: [], octatrackSelected: [], onToggleOctatrack: noop, digiSelected: { digitakt: device.id === 'digitakt' ? selectedIds : [], 'digitakt-ii': device.id === 'digitakt-ii' ? selectedIds : [], digitone: device.id === 'digitone' ? selectedIds : [], 'analog-rytm-mkii': device.id === 'analog-rytm-mkii' ? selectedIds : [], 'model-cycles': device.id === 'model-cycles' ? selectedIds : [] }, onToggleDigi: (_: string, id: string) => onToggle(id), viewedModuleVersions: {}, moduleBaseline: null }) + return createElement(MachineLibrary, { ...rest, device, octatrackModules: [], octatrackSelected: [], onToggleOctatrack: noop, digiSelected: { digitakt: device.id === 'digitakt' ? selectedIds : [], 'digitakt-ii': device.id === 'digitakt-ii' ? selectedIds : [], digitone: device.id === 'digitone' ? selectedIds : [], 'analog-rytm-mkii': device.id === 'analog-rytm-mkii' ? selectedIds : [], 'digitone-ii': device.id === 'digitone-ii' ? selectedIds : [], 'model-cycles': device.id === 'model-cycles' ? selectedIds : [] }, onToggleDigi: (_: string, id: string) => onToggle(id), viewedModuleVersions: {}, moduleBaseline: null }) } // Likes and downloads show the number beside an icon; the word is there for screen readers only. const count = (value: string, word: string) => value + ' ' + word + '' const props = { query: '', octatrackModules: AVAILABLE_MODULES, octatrackSelected: ['miniverb'], - onToggleOctatrack: noop, digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'model-cycles': [] }, onToggleDigi: noop, + onToggleOctatrack: noop, digiSelected: { digitakt: [], 'digitakt-ii': [], digitone: [], 'analog-rytm-mkii': [], 'digitone-ii': [], 'model-cycles': [] }, onToggleDigi: noop, family: 'all', onFamilyChange: noop, sort: 'collection', onSortChange: noop, statistics: [{module_id: 'miniverb', average: 4.5, count: 2, likes: 7, downloads: 12, worksReports: 5, downloadsStarted: null}], comparison: ['miniverb'], onCompare: noop, onOpenComparison: noop, @@ -109,11 +109,12 @@ describe('All machines library parity', () => { expect(html).toContain(count('—', 'downloads')) expect(html).not.toContain(count('0', 'downloads')) expect(html).toContain('Popularity counts are currently unavailable.') - expect(html.match(/aria-label="Build firmware for/g)).toHaveLength(5) + expect(html.match(/aria-label="Build firmware for/g)).toHaveLength(6) expect(html).toContain('href="#digitakt/configuration"') expect(html).toContain('href="#digitakt-ii/configuration"') expect(html).toContain('href="#digitone/configuration"') expect(html).toContain('href="#analog-rytm-mkii/configuration"') + expect(html).toContain('href="#digitone-ii/configuration"') }) it('applies type and alphabetical sorting to the Digi groups', () => { @@ -249,7 +250,7 @@ describe('Digi library parity', () => { const other = renderToStaticMarkup(createElement(DigiLibrary, {...digiProps, comparison: ['digitone-digihealth']})) expect(other).not.toContain('type="checkbox" checked=""') } - const dialog = renderToStaticMarkup(createElement(ModuleComparison, {ids:['digitakt-digihealth','digitone-digihealth'], selected: [], digiSelected:{digitakt:['digihealth'],'digitakt-ii':[],digitone:[],'analog-rytm-mkii':[],'model-cycles':[]}, onToggle:noop,onToggleDigi:noop,onClose:noop})) + const dialog = renderToStaticMarkup(createElement(ModuleComparison, {ids:['digitakt-digihealth','digitone-digihealth'], selected: [], digiSelected:{digitakt:['digihealth'],'digitakt-ii':[],digitone:[],'analog-rytm-mkii':[],'digitone-ii':[],'model-cycles':[]}, onToggle:noop,onToggleDigi:noop,onClose:noop})) expect(dialog).toContain('href="/digitakt/module/digihealth/"') expect(dialog).toContain('href="/digitone/module/digihealth/"') expect(dialog).toContain('aria-pressed="true"') diff --git a/src/devices/machine-contract.test.ts b/src/devices/machine-contract.test.ts index a54d524b7f..687e23c8a3 100644 --- a/src/devices/machine-contract.test.ts +++ b/src/devices/machine-contract.test.ts @@ -14,7 +14,7 @@ describe('machine profiles', () => { it('validates every machine and matches the generated registry', () => { const parsed = profiles.map(parseMachineProfile).sort((a, b) => a.order - b.order) expect(parsed.map(profile => profile.id)).toEqual(GENERATED.map(profile => profile.id)) - expect(parsed.filter(profile => profile.sdk).map(profile => profile.id)).toEqual(['octatrack', 'digitakt', 'digitone', 'digitakt-ii', 'analog-rytm-mkii', 'analog-rytm-mki', 'analog-four-mkii', 'model-cycles', 'zoom-ms-70cdr']) + expect(parsed.filter(profile => profile.sdk).map(profile => profile.id)).toEqual(['octatrack', 'digitakt', 'digitone', 'digitakt-ii', 'digitone-ii', 'analog-rytm-mkii', 'analog-rytm-mki', 'analog-four-mkii', 'model-cycles', 'zoom-ms-70cdr']) }) it('keeps status, steps and SDK claims consistent', () => { diff --git a/src/devices/machines.generated.json b/src/devices/machines.generated.json index 1459d5ca98..ca9e2015d0 100644 --- a/src/devices/machines.generated.json +++ b/src/devices/machines.generated.json @@ -369,17 +369,17 @@ "order": 50, "name": "Digitone II", "family": "elektron", - "status": "research", - "summary": "Shares the Digitakt II platform and its sealed OS file. OS 1.12 rebuilds byte for byte, and modified builds boot on units: core-dn2 0.3's six UI events ran on a unit, and stock 1.12 restores it.", + "status": "preview", + "summary": "Experimental OS 1.12 support on the Modwerk Digitone II base (core 1.1). Voice Spread is the first module. Downloads stay disabled.", "steps": { "format": "done", "rebuild": "done", "boot": "done", - "core": "started", - "mods": "open" + "core": "done", + "mods": "done" }, "stack": { - "base": "open", + "base": "started", "link": "open", "flash": "open", "loader": "open", @@ -404,7 +404,7 @@ ] } ], - "flash": "Normal OS updates use Elektron Transfer with the owner's own stock OS file. Modwerk has no Digitone II build path yet and downloads stay disabled.", + "flash": "Normal OS updates use Elektron Transfer with the owner's own stock OS file. The page builds Modwerk's Digitone II base alone from that file (beta); downloads stay disabled until the owner turns them on.", "recovery": "Hold FUNC while powering on, choose TRIG 4 (OS UPGRADE), then send the owner's stock .syx over MIDI DIN; recovery mode does not use USB. Checked on toonst's unit with stock 1.12 (23 October 2026, elekloader's build guide); on a second unit only the normal Transfer update back to stock 1.12 was tried (18 November 2026)." }, "research": [ @@ -428,7 +428,38 @@ "url": "https://github.com/repeat98/modwerk/blob/main/docs/verification/2026-11-18-digitone-ii-core-on-a-unit.md", "note": "prodbysmolec's unit: stock 1.12 with core-dn2 0.3 and hello-marker, then hooks-check-dn2, built with toonst's elekloader at 3d7c2e3 and flashed with Transfer; boot, normal playback, all six UI events and the return to stock 1.12 observed." } - ] + ], + "sdk": { + "platform": "elemod", + "modules": "sdk/digitone-ii/modules", + "catalog": null, + "guide": "sdk/machines/digitone-ii/GOAL.md", + "core": { + "version": "1.1", + "path": "sdk/digitone-ii/core-profile" + }, + "toolchain": "m68k-elf GCC and binutils and the pinned Elekloader kit with the device Modwerk's builder carries; builds start from the owner's exact OS 1.12 .syx.", + "budgets": [ + { + "name": "Shared mod memory", + "unit": "bytes", + "value": 262144, + "note": "Digitone II DDR region 0x47F00000–0x47F40000, shared by the base and linked mods." + }, + { + "name": "Core image", + "unit": "bytes", + "value": 6776, + "note": "Pinned Modwerk base: 3,656 bytes .run plus 3,120 bytes .bss. The linker measures each selected set." + }, + { + "name": "Per-event subscriptions", + "unit": "slots", + "value": 4, + "note": "The Modwerk base allocates four hook entries per shared event collection." + } + ] + } }, { "schemaVersion": 1, diff --git a/src/engine/elekloader/carried-devices.ts b/src/engine/elekloader/carried-devices.ts index c33bc2a0a7..61848afeca 100644 --- a/src/engine/elekloader/carried-devices.ts +++ b/src/engine/elekloader/carried-devices.ts @@ -31,6 +31,14 @@ export function carriedDevice(facts: Facts): Device { export const CARRIED_DEVICES: readonly Device[] = [carriedDevice(DN2_DEVICE.device)] +/** device key -> the most an OS upgrade may hold once decoded (device.json's update_max), where it is known. The + * pinned kit's Device has no such field, so Modwerk keeps it beside the device (fit-update.ts). */ +export const UPDATE_LIMITS: Readonly> = Object.fromEntries( + [DN2_DEVICE.device].filter(facts => 'update_max' in facts).map(facts => [facts.key, num((facts as { update_max: Num }).update_max)])) +/** The same limits by the device's name, as a build result names its device ("Digitone II"). */ +export const UPDATE_LIMITS_BY_NAME: Readonly> = Object.fromEntries( + [DN2_DEVICE.device].filter(facts => 'update_max' in facts).map(facts => [facts.name, num((facts as { update_max: Num }).update_max)])) + /** Add every carried device the kit does not know to its device list. Idempotent; a kit that ships one keeps its own. */ export function carryDevices(): void { const known = devices() diff --git a/src/engine/elekloader/digi-build.test.ts b/src/engine/elekloader/digi-build.test.ts index 7627d9b87c..393f4fffc5 100644 --- a/src/engine/elekloader/digi-build.test.ts +++ b/src/engine/elekloader/digi-build.test.ts @@ -3,10 +3,11 @@ import { DIGI_MODS } from '../../devices/digi-mods' import MACHINES from '../../devices/machines.generated.json' import { BUILDER_CATALOG, BUILDER_SOURCE, buildLogText, buildStep, builderReleases, planBuild, prepareBuild, type Builder } from './digi-build' import type { Catalog } from '../../../vendor/elekloader/kit/src/kit/catalog' -import { DIGI_DOWNLOADS_ENABLED, digiDownloadsEnabled, isCoreBuildPreview } from './protocol' +import { DIGI_DOWNLOADS_ENABLED, coreBuildPreviewOpen, digiDownloadsEnabled, isCoreBuildPreview } from './protocol' import { baseVariant, rytmVariant } from './machine-build' import DT2_BASE from '../../../sdk/machines/digitakt-ii/base-binding.json' import RYTM_BASE from '../../../sdk/machines/analog-rytm-mkii/base-binding.json' +import DN2_BASE from '../../../sdk/machines/digitone-ii/base-binding.json' import CYCLES_BASE from '../../../sdk/machines/model-cycles/base-binding.json' const PLAIN = 'modwerk-base-analog-rytm-mkii-' + RYTM_BASE.variants.plain.slice(0, 8) + '.elemod' @@ -383,8 +384,9 @@ describe('the vendored elekloader catalog', () => { }) }) it('keeps download approval specific to each device', () => { - expect(DIGI_DOWNLOADS_ENABLED).toEqual({ digitakt: true, 'digitakt-ii': false, digitone: true, 'analog-rytm-mkii': true, 'model-cycles': false }) + expect(DIGI_DOWNLOADS_ENABLED).toEqual({ digitakt: true, 'digitakt-ii': false, digitone: true, 'analog-rytm-mkii': true, 'digitone-ii': false, 'model-cycles': false }) expect(digiDownloadsEnabled('digitakt-ii')).toBe(false) + expect(digiDownloadsEnabled('digitone-ii')).toBe(false) expect(digiDownloadsEnabled('analog-rytm-mkii')).toBe(true) expect(digiDownloadsEnabled('unknown-device')).toBe(false) expect(digiDownloadsEnabled('constructor')).toBe(false) @@ -473,3 +475,11 @@ describe('the build log', () => { expect(text.trimEnd().split('\n').at(-1)).toBe(' 0.01 s mod core 2.1 39 sites (file sha256 f38b0c193677a060)') }) }) + +describe('the Digitone II core build preview', () => { + it('is offered to beta users only, and builds on the base that ran on a unit', () => { + expect(coreBuildPreviewOpen('digitone-ii', false)).toBe(false) + expect(coreBuildPreviewOpen('digitone-ii', true)).toBe(true) + expect(planBuild('digitone-ii', '1.12', [])).toMatchObject({ core: { sha256: DN2_BASE.identity } }) + }) +}) diff --git a/src/engine/elekloader/digi-build.ts b/src/engine/elekloader/digi-build.ts index 698354d2fe..a302eb22f1 100644 --- a/src/engine/elekloader/digi-build.ts +++ b/src/engine/elekloader/digi-build.ts @@ -3,5 +3,5 @@ import { MACHINE_DEVICE } from './machine-build.ts' export { BUILDER_CATALOG, BUILDER_SOURCE, buildStep, buildLogText, builderReleases, planBuild, prepareBuild, createMachineBuilder as createDigiBuilder, type Builder, type PreparedBuild } from './machine-build.ts' -// The updater still imports only approved Digitakt/Digitone releases (and the Digitakt II and Analog Rytm MKII previews, and the Model:Cycles base's core) until Octatrack ports qualify. -export const DEVICE = { digitakt: MACHINE_DEVICE.digitakt, 'digitakt-ii': MACHINE_DEVICE['digitakt-ii'], digitone: MACHINE_DEVICE.digitone, 'analog-rytm-mkii': MACHINE_DEVICE['analog-rytm-mkii'], 'model-cycles': MACHINE_DEVICE['model-cycles'] } +// The updater still imports only approved Digitakt/Digitone releases (and the Digitakt II, Analog Rytm MKII and Digitone II previews, and the Model:Cycles base's core) until Octatrack ports qualify. +export const DEVICE = { digitakt: MACHINE_DEVICE.digitakt, 'digitakt-ii': MACHINE_DEVICE['digitakt-ii'], digitone: MACHINE_DEVICE.digitone, 'analog-rytm-mkii': MACHINE_DEVICE['analog-rytm-mkii'], 'digitone-ii': MACHINE_DEVICE['digitone-ii'], 'model-cycles': MACHINE_DEVICE['model-cycles'] } diff --git a/src/engine/elekloader/engine.test.ts b/src/engine/elekloader/engine.test.ts index edbd9b0985..8a9c017ad9 100644 --- a/src/engine/elekloader/engine.test.ts +++ b/src/engine/elekloader/engine.test.ts @@ -3,6 +3,10 @@ import { describe, expect, it } from 'vitest' import CATALOG from '../../../vendor/elekloader/catalog/catalog.json' import { createService } from '../../../vendor/elekloader/kit/src/kit/serve.ts' import type { Ready } from '../../../vendor/elekloader/kit/src/kit/protocol.ts' +import { carryDevices } from './carried-devices' + +// The site's worker registers the devices Modwerk's builder carries before it serves (kit-worker.ts); so does this. +carryDevices() // The kit's worker logic with the vendored catalog, its cores and mods served as Modwerk serves them under // elekloader/. No firmware: the stock-file side is covered by the recorded parity runs (docs/VERIFICATION.md). diff --git a/src/engine/elekloader/fit-update.test.ts b/src/engine/elekloader/fit-update.test.ts new file mode 100644 index 0000000000..7605db4b59 --- /dev/null +++ b/src/engine/elekloader/fit-update.test.ts @@ -0,0 +1,25 @@ +import { describe, expect, it } from 'vitest' +import DN2 from '../../../sdk/machines/digitone-ii/elekloader/device.json' with { type: 'json' } +import { DIGITAKT_MK2 } from '../../../vendor/elekloader/kit/src/devices.ts' +import { CARRIED_DEVICES } from './carried-devices' +import { fitBuilt, updateLimit } from './fit-update' + +describe('update limits', () => { + it('give the Digitone II the 2 MiB its unit takes, and no other device a limit Modwerk has not seen', () => { + expect(DN2.device.update_max).toBe('0x200000') + expect(updateLimit(CARRIED_DEVICES.find(d => d.key === 'digitone-mk2')!)).toBe(0x200000) + expect(updateLimit(DIGITAKT_MK2)).toBeNull() + }) + it('leaves a build for a device with no known limit exactly as the kit returned it', async () => { + const result = { device: 'digitakt-mk2', files: [{ name: 'a.syx', path: 'a.syx', bytes: 1, sha256: 'x', data: new ArrayBuffer(1) }], sha256: 'x', bytes: 1 } + expect(await fitBuilt(result, new Uint8Array(0))).toBe(result) + }) + it('fits a Digitone II build as the kit names it, by its device name', async () => { + // The kit's result says "Digitone II", not digitone-mk2: a build by that name is fitted (here it fails on the empty + // stock file, which shows it was not passed through), and the Digitakt II's by its name is left as it is. + const file = { name: 'a.syx', path: 'a.syx', bytes: 1, sha256: 'x', data: new ArrayBuffer(1) } + await expect(fitBuilt({ device: 'Digitone II', files: [file], sha256: 'x', bytes: 1 }, new Uint8Array(0))).rejects.toThrow() + const other = { device: 'Digitakt II', files: [file], sha256: 'x', bytes: 1 } + expect(await fitBuilt(other, new Uint8Array(0))).toBe(other) + }) +}) diff --git a/src/engine/elekloader/fit-update.ts b/src/engine/elekloader/fit-update.ts new file mode 100644 index 0000000000..f19fa4b819 --- /dev/null +++ b/src/engine/elekloader/fit-update.ts @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +// Fit a built OS upgrade to the unit's limit. Some units refuse an upgrade past a size of their own (the Digitone II +// at about 2 MiB decoded: docs/verification/2026-11-19-digitone-ii-base-on-a-unit.md), and the kit's greedy packer +// leaves its main OS larger than Elektron's. Past the limit, the main OS is packed again with the optimal parse +// (packOptimal), written and sealed by the kit's own writer and checked by its verifier, so only the stored bytes of the +// main section change; an upgrade that still does not fit is refused here, before anything is sent. +import { load, mainImage, parse, verify, write, type Parsed } from '../../../vendor/elekloader/kit/src/formats.ts' +import type { Device } from '../../../vendor/elekloader/kit/src/devices.ts' +import { sha } from '../../../vendor/elekloader/kit/src/bytes.ts' +import { packSectionOptimal } from '../elektron/codec/pack.ts' +import { UPDATE_LIMITS, UPDATE_LIMITS_BY_NAME } from './carried-devices' + +export type Fitted = { syx: Uint8Array; decoded: number; limit: number | null; repacked: boolean } + +/** The bytes an upgrade holds once decoded: the 8-byte preamble and its container. */ +export const decodedSize = (file: Parsed): number => 8 + (file as { total: number }).total + +/** The most an upgrade for this device may hold once decoded, or null where no limit is known. */ +export const updateLimit = (device: Device): number | null => UPDATE_LIMITS[device.key] ?? null + +/** `built` (an ELE3 .syx the kit wrote from `stockRaw`) as it may be sent to the unit. */ +export async function fitUpdate(built: Uint8Array, stockRaw: Uint8Array): Promise { + const [stock, device] = await load(stockRaw) + if (device.container !== 'ele3') return { syx: built, decoded: built.length, limit: null, repacked: false } + const file = parse(built, device), limit = updateLimit(device) + if (limit === null || decodedSize(file) <= limit) return { syx: built, decoded: decodedSize(file), limit, repacked: false } + const image = mainImage(file, device), version = (file as { version: string }).version + const stored = packSectionOptimal(image) + const padded = stored.length % 4 ? Uint8Array.from([...stored, ...new Uint8Array(4 - stored.length % 4)]) : stored + const outputs = write(stock, padded, device, version) + verify(outputs, stock, image, device, version) + const decoded = decodedSize(parse(outputs.syx, device)) + if (decoded > limit) { + throw new Error(`This build holds ${decoded} bytes once decoded, and the ${device.name} takes at most ${limit}: leave a module out.`) + } + return { syx: outputs.syx, decoded, limit, repacked: true } +} + +type Output = { name: string; path: string; bytes: number; sha256: string; data: ArrayBuffer } +type BuiltFiles = { device: string; files: Output[]; sha256: string; bytes: number } + +/** A site build's result with every .syx fitted to its device's limit (fitUpdate); a device with no known limit keeps + * the result as it is, so other machines' builds do not change. The top-level sha256 and bytes follow the .syx. */ +export async function fitBuilt(result: T, stockRaw: Uint8Array): Promise { + // The kit's result names its device ("Digitone II"), not its key. + if (!(result.device in UPDATE_LIMITS_BY_NAME) && !(result.device in UPDATE_LIMITS)) return result + const files: Output[] = [] + let top = { sha256: result.sha256, bytes: result.bytes } + for (const file of result.files) { + if (!file.name.toLowerCase().endsWith('.syx')) { files.push(file); continue } + const fitted = await fitUpdate(new Uint8Array(file.data), stockRaw) + if (!fitted.repacked) { files.push(file); continue } + const data = fitted.syx.slice().buffer, sha256 = sha(fitted.syx) + if (file.sha256 === result.sha256) top = { sha256, bytes: fitted.syx.length } + files.push({ ...file, data, sha256, bytes: fitted.syx.length }) + } + return { ...result, files, ...top } +} + diff --git a/src/engine/elekloader/machine-build.test.ts b/src/engine/elekloader/machine-build.test.ts index 7a53de1ae8..5bab5ba412 100644 --- a/src/engine/elekloader/machine-build.test.ts +++ b/src/engine/elekloader/machine-build.test.ts @@ -17,7 +17,7 @@ const localClient = () => { describe('one Elekloader builder for machine extensions', () => { it('uses the same device keys and fails closed until an Octatrack core is in the catalogue', async () => { - expect(MACHINE_DEVICE).toEqual({ octatrack: 'octatrack', digitakt: 'digitakt-mk1', 'digitakt-ii': 'digitakt-mk2', digitone: 'digitone-mk1', 'analog-rytm-mkii': 'analog-rytm-mk2', 'model-cycles': 'model-cycles' }) + expect(MACHINE_DEVICE).toEqual({ octatrack: 'octatrack', digitakt: 'digitakt-mk1', 'digitakt-ii': 'digitakt-mk2', digitone: 'digitone-mk1', 'analog-rytm-mkii': 'analog-rytm-mk2', 'digitone-ii': 'digitone-mk2', 'model-cycles': 'model-cycles' }) expect(planBuild('octatrack', '1.40C', ['repitch'])).toMatchObject({ core: undefined, missing: ['repitch'] }) const fake = client() await expect(prepareBuild(fake as unknown as Builder, { machine: 'octatrack', release: '1.40C', stock, moduleIds: [] })).resolves.toEqual({ ok: false, error: 'The catalog has no core for octatrack OS 1.40C.' }) diff --git a/src/engine/elekloader/machine-build.ts b/src/engine/elekloader/machine-build.ts index c1a7e6077d..7414129b72 100644 --- a/src/engine/elekloader/machine-build.ts +++ b/src/engine/elekloader/machine-build.ts @@ -4,6 +4,7 @@ import CATALOG_JSON from '../../../vendor/elekloader/catalog/catalog.json' with { type: 'json' } import KIT from '../../../vendor/elekloader/kit/kit.json' with { type: 'json' } import DT2_BASE from '../../../sdk/machines/digitakt-ii/base-binding.json' with { type: 'json' } +import DN2_BASE from '../../../sdk/machines/digitone-ii/base-binding.json' with { type: 'json' } import RYTM_BASE from '../../../sdk/machines/analog-rytm-mkii/base-binding.json' with { type: 'json' } import CYCLES_BASE from '../../../sdk/machines/model-cycles/base-binding.json' with { type: 'json' } import RYTM_FX_IDS from '../../../sdk/machines/analog-rytm-mkii/fx-ids.json' with { type: 'json' } @@ -19,7 +20,7 @@ import { carryDevices } from './carried-devices' export { buildStep } from '../../../vendor/elekloader/kit/src/kit/index.ts' export type { Builder } -export const MACHINE_DEVICE = { octatrack: 'octatrack', digitakt: 'digitakt-mk1', 'digitakt-ii': 'digitakt-mk2', digitone: 'digitone-mk1', 'analog-rytm-mkii': 'analog-rytm-mk2', 'model-cycles': 'model-cycles' } as const +export const MACHINE_DEVICE = { octatrack: 'octatrack', digitakt: 'digitakt-mk1', 'digitakt-ii': 'digitakt-mk2', digitone: 'digitone-mk1', 'analog-rytm-mkii': 'analog-rytm-mk2', 'digitone-ii': 'digitone-mk2', 'model-cycles': 'model-cycles' } as const export type ElekloaderMachine = keyof typeof MACHINE_DEVICE carryDevices() export const BUILDER_CATALOG: Catalog = parseCatalog(CATALOG_JSON) @@ -39,6 +40,11 @@ const MODWERK_BASES: Partial 'base', }, + // The Digitakt II base's source with the Digitone II's recipe (sdk/machines/digitone-ii/elekloader/): one variant. + 'digitone-ii': { + variants: DN2_BASE.variants, + variant: () => 'plain', + }, 'analog-rytm-mkii': { variants: RYTM_BASE.variants, variant: moduleIds => rytmVariant(moduleIds, Object.values(RYTM_FX_IDS.ids), RYTM_VOICE_MODULES.ids), diff --git a/src/engine/elekloader/protocol.ts b/src/engine/elekloader/protocol.ts index f006702215..cf13d3dbaa 100644 --- a/src/engine/elekloader/protocol.ts +++ b/src/engine/elekloader/protocol.ts @@ -5,7 +5,7 @@ export type { Device as BuilderDevice, Stock as BuilderStock, Mod as BuilderMod, Added as BuilderAdded, Check as BuilderCheck, VersionField as BuilderVersion, Output as BuilderFile, Log as BuilderLog, BuildResult as BuilderResult, } from '../../../vendor/elekloader/kit/src/kit/protocol.ts' -export type BuilderMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' +export type BuilderMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' // Digitakt/Digitone mk1 downloads retain their owner-approved parity gate; Analog Rytm MKII (OS 1.74) downloads are owner-approved too. // Digitakt II (OS 1.17) builds locally with its library modules, but downloads remain disabled pending qualification/review. @@ -15,6 +15,8 @@ export const DIGI_DOWNLOADS_ENABLED: Readonly> = 'digitakt-ii': false, digitone: true, 'analog-rytm-mkii': true, + // The Digitone II's base builds on the page (beta) before any module exists; downloads wait for the owner (board, 19 November 2026). + 'digitone-ii': false, 'model-cycles': false, } @@ -26,6 +28,7 @@ export function digiDownloadsEnabled(machine: string): boolean { // by machine; download availability remains governed independently above. The preview, its configuration route // and its button are beta-only until the owner releases the machine (MACHINE_RECIPE.md, Beta first): ask // coreBuildPreviewOpen with the session's hasBetaUi. -export const CORE_BUILD_PREVIEWS: readonly BuilderMachine[] = ['model-cycles'] +// The Digitone II's base alone, with no module yet (owner, board, 19 November 2026), and the Model:Cycles base. +export const CORE_BUILD_PREVIEWS: readonly BuilderMachine[] = ['digitone-ii', 'model-cycles'] export function isCoreBuildPreview(machine: string): boolean { return (CORE_BUILD_PREVIEWS as readonly string[]).includes(machine) } export function coreBuildPreviewOpen(machine: string, betaUi: boolean): boolean { return betaUi && isCoreBuildPreview(machine) } diff --git a/src/engine/elektron/codec/pack-optimal.test.ts b/src/engine/elektron/codec/pack-optimal.test.ts new file mode 100644 index 0000000000..bdfbec126c --- /dev/null +++ b/src/engine/elektron/codec/pack-optimal.test.ts @@ -0,0 +1,42 @@ +import { describe, expect, it } from 'vitest' +import { depack, depackSection } from './depack.ts' +import { pack, packOptimal, packSectionOptimal } from './pack.ts' + +// The optimal parse is several times slower than greedy: on a loaded runner these take seconds, past vitest's 5 s. +const SLOW = 60_000 + +// Synthetic inputs only: a seeded random stream, runs, a repeated record and text-like data with shifted repeats. +function input(kind: string, n: number, seed: number): Uint8Array { + const out = new Uint8Array(n) + let x = seed * 2654435761 >>> 0 || 1 + const next = () => (x = Math.imul(x ^ x >>> 15, 0x2c1b3c6d) + 0x9e3779b9 >>> 0) + for (let i = 0; i < n; i++) { + if (kind === 'random') out[i] = next() & 0xff + else if (kind === 'runs') out[i] = (i >> 5) & 3 ? 0 : next() & 0xff + else if (kind === 'records') out[i] = i % 48 < 6 ? (i / 48 | 0) & 0xff : (i % 48) * 7 & 0xff + else out[i] = next() % 5 ? 'abcdefgh'.charCodeAt((i + (i >> 9)) % 8) : next() & 0xff + } + return out +} + +describe('the optimal packer', () => { + it('depacks to its input, with the end marker where the greedy packer puts it', () => { + for (const kind of ['random', 'runs', 'records', 'text']) + for (const n of [0, 1, 2, 3, 4, 7, 100, 4096, 70000]) { + const data = input(kind, n, n + 1), stream = packOptimal(data) + const [out, end] = depack(stream, 0, stream.length) + expect(out, kind + '/' + n).toEqual(data) + expect(end, kind + '/' + n).toBe(stream.length) + expect(depackSection(packSectionOptimal(data)), kind + '/' + n).toEqual(data) + } + }, SLOW) + + it('is never larger than the greedy packer on compressible data, and smaller where offsets repeat', () => { + for (const kind of ['runs', 'records', 'text']) { + const data = input(kind, 60000, 7) + expect(packOptimal(data).length, kind).toBeLessThanOrEqual(pack(data).length) + } + const records = input('records', 60000, 7) + expect(packOptimal(records).length).toBeLessThan(pack(records).length * 0.95) + }, SLOW) +}) diff --git a/src/engine/elektron/codec/pack.ts b/src/engine/elektron/codec/pack.ts index d77ab3178f..1cbf718ddc 100644 --- a/src/engine/elektron/codec/pack.ts +++ b/src/engine/elektron/codec/pack.ts @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // Modwerk's packer for Elektron firmware sections: a greedy LZ77 match finder writing the -// aPLib-style bit stream that depack.ts depacks. +// aPLib-style bit stream that depack.ts depacks, and an optimal parse of the same format for updates that must fit a +// unit's limit (packOptimal). -const MIN = 3, FAR = 3328, MAXOFF = 65536, MAXCOUNT = 2048, WINDOW = 24, EARLY = 64 +const MIN = 3, FAR = 3328, MAXOFF = 65536, MAXCOUNT = 2048, WINDOW = 24, EARLY = 64, OPTIMAL_WINDOW = 64 // Control bits go into tag bytes, most significant first; a tag byte is placed in the stream when its // first bit is written, so payload bytes written in between land before the next tag byte. @@ -35,6 +36,14 @@ class Writer { if (length <= 3) { this.bit(length >> 1); this.bit(length & 1) } else { this.bit(0); this.bit(0); this.gamma(length - 2) } } + // The offset-reuse code: gamma 2 and no offset byte; the depacker copies from the last match's offset. + reuse(off: number, count: number) { + const length = count - (off > FAR ? 2 : 1) + this.bit(0) + this.gamma(2) + if (length <= 3) { this.bit(length >> 1); this.bit(length & 1) } else { this.bit(0); this.bit(0); this.gamma(length - 2) } + } + // gamma(2^24 + 2) with 0xff makes the depacker's raw offset wrap to exactly 767. end() { this.bit(0); this.gamma(0x1000002, 0xff) } } @@ -89,8 +98,11 @@ export function pack(data: Uint8Array, compress = true): Uint8Array { return w.out.slice(0, w.n) } -export function packSection(data: Uint8Array, compress = true): Uint8Array { - const stream = pack(data, compress), out = new Uint8Array(8 + stream.length), view = new DataView(out.buffer) +export function packSection(data: Uint8Array, compress = true): Uint8Array { return frame(pack(data, compress)) } + +// A stream behind its 8-byte header: its length and its byte sum. +function frame(stream: Uint8Array): Uint8Array { + const out = new Uint8Array(8 + stream.length), view = new DataView(out.buffer) let sum = 0 for (const b of stream) sum += b view.setUint32(0, stream.length) @@ -98,3 +110,76 @@ export function packSection(data: Uint8Array, compress = true): Uint8Array { out.set(stream, 8) return out } + +// ---- the optimal parse: the smallest stream this bit format allows for the matches the chains find ---- +// Every position is reached by its cheapest path in bits: a literal, a match at a new offset, or the offset-reuse code +// (gamma 2: the previous match's offset, no offset byte), which Elektron's own packer uses and the boot code depacks. +// Each position keeps the offset its path last used, so a reuse is priced against that path only. Slower than greedy, +// so it is used where an update must fit a unit's limit (fitUpdate); pack() stays the kit's greedy packer. +const gammaBits = (v: number) => 2 * (31 - Math.clz32(v)) +const lengthBits = (count: number, off: number) => { const length = count - (off > FAR ? 2 : 1); return length <= 3 ? 2 : 2 + gammaBits(length - 2) } +const shortest = (off: number) => (off > FAR ? 3 : 2) +const LITERAL = 0, REUSED = 1, MATCH = 2 + +function optimal(d: Uint8Array, w: Writer) { + const n = d.length + const cost = new Float64Array(n + 1).fill(Infinity), from = new Int32Array(n + 1), kind = new Uint8Array(n + 1) + const offset = new Int32Array(n + 1), last = new Int32Array(n + 1) + cost[0] = 0; last[0] = 1 + const reach = (to: number, c: number, at: number, k: number, off: number, lastOff: number) => { + if (c < cost[to]) { cost[to] = c; from[to] = at; kind[to] = k; offset[to] = off; last[to] = lastOff } + } + const bits = Math.max(4, 33 - Math.clz32(n)), mask = (1 << bits) - 1, shift = 32 - bits + const keys = new Int32Array(mask + 1).fill(-1), heads = new Int32Array(mask + 1), prev = new Int32Array(n) + const key = (p: number) => d[p] << 16 | d[p + 1] << 8 | d[p + 2] + const slot = (k: number) => { + let s = Math.imul(k, 0x9e3779b1) >>> shift + while (keys[s] !== k && keys[s] !== -1) s = s + 1 & mask + return s + } + for (let i = 0; i < n; i++) { + const here = cost[i], limit = Math.min(MAXCOUNT, n - i) + reach(i + 1, here + 9, i, LITERAL, 0, last[i]) + const r = last[i] + if (r <= i) { + let len = 0 + while (len < limit && d[i + len] === d[i + len - r]) len++ + for (let c = shortest(r); c <= len; c++) reach(i + c, here + 3 + lengthBits(c, r), i, REUSED, r, r) + } + if (i + 3 > n) continue + const s = slot(key(i)) + let best = 1 + for (let j = keys[s] === -1 ? -1 : heads[s], seen = 0; j >= 0 && seen < OPTIMAL_WINDOW; j = prev[j], seen++) { + const off = i - j + if (off > MAXOFF) break + if (best >= limit || d[j + best] !== d[i + best]) continue + let len = 0 + while (len < limit && d[j + len] === d[i + len]) len++ + if (len <= best) continue + const offBits = 9 + gammaBits(off + 767 >> 8) + for (let c = Math.max(best + 1, shortest(off)); c <= len; c++) reach(i + c, here + offBits + lengthBits(c, off), i, MATCH, off, off) + best = len + } + if (keys[s] === -1) { keys[s] = key(i); prev[i] = -1 } else prev[i] = heads[s] + heads[s] = i + } + const path: number[] = [] + for (let at = n; at > 0; at = from[at]) path.push(at) + for (let k = path.length - 1, at = 0; k >= 0; at = path[k--]) { + const to = path[k] + if (kind[to] === LITERAL) w.literal(d[at]) + else if (kind[to] === MATCH) w.match(offset[to], to - at) + else w.reuse(offset[to], to - at) + } +} + +/** pack() with the optimal parse: the same bit format and end marker, a smaller stream. */ +export function packOptimal(data: Uint8Array): Uint8Array { + const w = new Writer(data.length + 1 + (data.length + 56 >> 3)) + optimal(data, w) + w.end() + return w.out.slice(0, w.n) +} + +/** packSection() with the optimal parse. */ +export function packSectionOptimal(data: Uint8Array): Uint8Array { return frame(packOptimal(data)) } diff --git a/src/engine/elektron/ele3.ts b/src/engine/elektron/ele3.ts index 8e57e431e8..86a6a74e81 100644 --- a/src/engine/elektron/ele3.ts +++ b/src/engine/elektron/ele3.ts @@ -9,9 +9,9 @@ import { CHUNK_SIZE, FIRST_COUNTER, contentChecksum, decodeDataMessages, encodeS const COUNT_OFFSET = 0x1c, TABLE_OFFSET = 0x20, ENTRY_SIZE = 16, VERSION_FIELD = [0x14, 0x18] as const const OFFSET_BIAS = 767, FAR_OFFSET = 3328 -export type DigiMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' +export type DigiMachine = 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' // Machines with a container and linker profile; the app's firmware flow covers DigiMachine only. -export type ElemodMachine = DigiMachine | 'syntakt' | 'analog-four-mkii' | 'digitone-ii' +export type ElemodMachine = DigiMachine | 'syntakt' | 'analog-four-mkii' export type Ele3Device = { mainSection: number; mainLoad: number; stage: number; flashAt: number; flashLimit: number; sysexId: number; seal?: 'hmac' } // Facts about each machine's container and loader, from public research (elekloader device profiles). diff --git a/src/engine/elektron/firmware.worker.ts b/src/engine/elektron/firmware.worker.ts index 21d15bdf55..d9d46fa710 100644 --- a/src/engine/elektron/firmware.worker.ts +++ b/src/engine/elektron/firmware.worker.ts @@ -4,7 +4,7 @@ import { inspectDigiFirmware, type DigiMachine } from './firmware' self.onmessage = async (event: MessageEvent<{ id: number; machine: DigiMachine; name: string; buffer: ArrayBuffer }>) => { const { id, machine, name, buffer } = event.data try { - if (!['digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'model-cycles'].includes(machine) || !(buffer instanceof ArrayBuffer)) throw new Error('Invalid local firmware request.') + if (!['digitakt', 'digitakt-ii', 'digitone', 'analog-rytm-mkii', 'digitone-ii', 'model-cycles'].includes(machine) || !(buffer instanceof ArrayBuffer)) throw new Error('Invalid local firmware request.') const inspection = await inspectDigiFirmware(machine, new Uint8Array(buffer), name) self.postMessage({ id, type: 'inspection', inspection }) } catch (error) { diff --git a/src/engine/elektron/odd-jumps.test.ts b/src/engine/elektron/odd-jumps.test.ts index fb22c8fdfa..cd45ee6403 100644 --- a/src/engine/elektron/odd-jumps.test.ts +++ b/src/engine/elektron/odd-jumps.test.ts @@ -3,6 +3,10 @@ import { fileURLToPath } from 'node:url' import { describe, expect, it } from 'vitest' import { oddJumpsIn, oddJumpsInElemod, oddJumpsInFiles, type Machine } from './odd-jumps' import { devices } from '../../../vendor/elekloader/kit/src/devices.ts' +import { carryDevices } from '../elekloader/carried-devices' + +// The devices Modwerk's builder carries (the Digitone II), as the site's worker registers them. +carryDevices() // A synthetic machine: its "stock" image is 0x40000000-0x40001000 and its module RAM 0x41000000-0x41001000. No // Elektron firmware is involved. diff --git a/src/hooks/useDigiBuild.ts b/src/hooks/useDigiBuild.ts index 1ac4079826..49e090694c 100644 --- a/src/hooks/useDigiBuild.ts +++ b/src/hooks/useDigiBuild.ts @@ -6,6 +6,7 @@ import { elekloaderBuildKind } from '../community/octatrack-diagnostics-contract import { trackUsage } from '../community/usage' import { buildStep, buildWithLock, builtLock, createMachineBuilder, prepareBuild, type Builder } from '../engine/elekloader/machine-build' import { PREFLIGHT_MACHINES, PreflightError, preflightBuiltFile, type PreflightFacts } from '../engine/elekloader/digi-preflight' +import { fitBuilt } from '../engine/elekloader/fit-update' import type { StorageLock } from '../config/workspace' import type { BuilderCheck, BuilderDevice, BuilderMachine, BuilderResult } from '../engine/elekloader/protocol' import type { BuildProgress } from '../engine/protocol' @@ -33,7 +34,8 @@ export function useDigiBuild(machine: BuilderMachine, file: File | undefined, re const key = inputs + '#' + attempt const [view, setView] = useState({ phase: 'idle', key: '' }) // Local build outcomes include preview machines; their download gates remain separate. - const usageMachine = machine + // The usage counts name the machines the Worker's contract lists (usage-contract.ts); the Digitone II's beta builds are not among them. + const usageMachine = machine === 'digitone-ii' ? undefined : machine const client = useRef(null), operation = useRef(0), storageRef = useRef(storage) useEffect(() => { storageRef.current = storage }) useEffect(() => () => { client.current?.dispose(); client.current = null }, []) @@ -77,10 +79,12 @@ export function useDigiBuild(machine: BuilderMachine, file: File | undefined, re const named = await builder.version(version, enabled) if (operation.current !== request) return if (!named.ok) { emitSiteDiagnosticEvent({ event: 'build_failed', phase: 'preparing', buildKind: elekloaderBuildKind(machine), error: 'input' }, context); setView({ phase: 'failed', key, enabled, device, error: named.error ?? 'Check the OS version.' }); return } - const result = await buildWithLock(builder, enabled, version, named.name, storage?.lock ?? null, line => { + const built = await buildWithLock(builder, enabled, version, named.name, storage?.lock ?? null, line => { step = buildStep(line, step) if (operation.current === request) setView({ phase: 'building', key, enabled, device, log: line, step }) }) + // A unit that refuses large upgrades gets its build packed to fit (fit-update.ts); other machines' are unchanged. + const result = built.ok && file ? await fitBuilt(built, new Uint8Array(await file.arrayBuffer())) : built if (operation.current !== request) return if (!result.ok) emitSiteDiagnosticEvent({ event: 'build_failed', phase: step, buildKind: elekloaderBuildKind(machine), error: 'build' }, context) // A second, independent check before the page offers the file (digi-preflight.ts): a refusal is a failed build. diff --git a/src/storage/device.ts b/src/storage/device.ts index 829f6589a9..2005df4f10 100644 --- a/src/storage/device.ts +++ b/src/storage/device.ts @@ -85,11 +85,11 @@ export function deviceStore(db: IDBDatabase) { compareModuleVersions(module.version, module.version) await transaction('settings', 'readwrite', store => store.put({ id: module.id, version: module.version }, 'module-view/' + module.id)) }, - async readFirmware(machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack'): Promise { return transaction('firmware', 'readonly', store => store.get(machine === 'octatrack' ? 'base' : 'base/' + machine)) }, - async saveFirmware(file: File, machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack') { + async readFirmware(machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack'): Promise { return transaction('firmware', 'readonly', store => store.get(machine === 'octatrack' ? 'base' : 'base/' + machine)) }, + async saveFirmware(file: File, machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack') { await transaction('firmware', 'readwrite', store => store.put({ name: file.name, blob: file }, machine === 'octatrack' ? 'base' : 'base/' + machine)) }, - async forgetFirmware(machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack') { await transaction('firmware', 'readwrite', store => store.delete(machine === 'octatrack' ? 'base' : 'base/' + machine)) }, + async forgetFirmware(machine: 'octatrack' | 'digitakt' | 'digitakt-ii' | 'digitone' | 'analog-rytm-mkii' | 'digitone-ii' | 'model-cycles' | 'zoom-ms-70cdr' = 'octatrack') { await transaction('firmware', 'readwrite', store => store.delete(machine === 'octatrack' ? 'base' : 'base/' + machine)) }, } } export type DeviceStore = ReturnType diff --git a/src/tooling/elekloader-update.test.ts b/src/tooling/elekloader-update.test.ts index d05ad79095..0b42225bfa 100644 --- a/src/tooling/elekloader-update.test.ts +++ b/src/tooling/elekloader-update.test.ts @@ -180,7 +180,7 @@ function fixture() { mkdirSync(dirname(join(root, path)), { recursive: true }) cpSync(join(ROOT, path), join(root, path), { recursive: true }) } - for (const path of [...noticePaths, 'LICENSE', 'LICENSES', 'scripts/elekloader-update.ts', 'scripts/elekloader-vendor.ts', 'scripts/licenses.mjs', 'scripts/license-notices.mjs', 'src/engine/elektron/codec', 'src/engine/elektron/odd-jumps.ts']) copy(path) + for (const path of [...noticePaths, 'LICENSE', 'LICENSES', 'scripts/elekloader-update.ts', 'scripts/elekloader-vendor.ts', 'scripts/licenses.mjs', 'scripts/license-notices.mjs', 'src/engine/elektron/codec', 'src/engine/elektron/odd-jumps.ts', 'src/engine/elekloader/carried-devices.ts', 'sdk/machines/digitone-ii/elekloader/device.json']) copy(path) // The module records that add Modwerk-built pins to the upstream catalog. for (const name of readdirSync(join(ROOT, 'sdk/imports')).filter(name => /^elekloader-.*\.json$/.test(name))) copy('sdk/imports/' + name) const manifest = JSON.parse(readFileSync(join(root, 'sdk/octabam/licenses/manifest.json'), 'utf8')) as { moduleComponents: Record } diff --git a/vendor/elekloader/catalog/modwerk-base-digitone-ii-7a60d82e.elemod b/vendor/elekloader/catalog/modwerk-base-digitone-ii-7a60d82e.elemod new file mode 100644 index 0000000000..c8d89b2b38 --- /dev/null +++ b/vendor/elekloader/catalog/modwerk-base-digitone-ii-7a60d82e.elemod @@ -0,0 +1,1799 @@ +{ + "elemod": 2, + "id": "core", + "version": "1.1", + "title": "core", + "description": "The boot copier and the hook bus for the Digitakt II: every other mod needs it. From 1.1 also each frame's per-track parameter values before the stock modulators (ev_frame_params), the key-LED frame before the stock views (ev_key_leds), the mods' project data and kit data, saved and loaded with the project and its kits and copied with the kits (core_projdata, core_kitdata), and value rows for PERSONALIZE and SETTINGS (core_addvalue). On its own it changes nothing the unit does. Modwerk's Digitone II copy (OS 1.12): no .fast area, since SRAM is not qualified there, so no fast.s, core_fast or its copier.", + "category": "Framework", + "author": "irpina", + "license": "GPL-2.0-or-later", + "target": { + "device": "digitone-mk2", + "product": "Digitone II", + "os": "1.12", + "syx_sha256": "7e5b8a733d4ab1fdf7e5d22757f7d8eddaa3cbf71d0858874a791844c02ceb35", + "section3_sha256": "a098f620019b2ad38fd7e0397df39501fb1cf6bc26d0283915f34c49446fdf1a", + "section3_len": 3196288 + }, + "sections": { + ".boot": { + "align": 4, + "len": 50, + "parts": [ + [ + "hex", + "41f90000000043f900000000203c0000000022d8538066fa43f900000000203c0000000067064299538066fa4ef9400019b0" + ] + ] + }, + ".run": { + "align": 4, + "len": 3656, + "parts": [ + [ + "hex", + "2f0a45f900000000201a670c2f2f000820404e90588f60f0245f" + ], + [ + "stock", + "0x4011d5d4", + 10 + ], + [ + "stock", + "0x40025c34", + 8 + ], + [ + "hex", + "4eb94011d60a508f2f0a45f900000000201a67102f2f00082f2f001020404e90508f60ec245f4e752f0a45f9000000006126245f4a8066064ef94002c5c84e752f0a45f900000000610e245f4a8066064ef94002c55c4e75201a6712" + ], + [ + "stock", + "0x40049d1a", + 8 + ], + [ + "hex", + "20404e90508f4a8067ea4e752f0b47f900000000201b670a2f0a20404e90588f60f2265f2052487800024ef94009ff8e4e56ffc0" + ], + [ + "stock", + "0x40001792", + 8 + ], + [ + "stock", + "0x4000f7f2", + 8 + ], + [ + "hex", + "41eeffc0429042a80004203c4018de3e2140000820132140000c41eeffd0208a42a80004203c4018de3e21400008202b00042140000c41eeffe0429042a80004203c4018de3e21400008202b00082140000c41eefff0208a42a80004203c4018de3e21400008202b000c2140000c" + ], + [ + "stock", + "0x4014e98a", + 8 + ], + [ + "hex", + "0544588f2400" + ], + [ + "stock", + "0x40059d22", + 8 + ], + [ + "stock", + "0x400f6f4e", + 8 + ], + [ + "hex", + "486effd0486effc02f02" + ], + [ + "stock", + "0x40059d36", + 8 + ], + [ + "stock", + "0x40016630", + 8 + ], + [ + "hex", + "40116bee508f" + ], + [ + "stock", + "0x4008733e", + 10 + ], + [ + "hex", + "47f900000000201b670a2f0c20404e90588f60f2" + ], + [ + "stock", + "0x4007bea2", + 8 + ], + [ + "hex", + "00804e752f0a45f900000000201a671848780065222f000c0681000000222f0120404e90508f60e4245f4ef9400db3902f2f00044eb94002c3c6588f2f0a45f900000000201a670c2f2f000820404e90588f60f0245f205f2f024ed04210d08c00005d71000028af00000151446488d02f0b2f0a4eb900000000508f223cbacef00c" + ], + [ + "stock", + "0x40186de4", + 8 + ], + [ + "hex", + "00000000508f223cbacef00c4e7526bcbeefbace" + ], + [ + "stock", + "0x4000125c", + 8 + ], + [ + "hex", + "2f0b4eb900000000" + ], + [ + "stock", + "0x40001276", + 10 + ], + [ + "hex", + "4e752f0b4eb900000000588f203cbeefbace4e75" + ], + [ + "stock", + "0x40083612", + 8 + ], + [ + "hex", + "5d716712" + ], + [ + "stock", + "0x4003d640", + 8 + ], + [ + "hex", + "202f000c4ef94013477c" + ], + [ + "stock", + "0x4004e9e6", + 8 + ], + [ + "hex", + "2f2f000c61e04fef000c2f00" + ], + [ + "stock", + "0x4004e9e6", + 8 + ], + [ + "hex", + "4eb900000000508f201f4e754e56ffc0" + ], + [ + "stock", + "0x40001792", + 8 + ], + [ + "stock", + "0x4000f7f2", + 8 + ], + [ + "hex", + "41eeffc0740320ae001042a80004203c4018de3e21400008201b2140000c41e8001053826ae0" + ], + [ + "stock", + "0x4014e98a", + 8 + ], + [ + "hex", + "0544588f2400" + ], + [ + "stock", + "0x40059d22", + 8 + ], + [ + "stock", + "0x400f6f4e", + 8 + ], + [ + "hex", + "486effd0486effc02f02" + ], + [ + "stock", + "0x40059d36", + 8 + ], + [ + "stock", + "0x40016630", + 8 + ], + [ + "hex", + "40116bee508f" + ], + [ + "stock", + "0x4008733e", + 12 + ], + [ + "hex", + "fffc2f022408226e000822512251486effff2f11" + ], + [ + "stock", + "0x400148d0", + 8 + ], + [ + "stock", + "0x400365fe", + 14 + ], + [ + "stock", + "0x401503d2", + 8 + ], + [ + "hex", + "5c004a390000000067103039000000004cd75c004fef00184e752879000000004a8c677072ff47f9000000004def001843ef0010200c204c5880244914d8b08866fa2f6c000400141019e188b3802200ee89e1880281000001fe2041d1fc000000003210b3803200bdc966dc286b0004588b4a8c66ba4a4066027001720133c00000000013c1000000004cd75c004fef00184e7570ff720133c00000000013c100000000" + ], + [ + "stock", + "0x401a2104", + 8 + ], + [ + "hex", + "041c263900000000282f" + ], + [ + "stock", + "0x4000fd14", + 8 + ], + [ + "hex", + "670c200a204ad0834218b08866fa14bc004b4ebaff28e088154000014ebaff1e207900000000154000024a886740240ad68a568245f9000000002228000420039082b28062284a816718200422424c01080020680008d1c02008d08112d8b08866fa206a0004d481588a4a8866cc" + ], + [ + "stock", + "0x400160cc", + 10 + ], + [ + "stock", + "0x400059aa", + 8 + ], + [ + "stock", + "0x4000e716", + 8 + ], + [ + "hex", + "4a8a6700008c7192240a724b5682b28067000084d5f90000000042842079000000004a88674e47f900000000222800042003206800084c010800d1c04a84673e200a9082b280623a20024a81670a2242d08110d9b3c066fa24002004205b2068000c4a8867082f002f034e90508f20534a8866b8" + ], + [ + "stock", + "0x40005a4c", + 10 + ], + [ + "hex", + "4a81670a2008d0814218b1c066fa428060cc428242846086382a00014ebafe18d5f900000000b1844a4457c4790444846000ff6c4feffff4207900000000" + ], + [ + "stock", + "0x40001796", + 8 + ], + [ + "hex", + "4a886754240a06820000020043ea001c52894a29ffff66000082b3c266f243ea001c4219b3c266fa203c454c4b502540001c45ea002047f9000000002228000422412002908a43e9000cb3c06314206b0004588b4a88" + ], + [ + "stock", + "0x40025912", + 12 + ], + [ + "hex", + "2008224a588012d8b1c066fa254100044a816714205343ea0008206800082008d08112d8b08866fa206b0004588b45f218084a8866a460be203c454c4b50b0aa001c6700ff784cd70c0452b900000000" + ], + [ + "stock", + "0x400017da", + 8 + ], + [ + "stock", + "0x4000af64", + 8 + ], + [ + "hex", + "0018242b001c0c82454c4b50671a200b06800000020041eb001c52884a28ffff660000b2b08866f22079000000004a886772260b06830000020049f900000000202800044a80670c20680008d0884218b1c066fa24540c82454c4b50662c41eb0020203c000001e0221051804a81671a22680004b3c06212b292673241f09808200372079088b2806dde4280206a000c4a8867062f004e90588f206c0004588c4a88669c" + ], + [ + "stock", + "0x4000afc6", + 10 + ], + [ + "hex", + "202a0004b3c0640220094a80672243f0080850882009226a000812d8b1c066fa2454700160b852b9000000006000ff4c700160aa20390000000057804e7520790000000020504a88670c20280138727fb28065024e7570ff" + ], + [ + "stock", + "0x40005352", + 8 + ], + [ + "hex", + "0010223900000000226f000cb282620000ca2002908141f9000000004c5000014c5000004a81660000b2727fb280650000aa22004ab9000000006728d3f9000000002039000000002049d089b088671a4a1867f877912043764bb688670c52b900000000241f261f4e7576ffb681663041f900000000428141e80158b4a8fea8672e52817608b68166ee4ab90000000067d24219b08967cc4219b08966f460c42f49" + ], + [ + "stock", + "0x40007856", + 10 + ], + [ + "hex", + "6000fc1e4ab90000000067acc2fc01582039000000002041d1fc00000000d08812d8b1c0679212d8b1c066f4608a72ff6000ff564fefffec" + ], + [ + "stock", + "0x4002c31c", + 8 + ], + [ + "hex", + "223900000000226f001cb282620001282002908141f9000000004c5000014c5000004a8166000110727fb2806500010822004ab900000000676ad3f9000000002039000000002049d089b08867124a1867f87991764bb684676452b900000000161178ffb881671e7183744bb480670293c94cd7041c2f49001c2f41" + ], + [ + "stock", + "0x400d95fc", + 8 + ], + [ + "hex", + "fbec7383784bb881673641f900000000b490671641e80158b1fc0000000066f04cd7041c4fef00144e75429041e80158b1fc0000000066d860e676ffb68166ae428141f90000000041e80158b4a8fea8676652817608b68166ee73b900000000760745f900000000204152882808c88341ef00132f440010283c000001584c014800c2fc015813d000000000258248002041d1fc000000004ab900000000678010d9b0896700ff7a10d9b08966f26000ff7072ff6000fef8c2fc01582041d1fc000000004ab90000000066d46000ff524fefffe8226f001c207900000000" + ], + [ + "stock", + "0x40036bb0", + 8 + ], + [ + "hex", + "b1c96200011c2009908845f9000000004c5200014c5200004a8166000104727fb280650000fc2200b1c2620000fa2002908845f9000000004c5200034c5200004a83660000e2767fb680650000da4ab900000000670000b2b489670000ac4879000000002f00" + ], + [ + "stock", + "0x401219e6", + 8 + ], + [ + "hex", + "4ebafa06508f70ff222f001041f900000000226f000cb08167144cd7040c2f4800202f41001c4fef00186000fa6c45f9000000002f4a0014428045f90000000045ea0158b3eafea8675a52807208b28066ee71b9000000007407246f001422005281c282243c000001584c002800c0fc01582589280013c1000000002240d3fc000000004ab900000000670e203900000000d08812d8b08866fa" + ], + [ + "stock", + "0x40036bf0", + 10 + ], + [ + "hex", + "c0fc01582240d3fc0000000060d272ff6000ff044ab90000000067dab48967d645f90000000042802f4a0014204a41e80158b4a8fea8673252807608b68066ee52814a8166b0b3d2671045ea0158b5fc0000000067a0b3d266f0429245ea0158b5fc0000000066ee608cc0fc0158204070ffd1fc00000000b0816700ff184cd7040c2f4800202f41001c4fef00186000f9640000" + ], + [ + "stock", + "0x40001894", + 10 + ], + [ + "hex", + "242f0014245020522068000c4e90d4804a826d3a205220280008b4806d04240053822068000c4e90b082670c2052" + ], + [ + "stock", + "0x40030ac4", + 8 + ], + [ + "hex", + "588f246a0004" + ], + [ + "stock", + "0x400967b6", + 14 + ], + [ + "hex", + "00000000428260c2" + ], + [ + "stock", + "0x4001b00e", + 10 + ], + [ + "stock", + "0x4008a378", + 8 + ], + [ + "hex", + "b0a800086504245f4e75206800042f300c00" + ], + [ + "stock", + "0x4008d948", + 10 + ], + [ + "hex", + "00285480" + ], + [ + "stock", + "0x400bd54a", + 8 + ], + [ + "hex", + "00132f084879000000002f2f002c4eb900000000" + ], + [ + "stock", + "0x40125d5c", + 8 + ], + [ + "hex", + "487800084eb900000000588f4a80670a206f00084aa8000866024e75222f0004204020af0008214100042f004879000000002f014eb900000000" + ], + [ + "stock", + "0x400120b4", + 8 + ], + [ + "hex", + "0000102120423063408450a560c670e781089129a14ab16bc18cd1ade1cef1ef123102103273225252b5429472f762d693398318b37ba35ad3bdc39cf3ffe3de246234430420140164e674c744a45485a56ab54b85289509e5eef5cfc5acd58d365326721611063076d766f6569546b4b75ba77a97198738f7dfe7fed79dc7bc48c458e5688678a70840186128023823c9ccd9ede98ef9af89489969a90ab92b5af54ad47ab76a961a710a503a332a12dbfdcbdcfbbfeb9e9b798b58bb3bab1a6ca67c874ce45cc52c223c030c601c41edaefd8fcdecddcdad2abd0b8d689d497e976eb65ed54ef43e132e321e510e70ff9fefbedfddcffcbf1baf3a9f598f78918881a9b1caa1ebd10cc12df14ee16f108000a130c220e3500440257046606783b99398a3fbb3dac33dd31ce37ff35e02b1129022f332d24235521462777256b5eaa5cb95a88589f56ee54fd52cc50d34e224c314a004817466644754244405a7dbb7fa879997b8e75ff77ec71dd73c26d336f2069116b06657767646155634d94cc96df90ee92f99c889e9b98aa9ab584448657806682718c008e1388228a3cb7ddb5ceb3ffb1e8bf99bd8abbbbb9a4a755a546a377a160af11ad02ab33a92fd2eed0fdd6ccd4dbdaaad8b9de88dc97c266c075c644c453ca22c831ce00cc1ef1fff3ecf5ddf7caf9bbfba8fd99ff86e177e364e555e742e933eb20ed11ef000000000000000000000000000000000" + ] + ] + }, + ".bss": { + "align": 4, + "size": 3120 + } + }, + "symbols": { + "FRAME_STRIDE": [ + "abs", + 101 + ], + "LEDS_CLEAR": [ + "abs", + 1073923014 + ], + "MODS_STOCK": [ + "abs", + 1074639760 + ], + "PATTERN_OBJ": [ + "abs", + 1147439312 + ], + "KIT_ROOM": [ + "abs", + 337 + ], + "KIT_PAD": [ + "abs", + 10415 + ], + "KIT_SIZE": [ + "abs", + 23921 + ], + "FW_KITS": [ + "abs", + 1108398220 + ], + "MEMCPY": [ + "abs", + 1075005296 + ], + "FW_STR_NEW": [ + "abs", + 1075636920 + ], + "FW_LED_SET": [ + "abs", + 1073922840 + ], + "FW_INVALIDATE": [ + "abs", + 1074907802 + ], + "FW_FONT_MENU": [ + "abs", + 1076446992 + ], + "FW_TEXTBOX": [ + "abs", + 1074878792 + ], + "VBR_FN": [ + "abs", + 1073748400 + ], + "NO_DTIM0": [ + "abs", + 1 + ], + "SETTINGS_RET": [ + "abs", + 1074397070 + ], + "FN_MGR": [ + "abs", + 1075371582 + ], + "MENU_ADD": [ + "abs", + 1074883566 + ], + "ITEM_CTOR": [ + "abs", + 1074885560 + ], + "OP_NEW": [ + "abs", + 1074922820 + ], + "ENCDISP": [ + "abs", + 1073923420 + ], + "KEYDISP": [ + "abs", + 1073923528 + ], + "DRAWALL": [ + "abs", + 1074910730 + ], + "dispatch": [ + ".run", + 132 + ], + "layout": [ + ".run", + 872 + ], + "layout_known": [ + ".bss", + 3114 + ], + "layout_id": [ + ".bss", + 3116 + ], + "pack": [ + ".run", + 1044 + ], + "unpack": [ + ".run", + 1188 + ], + "shadow": [ + ".bss", + 362 + ], + "shadow_next": [ + ".bss", + 360 + ], + "tmp.0": [ + ".bss", + 20 + ], + "select": [ + ".run", + 2884 + ], + "change": [ + ".run", + 2886 + ], + "draw": [ + ".run", + 2976 + ], + "callbacks": [ + ".run", + 3640 + ], + "core_projdata_load": [ + ".run", + 1584 + ], + "core_draw": [ + ".run", + 36 + ], + "core_zero": [ + ".bss", + 0 + ], + "core_memcpy": [ + ".run", + 626 + ], + "core_store_layout": [ + ".run", + 514 + ], + "core_key": [ + ".run", + 84 + ], + "fw_led_set": [ + "abs", + 1073922840 + ], + "core_kit_on": [ + ".run", + 1830 + ], + "fw_invalidate": [ + "abs", + 1074907802 + ], + "core_value_label": [ + ".run", + 826 + ], + "boot": [ + ".boot", + 0 + ], + "core_kit_load": [ + ".run", + 554 + ], + "core_proj_save": [ + ".run", + 574 + ], + "core_addrow": [ + ".run", + 696 + ], + "core_kit_save": [ + ".run", + 534 + ], + "fw_font_menu": [ + "abs", + 1076446992 + ], + "core_store_conflicts": [ + ".bss", + 16 + ], + "fw_op_new": [ + "abs", + 1074922820 + ], + "fw_textbox": [ + "abs", + 1074878792 + ], + "core_tick": [ + ".run", + 0 + ], + "core_frame": [ + ".run", + 426 + ], + "core_enc": [ + ".run", + 108 + ], + "core_projdata_save": [ + ".run", + 1382 + ], + "core_addvalue": [ + ".run", + 3062 + ], + "core_settings": [ + ".run", + 156 + ], + "core_kit_copied": [ + ".run", + 2440 + ], + "core_key_leds": [ + ".run", + 470 + ], + "core_kitdata_room": [ + ".run", + 1820 + ], + "core_kitdata_load": [ + ".run", + 2088 + ], + "core_proj_load": [ + ".run", + 608 + ], + "core_personalize": [ + ".run", + 394 + ], + "core_kitdata_save": [ + ".run", + 1858 + ], + "core_additem": [ + ".run", + 192 + ] + }, + "exports": [ + "boot", + "core_additem", + "core_addrow", + "core_addvalue", + "core_draw", + "core_enc", + "core_frame", + "core_key", + "core_key_leds", + "core_kit_copied", + "core_kit_load", + "core_kit_on", + "core_kit_save", + "core_kitdata_load", + "core_kitdata_room", + "core_kitdata_save", + "core_memcpy", + "core_personalize", + "core_proj_load", + "core_proj_save", + "core_projdata_load", + "core_projdata_save", + "core_settings", + "core_store_conflicts", + "core_store_layout", + "core_tick", + "core_value_label", + "core_zero", + "fw_font_menu", + "fw_invalidate", + "fw_led_set", + "fw_op_new", + "fw_textbox" + ], + "imports": [ + "__bss_start", + "__bss_words", + "__run_load", + "__run_start", + "__run_words", + "core_kitdata", + "core_projdata", + "ev_draw", + "ev_enc", + "ev_frame_params", + "ev_key", + "ev_key_leds", + "ev_personalize", + "ev_settings", + "ev_tick" + ], + "weak": [], + "relocs": [ + [ + ".boot", + 2, + "abs32", + "sym:__run_load", + 0 + ], + [ + ".boot", + 8, + "abs32", + "sym:__run_start", + 0 + ], + [ + ".boot", + 14, + "abs32", + "sym:__run_words", + 0 + ], + [ + ".boot", + 26, + "abs32", + "sym:__bss_start", + 0 + ], + [ + ".boot", + 32, + "abs32", + "sym:__bss_words", + 0 + ], + [ + ".run", + 4, + "abs32", + "sym:ev_tick", + 0 + ], + [ + ".run", + 56, + "abs32", + "sym:ev_draw", + 0 + ], + [ + ".run", + 88, + "abs32", + "sym:ev_key", + 0 + ], + [ + ".run", + 112, + "abs32", + "sym:ev_enc", + 0 + ], + [ + ".run", + 160, + "abs32", + "sym:ev_settings", + 0 + ], + [ + ".run", + 396, + "abs32", + "sym:ev_personalize", + 0 + ], + [ + ".run", + 430, + "abs32", + "sym:ev_frame_params", + 0 + ], + [ + ".run", + 486, + "abs32", + "sym:ev_key_leds", + 0 + ], + [ + ".run", + 540, + "abs32", + "sec:.run", + 1858 + ], + [ + ".run", + 560, + "abs32", + "sec:.run", + 2088 + ], + [ + ".run", + 592, + "abs32", + "sec:.run", + 1382 + ], + [ + ".run", + 612, + "abs32", + "sec:.run", + 1584 + ], + [ + ".run", + 686, + "abs32", + "sec:.run", + 2440 + ], + [ + ".run", + 882, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 890, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 906, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 918, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 972, + "abs32", + "sec:.run", + 3128 + ], + [ + ".run", + 1006, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 1012, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 1032, + "abs32", + "sec:.bss", + 3116 + ], + [ + ".run", + 1038, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 1054, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1102, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1122, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1226, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1234, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1244, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1364, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1388, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1456, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1574, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1636, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1654, + "abs32", + "sym:core_projdata", + 0 + ], + [ + ".run", + 1808, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1822, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1832, + "abs32", + "sec:.run", + 530 + ], + [ + ".run", + 1868, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 1888, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 1918, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 1926, + "abs32", + "sec:.run", + 522 + ], + [ + ".run", + 1932, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 1960, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 1978, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2004, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2042, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2054, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2062, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2102, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 2122, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2152, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2160, + "abs32", + "sec:.run", + 522 + ], + [ + ".run", + 2166, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2192, + "abs32", + "sec:.bss", + 16 + ], + [ + ".run", + 2244, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2258, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2282, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2300, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2324, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2332, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2368, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2380, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2386, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2424, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2430, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2450, + "abs32", + "sec:.run", + 514 + ], + [ + ".run", + 2474, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2514, + "abs32", + "sec:.run", + 518 + ], + [ + ".run", + 2542, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2558, + "abs32", + "sec:.bss", + 20 + ], + [ + ".run", + 2586, + "abs32", + "sec:.bss", + 20 + ], + [ + ".run", + 2620, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2632, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2656, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2692, + "abs32", + "sec:.bss", + 360 + ], + [ + ".run", + 2700, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2706, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2714, + "abs32", + "sec:.run", + 526 + ], + [ + ".run", + 2744, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2758, + "abs32", + "sym:core_kitdata", + 0 + ], + [ + ".run", + 2770, + "abs32", + "sec:.bss", + 362 + ], + [ + ".run", + 2816, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2834, + "abs32", + "sec:.bss", + 3114 + ], + [ + ".run", + 2852, + "abs32", + "sec:.bss", + 366 + ], + [ + ".run", + 2968, + "abs32", + "abs", + 1074907802 + ], + [ + ".run", + 3040, + "abs32", + "abs", + 1076446992 + ], + [ + ".run", + 3050, + "abs32", + "abs", + 1074878792 + ], + [ + ".run", + 3068, + "abs32", + "abs", + 1074922820 + ], + [ + ".run", + 3108, + "abs32", + "sec:.run", + 3640 + ], + [ + ".run", + 3116, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 3640, + "abs32", + "sec:.run", + 826 + ], + [ + ".run", + 3644, + "abs32", + "sec:.run", + 2884 + ], + [ + ".run", + 3648, + "abs32", + "sec:.run", + 2976 + ], + [ + ".run", + 3652, + "abs32", + "sec:.run", + 2886 + ] + ], + "sites": [ + { + "addr": "0x40000538", + "len": 6, + "stock_sha256": "f0c5fc0afd892b3ec3f8803e1d875a2a22c6bb4e2cb987adc582cf8dea48c28a", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:boot", + 0 + ] + ] + }, + { + "addr": "0x4002e464", + "len": 6, + "stock_sha256": "8abc5b3d8941b94f9ec93c348112bcaf09510582ab72977a407b9ce1e213a459", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_tick", + 0 + ] + ] + }, + { + "addr": "0x4002e4ca", + "len": 6, + "stock_sha256": "51e3665db347990c1500cab5b2766706e47605e08a3a01c721fc1958f75c27ab", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_draw", + 0 + ] + ] + }, + { + "addr": "0x4002f20c", + "len": 6, + "stock_sha256": "d1e1f5dd2afbbcebc50c89fdcf5fd704a0a26f28becdcada110ab0c2d14626fc", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_key", + 0 + ] + ] + }, + { + "addr": "0x4002f256", + "len": 6, + "stock_sha256": "786bc53e108e78a53f3bfc32fc57bd91569f6702c55a9566747386c873b91d4a", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_enc", + 0 + ] + ] + }, + { + "addr": "0x4009ff88", + "len": 6, + "stock_sha256": "c7589861366d298dd3e07f1f5ebce25db0435f9cad638eae321d68e7542f6c74", + "new": "4ef900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_settings", + 0 + ] + ] + }, + { + "addr": "0x400987a2", + "len": 6, + "stock_sha256": "10552f30e94896a18c635b43b0f16452187a5e3db5b661ba3255c1ecb054fd50", + "new": "4ef900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_personalize", + 0 + ] + ] + }, + { + "addr": "0x40027196", + "len": 6, + "stock_sha256": "8f4626d425f213c0f0f9f81054e40a51bad034eaa6b154d51fe969ae4a521a8d", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_frame", + 0 + ] + ] + }, + { + "addr": "0x4002c87a", + "len": 6, + "stock_sha256": "3988e55cba5c51c557dcb530885eba6f789018b4345baccd49ebce731fd6f68e", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_key_leds", + 0 + ] + ] + }, + { + "addr": "0x400de0d4", + "len": 6, + "stock_sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_kit_save", + 0 + ] + ] + }, + { + "addr": "0x400ddddc", + "len": 6, + "stock_sha256": "1a4f590b6150643d45e52f347f5e32771feeeb47a764c2337fc4d6faefdfeb8f", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_kit_load", + 0 + ] + ] + }, + { + "addr": "0x400e18be", + "len": 6, + "stock_sha256": "be28bf581aa32f87a3306f04738f1dbdb4b28489865cd0d88145466f2740333c", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_proj_save", + 0 + ] + ] + }, + { + "addr": "0x400e1928", + "len": 6, + "stock_sha256": "39d8feaa0cf09fbdc868baea4e44be238666cbfcbf350883559c99085034a789", + "new": "4eb900000000", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_proj_load", + 0 + ] + ] + }, + { + "addr": "0x40134770", + "len": 12, + "stock_sha256": "a48eab821488cf202e892b5cad063488c972824e57c3d851ab402463dc0f5657", + "new": "4ef9000000004e714e714e71", + "kind": "code", + "relocs": [ + [ + 2, + "abs32", + "sym:core_memcpy", + 0 + ] + ] + } + ], + "collections": { + "ev_tick": { + "entry": 4 + }, + "ev_draw": { + "entry": 4 + }, + "ev_key": { + "entry": 4 + }, + "ev_enc": { + "entry": 4 + }, + "ev_settings": { + "entry": 4 + }, + "ev_personalize": { + "entry": 4 + }, + "ev_frame_params": { + "entry": 4 + }, + "ev_key_leds": { + "entry": 4 + }, + "core_projdata": { + "entry": 4 + }, + "core_kitdata": { + "entry": 4 + } + }, + "contribute": [], + "copied": [], + "resources": {}, + "requires": [], + "conflicts": [], + "build": { + "sources": { + "core.s": "dd0074e9b08a254838feae6215404e775ba7ef7aa2afbcce1e5c24794eebddc5", + "settings.s": "8fa715d46d6dbe239bed6d8d0ea4a0c3100c068b39869c938b402f2d6a15a380", + "personalize.s": "10372f64d233a1cc3c5abcb202084c3a8707e17e8d656038754c44a3e7554111", + "fw.s": "ae8bfc9a7f5778162be93fb1aa499e0ad1d7b515cbba52ba6b22b03588458cac", + "frame.s": "92fdd15abac49c2f802cd623af6a841327b3e32b53967795ade3188f46652c14", + "leds.s": "bbccdf836c4ef7cc27b78f8bbc3c3dcce10fa691e0d6a34b6a30c1d7d2375d87", + "store.s": "499d5ad2e71609075fd7461f6081504d91acf0c16aa77b267550af7ec417999b", + "store.c": "442ec9e88128519d5b446d1627b52ec05afdcefda564012734f5fa9430a4a5a4", + "rows.s": "00d971f3ba2372a08c209023edd45458a72ec3a73e56920fb440b82b7327ee4c", + "rows.c": "d6b5b85e86f38d9429c17a1b48ac4a77169583954c56b0707ce11c2821acc58e" + } + }, + "signature": null +} diff --git a/vendor/elekloader/catalog/voice-spread-0.1.0-experimental-os1.12.elemod b/vendor/elekloader/catalog/voice-spread-0.1.0-experimental-os1.12.elemod new file mode 100644 index 0000000000..46027950ea --- /dev/null +++ b/vendor/elekloader/catalog/voice-spread-0.1.0-experimental-os1.12.elemod @@ -0,0 +1,571 @@ +{ + "elemod": 2, + "id": "voice-spread", + "version": "0.1.0-experimental", + "title": "Voice Spread", + "description": "Spreads the voices of a chord across the stereo field, and their filters a little apart.", + "category": "playback", + "author": "prodbysmolec", + "license": "GPL-3.0-or-later", + "target": { + "device": "digitone-mk2", + "product": "Digitone II", + "os": "1.12", + "syx_sha256": "7e5b8a733d4ab1fdf7e5d22757f7d8eddaa3cbf71d0858874a791844c02ceb35", + "section3_sha256": "a098f620019b2ad38fd7e0397df39501fb1cf6bc26d0283915f34c49446fdf1a", + "section3_len": 3196288 + }, + "sections": { + ".run": { + "align": 4, + "len": 787, + "parts": [ + [ + "hex", + "2f024aaf00086634420013c000000000420013c000000000700141f900000000241f13d00000000041f90000000013c00000000013d0000000004e7571b90000000053804a80670c4202420013c20000000060be1039000000003040103900000000340873827404b481640291c83408738013c2000000007403b48164944200609071b9000000004e7571b9000000004e757201202f000413c00000000013c00000000013c1000000004e757201202f000413c00000000013c00000000013c1000000004e752f0a4879000000002f2f000c45f9000000004e924879000000002f2f00144e924fef0010245f4e751039000000001239000000002f02240084814a02671a738171802f012f002f2f00142f2f00144eb9000000004fef0010241f4e750000222f00087004b081651e700fc0af000441f9000000001030080041f9000000004880c1f01a004e7542804e752f027003222f000cb0816524202f0008740f5a80c08241f900000000241f1030080041f9000000004880c1f01a004e75241f42804e754fefffe0226f002448d71c7c222f00282a3c00000000262f002c47f90000000045e90086d281282f0030204b43e900b24a8366704a8466345288b1c566fa4cd71c7c4fef00204e7542404a826d0a0c8200007f006e78300234805288d3c1d5c1b1fc0000000067d64a83663870057c0f908bd088c08675527c03bc8465ca1033080049f9000000004880c1f44a00d48060b6424032804a8466d2d5c15288d3c1b1c5679a71517404b4836510141049f9000000004882c5f43a00d0824a806dd20c8000007f006fcc303c7f0060c6303c7f006084000000000000000000000000000400000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000565350520000000400000000000000000000008001400280000001f803f005e807e0f808fc04fa06fe02f907fd03fb05ff0146494c5445522053505245414400564f49434520535052454144004f4646004c4f57004d494400484947480032350035300037350031303000" + ] + ] + }, + ".bss": { + "align": 4, + "size": 8 + } + }, + "symbols": { + "loaded": [ + ".run", + 0 + ], + "pan_level": [ + ".bss", + 1 + ], + "filter_level": [ + ".bss", + 0 + ], + "saved": [ + ".bss", + 2 + ], + "get_pan": [ + ".run", + 130 + ], + "get_filter": [ + ".run", + 138 + ], + "set_pan": [ + ".run", + 146 + ], + "set_filter": [ + ".run", + 172 + ], + "pan_row": [ + ".run", + 624 + ], + "filter_row": [ + ".run", + 604 + ], + "filter_values": [ + ".run", + 644 + ], + "pan_values": [ + ".run", + 660 + ], + "place": [ + ".run", + 714 + ], + "pan_step": [ + ".run", + 704 + ], + "filter_step": [ + ".run", + 696 + ], + "vs_pan_offset": [ + ".run", + 292 + ], + "vs_filter_offset": [ + ".run", + 336 + ], + "vs_apply": [ + ".run", + 390 + ], + "voice_spread_projdata": [ + ".run", + 680 + ], + "voice_spread_frame": [ + ".run", + 238 + ], + "voice_spread_personalize": [ + ".run", + 198 + ] + }, + "exports": [ + "voice_spread_frame", + "voice_spread_personalize", + "voice_spread_projdata", + "vs_apply", + "vs_filter_offset", + "vs_pan_offset" + ], + "imports": [ + "core_addvalue" + ], + "weak": [], + "relocs": [ + [ + ".run", + 12, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 20, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 28, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 36, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 42, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 48, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 54, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 62, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 78, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 86, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 94, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 116, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 132, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 140, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 154, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 160, + "abs32", + "sec:.bss", + 3 + ], + [ + ".run", + 166, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 180, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 186, + "abs32", + "sec:.bss", + 4 + ], + [ + ".run", + 192, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 202, + "abs32", + "sec:.run", + 624 + ], + [ + ".run", + 212, + "abs32", + "sym:core_addvalue", + 0 + ], + [ + ".run", + 220, + "abs32", + "sec:.run", + 604 + ], + [ + ".run", + 240, + "abs32", + "sec:.bss", + 1 + ], + [ + ".run", + 246, + "abs32", + "sec:.bss", + 0 + ], + [ + ".run", + 278, + "abs32", + "sec:.run", + 390 + ], + [ + ".run", + 310, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 320, + "abs32", + "sec:.run", + 704 + ], + [ + ".run", + 360, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 372, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 408, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 418, + "abs32", + "sec:.run", + 714 + ], + [ + ".run", + 488, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 522, + "abs32", + "sec:.run", + 696 + ], + [ + ".run", + 566, + "abs32", + "sec:.run", + 704 + ], + [ + ".run", + 604, + "abs32", + "sec:.run", + 730 + ], + [ + ".run", + 608, + "abs32", + "sec:.run", + 644 + ], + [ + ".run", + 616, + "abs32", + "sec:.run", + 138 + ], + [ + ".run", + 620, + "abs32", + "sec:.run", + 172 + ], + [ + ".run", + 624, + "abs32", + "sec:.run", + 744 + ], + [ + ".run", + 628, + "abs32", + "sec:.run", + 660 + ], + [ + ".run", + 636, + "abs32", + "sec:.run", + 130 + ], + [ + ".run", + 640, + "abs32", + "sec:.run", + 146 + ], + [ + ".run", + 644, + "abs32", + "sec:.run", + 757 + ], + [ + ".run", + 648, + "abs32", + "sec:.run", + 761 + ], + [ + ".run", + 652, + "abs32", + "sec:.run", + 765 + ], + [ + ".run", + 656, + "abs32", + "sec:.run", + 769 + ], + [ + ".run", + 660, + "abs32", + "sec:.run", + 757 + ], + [ + ".run", + 664, + "abs32", + "sec:.run", + 774 + ], + [ + ".run", + 668, + "abs32", + "sec:.run", + 777 + ], + [ + ".run", + 672, + "abs32", + "sec:.run", + 780 + ], + [ + ".run", + 676, + "abs32", + "sec:.run", + 783 + ], + [ + ".run", + 688, + "abs32", + "sec:.bss", + 2 + ], + [ + ".run", + 692, + "abs32", + "sec:.run", + 0 + ] + ], + "sites": [], + "collections": {}, + "contribute": [ + { + "to": "ev_personalize", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_personalize", + 0 + ] + ], + "claims": [] + }, + { + "to": "ev_frame_params", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_frame", + 0 + ] + ], + "claims": [] + }, + { + "to": "core_projdata", + "order": 50, + "data": "00000000", + "relocs": [ + [ + 0, + "abs32", + "sym:voice_spread_projdata", + 0 + ] + ], + "claims": [] + } + ], + "copied": [], + "resources": { + "regions": [], + "names": [ + "projdata:VSPR" + ], + "core": "1.1" + }, + "requires": [ + "core" + ], + "conflicts": [], + "signature": null +}