From 0ee24f7fee8cfa8ebd20afb98cfdd1b7860cd060 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 18:02:34 -0600 Subject: [PATCH 01/32] Loopbox 0.1.0 (draft): an automatic micro-loop effect for FX2 (LAYER, SHUFL, SLIDE) Three read heads on one loop window from the FX2 ring, each faded by its own position so any speed loops without a click. verify.py: bit for bit against reference.py in dsp_host for every TYPE and VAR; test_reference.py 17/17. Cycle meter 309-330 executed a sample (SPRING REV 314). Not yet run on a unit. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/LICENSE | 30 + sdk/drafts/loopbox/README.md | 65 + sdk/drafts/loopbox/TESTING.md | 19 + sdk/drafts/loopbox/engine.asm | 1359 +++++++++++++++++ sdk/drafts/loopbox/manifest.py | 88 ++ sdk/drafts/loopbox/octamod.module.json | 197 +++ sdk/drafts/loopbox/perf.py | 123 ++ sdk/drafts/loopbox/qualification.example.json | 84 + sdk/drafts/loopbox/reference.py | 492 ++++++ .../loopbox/resource-impact.example.json | 21 + sdk/drafts/loopbox/test_reference.py | 198 +++ sdk/drafts/loopbox/verify.py | 194 +++ 12 files changed, 2870 insertions(+) create mode 100644 sdk/drafts/loopbox/LICENSE create mode 100644 sdk/drafts/loopbox/README.md create mode 100644 sdk/drafts/loopbox/TESTING.md create mode 100644 sdk/drafts/loopbox/engine.asm create mode 100644 sdk/drafts/loopbox/manifest.py create mode 100644 sdk/drafts/loopbox/octamod.module.json create mode 100644 sdk/drafts/loopbox/perf.py create mode 100644 sdk/drafts/loopbox/qualification.example.json create mode 100644 sdk/drafts/loopbox/reference.py create mode 100644 sdk/drafts/loopbox/resource-impact.example.json create mode 100644 sdk/drafts/loopbox/test_reference.py create mode 100644 sdk/drafts/loopbox/verify.py diff --git a/sdk/drafts/loopbox/LICENSE b/sdk/drafts/loopbox/LICENSE new file mode 100644 index 0000000000..250cae34a6 --- /dev/null +++ b/sdk/drafts/loopbox/LICENSE @@ -0,0 +1,30 @@ +MIT License + +Copyright (c) 2026 jrs1717 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +This licence covers this module's own source code and documentation only. It +does not extend to any Elektron Music Machines firmware, which is not +distributed here and remains the property of its copyright holder. Nothing in +this module is endorsed by, supported by, or affiliated with Elektron. +Octatrack and Elektron are trademarks of Elektron Music Machines MAV AB, used +only to identify the hardware this module targets. diff --git a/sdk/drafts/loopbox/README.md b/sdk/drafts/loopbox/README.md new file mode 100644 index 0000000000..b45e736526 --- /dev/null +++ b/sdk/drafts/loopbox/README.md @@ -0,0 +1,65 @@ +# Loopbox + +Version 0.1.0 · by @jrs1717 · a draft: bit for bit against its model in `dsp_host`, not yet run on a unit. + +## Overview + +Loopbox is an automatic micro-looper for an audio track's FX2 slot. It keeps the last third of a second of the track and, on a note grid at the project's tempo, loops what was just played: +- **LAYER** stacks three loops of the same audio at different speeds. +- **SHUFL** cuts the loop into slices and replays them in a new order, as a repeating sequence. +- **SLIDE** glides two overlapping loops in pitch. + +Each type has variations A to D. Each read head fades in and out of the loop by its own position, so loops at any speed are click-free. MIX sets how far the loops replace the track, and TAIL lets a loop ring on after it ends. + +## Controls + +| Page | Knob | Name | Range | Default | What it does | +|---|---|---|---|---|---| +| Main | A | TIME | 1/64, 1/32, 1/16, 1/8, 1/4, 1/2 | 1/16 | The note grid at the project's tempo. Loops start only on it and last a whole slice. A slice longer than 179 ms plays as 2, 4, 8, 16 or 32 equal chunks, each looping the latest audio. | +| Main | B | ACT | 0-127 | 64 | How often a slice loops: 0 never, 127 about 70 % of slices. | +| Main | C | SHAP | 0-127 | 32 | The loops' fades: short at 0 (1/64 of a loop), rising evenly to a full swell. | +| Main | D | RPT | 1-8 | 2 | How many times the loop cycles in a chunk: 1 plays the whole chunk once, 8 loops an eighth of it eight times. | +| Main | E | MIX | 0-127 | 64 | Up to 96 the track plays dry between loops and ducks under each one; from 96 to 127 the dry fades out, so 127 is the loops alone. | +| Main | F | TAIL | 0-127 | 64 | After a loop, its heads loop on and fade: 0 none, 127 about 3 s. | +| Setup | A | TYPE | LAYER, SHUFL, SLIDE | LAYER | Which kind of loop (above). | +| Setup | B | DIRT | 0-127 | 0 | Grit on the loops: sample-rate reduction, harder crush and clipping drive. | +| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. SHUFL: A 4 slices, B 8, C 4 with every other one reversed, D 8 slices each played as a ratchet. SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed. | +| Setup | D | WIDE | 0-127 | 0 | Ping-pong: loops alternate left and right this far. | +| Setup | E | RAND | 0-127 | 0 | Chaos: random loop counts, speeds, glide targets and places. | +| Setup | F | DGRD | 0-127 | 0 | Degrade: a tail grows dirtier as it fades. | + +## Usage + +Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. FX2 shows the main page; press FX2 again for the setup page. + +## Quick tutorial + +1. Put Loopbox on FX2 of a track playing a drum loop. At the defaults it is LAYER A at 1/16, looping about half the slices. +2. Turn ACT to 127 and MIX to 127 to hear only the loops, then step TYPE through LAYER, SHUFL and SLIDE. +3. Set TIME to 1/4 and RPT to 1 for longer phrases, and raise TAIL to let each loop ring on. +4. Turn MIX back to 64 to blend the loops with the track again. + +## Compatibility and limitations + +- FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words, stopping short of Sidechain Compressor's key window). +- Loops follow the project's tempo but not yet the pattern's steps, track speed or swing, like Glitchbox: free-running tempo slices until the base has a step clock for effects ([issue #2491](https://github.com/repeat98/modwerk/issues/2491)). +- After a second of silent input no loop starts; after four seconds any loop or tail stops, so a stopped track falls silent. The watch listens to the mono sum the ring records. +- It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits. +- Declared incompatible with Analog BD, which currently requires the stock DSP effects, as every custom DSP effect is. + +## Tests and measurements + +See [TESTING.md](TESTING.md). + +## Authorship and licences + +Original code by @jrs1717 under the MIT licence in LICENSE. It starts from the author's own Glitchbox engine. Inspired by micro-loop effects in general, with no product's code, tables or names. + +## Screens and audio + +None yet. + +## Develop + +- Hear it: `npm run module:dev -- loopbox --cycles 331 --cycles-kind executed --state 120 --buffer 15870 --slots fx2`. +- Check it: `npm run module:doctor -- --draft loopbox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model. diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/drafts/loopbox/TESTING.md new file mode 100644 index 0000000000..eb29333dfb --- /dev/null +++ b/sdk/drafts/loopbox/TESTING.md @@ -0,0 +1,19 @@ +# Loopbox testing + +Record what you ran, on which build and which unit, and what you saw. "Not tested" is a valid answer; never write a result you did not observe, and keep emulator runs apart from hardware ones. + +## On the unit + +Not tested. + +## Stock flows + +Not tested. List the stock flows you compared with and without the module (docs/module-guides/README.md, Leave stock flows alone). + +## Sound quality + +Not tested. npm run fx:audit checks aliasing, DC, clipping and idle behaviour (docs/module-guides/effects.md, Sound quality). + +## Performance + +Not measured. Listing it needs evidence/performance.json: npm run perf:audit -- template dsp (docs/MODULE_PERFORMANCE.md). diff --git a/sdk/drafts/loopbox/engine.asm b/sdk/drafts/loopbox/engine.asm new file mode 100644 index 0000000000..7a79560106 --- /dev/null +++ b/sdk/drafts/loopbox/engine.asm @@ -0,0 +1,1359 @@ +; LOOPBOX -- an original micro-loop effect for FX2 of any track. +; Copyright (c) 2026 jrs1717, MIT (LICENSE). +; +; The track's mono sum, at a quarter of full scale, goes into a ring of +; 15,870 words in the FX2 slot's own buffer (it stops at +$3DFD, so +; Sidechain Compressor's key window stays free). On an FX1-sized slot +; (allocator base under $4000) the frames pass dry. +; +; A slice is TIME (1/64 to 1/2) at the project's tempo (tempo24 at r6+$13). +; It plays as 1, 2, 4, 8, 16 or 32 chunks of at most 7,900 samples. At each +; slice boundary, judged at the start of a call (a block of 16 frames at most) +; and with a chunk captured, ACT is the chance that the slice loops. A loop +; takes the latest chunk / RPT of the ring as its window, once a chunk, and +; plays it with three read heads that wrap inside the window: +; LAYER heads at 1/2, 1/4 and 1/4: the loop at its speed, and A an octave +; up and down, B a fifth up and a fourth down, C reversed and an +; octave down, D two random speeds +; SHUFL one head: the window cut into 4 (A, C) or 8 (B, D) slices played in +; a shuffled order, RPT times (C reverses every other slice, D plays +; each slice's first half twice) +; SLIDE two heads half a window apart, gliding over the chunk: A up an +; octave, B down an octave, C one up and one down, D to a random speed +; Each head fades by its own position, min(p, W - p) x K (K = 2^28 / F, F the +; window x SHAP's share, at least 64 samples), so a head at any speed wraps +; without a click; the chunk has its own envelope over it. The window always +; lies behind the write position and a loop lasts a chunk at a time, so the +; writer never reaches it. TAIL (slot 5): when a loop ends its heads loop on, +; steady in pitch, under a gain that decays a sample at c (about 3 s to +; -60 dB at 127; 0 no tail) until -72 dB or the next loop. Should the writer +; come within 32 samples of the window, the ring freezes; a loop due then ends +; the tail and waits for a fresh chunk. After a second of silence in no loop +; starts; after four, any loop or tail stops and the ring records again. +; +; Knobs (value<<16): page 1 TIME r6+0 (0-5), ACT r6+1, SHAP r6+2, RPT r6+3 +; (0-7: 1-8 cycles), MIX r6+4, TAIL r6+5; page 2 TYPE slot 6 (r6+$c bits 16-23, +; 0-2), DIRT slot 7, VAR slot 8 (r6+$d bits 16-23, 0-3), WIDE slot 9, RAND +; slot 10, DGRD slot 11. MIX glides per sample and snaps within 64 LSB. Between +; loops the track plays dry (a tail echoes over it at MIX); while a loop plays +; the dry ducks by D x the chunk's envelope (D = 4/3 MIX, whole at 96); from 96 +; to 127 the dry fades out everywhere: 127 is the loops alone. +; +; State (X, offsets from r7; init clears $00..$77): +; $00 ring base (Y) $01 live (an FX2-sized slot) $02 write index +; $03 the write step (1) $04 samples captured $05 LFSR $06 playing +; $07 samples into the slice $08 a chunk $09 events left in the chunk +; $0a event number $0b window start (Y) $0c W, the window less one +; $0d/$0e head 0 position hi/lo $0f head 0 rate (Q21) +; $10 the chunk's phase u $11 its step $12 its fade slope Am $13 K, the heads' fade slope +; $14 crush mask (whole) $15 the tail's gain $16 the loop (chunk / RPT) $17 the tail's decay +; $18 a tail playing $19 samples to the next event $1a/$1b MIX target/run $1c the dry's gain +; $1d TYPE $1e VAR $1f ACT $20 Am from SHAP $21 RPT $22 TIME $23 tempo24 +; $24-$27 random speeds (Q21) $2c seeded $2d the phase's wrap (never) $2e/$2f the frame's L/R +; $30 the heads' sum $31 the loop $32 TAIL's decay $33 SHAP's share of a window $34 the chunk now +; $36-$3b LAYER's speeds for A-C $3f P (1 in a loop) +; $40 chunks in a slice of TIME $41 the chunk's place in it $42 chunks left in the loop +; $43 D, the loop's gain $44 K, the dry's ceiling $45 events in a chunk (RPT, x N for SHUFL) +; $46 the crush mask (DIRT's) $47 DIRT's hold N $48 its countdown $49 the held sample +; $4a/$4b DIRT's drive and level $4c/$4d WIDE's left/right gain $4e WIDE $4f RAND $50 DGRD +; $51 DIRT $52 scratch $53 samples of silence in $54 the call's loudest input +; $55-$57 the heads' faded reads (scratch) $58-$5f DIRT's crush masks +; $60-$64 head 1: position hi/lo, rate, glide, gain $65-$69 head 2: the same (no glide) +; $6a/$6b head 0's glide and gain $6c SHUFL's N $6d a slice $6e the window's ring index +; $6f-$76 SHUFL's slice order $77 the tail's hold (the chunk's envelope whole) +; Nothing above $77 is touched. Every product is the signed mpy/mac x0,y1 +; form. Labels are gb and two characters, so none is another's prefix. +; CYCLES_FORWARD_BRANCHES +init: + clr a + move r7,r5 + move #>$ffffff,m5 + do #$78,>gbi0 + move a,x:(r5)+ +gbi0: + nop + move x:>$213,r4 + move #>$ffffff,m4 + nop + move x:(r4),x0 + move x0,x:(r7+$00) + move x0,x:(r7+$0b) + move x0,a + move #>$4000,x0 + sub x0,a + clr b + move #>$1,x0 + tst a + tpl x0,b + move b,x:(r7+$01) + move #>$1,x0 + move x0,x:(r7+$03) + move #>$7fffff,x0 + move x0,x:(r7+$15) + move x0,x:(r7+$2d) + move #>$123456,x0 + move x0,x:(r7+$05) + move #>$080000,x0 + move x0,x:(r7+$24) + move #>$100000,x0 + move x0,x:(r7+$25) + move #>$400000,x0 + move x0,x:(r7+$26) + move #>$600000,x0 + move x0,x:(r7+$27) + move #>$400000,x0 + move x0,x:(r7+$36) + move #>$100000,x0 + move x0,x:(r7+$37) + move #>$2ff222,x0 + move x0,x:(r7+$38) + move #>$17f911,x0 + move x0,x:(r7+$39) + move #>$e00000,x0 + move x0,x:(r7+$3a) + move #>$100000,x0 + move x0,x:(r7+$3b) + move #>$ffffff,x0 + move x0,x:(r7+$14) + move #>$ffffff,x0 + move x0,x:(r7+$58) + move #>$fff000,x0 + move x0,x:(r7+$59) + move #>$ffc000,x0 + move x0,x:(r7+$5a) + move #>$ff8000,x0 + move x0,x:(r7+$5b) + move #>$ff0000,x0 + move x0,x:(r7+$5c) + move #>$fe0000,x0 + move x0,x:(r7+$5d) + move #>$fc0000,x0 + move x0,x:(r7+$5e) + move #>$f80000,x0 + move x0,x:(r7+$5f) + rts + +proc: + move x:(r7+$01),a + tst a + beq gbzz + move #>$ffffff,m4 + move #>$ffffff,m5 +; TIME: slot 0, at most 5 + move x:(r6+$0),a + and #>$7f0000,a + asr #$10,a,a + move #>$5,x0 + cmp x0,a + tgt x0,a + move a1,x:(r7+$22) +; ACT, tempered: 127 glitches about 70 % of the slices + move x:(r6+$1),a + and #>$7fffff,a + move a1,x0 + move #>$5a0000,y1 + mpy x0,y1,a + move a,x:(r7+$1f) +; SHAP: the fade is 1/64 of a repeat at 0, rising evenly to 1/2: +; Am = 1 / (1 + 31 s), as (2^41 - 2) over 2 x 2^17 (1 + 31 s) + move x:(r6+$2),a + and #>$7fffff,a + move a1,x0 + move #>$3e0000,y1 + mpy x0,y1,b + move b1,x0 + move #>$20000,b + add x0,b + move b1,x0 + move x0,x:(r7+$33) + move #>$1ffff,a + move #>$fffffe,a0 + bsr gbdi + move x0,x:(r7+$20) +; RPT: slot 3, 0-7, one more repeat + move x:(r6+$3),a + and #>$7f0000,a + asr #$10,a,a + move #>$7,x0 + cmp x0,a + tgt x0,a + add #>$1,a + move a1,x:(r7+$21) +; TAIL: slot 5; 0 no tail, else the decay a sample, c_min + (c_max - c_min)(1 - t)^3 + move x:(r6+$5),a + and #>$7fffff,a + move a1,x1 + move #>$7fffff,a + sub x1,a + move a,x0 + move x0,y1 + mpy x0,y1,a + move a,y1 + mpy x0,y1,a + move a,x0 + move #>$0064ea,y1 + mpy x0,y1,a + move #>$0001b6,y0 + add y0,a + move x1,b + move #>$10000,y0 + cmp y0,b + move #>$0,y1 + tlt y1,a + move a,x:(r7+$32) +; MIX: 127 and above exactly full wet + move x:(r6+$4),a + and #>$7fffff,a + move a1,x0 + move x0,a + move #>$7f0000,y0 + cmp y0,a + move #>$7fffff,y1 + tge y1,a + move a1,x:(r7+$1a) +; TYPE: slot 6, at most 2 + move x:(r6+$c),a + and #>$7f0000,a + asr #$10,a,a + move #>$2,x0 + cmp x0,a + tgt x0,a + move a1,x:(r7+$1d) +; VAR: slot 8, at most 3 + move x:(r6+$d),a + and #>$7f0000,a + asr #$10,a,a + move #>$3,x0 + cmp x0,a + tgt x0,a + move a1,x:(r7+$1e) +; DIRT slot 7 (r6+$c bits 8-15), WIDE slot 9 (r6+$d bits 8-15), RAND slot 10 (r6+$e bits 16-23), +; DGRD slot 11 (r6+$e bits 8-15), each as v<<16. + move x:(r6+$c),a + and #>$00ff00,a + asl #8,a,a + move a1,x:(r7+$51) + move x:(r6+$d),a + and #>$00ff00,a + asl #8,a,a + move a1,x:(r7+$4e) + move x:(r6+$e),a + and #>$7f0000,a + move a1,x:(r7+$4f) + move x:(r6+$e),a + and #>$00ff00,a + asl #8,a,a + move a1,x:(r7+$50) +; tempo24, clean; none or under 30 BPM is 120, over 300 is 300 + move x:(r6+$13),b + asr #$8,b,b + move b1,x0 + move x0,b + move #>$2d0,x0 + cmp x0,b + move #>$b40,x0 + tlt x0,b + move #>$1c20,x0 + cmp x0,b + tgt x0,b + move b1,x:(r7+$23) +; L = TIME's samples: 2 x samples-per-note x tempo24 over 2 tempo24 + move x:(r7+$22),b + move #>$0,a + move #>$791fd0,a0 + move #>$1,x0 + cmp x0,b + blt gbtd + move #>$0,a + move #>$f23fa0,a0 + move #>$2,x0 + cmp x0,b + blt gbtd + move #>$1,a + move #>$e47f40,a0 + move #>$3,x0 + cmp x0,b + blt gbtd + move #>$3,a + move #>$c8fe80,a0 + move #>$4,x0 + cmp x0,b + blt gbtd + move #>$7,a + move #>$91fd00,a0 + move #>$5,x0 + cmp x0,b + blt gbtd + move #>$f,a + move #>$23fa00,a0 +gbtd: + move x:(r7+$23),x0 + bsr gbdi + move x0,b + move #>$1,x1 + move #>7900,x0 + cmp x0,b + ble gbh1 + asr #$1,b,b + move b1,y0 + move y0,b + move x1,a + asl #1,a,a + move a1,x1 +gbh1: + cmp x0,b + ble gbh2 + asr #$1,b,b + move b1,y0 + move y0,b + move x1,a + asl #1,a,a + move a1,x1 +gbh2: + cmp x0,b + ble gbh3 + asr #$1,b,b + move b1,y0 + move y0,b + move x1,a + asl #1,a,a + move a1,x1 +gbh3: + cmp x0,b + ble gbh4 + asr #$1,b,b + move b1,y0 + move y0,b + move x1,a + asl #1,a,a + move a1,x1 +gbh4: + cmp x0,b + ble gbh5 + asr #$1,b,b + move b1,y0 + move y0,b + move x1,a + asl #1,a,a + move a1,x1 +gbh5: + move b1,x:(r7+$08) + move x1,x:(r7+$40) +; The first call after init starts MIX on its target and the clock on L. + move x:(r7+$2c),a + tst a + bne gbsd + move x:(r7+$1a),x0 + move x0,x:(r7+$1b) + move #>$7fffff,x0 + move x0,x:(r7+$1c) + move x:(r7+$08),x0 + move x0,x:(r7+$19) + move #>$1,x0 + move x0,x:(r7+$2c) +gbsd: + move x:(r7+$1a),a + move x:(r7+$1b),x0 + sub x0,a + abs a + move #>64,x0 + cmp x0,a + move x:(r7+$1b),b + move x:(r7+$1a),y0 + tlt y0,b + move b1,x:(r7+$1b) +; The tail: over below -72 dB; the writer kept off its window by a freeze. + move x:(r7+$18),a + tst a + beq gbt9 + move x:(r7+$15),a + move #>$002000,x0 + cmp x0,a + bge gbt5 + clr a + move a,x:(r7+$18) + move a,x:(r7+$12) + move a,x:(r7+$17) + move a,x:(r7+$77) + move #>$7fffff,x0 + move x0,x:(r7+$15) + move x0,x:(r7+$2d) + bra gbt9 +gbt5: + move x:(r7+$03),a + tst a + beq gbt9 + move x:(r7+$6e),a + move x:(r7+$02),x0 + sub x0,a + move #>$0,y0 + move #>15870,x0 + tst a + move x0,b + tge y0,b + add b,a + move #>32,x0 + cmp x0,a + bgt gbt9 + clr a + move a,x:(r7+$03) +gbt9: +; Neither a glitch nor a tail, and frozen: record again, from nothing captured. + move x:(r7+$03),a + tst a + bne gbt8 + move x:(r7+$06),a + tst a + bne gbt8 + move x:(r7+$18),a + tst a + bne gbt8 + move #>$1,x0 + move x0,x:(r7+$03) + clr a + move a,x:(r7+$04) +gbt8: +; Four seconds of silence in (the transport stopped): no glitch, no tail, and the ring records again. + move x:(r7+$53),a + move #>176400,x0 + cmp x0,a + blt gbz1 + clr b + move b,x:(r7+$18) + move b,x:(r7+$12) + move b,x:(r7+$06) + move b,x:(r7+$17) + move b,x:(r7+$04) + move b,x:(r7+$77) + move #>$7fffff,x0 + move x0,x:(r7+$15) + move x0,x:(r7+$2d) + move #>$1,x0 + move x0,x:(r7+$03) +gbz1: +; A slice boundary: the next repeat, the end of a glitch, or the decision. + move x:(r7+$07),a + move x:(r7+$19),x0 + cmp x0,a + blt gbnv + bsr gbev +gbnv: +; P: 1 while a glitch plays, else 0 (a tail echoes over the whole track). + move x:(r7+$06),b + move #>$7fffff,x0 + clr a + tst b + tne x0,a + move a1,x:(r7+$3f) +; d = DIRT, and in a tail DGRD x how far it has faded: the crush (MASKS[d/16] with VAR's), the hold +; (a new sample every 1 + d/8), the drive (x (1/4 + 3/4 d) x 4, clipped, then x (1 - d/2)). + move x:(r7+$51),a + move x:(r7+$18),b + tst b + beq gbd1 + move x:(r7+$15),x0 + move #>$7fffff,b + sub x0,b + move b,x0 + move x:(r7+$50),y1 + mpy x0,y1,b + add b,a +gbd1: + move a,x0 + move x0,a + asr #20,a,a + add #>$58,a + move a1,n1 + move r7,r1 + move #>$ffffff,m1 + nop + move x:(r1+n1),y0 + move x:(r7+$14),a + and y0,a + move a1,x:(r7+$46) + move x0,a + asr #19,a,a + add #>$1,a + move a1,x:(r7+$47) + move #>$600000,y1 + mpy x0,y1,a + add #>$200000,a + move a,x:(r7+$4a) + move x0,a + asr #1,a,a + move a1,y0 + move #>$7fffff,b + sub y0,b + move b,x:(r7+$4b) + move x:(r7+$00),a + move x:(r7+$02),x0 + add x0,a + move a1,r4 + move #>$3dfd,m4 + move x:(r7+$03),n4 + move #>$3dfd,m5 + move #>$1,n0 + do n7,>gbsl +; MIX glides; D = 4/3 MIX (whole at 96), K = 4 (1 - MIX) (the dry's ceiling: whole up to 96, none at 127) + move x:(r7+$1a),a + move x:(r7+$1b),x0 + sub x0,a + asr #6,a,a + add x0,a + move a1,x:(r7+$1b) + move x:(r7+$1b),x0 + move #>$2aaaab,y1 + mpy x0,y1,a + add x0,a + move a,x:(r7+$43) + move #>$7fffff,a + sub x0,a + asl #2,a,a + move a,x:(r7+$44) +; The frame, and the ring at a quarter of the mono sum. + move x:(r0),x1 + move x:(r0+n0),y0 + move x1,x:(r7+$2e) + move y0,x:(r7+$2f) + move x1,a + add y0,a + asr #2,a,a + move a,y:(r4) + move (r4)+n4 +; The input's loudest sample this call, for the silence watch (the mono ring word: what a glitch can replay). + move a,x0 + move x0,a + abs a + move x:(r7+$54),b + cmp a,b + tlt a,b + move b1,x:(r7+$54) +; Head 0: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. + move x:(r7+$0b),r5 + move x:(r7+$0d),a + move x:(r7+$0e),a0 + move x:(r7+$0f),b + asr #21,b,b + add b,a + move x:(r7+$0c),x0 + move #>$0,y0 + cmp x0,a + move x0,b + tlt y0,b + sub b,a + tst a + move x0,b + tge y0,b + add b,a + move a1,x:(r7+$0d) + move a0,x:(r7+$0e) + move a1,n5 + move a0,b + lsr b + move b1,y1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + mac x0,y1,a + move a1,x1 + move x:(r7+$0d),a + move x:(r7+$0c),b + sub a,b + cmp b,a + tgt b,a + move a1,x0 + move x:(r7+$13),y1 + mpy x0,y1,a + asl #18,a,a + move a,x0 + move x1,y1 + mpy x0,y1,a + move a,x:(r7+$55) + move x:(r7+$0f),a + move x:(r7+$6a),x0 + add x0,a + move a1,x:(r7+$0f) +; Head 1: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. + move x:(r7+$0b),r5 + move x:(r7+$60),a + move x:(r7+$61),a0 + move x:(r7+$62),b + asr #21,b,b + add b,a + move x:(r7+$0c),x0 + move #>$0,y0 + cmp x0,a + move x0,b + tlt y0,b + sub b,a + tst a + move x0,b + tge y0,b + add b,a + move a1,x:(r7+$60) + move a0,x:(r7+$61) + move a1,n5 + move a0,b + lsr b + move b1,y1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + mac x0,y1,a + move a1,x1 + move x:(r7+$60),a + move x:(r7+$0c),b + sub a,b + cmp b,a + tgt b,a + move a1,x0 + move x:(r7+$13),y1 + mpy x0,y1,a + asl #18,a,a + move a,x0 + move x1,y1 + mpy x0,y1,a + move a,x:(r7+$56) + move x:(r7+$62),a + move x:(r7+$63),x0 + add x0,a + move a1,x:(r7+$62) +; Head 2: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. + move x:(r7+$0b),r5 + move x:(r7+$65),a + move x:(r7+$66),a0 + move x:(r7+$67),b + asr #21,b,b + add b,a + move x:(r7+$0c),x0 + move #>$0,y0 + cmp x0,a + move x0,b + tlt y0,b + sub b,a + tst a + move x0,b + tge y0,b + add b,a + move a1,x:(r7+$65) + move a0,x:(r7+$66) + move a1,n5 + move a0,b + lsr b + move b1,y1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + mac x0,y1,a + move a1,x1 + move x:(r7+$65),a + move x:(r7+$0c),b + sub a,b + cmp b,a + tgt b,a + move a1,x0 + move x:(r7+$13),y1 + mpy x0,y1,a + asl #18,a,a + move a,x0 + move x1,y1 + mpy x0,y1,a + move a,x:(r7+$57) +; The heads at their gains, then the crush mask (DIRT's). + move x:(r7+$55),x0 + move x:(r7+$6b),y1 + mpy x0,y1,a + move x:(r7+$56),x0 + move x:(r7+$64),y1 + mac x0,y1,a + move x:(r7+$57),x0 + move x:(r7+$69),y1 + mac x0,y1,a + move x:(r7+$46),x0 + and x0,a + move a1,x:(r7+$30) +; DIRT's hold: a new sample every N. + move x:(r7+$48),a + sub #>$1,a + move x:(r7+$49),b + move x:(r7+$30),x1 + move x:(r7+$47),x0 + tle x1,b + tle x0,a + move a1,x:(r7+$48) + move b,x:(r7+$49) +; The envelope: min(u, 1/2 - u) at the fade's slope, from 0 to 1: the whole repeat's, which the dry follows. + move x:(r7+$10),a + move x:(r7+$11),x0 + add x0,a + move x:(r7+$2d),x0 + cmp x0,a + move #>$0,y0 + move x0,b + tlt y0,b + sub b,a + move a1,x:(r7+$10) + move a1,x0 + move x:(r7+$12),y1 + mpy x0,y1,b + asl #7,b,b + move b,x1 + move #>$400000,b + sub x0,b + move b,x0 + mpy x0,y1,b + asl #7,b,b + move b,x0 + move x1,b + cmp x0,b + tgt x0,b + tst b + move #>$0,y0 + tmi y0,b + move x:(r7+$77),x0 + cmp x0,b + tlt x0,b +; The dry ducks under the repeat as it swells and comes back in its fades: 1 - D x env x P, +; at most K, so from MIX 96 to 127 the dry fades out everywhere. + move b,y1 + move x:(r7+$3f),x0 + mpy x0,y1,a + move a,x0 + move x:(r7+$43),y1 + mpy x0,y1,a + move a,x0 + move #>$7fffff,a + sub x0,a + move x:(r7+$44),x0 + cmp x0,a + tgt x0,a + move a,x:(r7+$1c) + move b,y1 +; The glitch: the replay (a quarter of the mono sum) x env, then x 2 (x 0.99999 x 2): half the +; mono sum, as loud as the dry track for a mono sample; limited at full scale. + move x:(r7+$49),x0 + mpy x0,y1,a + move a,x0 + move #>$7fffff,y1 + mpy x0,y1,a + asl #1,a,a +; DIRT's drive, clipped at full scale, and its level. + move a,x0 + move x:(r7+$4a),y1 + mpy x0,y1,a + asl #2,a,a + move a,x0 + move x:(r7+$4b),y1 + mpy x0,y1,a + move a,x0 + move x:(r7+$15),y1 + mpy x0,y1,a + move a,x:(r7+$31) +; The tail's gain decays at c (0 outside a tail). + move x:(r7+$15),x0 + move x:(r7+$17),y1 + mpy x0,y1,b + move x0,a + sub b,a + move a1,x:(r7+$15) +; Left and right: glitch x D x WIDE's side + dry x its gain. + move x:(r7+$31),x0 + move x:(r7+$43),y1 + mpy x0,y1,a + move a,x:(r7+$52) + move x:(r7+$52),x0 + move x:(r7+$4c),y1 + mpy x0,y1,a + move x:(r7+$2e),x0 + move x:(r7+$1c),y1 + mac x0,y1,a + move a,x:(r0)+ + move x:(r7+$52),x0 + move x:(r7+$4d),y1 + mpy x0,y1,a + move x:(r7+$2f),x0 + move x:(r7+$1c),y1 + mac x0,y1,a + move a,x:(r0)+ +gbsl: + nop + move r4,a + move x:(r7+$00),x0 + sub x0,a + move a1,x:(r7+$02) + move n7,x0 + move x:(r7+$07),a + add x0,a + move a1,x:(r7+$07) +; The silence watch: samples since the input last reached 64 LSB (at most $100000). + move x:(r7+$53),b + add x0,b + move #>$100000,x1 + cmp x1,b + tgt x1,b + move x:(r7+$54),a + move #>64,y1 + cmp y1,a + move #>$0,y0 + tge y0,b + move b1,x:(r7+$53) + clr a + move a,x:(r7+$54) + move x:(r7+$03),b + tst b + beq gbzz + move x:(r7+$04),a + add x0,a + move #>15854,y0 + cmp y0,a + tgt y0,a + move a1,x:(r7+$04) +; Back to linear addressing, as the code after us expects: m4 and m5 held the ring's modulus. +gbzz: + move #>$ffffff,m4 + move #>$ffffff,m5 + rts + +; A slice boundary. +gbev: + move x:(r7+$07),a + move x:(r7+$19),x0 + sub x0,a + cmp x0,a + move #>$0,y0 + tge y0,a + move a1,x:(r7+$07) + move x:(r7+$06),a + tst a + beq gbiw + move x:(r7+$09),a + sub #>$1,a + move a1,x:(r7+$09) + tst a + beq gbce + move x:(r7+$0a),a + add #>$1,a + move a1,x:(r7+$0a) + bsr gbsr + rts +; A chunk is over: the glitch goes on through its slice of TIME, or ends. +gbce: + bsr gbgp + move x:(r7+$42),a + sub #>$1,a + move a1,x:(r7+$42) + tst a + bgt gbcs +; The glitch is over. +gbst: + clr a + move a,x:(r7+$06) + move x:(r7+$32),a + tst a + bne gbtl + move a,x:(r7+$12) + bra gbid +gbtl: + move a1,x:(r7+$17) + move #>$1,x0 + move x0,x:(r7+$18) + move #>$7fffff,x0 + move x0,x:(r7+$77) + clr a + move a,x:(r7+$6a) + move a,x:(r7+$63) + move a,x:(r7+$68) + bra gbid +; Idle at a chunk's end. +gbiw: + bsr gbgp +gbid: + move x:(r7+$08),x0 + move x0,x:(r7+$19) +; Decided only on TIME's grid, and not after a second of silence in. + move x:(r7+$41),a + tst a + bne gbix + move x:(r7+$53),a + move #>44100,y0 + cmp y0,a + bge gbix + move x:(r7+$04),a + cmp x0,a + blt gbix + bsr gbrn + move x:(r7+$1f),a + cmp x0,a + ble gbix +; A tail froze the ring: end it, record again, and wait for a fresh chunk. + move x:(r7+$03),a + tst a + bne gbfr + clr a + move a,x:(r7+$18) + move a,x:(r7+$12) + move a,x:(r7+$17) + move a,x:(r7+$04) + move a,x:(r7+$77) + move #>$7fffff,x0 + move x0,x:(r7+$15) + move x0,x:(r7+$2d) + move #>$1,x0 + move x0,x:(r7+$03) + bra gbix +gbfr: + move x:(r7+$40),x0 + move x0,x:(r7+$42) +; A chunk starts. +gbcs: +; RAND: a random number of repeats, 1-8. + move x:(r7+$21),x0 + move x0,x:(r7+$45) + move x:(r7+$4f),a + tst a + beq gbr9 + bsr gbrn + move x:(r7+$4f),a + cmp x0,a + ble gbr9 + bsr gbrn + move #>$8,y1 + mpy x0,y1,a + add #>$1,a + move a1,x:(r7+$45) +gbr9: + move #>$1,x0 + move x0,x:(r7+$06) + move x0,x:(r7+$03) + clr a + move a,x:(r7+$0a) + move a,x:(r7+$18) + move a,x:(r7+$17) + move a,x:(r7+$77) + move #>$7fffff,x0 + move x0,x:(r7+$15) + move x0,x:(r7+$2d) +; The loop: a chunk / RPT, the latest audio behind the writer. + move x:(r7+$08),a + move a1,x:(r7+$34) + asr #23,a,a + move x:(r7+$45),x0 + bsr gbdi + move x0,x:(r7+$16) + move x0,x:(r7+$6d) + move x:(r7+$02),a + sub x0,a + move #>$0,y0 + move #>15870,x1 + tst a + move x1,b + tge y0,b + add b,a + move a1,x:(r7+$6e) + move x:(r7+$00),x1 + add x1,a + move a1,x:(r7+$0b) + move x0,a + sub #>$1,a + move a1,x:(r7+$0c) +; The chunk's own envelope, over the whole chunk. + clr a + move a,x:(r7+$10) + move #>$0,a + move #>$800000,a0 + move x:(r7+$34),b + sub #>$1,b + move b1,x0 + bsr gbdi + move x0,x:(r7+$11) + move x:(r7+$20),x0 + move x0,x:(r7+$12) +; Every head at rest: no position, glide or gain, a rate of 1. + clr a + move #>$200000,x0 + move a,x:(r7+$0d) + move a,x:(r7+$0e) + move a,x:(r7+$6a) + move a,x:(r7+$6b) + move x0,x:(r7+$0f) + move a,x:(r7+$60) + move a,x:(r7+$61) + move a,x:(r7+$63) + move a,x:(r7+$64) + move x0,x:(r7+$62) + move a,x:(r7+$65) + move a,x:(r7+$66) + move a,x:(r7+$68) + move a,x:(r7+$69) + move x0,x:(r7+$67) + move #>$1,x0 + move x0,x:(r7+$6c) + move x:(r7+$1d),a + tst a + beq gbla + move #>$2,x0 + cmp x0,a + beq gbgl +; SHUFL: N slices of the loop (4, or 8 for B and D) in a new order, played RPT times. + move #>$7fffff,x0 + move x0,x:(r7+$6b) + move #>$4,x1 + move x:(r7+$1e),a + and #>$1,a + tst a + beq gbh8 + move #>$8,x1 +gbh8: + move x1,x:(r7+$6c) + move x:(r7+$16),a + asl #1,a,a + move a1,a0 + move #>$0,a1 + move x1,x0 + bsr gbdi + move x0,x:(r7+$6d) + move r7,a + add #>$6f,a + move a1,r1 + move #>$ffffff,m1 + clr a + do #8,>gbhp + move a1,x:(r1)+ + add #>$1,a +gbhp: + nop + move r7,a + add #>$6f,a + move a1,r1 + move x:(r7+$6c),a + sub #>$1,a + move a1,x:(r7+$55) + move a1,x0 + do x0,>gbhs + bsr gbrn + move x:(r7+$55),a + add #>$1,a + move a1,y1 + mpy x0,y1,a + move a1,n1 + nop + move x:(r1+n1),y0 + move x:(r7+$55),n1 + nop + move x:(r1+n1),x1 + move y0,x:(r1+n1) + move a1,n1 + nop + move x1,x:(r1+n1) + move x:(r7+$55),a + sub #>$1,a + move a1,x:(r7+$55) +gbhs: + nop + move x:(r7+$45),a + asl #2,a,a + move x:(r7+$6c),b + move #>$8,x0 + cmp x0,b + bne gbh9 + asl #1,a,a +gbh9: + move a1,x:(r7+$45) + bra gbse +; LAYER: three heads on the loop at different speeds, at 1/2, 1/4 and 1/4. +gbla: + move #>$400000,x0 + move x0,x:(r7+$6b) + move #>$200000,x0 + move x0,x:(r7+$64) + move x0,x:(r7+$69) + move x:(r7+$1e),a + move #>$3,x0 + cmp x0,a + beq gbl3 + asl #1,a,a + move a1,n1 + move #>$ffffff,m1 + lua (r7+$36),r1 + nop + move x:(r1+n1),x0 + move x0,x:(r7+$62) + lua (r7+$37),r1 + nop + move x:(r1+n1),x0 + move x0,x:(r7+$67) + bra gbl4 +gbl3: + bsr gbt0 + move x0,x:(r7+$62) + bsr gbt0 + move x0,x:(r7+$67) +gbl4: + move x:(r7+$4f),a + tst a + beq gbl5 + bsr gbrn + move x:(r7+$4f),a + cmp x0,a + ble gbl5 + bsr gbt0 + move x0,x:(r7+$62) +gbl5: + move x:(r7+$62),a + tst a + bpl gbl6 + move x:(r7+$0c),a + sub #>$1,a + move a1,x:(r7+$60) +gbl6: + bsr gbfa + bra gbse +; SLIDE: two heads half a loop apart, gliding over the chunk (A up an octave, B down, C apart, D to a random speed). +gbgl: + move #>$400000,x0 + move x0,x:(r7+$6b) + move x0,x:(r7+$64) + move x:(r7+$0c),a + asr #1,a,a + move a1,x:(r7+$60) + move #>$400000,x0 + move #>$100000,x1 + move x:(r7+$1e),a + tst a + bne gbg2 + move x0,x1 + bra gbg4 +gbg2: + move #>$1,y0 + cmp y0,a + bne gbg3 + move x1,x0 + bra gbg4 +gbg3: + move #>$3,y0 + cmp y0,a + bne gbg4 + bsr gbt0 + move x0,x1 +gbg4: + move x0,x:(r7+$55) + move x1,x:(r7+$56) + move x:(r7+$4f),a + tst a + beq gbg5 + bsr gbrn + move x:(r7+$4f),a + cmp x0,a + ble gbg5 + bsr gbt0 + move x0,x:(r7+$55) +gbg5: + move x:(r7+$55),x0 + bsr gbgo + move x0,x:(r7+$6a) + move x:(r7+$56),x0 + bsr gbgo + move x0,x:(r7+$63) + bsr gbfa +gbse: + move x:(r7+$45),x0 + move x0,x:(r7+$09) + bsr gbsr +gbix: + rts +; The next chunk of TIME's slice. +gbgp: + move x:(r7+$41),a + add #>$1,a + move x:(r7+$40),x0 + cmp x0,a + move #>$0,y0 + tge y0,a + move a1,x:(r7+$41) + rts + +; An event within the chunk: SHUFL's next slice; for every TYPE, WIDE's side. +gbsr: + move x:(r7+$1d),a + move #>$1,x0 + cmp x0,a + beq gbs1 + move x:(r7+$16),x0 + move x0,x:(r7+$19) + bra gbs9 +; The slice perm[k mod N]: its window, rate (C reverses every other one) and fade. +gbs1: + move x:(r7+$6c),a + sub #>$1,a + move a1,x0 + move x:(r7+$0a),a + and x0,a + move a1,n1 + move r7,a + add #>$6f,a + move a1,r1 + move #>$ffffff,m1 + nop + move x:(r1+n1),x0 + move x:(r7+$6d),y1 + mpy x0,y1,a + asr #1,a,a + move a0,x0 + move x:(r7+$6e),a + add x0,a + move #>15870,x0 + cmp x0,a + blt gbs2 + sub x0,a +gbs2: + move x:(r7+$00),x0 + add x0,a + move a1,x:(r7+$0b) + move x:(r7+$6d),a + move x:(r7+$1e),b + move #>$3,x0 + cmp x0,b + bne gbs3 + asr #1,a,a +gbs3: + sub #>$1,a + move a1,x:(r7+$0c) + clr a + move a,x:(r7+$0e) + move a,x:(r7+$0d) + move #>$200000,x0 + move x0,x:(r7+$0f) + move #>$2,x0 + cmp x0,b + bne gbs4 + move x:(r7+$0a),a + and #>$1,a + tst a + beq gbs4 + move #>$e00000,x0 + move x0,x:(r7+$0f) + move x:(r7+$0c),a + sub #>$1,a + move a1,x:(r7+$0d) +gbs4: + bsr gbfa + move x:(r7+$6d),x0 + move x0,x:(r7+$19) +gbs9: +; WIDE: the repeat's side, + on even repeats and - on odd; with RAND anywhere within it. + move x:(r7+$4e),a + move x:(r7+$0a),b + and #>$1,b + tst b + beq gbw1 + neg a +gbw1: + move a,x:(r7+$52) + move x:(r7+$4f),b + tst b + beq gbw2 + bsr gbrn + move x:(r7+$4f),a + cmp x0,a + ble gbw2 + bsr gbrn + move x0,a + sub #>$400000,a + asl #1,a,a + move a,x0 + move x:(r7+$4e),y1 + mpy x0,y1,a + move a,x:(r7+$52) +gbw2: + move x:(r7+$52),x0 + move #>$7fffff,y0 + move #>$7fffff,a + sub x0,a + cmp y0,a + tge y0,a + move a,x:(r7+$4d) + move #>$7fffff,b + add x0,b + cmp y0,b + tge y0,b + move b,x:(r7+$4c) + rts + +; The next LFSR word; x0 = a random fraction. +; x0 = a random speed from T0. +gbt0: + bsr gbrn + move #>$4,y1 + mpy x0,y1,a + move a1,n1 + lua (r7+$24),r1 + move #>$ffffff,m1 + nop + move x:(r1+n1),x0 + rts + +; x0 = the change a sample taking a rate of 1 to x0 over the chunk: (target - 1) / chunk, Q21. +gbgo: + move x0,a + sub #>$200000,a + tfr a,b + abs a + move a1,x0 + clr a + move x0,a0 + asl a + move x:(r7+$34),x0 + bsr gbdi + move x0,a + tst b + bge gbo1 + neg a +gbo1: + move a1,x0 + rts + +; A head's fade for the window now: F = (W + 1) x SHAP's share, at least 64; K = 2^28 / F. +gbfa: + move x:(r7+$0c),a + add #>$1,a + move a1,x0 + move x:(r7+$33),y1 + mpy x0,y1,a + move a1,x0 + move x0,a + move #>64,y0 + cmp y0,a + tlt y0,a + move a1,x0 + move #>$20,a + move #>$0,a0 + bsr gbdi + move x0,x:(r7+$13) + rts + +gbrn: + move x:(r7+$05),a + lsr a + bcc gbrc + move #>$e10000,x0 + eor x0,a +gbrc: + move a1,x:(r7+$05) + and #>$7fffff,a + move a1,x0 + rts + +; x0 = floor(a / (2 x0)): a the 48-bit dividend (effects.md, Traps). +gbdi: + andi #$fe,ccr + do #24,>gbdl + div x0,a +gbdl: + move a0,x0 + rts diff --git a/sdk/drafts/loopbox/manifest.py b/sdk/drafts/loopbox/manifest.py new file mode 100644 index 0000000000..efb920aaab --- /dev/null +++ b/sdk/drafts/loopbox/manifest.py @@ -0,0 +1,88 @@ +"""LOOPBOX -- an original micro-loop effect for FX2 of any track. + +The track's mono sum goes into a capture ring in the FX2 slot's buffer. At each slice (TIME at the project's +tempo) ACT decides whether the slice loops; a loop plays the latest audio with three read heads on one window, as +LAYER (heads at different speeds), SHUFL (the loop cut into slices and replayed in a new order) or SLIDE (two +overlapping heads gliding in pitch), each with four variations (VAR, page 2). SHAP sets the heads' fades, RPT how +many times a loop cycles in a chunk, MIX how far a loop replaces the track (dry between loops up to 96, the loops +alone at 127). Timing follows the tempo word only: slices are free-running at the tempo, not locked to the +pattern's steps or swing. + +verify.py holds engine.asm to reference.py's model bit for bit in dsp_host. Not yet run on a unit. +""" +import importlib.util +import pathlib + +from remix.schema import (Category, Claims, Proof, BusRole, DspSection, Formatter, Gate, Harness, Kind, + MenuEntry, Module, Param, YBase) + +# Under its own name: every module's manifest loads in one process, and another may have a reference.py too. +_spec = importlib.util.spec_from_file_location("loopbox_ref", pathlib.Path(__file__).with_name("reference.py")) +_ref = importlib.util.module_from_spec(_spec) +_spec.loader.exec_module(_ref) + +P, S, W = Formatter.PLAIN, Formatter.STEPPED, Formatter.WIDE_STEPPED + +MODULE = Module( + name="loopbox", + key="LOOPBOX", + kind=Kind.DSP_EFFECT, + doc="Micro-loop effect on FX2: LAYER, SHUFL, SLIDE loops of the track at the tempo.", + category=Category.TRACK, author="jrs1717", author_url="https://github.com/jrs1717", + proof=Proof.RENDER, + proof_note="verify.py bit-exact against reference.py in dsp_host; not yet run on a unit", + + menu=MenuEntry( + fx2_id=0x0a, + donor_desc=0x400d58b8, # DARK REV; every drawn slot is written below + abbr=b"LOOP", + fullname=b"LOOPBOX", + build_tag=False, + ), + + params=( + Param(b"TIME", 2, 6, active=True, formatter=W, labels=_ref.TIME_LABELS, + doc="slice length at the tempo, 1/64 to 1/2; loops start on it and last it, in chunks of 179 ms at most"), + Param(b"ACT", 64, 128, active=True, formatter=P, + doc="the share of slices that loop: 0 none, 127 about 70 %"), + Param(b"SHAP", 32, 128, active=True, formatter=P, + doc="the loops' fades: 1/64 of a loop at 0, rising evenly to a full swell"), + Param(b"RPT", 1, 8, active=True, formatter=W, labels=tuple(str(i) for i in range(1, 9)), + doc="how many times a loop cycles in a chunk: 1 the whole chunk once, 8 an eighth of it eight times"), + Param(b"MIX", 64, 128, active=True, formatter=P, + doc="how far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone"), + Param(b"TAIL", 64, 128, active=True, formatter=P, + doc="after a loop its heads loop on and fade: 0 none, 127 about 3 s"), + Param(b"TYPE", 0, 3, active=True, formatter=S, labels=_ref.TYPE_NAMES, + doc="LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch"), + Param(b"DIRT", 0, 128, active=True, formatter=P, + doc="grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean"), + Param(b"VAR", 0, 4, active=True, formatter=S, labels=_ref.VAR_NAMES, + doc="variation A-D: octaves, fifths, reversed or random layers; 4 or 8 slices, reversed or ratcheted; up, down, apart or random glides"), + Param(b"WIDE", 0, 128, active=True, formatter=P, + doc="ping-pong: loops alternate left and right this far; with RAND anywhere in it"), + Param(b"RAND", 0, 128, active=True, formatter=P, + doc="chaos: random loop counts, speeds, glide targets and places; 0 as set"), + Param(b"DGRD", 0, 128, active=True, formatter=P, + doc="degrade: a tail grows dirtier as it fades; 0 a clean fade"), + ), + mode_slot=6, + + dsp=DspSection( + asm="modules/loopbox/engine.asm", + priority=10, + bus_role=BusRole.NONE, + ybase=YBase.NEVER, + r7_latch_slot=None, + gate_label=None, + ), + # 15,870 words from the FX2 slot's base, ending at +$3DFD: Sidechain Compressor's key window stays free. + claims=Claims(stock_instance_buffer=True, buffer_words=_ref.R), + + harness=Harness(layout_char=None, is_server=False), + + gates=(Gate("modules/loopbox/verify.py", remix_arg=False),), + # the shortest slices, a loop every slice, eight cycles, SHUFL's eight ratcheted slices (its dearest), full wet + dear={"TIME": 0, "ACT": 127, "SHAP": 127, "RPT": 7, "MIX": 127, "TAIL": 127, "TYPE": 1, "DIRT": 127, "VAR": 3, + "WIDE": 127, "RAND": 127, "DGRD": 127}, +) diff --git a/sdk/drafts/loopbox/octamod.module.json b/sdk/drafts/loopbox/octamod.module.json new file mode 100644 index 0000000000..418ca2e7c3 --- /dev/null +++ b/sdk/drafts/loopbox/octamod.module.json @@ -0,0 +1,197 @@ +{ + "schemaVersion": 2, + "id": "loopbox", + "key": "LOOPBOX", + "name": "Loopbox", + "version": "0.1.0", + "category": "effects", + "author": { + "github": "jrs1717", + "credits": [ + "jrs1717" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "LOOP", + "family": "Looper", + "summary": "Automatic micro-loops on FX2: overlapping loops at different speeds, slices replayed in a new order, or loops gliding in pitch, all at the project's tempo.", + "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, SHUFL cuts the loop into slices and replays them in a shuffled order, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", + "highlights": [ + "Three types, four variations each: LAYER, SHUFL and SLIDE", + "Loops on a note grid from 1/64 to 1/2 at the project's tempo", + "Each read head fades by its own position, so loops at any speed are click-free", + "DIRT, WIDE ping-pong, RAND and a degrading TAIL on the setup page" + ], + "usage": [ + "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SHUFL and SLIDE." + ] + }, + "controls": [ + { + "name": "TIME", + "default": 2, + "count": 6, + "doc": "Slice length at the tempo, 1/64 to 1/2; loops start on it and last it, in chunks of 179 ms at most.", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ] + }, + { + "name": "ACT", + "default": 64, + "count": 128, + "doc": "The share of slices that loop: 0 none, 127 about 70 %.", + "labels": null + }, + { + "name": "SHAP", + "default": 32, + "count": 128, + "doc": "The loops' fades: 1/64 of a loop at 0, rising evenly to a full swell.", + "labels": null + }, + { + "name": "RPT", + "default": 1, + "count": 8, + "doc": "How many times a loop cycles in a chunk: 1 the whole chunk once, 8 an eighth of it eight times.", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "name": "MIX", + "default": 64, + "count": 128, + "doc": "How far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone.", + "labels": null + }, + { + "name": "TAIL", + "default": 64, + "count": 128, + "doc": "After a loop its heads loop on and fade: 0 none, 127 about 3 s.", + "labels": null + }, + { + "name": "TYPE", + "default": 0, + "count": 3, + "doc": "LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch.", + "labels": [ + "LAYER", + "SHUFL", + "SLIDE" + ] + }, + { + "name": "DIRT", + "default": 0, + "count": 128, + "doc": "Grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean.", + "labels": null + }, + { + "name": "VAR", + "default": 0, + "count": 4, + "doc": "Variation A-D: octaves, fifths, reversed or random layers; 4 or 8 slices, reversed or ratcheted; up, down, apart or random glides.", + "labels": [ + "A", + "B", + "C", + "D" + ] + }, + { + "name": "WIDE", + "default": 0, + "count": 128, + "doc": "Ping-pong: loops alternate left and right this far; with RAND anywhere in it.", + "labels": null + }, + { + "name": "RAND", + "default": 0, + "count": 128, + "doc": "Chaos: random loop counts, speeds, glide targets and places; 0 as set.", + "labels": null + }, + { + "name": "DGRD", + "default": 0, + "count": 128, + "doc": "Degrade: a tail grows dirtier as it fades; 0 a clean fade.", + "labels": null + } + ], + "compatibility": { + "firmware": "1.40C", + "location": "FX1", + "conflicts": [], + "uiClaims": [], + "limitations": [ + "Scaffold only; audio behavior and hardware operation have not been tested." + ], + "effectId": 10 + }, + "resources": { + "recorded": "Not measured", + "storage": { + "label": "Storage", + "display": "Not measured", + "value": null, + "unit": "unknown", + "method": "unmeasured", + "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "source": "TESTING.md" + }, + "processing": { + "label": "CPU / DSP load", + "display": "Not measured", + "value": null, + "unit": "unknown", + "method": "unmeasured", + "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "source": "TESTING.md" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "No tests have been run. Add tests.qualification with worst-case cycles, exact memory and attributed owner-reviewed hardware evidence before submitting. This scaffold cannot pass publication checks.", + "hardwareStatus": "untested", + "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ] + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Replace with accurate authorship, attribution and original/licensed source and media rights. Never include Elektron firmware, extracted routines or tables." + }, + "media": [], + "access": { + "location": "Describe the exact OT page or menu where the module is selected or enabled.", + "steps": [ + "Describe prerequisites, track/machine selection and the exact button/menu sequence." + ], + "screenshots": [] + } +} diff --git a/sdk/drafts/loopbox/perf.py b/sdk/drafts/loopbox/perf.py new file mode 100644 index 0000000000..355f56c0a6 --- /dev/null +++ b/sdk/drafts/loopbox/perf.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +"""Loopbox's performance measurements for evidence/performance.json, in dsp_host. + + python3 -B perf.py (the tools verify.py finds; several minutes) + python3 -B perf.py --stress (the stress run only) + +static the words of the per-sample loop, from the assembled symbols: everything between `do n7,>gbsl` and gbsl, + priced as sdk/octabam/tools/build/cycle_count.py prices straight-line code, one cycle a word. The loop has + no branch, no bsr, no nested do or rep (verify.py marks it CYCLES_FORWARD_BRANCHES), so every sample runs + every word. +measured executed instructions a sample from dsp_host's meter, one instance on verify.py's synthetic image: + the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and + DGRD at 127, RPT 8, VAR D) and a moving pattern (every slot swept by triangles, TYPE and VAR stepped, + everything jumped every 37 blocks), each unsplit and with a trig split at every position 1-15. +stress eight instances, four a core, each on its own stem (bursts, a full-scale square, a sweep, noise, + impulses, DC steps, silence, a chord), all twelve parameter words given a new value every block, + trig splits of 1, 3, 7, 8, 12 and 15 frames, under -guard 0x4000 -guard-shared and -dirty. dsp_host + hands every instance the same allocator entry, so the eight rings overlap here (on a unit each slot has + its own buffer); dsp_host writes a word a block into the instance at core 1 position 2 + (dsp_gate.HARNESS_WORD). +Then npm run perf:audit -- check evidence/performance.json --stamp (docs/MODULE_PERFORMANCE.md). +""" +import math +import pathlib +import random +import sys + +HERE = pathlib.Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import verify as V # noqa: E402 (finds sdk/octatrack/tools) + +G, R = V.G, V.R +Q = R.Q +BLOCKS = 4096 +SECONDS = 2 + + +def static(asm): + """The per-sample loop's words: from after `do n7,>gbsl` (two words) to gbsl.""" + syms = asm.syms + lines = G.listing(asm) + do = [addr for addr, line in lines.items() if line.mnemonic.lower() == "do" and "n7" in line.operands.lower() + and addr < syms["gbsl"]] + return syms["gbsl"] - (max(do) + 2) + + +def moving(blocks, seed=1): + """Every slot swept by triangles an eighth of a turn apart (TIME 0-5, RPT 0-7, TYPE 0-2, VAR 0-3 by their + steps), everything jumped at random every 37 blocks.""" + rnd = random.Random(seed) + rows = {} + for b in range(blocks): + tri = [min(127, 128 - abs(((b + 32 * k) % 256) - 128)) for k in range(12)] + row = list(tri) + row[0] = (b // 96) % 6 + row[3] = (b // 48) % 8 + row[6] = (b // 128) % 3 + row[8] = (b // 64) % 4 + if b % 37 == 0: + row = [rnd.randrange(128) for _ in range(12)] + row[0], row[3], row[6], row[8] = rnd.randrange(6), rnd.randrange(8), rnd.randrange(3), rnd.randrange(4) + rows[b] = tuple(row) + return rows + + +def dearest(t): + row = list(R.DEAREST) + row[R.TYPE_SLOT] = t + return tuple(row) + + +def stems(n, live): + rnd = random.Random(9) + on = lambda i, v: v if i < live else 0 # noqa: E731 + return [ + [on(i, round(0.9 * Q * (rnd.random() * 2 - 1) * math.exp(-(i % 11025) / 1500))) for i in range(n)], + [on(i, Q - 1 if (i // 110) % 2 else -Q) for i in range(n)], + [on(i, round(0.9 * Q * math.sin(2 * math.pi * (20 * (1000 ** (i / live))) * i / G.FS))) for i in range(n)], + [on(i, round(Q * (rnd.random() * 2 - 1))) for i in range(n)], + [on(i, Q - 1 if i % 4410 == 0 else 0) for i in range(n)], + [on(i, (Q - 1) if (i // 8820) % 2 else -Q) for i in range(n)], + [0] * n, + [on(i, round(0.3 * Q * sum(math.sin(2 * math.pi * f * i / G.FS) for f in (220, 277.2, 329.6)))) + for i in range(n)], + ] + + +def main(): + G.require_tools(HERE) + with G.workdir("loopbox-perf-") as tmp: + work = pathlib.Path(tmp) + asm = G.assemble(V.SOURCE, work) + if "--stress" not in sys.argv: + print(f"static: {static(asm)} cycles/sample (the per-sample loop's words)", flush=True) + sig = G.noise(16 * BLOCKS, 0.7, 5) + cases = {"defaults": dict(knobs=R.DEFAULTS), "moving": dict(rows=moving(BLOCKS))} + for t, name in enumerate(R.TYPE_NAMES): + cases[f"dearest {name}"] = dict(knobs=dearest(t)) + worst = (0.0, "") + for name, knobs in cases.items(): + found = {} + for split in range(16): + found[split] = G.run(asm, [G.Instance(sig, sig, **knobs)], split=split or None, tag="m").meter + if found[split] > worst[0]: + worst = (found[split], f"{name}, split {split}") + print(f"measured {name}: unsplit {found[0]:.2f}, worst with a split {max(found[s] for s in range(1, 16)):.2f}", + flush=True) + print(f"measured worst: {worst[0]:.2f} executed instructions a sample ({worst[1]})", flush=True) + + n = G.FS * SECONDS * 2 + insts = [G.Instance(s, s, rows=moving(n // 16, seed=k + 11), split=split, core=k // 4) + for k, (s, split) in enumerate(zip(stems(n, G.FS * SECONDS), (1, 3, 7, 8, 12, 15, 0, 0)))] + r = G.run(asm, insts, dirty=0x5a, guard="0x4000", extra=("-guard-shared",), check=False, tag="stress", timeout=3600) + print(f"stress: dsp_host exit {r.returncode}; meters {r.meters}; clobbers {sum(r.clobbers)}, stray {sum(r.stray)}") + for k, (core, pos) in enumerate(r.layout): + note = " (dsp_host's own word lands here)" if r.harness_word(k) else "" + print(f" instance {k}: core {core} pos {pos}, {r.per_instance[k]} a sample, {r.nonzero[k]} non-zero samples{note}") + if r.returncode: + print(r.stdout[-2000:]) + + +if __name__ == "__main__": + main() diff --git a/sdk/drafts/loopbox/qualification.example.json b/sdk/drafts/loopbox/qualification.example.json new file mode 100644 index 0000000000..f24ba06cd4 --- /dev/null +++ b/sdk/drafts/loopbox/qualification.example.json @@ -0,0 +1,84 @@ +{ + "moduleVersion": "0.1.0", + "sourceSha256": "REPLACE_WITH_NATIVE_SOURCE_SHA256", + "imageSha256": "REPLACE_WITH_LOCAL_TESTED_IMAGE_SHA256", + "cycles": [ + { + "processor": "dsp", + "worstCase": null, + "maxConfiguration": null, + "maxInstances": null, + "budget": null, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", + "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", + "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", + "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", + "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." + }, + "report": "TESTING.md" + } + ], + "memory": { + "regions": [ + { + "name": "Replace with each code, state, table, buffer, stack/heap and padding allocation", + "space": "dsp-p", + "words": null, + "wordBits": 24, + "bytes": null, + "scope": "shared" + } + ], + "perInstanceBytes": null, + "sharedBytes": null, + "maxInstances": null, + "totalBytes": null, + "conditions": "State exact build options, alignment, accounting convention, allocator/stack bounds and reused stock/shared memory; justify every absent allocation class.", + "report": "TESTING.md" + }, + "hardware": { + "status": "pending", + "model": "MKII", + "testedOn": "YYYY-MM-DD", + "tester": "Your credited tester handle; no email", + "project": { + "name": "Your local stress project", + "sha256": "REPLACE_WITH_PROJECT_FINGERPRINT", + "recipe": "Record generator/tool revision and command, local source template fingerprint, sample recipe, all settings and modifications needed to reproduce this stress project. Keep the project/card/firmware local." + }, + "durationMinutes": null, + "audioTracks": 8, + "midiTracks": null, + "conditions": { + "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", + "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", + "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", + "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", + "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." + }, + "checks": { + "audioContinuity": "failed", + "transport": "failed", + "controls": "failed", + "memoryIntegrity": "failed", + "recovery": "failed" + }, + "report": "TESTING.md", + "maxInstances": null + }, + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Explain setup and exactly where to select or enable the module.", + "Demonstrate the main controls with a useful example setting.", + "Explain what to hear/observe and how to stop, reset or bypass." + ] + }, + "screenshots": [], + "screenshotStyle": "black-and-white" + } +} diff --git a/sdk/drafts/loopbox/reference.py b/sdk/drafts/loopbox/reference.py new file mode 100644 index 0000000000..8103c8525d --- /dev/null +++ b/sdk/drafts/loopbox/reference.py @@ -0,0 +1,492 @@ +"""Loopbox's reference, imported by verify.py and test_reference.py. + +Model is engine.asm instruction by instruction, on 24-bit words and a 56-bit accumulator, so dsp_host's render +must match it to the bit (verify.py). The design is original: a capture ring in the FX2 slot's buffer, a slice +clock at the project tempo, and at each slice a decision (ACT) to loop the latest audio with three read heads on +one window, as LAYER (heads at different speeds over one loop), SHUFL (the loop cut into slices and replayed in a +new order) or SLIDE (two overlapping heads gliding in pitch), each with variations A-D. Each head fades in and out +of the window by its own position, so heads at any speed loop without a click. No product's code, tables or names. +""" +import math + +FS = 44100.0 +Q = 1 << 23 + +KNOBS = ("TIME", "ACT", "SHAP", "RPT", "MIX", "TAIL", "TYPE", "DIRT", "VAR", "WIDE", "RAND", "DGRD") +TYPE_SLOT, VAR_SLOT = 6, 8 +DEFAULTS = (2, 64, 32, 1, 64, 64, 0, 0, 0, 0, 0, 0) +DEAREST = (0, 127, 127, 7, 127, 127, 1, 127, 3, 127, 127, 127) +TYPE_NAMES = ("LAYER", "SHUFL", "SLIDE") +VAR_NAMES = ("A", "B", "C", "D") +TIME_LABELS = ("1/64", "1/32", "1/16", "1/8", "1/4", "1/2") +LAYER, SHUFL, SLIDE = 0, 1, 2 + +R = 15870 # the ring: words of the FX2 slot's buffer, ending at +$3DFD +FRESH_MAX = R - 16 # captured samples counted up to this +LMAX = 7900 # a chunk: a slice longer than this plays as 2, 4, 8, 16 or 32 chunks that fit (two and a margin in the ring) +# 2 x samples-per-note x tempo24 for each TIME (samples a beat = 63,504,000 / tempo24): (high word, low word) +TIME_DIVIDENDS = ((0, 0x791fd0), (0, 0xf23fa0), (1, 0xe47f40), (3, 0xc8fe80), (7, 0x91fd00), (15, 0x23fa00)) +ONE = 0x200000 # a rate of 1 (Q21) +T0 = (0x080000, 0x100000, 0x400000, 0x600000) # random rates: 0.25, 0.5, 2, 3 (Q21) +# LAYER's second and third heads for VAR A-C (Q21): an octave up and down; a fifth up and a fourth down; reversed and an octave down +LAYERS = (0x400000, 0x100000, 0x2ff222, 0x17f911, 0xe00000, 0x100000) +REVERSE = 0xe00000 # -1 (Q21) +SLIDE_UP, SLIDE_DOWN = 0x400000, 0x100000 # SLIDE's targets: an octave up, an octave down +ACT_SCALE = 0x5a0000 # ACT 127 loops about 70 % of the slices +MASKS = (0xffffff, 0xfff000, 0xffc000, 0xff8000, 0xff0000, 0xfe0000, 0xfc0000, 0xf80000) # DIRT's crush, by DIRT / 16 +DRIVE = 0x600000 # DIRT's drive: x (1 + 3 DIRT), as (1/4 + 3/4 DIRT) x 4, then x (1 - DIRT / 2) +THIRD = 0x2aaaab # 1/3: D = MIX + MIX/3, whole at MIX 96 +TAIL_MIN, TAIL_RANGE = 0x1b6, 0x64ea # the tail's decay a sample: about 3 s to -60 dB at TAIL 127, 50 ms near 0 +TAIL_END = 0x2000 # -72 dB: the tail is over +SILENT, SILENT_STOP, SILENT_MAX = 44100, 176400, 0x100000 # the silence watch: no new loop, then nothing +FADE_MIN = 64 # a head's fade is at least 64 samples: K = 2^28 / F stays a word, and min(p, W - p) x K x 2^19 a 56-bit sum +HALF, QUARTER = 0x400000, 0x200000 +SEED = 0x123456 +MAKEUP = 0x7fffff # the loop at half the mono sum: x 0.99999 then x 2, level with a mono sample +LFSR_TAPS = 0xe10000 + + +def notes(): + """The constants' formulas, for test_reference.py.""" + return { + "dividends": [2 * round(63504000 / d) for d in (16, 8, 4, 2, 1, 0.5)], + "T0": [round(r * (1 << 21)) for r in (0.25, 0.5, 2, 3)], + "LAYERS": [round(r * (1 << 21)) & 0xffffff for r in (2, 0.5, 2 ** (7 / 12), 2 ** (-5 / 12), -1, 0.5)], + } + + +# ---- the fixed-point model ------------------------------------------------- + +def s24(v): + v &= 0xffffff + return v - (1 << 24) if v & 0x800000 else v + + +def w56(a): + a &= (1 << 56) - 1 + return a - (1 << 56) if a >> 55 else a + + +def lim(a): + return max(-0x800000, min(0x7fffff, a >> 24)) + + +def hi(a): + return s24(a >> 24) + + +def ld(x): + return s24(x) << 24 + + +def mac(a, x, y): + return w56(a + 2 * s24(x) * s24(y)) + + +def mpy(x, y): + return mac(0, x, y) + + +def div(n, d): + """The 24-step div routine: floor(N / 2D), N the 48-bit dividend (effects.md, Traps).""" + return n // (2 * d) + + +def stepped(word, top): + return min((word & 0x7f0000) >> 16, top) + + +# The three heads' state words: position high and low, rate, its change a sample, gain. +HEADS = ((0x0d, 0x0e, 0x0f, 0x6a, 0x6b), (0x60, 0x61, 0x62, 0x63, 0x64), (0x65, 0x66, 0x67, 0x68, 0x69)) +PERM = 0x6f # SHUFL's slice order, 8 words + + +class Model: + """One instance of engine.asm on a buffer at `base`. call(frames, p) runs one proc on [(left, right)] with the + parameter block p (offset -> word) and returns [(left, right)].""" + + def __init__(self, base=0x4000, ring=None): + self.x = [0] * 0x78 + self.ring = ring if ring is not None else [0] * R + x = self.x + x[0x00] = x[0x0b] = base + x[0x01] = 1 if ld(base) - ld(0x4000) >= 0 else 0 + x[0x03] = 1 + x[0x15] = x[0x2d] = 0x7fffff + x[0x14] = s24(0xffffff) + x[0x05] = SEED + x[0x24:0x28] = list(T0) + x[0x36:0x3c] = [s24(v) for v in LAYERS] + x[0x58:0x60] = [s24(v) for v in MASKS] + + def rand(self): + x = self.x + v = x[0x05] & 0xffffff + carry = v & 1 + v >>= 1 + if carry: + v ^= LFSR_TAPS + x[0x05] = s24(v) + return v & 0x7fffff + + def call(self, frames, p): + x = self.x + if x[0x01] == 0: + return list(frames) + x[0x22] = stepped(p[0x0], 5) + x[0x1f] = lim(mpy(p[0x1] & 0x7fffff, ACT_SCALE)) + f = 0x20000 + hi(mpy(p[0x2] & 0x7fffff, 0x3e0000)) + x[0x33] = f # the fade's share of a window: 1/64 to 1/2 + x[0x20] = div((0x1ffff << 24) | 0xfffffe, f) + x[0x21] = stepped(p[0x3], 7) + 1 + t5 = p[0x5] & 0x7fffff + s = lim(ld(0x7fffff) - ld(t5)) + c = lim(mpy(lim(mpy(s, lim(mpy(s, s)))), TAIL_RANGE) + ld(TAIL_MIN)) + x[0x32] = 0 if t5 < 0x10000 else c + m = p[0x4] & 0x7fffff + x[0x1a] = 0x7fffff if m >= 0x7f0000 else m + x[0x1d] = stepped(p[0xc], 2) + x[0x1e] = stepped(p[0xd], 3) + x[0x51] = (p[0xc] & 0x00ff00) << 8 # DIRT, slot 7 + x[0x4e] = (p[0xd] & 0x00ff00) << 8 # WIDE, slot 9 + x[0x4f] = p[0xe] & 0x7f0000 # RAND, slot 10 + x[0x50] = (p[0xe] & 0x00ff00) << 8 # DGRD, slot 11 + t = s24(p.get(0x13, 0)) >> 8 + t = s24(t) + if t < 0x2d0: + t = 0xb40 + if t > 0x1c20: + t = 0x1c20 + x[0x23] = t + h, l = TIME_DIVIDENDS[x[0x22]] + length = div((h << 24) | l, t) + chunks = 1 + for _ in range(5): # up to 32 chunks: a 1/2 at 30 BPM still fits + if length > LMAX: + length >>= 1 + chunks <<= 1 + x[0x08] = length # a chunk + x[0x40] = chunks # chunks in a slice of TIME + if x[0x2c] == 0: + x[0x1b] = x[0x1a] + x[0x1c] = 0x7fffff + x[0x19] = x[0x08] + x[0x2c] = 1 + if abs(ld(x[0x1a]) - ld(x[0x1b])) < ld(64): + x[0x1b] = x[0x1a] + if x[0x18]: + if x[0x15] < TAIL_END: + self.quiet() + elif x[0x03]: + d = x[0x6e] - x[0x02] # the loop's window, from where the writer is + if d < 0: + d += R + if d <= 32: + x[0x03] = 0 + if x[0x03] == 0 and x[0x06] == 0 and x[0x18] == 0: + x[0x03] = 1 + x[0x04] = 0 + if x[0x53] >= SILENT_STOP: # four seconds of silence in: no loop, no tail, record again + self.quiet() + x[0x06] = x[0x04] = 0 + x[0x03] = 1 + if x[0x07] >= x[0x19]: + self.event() + # P: 1 while a loop plays, else 0 (a tail echoes over the whole track) + x[0x3f] = 0x7fffff if x[0x06] else 0 + # DIRT, and in a tail DGRD x how far it has faded: the crush, the hold, the drive + d = x[0x51] + if x[0x18]: + d = lim(ld(d) + mpy(lim(ld(0x7fffff) - ld(x[0x15])), x[0x50])) + x[0x46] = s24((x[0x14] & 0xffffff) & (x[0x58 + (d >> 20)] & 0xffffff)) + x[0x47] = (d >> 19) + 1 + x[0x4a] = lim(mpy(d, DRIVE) + ld(0x200000)) + x[0x4b] = lim(ld(0x7fffff) - ld(d >> 1)) + out = [self.sample(left, right) for left, right in frames] + n = len(frames) + x[0x07] += n + x[0x53] = min(x[0x53] + n, SILENT_MAX) + if x[0x54] >= 64: + x[0x53] = 0 + x[0x54] = 0 + if x[0x03]: + x[0x04] = min(x[0x04] + n, FRESH_MAX) + return out + + def quiet(self): + """No tail: the gains and the tail's flags back to rest.""" + x = self.x + x[0x18] = x[0x12] = x[0x17] = x[0x77] = 0 + x[0x15] = x[0x2d] = 0x7fffff + + def event(self): + x = self.x + x[0x07] -= x[0x19] + if x[0x07] >= x[0x19]: + x[0x07] = 0 + if x[0x06]: + x[0x09] -= 1 + if x[0x09] != 0: + x[0x0a] += 1 + self.setrep() + return + self.chunk() # a chunk is over + x[0x42] -= 1 + if x[0x42] > 0: # the loop goes on through its slice of TIME + self.start() + return + x[0x06] = 0 # the loop is over + if x[0x32] == 0: + x[0x12] = 0 + else: # its tail: the heads loop on, decaying, steady in pitch + x[0x17] = x[0x32] + x[0x18] = 1 + x[0x77] = 0x7fffff + x[0x6a] = x[0x63] = x[0x68] = 0 + else: + self.chunk() + x[0x19] = x[0x08] + if x[0x41] != 0: # decided only on TIME's grid + return + if x[0x53] >= SILENT: # and not after a second of silence in + return + if x[0x04] < x[0x08]: + return + r = self.rand() + if x[0x1f] - r <= 0: + return + if x[0x03] == 0: # a tail froze the ring: end it, record again, wait for a fresh chunk + self.quiet() + x[0x04] = 0 + x[0x03] = 1 + return + x[0x42] = x[0x40] + self.start() + + def chunk(self): + x = self.x + x[0x41] += 1 + if x[0x41] >= x[0x40]: + x[0x41] = 0 + + def fade(self): + """A head's fade for the window now: F = W x SHAP's share, at least FADE_MIN; K = 2^28 / F.""" + x = self.x + f = hi(mpy(x[0x0c] + 1, x[0x33])) + if f < FADE_MIN: + f = FADE_MIN + x[0x13] = div(0x20 << 24, f) + + def start(self): + """A chunk of the loop starts: the latest audio becomes its window, and the heads are set by TYPE and VAR.""" + x = self.x + x[0x06] = x[0x03] = 1 # a loop always records: its window lies behind the writer + x[0x0a] = x[0x18] = x[0x17] = x[0x77] = 0 + x[0x15] = x[0x2d] = 0x7fffff + x[0x45] = x[0x21] # RAND: a random number of loops, 1-8 + if x[0x4f] and x[0x4f] - self.rand() > 0: + x[0x45] = hi(mpy(self.rand(), 8)) + 1 + x[0x34] = x[0x08] + x[0x16] = lev = div(2 * x[0x08], x[0x45]) # the loop: a chunk / RPT + s = x[0x02] - lev + if s < 0: + s += R + x[0x6e] = s + x[0x0b] = x[0x00] + s + x[0x0c] = lev - 1 + x[0x10] = 0 # the chunk's own envelope, over the whole chunk + x[0x11] = div(0x800000, x[0x34] - 1) + x[0x12] = x[0x20] + kind, var = x[0x1d], x[0x1e] + # every head at rest, then TYPE's + for ph, pl, rt, dr, gn in HEADS: + x[ph] = x[pl] = x[dr] = x[gn] = 0 + x[rt] = ONE + x[0x6c] = 1 + x[0x6d] = lev + if kind == LAYER: + x[0x6b], x[0x64], x[0x69] = HALF, QUARTER, QUARTER + if var == 3: + x[0x62] = x[0x24 + hi(mpy(self.rand(), 4))] + x[0x67] = x[0x24 + hi(mpy(self.rand(), 4))] + else: + x[0x62] = x[0x36 + 2 * var] + x[0x67] = x[0x37 + 2 * var] + if x[0x4f] and x[0x4f] - self.rand() > 0: # RAND: the second head at a random speed + x[0x62] = x[0x24 + hi(mpy(self.rand(), 4))] + if x[0x62] < 0: + x[0x60] = x[0x0c] - 1 + self.fade() + elif kind == SLIDE: + x[0x6b] = x[0x64] = HALF + x[0x60] = x[0x0c] >> 1 # the second head half a loop on: two overlapping loops + up = SLIDE_UP + down = SLIDE_DOWN if var != 0 else SLIDE_UP + if var == 0: + up = down = SLIDE_UP + elif var == 1: + up = down = SLIDE_DOWN + elif var == 3: + up = down = x[0x24 + hi(mpy(self.rand(), 4))] + if x[0x4f] and x[0x4f] - self.rand() > 0: # RAND: a random target + up = x[0x24 + hi(mpy(self.rand(), 4))] + x[0x6a] = self.glide(up) + x[0x63] = self.glide(down) + self.fade() + else: # SHUFL: N slices of the loop in a new order, played RPT times + x[0x6b] = 0x7fffff + n = 8 if var in (1, 3) else 4 + x[0x6c] = n + x[0x6d] = div(2 * lev, n) + for i in range(8): + x[PERM + i] = i + for i in range(n - 1, 0, -1): + j = hi(mpy(self.rand(), i + 1)) + x[PERM + i], x[PERM + j] = x[PERM + j], x[PERM + i] + x[0x45] = x[0x45] * n + x[0x09] = x[0x45] + self.setrep() + + def glide(self, target): + """The change a sample that takes a rate of 1 to target over the chunk (Q21).""" + x = self.x + d = s24(target - ONE) + q = div(2 * abs(d), x[0x34]) + return -q if d < 0 else q + + def setrep(self): + """An event within the chunk: SHUFL's next slice; for every TYPE, WIDE's side.""" + x = self.x + k = x[0x0a] + if x[0x1d] == SHUFL: + j = x[PERM + (k & (x[0x6c] - 1))] + sl = x[0x6d] + s = x[0x6e] + j * sl + if s >= R: + s -= R + x[0x0b] = x[0x00] + s + w = sl + if x[0x1e] == 3: + w = sl >> 1 # D: the slice's first half twice, a ratchet + x[0x0c] = w - 1 + x[0x0e] = 0 + x[0x0f] = ONE + x[0x0d] = 0 + if x[0x1e] == 2 and k & 1: # C: every other slice reversed + x[0x0f] = REVERSE + x[0x0d] = x[0x0c] - 1 + self.fade() + x[0x19] = sl + else: + x[0x19] = x[0x16] + p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) # WIDE: left, right, left; with RAND anywhere in it + if x[0x4f] and x[0x4f] - self.rand() > 0: + r = self.rand() + p = lim(mpy(lim(w56((ld(r) - ld(0x400000)) << 1)), x[0x4e])) + x[0x52] = p + a = ld(0x7fffff) - ld(p) + if a - ld(0x7fffff) >= 0: + a = ld(0x7fffff) + b = ld(0x7fffff) + ld(p) + if b - ld(0x7fffff) >= 0: + b = ld(0x7fffff) + x[0x4d], x[0x4c] = lim(a), lim(b) + + def head(self, ph, pl, rt, dr, gn, acc): + """One read head: its position wraps inside the window at its rate, an interpolated read, faded by how far it + is from the window's ends, into the accumulator at its gain.""" + x, ring = self.x, self.ring + a = ld(x[ph]) + (x[pl] & 0xffffff) + a = w56(a + (ld(x[rt]) >> 21)) + w = x[0x0c] + if a - ld(w) >= 0: + a -= ld(w) + if a < 0: + a += ld(w) + x[ph], x[pl] = hi(a), a & 0xffffff + x[rt] = hi(ld(x[rt]) + ld(x[dr])) + fh = (a & 0xffffff) >> 1 + i = (x[0x0b] - x[0x00] + hi(a)) % R + s0, s1 = ring[i], ring[(i + 1) % R] + v = hi(mac(ld(s0), lim(ld(s1) - ld(s0)), fh)) + m = x[ph] + q = w - m + if m - q > 0: + m = q + e = lim(w56(mpy(m, x[0x13]) << 18)) + return mac(acc, lim(mpy(v, e)), x[gn]) + + def sample(self, left, right): + x, ring = self.x, self.ring + x[0x1b] = hi(((ld(x[0x1a]) - ld(x[0x1b])) >> 6) + ld(x[0x1b])) + m = x[0x1b] + x[0x43] = lim(mpy(m, THIRD) + ld(m)) # D: the loop's gain, whole at MIX 96 + x[0x44] = lim(w56((ld(0x7fffff) - ld(m)) << 2)) # K: the dry's ceiling, none at MIX 127 + x[0x2e], x[0x2f] = left, right + ring[x[0x02]] = v = lim((ld(left) + ld(right)) >> 2) + x[0x54] = max(x[0x54], abs(v)) # the mono ring word: what a loop can replay + x[0x02] = (x[0x02] + x[0x03]) % R + acc = 0 + for h in HEADS: + acc = self.head(*h, acc) + rep = s24((hi(acc) & 0xffffff) & (x[0x46] & 0xffffff)) + x[0x30] = rep + c = x[0x48] - 1 # DIRT's hold: a new sample every N + if c <= 0: + x[0x49] = rep + c = x[0x47] + x[0x48] = c + rep = x[0x49] + u = ld(x[0x10]) + ld(x[0x11]) + if u - ld(x[0x2d]) >= 0: + u -= ld(x[0x2d]) + u = hi(u) + x[0x10] = u + e1 = lim(w56(mpy(u, x[0x12]) << 7)) + e2 = lim(w56(mpy(lim(ld(0x400000) - ld(u)), x[0x12]) << 7)) + env = min(e1, e2) # the chunk's envelope; a tail holds it whole + if env < 0: + env = 0 + if env < x[0x77]: + env = x[0x77] + # the dry ducks under the loop as it swells and comes back in its fades + a = ld(0x7fffff) - ld(lim(mpy(lim(mpy(x[0x3f], env)), x[0x43]))) + if a - ld(x[0x44]) > 0: + a = ld(x[0x44]) + x[0x1c] = lim(a) + w = lim(w56(mpy(lim(mpy(rep, env)), MAKEUP) << 1)) + w = lim(w56(mpy(w, x[0x4a]) << 2)) # DIRT's drive, clipped at full scale + w = lim(mpy(w, x[0x4b])) + wet = lim(mpy(w, x[0x15])) + x[0x31] = wet + x[0x15] = hi(ld(x[0x15]) - mpy(x[0x15], x[0x17])) + x[0x52] = wd = lim(mpy(wet, x[0x43])) + return (lim(mac(mpy(wd, x[0x4c]), left, x[0x1c])), lim(mac(mpy(wd, x[0x4d]), right, x[0x1c]))) + + +def pblock(values, raw=None): + """dsp_host's parameter block for slot values (0-127) and raw words {offset: word} written after.""" + v = list(values) + [0] * (12 - len(values)) + p = {i: (v[i] & 0x7f) << 16 for i in range(6)} + for w in range(3): + p[0xc + w] = ((v[6 + 2 * w] & 0x7f) << 16) | ((v[7 + 2 * w] & 0x7f) << 8) + p.update(raw or {}) + return p + + +def render(left, right, knob_rows, frames=16, split=0, raw=None, base=0x4000): + m = Model(base) + out_l, out_r = [], [] + cur = knob_rows.get(0, DEFAULTS) + for blk in range((len(left) + frames - 1) // frames): + cur = knob_rows.get(blk, cur) + p = pblock(cur, raw) + lo = blk * frames + fr = list(zip(left[lo:lo + frames], right[lo:lo + frames])) + for part in ([fr[:split], fr[split:]] if split else [fr]): + if not part: + continue + for l, r in m.call(part, p): + out_l.append(l) + out_r.append(r) + return out_l, out_r, m diff --git a/sdk/drafts/loopbox/resource-impact.example.json b/sdk/drafts/loopbox/resource-impact.example.json new file mode 100644 index 0000000000..8f7457a054 --- /dev/null +++ b/sdk/drafts/loopbox/resource-impact.example.json @@ -0,0 +1,21 @@ +{ + "conditions": "Describe the active workload, expensive modes, changing controls, instance count, and whether shared/stock allocations are included.", + "cpu": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose minimal, low, moderate or high from source inspection or a documented workload comparison. Explain the ColdFire work and cite the record; do not invent a utilization percentage.", + "source": "TESTING.md" + }, + "dsp": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose a relative demand tier covering the expensive DSP modes and modulation. Minimal needs an explanation of the small or absent added DSP path.", + "source": "TESTING.md" + }, + "memory": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose a relative footprint tier covering code, state, tables and buffers. Distinguish shared reservations and reused stock buffers from extra per-instance memory.", + "source": "TESTING.md" + } +} diff --git a/sdk/drafts/loopbox/test_reference.py b/sdk/drafts/loopbox/test_reference.py new file mode 100644 index 0000000000..df2512ca81 --- /dev/null +++ b/sdk/drafts/loopbox/test_reference.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +"""Loopbox's host test: no DSP tools, no firmware. reference.py's constants against their formulas, and the +model's behaviour: loops happen as often as ACT asks, every TYPE and VAR changes the sound, the heads loop without +a click, silence stays silent, ACT 0 and MIX 0 leave the track alone. verify.py holds engine.asm to the same model +in dsp_host. + + python3 -B test_reference.py +""" +import pathlib +import random +import re +import sys +import unittest + +HERE = pathlib.Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import reference as R # noqa: E402 + +N = 16 * 2500 +FS = 44100 + + +def noise(seed, n=N, amp=0.5): + rnd = random.Random(seed) + return [round(amp * (rnd.random() * 2 - 1) * (R.Q - 1)) for _ in range(n)] + + +def knobs(**kw): + row = list(R.DEFAULTS) + names = {"time": 0, "act": 1, "shap": 2, "rpt": 3, "mix": 4, "tail": 5, "type": 6, "dirt": 7, "var": 8, + "wide": 9, "rand": 10, "dgrd": 11} + for name, value in kw.items(): + row[names[name]] = value + return tuple(row) + + +def tempo(bpm): + return {0x13: (bpm * 24) << 8} + + +class Constants(unittest.TestCase): + def test_constants_round_their_formulas(self): + n = R.notes() + self.assertEqual([(h << 24) | l for h, l in R.TIME_DIVIDENDS], n["dividends"]) + self.assertEqual(list(R.T0), n["T0"]) + self.assertEqual(list(R.LAYERS), n["LAYERS"]) + + def test_engine_carries_the_same_hex(self): + text = (HERE / "engine.asm").read_text().lower() + for w in [l for _, l in R.TIME_DIVIDENDS] + list(R.T0) + list(R.LAYERS) + list(R.MASKS) + [ + R.REVERSE, R.SLIDE_UP, R.SLIDE_DOWN, R.SEED, R.LFSR_TAPS, R.MAKEUP, R.ACT_SCALE, R.TAIL_MIN, + R.TAIL_RANGE, R.TAIL_END, R.THIRD, R.DRIVE]: + self.assertIn(f"#>${w:06x}", text) + + def test_the_loop_and_a_chunk_fit_the_ring(self): + self.assertLessEqual(2 * R.LMAX, R.FRESH_MAX) + + def test_labels(self): + labels = [l.lower() for l in re.findall(r"^([A-Za-z_][A-Za-z0-9_]*):", (HERE / "engine.asm").read_text(), re.M)] + self.assertFalse([(a, b) for a in labels for b in labels if a != b and b.startswith(a)]) + self.assertEqual(len(labels), len(set(labels))) + + +class Behaviour(unittest.TestCase): + def test_slice_lengths_follow_the_tempo(self): + for bpm, time, want in ((120, 2, 5512), (120, 0, 1378), (90, 2, 7350), (60, 3, 5512)): + m = R.Model() + m.call([(0, 0)], R.pblock(knobs(time=time), tempo(bpm))) + self.assertEqual(m.x[0x08], want, (bpm, time)) + + def test_the_slowest_half_note_fits_the_ring(self): + m = R.Model() + m.call([(0, 0)], R.pblock(knobs(time=5), tempo(30))) + self.assertLessEqual(m.x[0x08], R.LMAX) + self.assertEqual(m.x[0x40], 32) + + def test_mix_zero_and_act_zero_leave_the_track(self): + x = noise(1) + for row in (knobs(act=0), knobs(act=127, mix=0, tail=0)): + out = R.render(x, x, {0: row})[0] + self.assertLessEqual(max(abs(a - b) for a, b in zip(x, out)), 1, row) + + def test_act_sets_how_often(self): + def starts(act): + m, n = R.Model(), [0] + start = m.start + m.start = lambda: (n.__setitem__(0, n[0] + 1), start()) + x = noise(2) + row = R.pblock(knobs(act=act, time=1)) + for b in range(0, N, 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + return n[0] + self.assertEqual(starts(0), 0) + self.assertGreater(starts(127), starts(40)) + + def test_every_type_and_variation_sounds_different(self): + x = noise(3) + outs = {} + for t in range(3): + for v in range(4): + outs[(t, v)] = R.render(x, x, {0: knobs(act=127, time=1, mix=127, type=t, var=v)})[0] + keys = list(outs) + for i, a in enumerate(keys): + for b in keys[i + 1:]: + self.assertNotEqual(outs[a], outs[b], (a, b)) + + def test_layer_heads_play_at_their_speeds(self): + for v, (r1, r2) in enumerate(zip(R.LAYERS[0::2], R.LAYERS[1::2])): + m = R.Model() + x = noise(4, 16 * 600) + row = R.pblock(knobs(act=127, time=1, type=R.LAYER, var=v)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + if m.x[0x06]: + break + self.assertEqual((m.x[0x0f], m.x[0x62], m.x[0x67]), (R.ONE, R.s24(r1), R.s24(r2)), v) + self.assertEqual((m.x[0x6b], m.x[0x64], m.x[0x69]), (R.HALF, R.QUARTER, R.QUARTER)) + + def test_shufl_plays_every_slice_once_a_cycle(self): + for v, n in ((0, 4), (1, 8)): + m = R.Model() + x = noise(5, 16 * 600) + row = R.pblock(knobs(act=127, time=1, type=R.SHUFL, var=v)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + if m.x[0x06]: + break + self.assertEqual(m.x[0x6c], n) + self.assertEqual(sorted(m.x[R.PERM:R.PERM + n]), list(range(n))) + + def test_slide_glides_its_heads(self): + want = {0: (1, 1), 1: (-1, -1), 2: (1, -1)} + for v, (up, down) in want.items(): + m = R.Model() + x = noise(6, 16 * 600) + row = R.pblock(knobs(act=127, time=2, type=R.SLIDE, var=v)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + if m.x[0x06]: + break + sign = lambda w: (w > 0) - (w < 0) # noqa: E731 + self.assertEqual((sign(m.x[0x6a]), sign(m.x[0x63])), (up, down), v) + # half a loop on at the start, then the block just played (16 samples, gliding from a rate of 1) + self.assertLess(abs(m.x[0x60] - (m.x[0x0c] >> 1) - 16), 3) + + def test_a_head_is_silent_at_the_window_ends(self): + # The fade by position: at either end of the window a head contributes almost nothing, so a wrap is silent. + m = R.Model() + m.x[0x0c] = 1000 + m.x[0x33] = 0x100000 + m.fade() + for pos, most in ((0, 0), (999, 0x40000)): + m.x[0x0d], m.x[0x0e], m.x[0x0f], m.x[0x6a], m.x[0x6b] = pos, 0, 0, 0, 0x7fffff + m.ring[:] = [0x200000] * R.R + acc = m.head(*R.HEADS[0], 0) + self.assertLessEqual(abs(R.hi(acc)), most, pos) + + def test_tail_rings_on_after_a_loop(self): + x = noise(7) + def ringing(tail): + rows = {0: knobs(act=127, time=1, mix=96, tail=tail), 680: knobs(act=0, time=1, mix=96, tail=tail)} + out = R.render(x, x, rows)[0] + return sum(1 for a, b in zip(x[16 * 900:], out[16 * 900:]) if abs(a - b) > 2) + self.assertEqual(ringing(0), 0) + self.assertGreater(ringing(127), ringing(40)) + + def test_it_falls_silent_after_the_input_stops(self): + x = noise(8, FS * 7) + x = [v if i < FS else 0 for i, v in enumerate(x)] + for t in range(3): + out = R.render(x, x, {0: knobs(act=127, tail=127, type=t, mix=127, time=2)})[0] + self.assertFalse(any(out[FS * 6:]), t) + + def test_a_loop_never_starts_on_a_frozen_ring(self): + x = noise(9, 16 * (FS * 6 // 16)) + m, seen = R.Model(), [] + start = m.start + def watched(): + seen.append(m.x[0x03] == 1) + start() + m.start = watched + froze = False + row = R.pblock(knobs(act=40, tail=127, time=4, rpt=0, type=R.LAYER), tempo(95)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + froze = froze or (m.x[0x03] == 0) + self.assertTrue(froze) + self.assertTrue(seen and all(seen)) + + def test_silence_stays_silent(self): + z = [0] * N + for t in range(3): + out = R.render(z, z, {0: R.DEAREST[:6] + (t,) + R.DEAREST[7:]}) + self.assertFalse(any(out[0]) or any(out[1]), t) + + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/drafts/loopbox/verify.py b/sdk/drafts/loopbox/verify.py new file mode 100644 index 0000000000..ceacfd895a --- /dev/null +++ b/sdk/drafts/loopbox/verify.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +"""Loopbox's render gate: engine.asm assembled and run in dsp_host, held to reference.py's model. + + python3 -B verify.py (needs the DSP tools; a few minutes) + python3 -B verify.py --fx-audit PLAN RENDERS [--type N --var N] + +No firmware is read: the harness is sdk/octatrack/tools/dsp_gate.py, a synthetic image and dsp_host, whose +allocator hands the instance Y:$4000 (an FX2-sized slot). Knobs arrive as value << 16; TYPE is slot 6 and VAR +slot 8 (bits 16-23 of r6+$c and r6+$d); the tempo word, tempo24 << 8, is r6+$13. What this cannot see: the +composed image, the real dispatcher and allocator, the panel and the sound on a unit. + +Gates: + 1. Every instruction decodes as written (signed mpy/mac x0,y1, no rep, no mpysu/macsu), no label is a + prefix of another (case-blind), the state stays inside X:(r7+$00..$77), and proc returns with every + modifier register it set to a modulus linear again. + 2. Bit for bit the model: every TYPE and VAR looping at every slice, the defaults at three tempos, TIME 1/4 + and 1/2 through every chunk, every + knob swept, a tempo change while playing, a 5-frame trig split every block, a knob word carrying an LFO's + fraction bits, garbage state before init, state from two seeds, and an FX1-sized slot (dry). + 3. Silence in is exact silence out; a burst's tail ends in exact silence; after the input stops, every type falls + silent within 6 s at TAIL 127, and every TYPE and VAR at TIME 1/4 within 4.2 s (the silence watch). + 4. The cycle meter, printed for TESTING.md: every TYPE and VAR, the dearest setting, TAIL's ring-freeze path. +""" +import pathlib +import re +import sys + +HERE = pathlib.Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) + + +def _library(): + for base in HERE.parents: + if (base / "sdk/octatrack/tools/dsp_gate.py").is_file(): + return base / "sdk/octatrack/tools" + sys.exit("[FAIL] sdk/octatrack/tools/dsp_gate.py not found: run this inside a Modwerk checkout") + + +sys.path.insert(0, str(_library())) +import dsp_gate as G # noqa: E402 +import reference as R # noqa: E402 + +SOURCE = HERE / "engine.asm" +STATE_LAST = 0x77 + + +def knobs(base=R.DEFAULTS, **kw): + row = list(base) + [0] * (12 - len(base)) + names = {"time": 0, "act": 1, "shap": 2, "rpt": 3, "mix": 4, "tail": 5, "type": R.TYPE_SLOT, "dirt": 7, + "var": R.VAR_SLOT, "wide": 9, "rand": 10, "dgrd": 11} + for name, value in kw.items(): + row[names[name]] = value + return tuple(row) + + +def tempo(bpm): + return (bpm * 24) << 8 + + +def main(): + G.require_tools(HERE) + gate = G.Gates("loopbox") + with G.workdir("loopbox-verify-") as tmp: + work = pathlib.Path(tmp) + asm = G.assemble(SOURCE, work) + if "--fx-audit" in sys.argv: + plan, renders = sys.argv[sys.argv.index("--fx-audit") + 1:][:2] + t = int(sys.argv[sys.argv.index("--type") + 1]) if "--type" in sys.argv else 0 + v = int(sys.argv[sys.argv.index("--var") + 1]) if "--var" in sys.argv else 3 + for path in G.render_fx_audit(asm, plan, renders, knobs(R.DEAREST, type=t, var=v)): + print(path.name, flush=True) + return + + # 1. decodes as written + problems = G.trap_problems(asm, forms=("x0,y1",)) + gate("1 decodes as written: signed mpy/mac x0,y1, no rep, no mpysu/macsu", not problems, "; ".join(problems[:4])) + labels = [l.lower() for l in re.findall(r"^([A-Za-z_][A-Za-z0-9_]*):", SOURCE.read_text(), re.M)] + clashes = [(a, b) for a in labels for b in labels if a != b and b.startswith(a)] + [l for l in set(labels) if labels.count(l) > 1] + gate("1 no label is a prefix of another, case-blind (dsp_asm resolves labels by prefix)", not clashes, str(clashes)) + # Every modifier register proc sets to a modulus is linear again where proc returns (gbzz): the code that + # runs after an effect addresses with them (every published effect resets them; dsp_host cannot hear it). + text = SOURCE.read_text() + bent = sorted(set(re.findall(r"move\s+#>?\$(?!ffffff)[0-9a-fA-F]+,(m[0-7])", text))) + tail = text[text.index("\ngbzz:"):] + tail = tail[:tail.index("rts")] + unreset = [m for m in bent if not re.search(r"move\s+#>?\$ffffff," + m + r"\b", tail)] + gate("1 proc leaves every modifier register it bends linear again (" + ", ".join(bent) + ")", bool(bent) and not unreset, str(unreset)) + # lua (Rn+aa) takes a 7-bit signed offset: dsp_asm wraps a larger one without a word (DIRT's table at $58 + # read 40 words below r7 before this gate). + far = [l.strip() for l in text.splitlines() if re.search(r"\blua\s+\(r[0-7]\+\$([0-9a-fA-F]+)\)", l) + and int(re.search(r"\(r[0-7]\+\$([0-9a-fA-F]+)\)", l).group(1), 16) > 0x3f] + gate("1 every lua (Rn+aa) offset is within its 7 bits (at most $3f)", not far, "; ".join(far)) + offsets = G.state_offsets(SOURCE.read_text()) + gate("1 state inside X:(r7+$00..$77)", bool(offsets) and offsets[-1] <= STATE_LAST, f"(highest ${offsets[-1]:02x})") + + # 2. bit for bit the model + n = 16 * 3000 + nl, nr = G.noise(n, 0.6, 1), G.noise(n, 0.6, 2) + tl = [a + b for a, b in zip(G.tone(220, 0.4, n), G.noise(n, 0.1, 3))] + + def same(name, inst, raw=None, **kw): + r = G.run(asm, [inst], split=kw.get("split"), pwords=kw.get("pwords"), dirty=kw.get("dirty"), + image=kw.get("image")) + rows = inst.rows or {0: inst.knobs} + want = R.render(inst.left, inst.right, rows, split=kw.get("split") or 0, raw=raw, base=kw.get("base", 0x4000)) + gate.same(name, r.outputs[0], want[:2]) + return r + + def tempo_words(bpm): + return dict(pwords=[(0, 0x13, tempo(bpm))], raw={0x13: tempo(bpm)}) + + meters = {} + for t, tname in enumerate(R.TYPE_NAMES): + for v, vname in enumerate(R.VAR_NAMES): + row = knobs(time=0, act=127, rpt=3, shap=64, type=t, var=v) + meters[tname + vname] = same(f"2 {tname} {vname} looping at every slice", G.Instance(tl, nl, knobs=row)).meter + for bpm in (90, 120, 174): + same(f"2 the defaults at {bpm} BPM", G.Instance(nl, nr, knobs=R.DEFAULTS), **tempo_words(bpm)) + rows, block = {0: knobs(time=1, act=110)}, 40 + for slot, values in (("time", (0, 5, 4, 1)), ("act", (0, 127, 100)), ("shap", (0, 127, 40)), ("rpt", (0, 7, 2)), + ("mix", (0, 127, 100)), ("type", (1, 2, 0)), ("var", (1, 2, 3, 0)), + ("dirt", (127, 40)), ("wide", (127, 60)), ("rand", (127, 30)), ("dgrd", (127, 0))): + for value in values: + rows[block] = knobs(rows[max(rows)], **{slot: value}) + block += 120 + same("2 every knob swept while glitching", G.Instance(nl, nr, rows=rows)) + long_n = 16 * 14000 + ll, lr = G.noise(long_n, 0.6, 5), G.noise(long_n, 0.6, 6) + for time, label in ((4, "1/4"), (5, "1/2")): + same(f"2 TIME {label} at 120 BPM: glitches on its grid, through every chunk of the slice", + G.Instance(ll, lr, knobs=knobs(time=time, act=64)), **tempo_words(120)) + for t, tname in ((1, "SHUFL"), (0, "LAYER")): + same(f"2 {tname}, TIME 1/2 at 30 BPM: 32 chunks, each within the ring's reach", + G.Instance(ll, lr, knobs=knobs(time=5, act=127, rpt=1, type=t, var=1)), **tempo_words(30)) + frz2 = list(knobs(time=4, rpt=0, act=40, type=1)) + frz2[5] = 127 + same("2 TAIL 127, TIME 1/4, RPT 1: a glitch due while the tail froze the ring ends it and records again", + G.Instance(ll, lr, knobs=tuple(frz2)), **tempo_words(95)) + for t, tname in enumerate(R.TYPE_NAMES): + rows2 = {0: knobs(R.DEAREST, type=t, time=1, act=110), 400: knobs(R.DEAREST, type=t, time=1, act=0)} + same(f"2 {tname}: DIRT, WIDE, RAND and DGRD at full, glitches then a degrading tail", G.Instance(tl, nl, rows=rows2)) + same("2 a tempo change while playing (raw word every call)", G.Instance(nl, nr, knobs=knobs(time=0, act=127)), + pwords=[(0, 0x13, tempo(140))], raw={0x13: tempo(140)}) + same("2 a trig split every block", G.Instance(nl, nr, rows=rows), split=5) + word = (127 << 16) | 0xb700 + same("2 a knob word with an LFO's fraction bits", G.Instance(nl, nr, knobs=knobs(act=127, time=0)), + pwords=[(0, 1, word)], raw={1: word}) + same("2 garbage state before init", G.Instance(nl, nr, rows=rows), dirty=0x5a5a5a) + gate.two_seeds("2 the same output from state filled with two seeds: nothing read before it is written", + asm, [G.Instance(nl, nr, rows=rows)]) + same("2 an FX1-sized slot passes the track dry", G.Instance(nl, nr, knobs=knobs(act=127, time=0)), + image=asm.image(x={G.ALLOC_AT: 0x2000}, name="fx1"), base=0x2000) + + # 3. silence + z = [0] * n + for t, tname in enumerate(R.TYPE_NAMES): + (l, r), = G.run(asm, [G.Instance(z, z, knobs=knobs(R.DEAREST, type=t))], tag="zero").outputs + gate(f"3 {tname}: silence in, silence out at the dearest setting", not any(l + r)) + m = G.FS * 3 + x = G.burst(4410, m) + (l, r), = G.run(asm, [G.Instance(x, x, knobs=knobs(R.DEAREST, type=1))], tag="tail").outputs + gate("3 a burst's tail ends in silence", not any(l[-G.FS // 2:] + r[-G.FS // 2:])) + + stop = [v if i < G.FS else 0 for i, v in enumerate(G.noise(G.FS * 8, 0.6, 4))] + for t, tname in enumerate(R.TYPE_NAMES): + frow = list(knobs(R.DEAREST, type=t, time=2, act=40)) + frow[5] = 127 + (l, r), = G.run(asm, [G.Instance(stop, stop, knobs=tuple(frow))], tag="stop").outputs + gate(f"3 {tname}: falls silent within 6 s after the input stops, TAIL 127", not any(l[G.FS * 7:] + r[G.FS * 7:])) + + quiet = [v if i < G.FS * 2 else 0 for i, v in enumerate(G.noise(16 * (G.FS * 7 // 16), 0.6, 7))] + for t, tname in enumerate(R.TYPE_NAMES): + for v, vname in enumerate(R.VAR_NAMES): + q = knobs(time=4, act=64, type=t, var=v) + q = q[:5] + (127,) + q[6:] + r = G.run(asm, [G.Instance(quiet, quiet, knobs=q)], pwords=[(0, 0x13, tempo(95))], tag="quiet") + want = R.render(quiet, quiet, {0: q}, raw={0x13: tempo(95)}) + (l, rr), = r.outputs + ok = (l, rr) == tuple(want[:2]) and not any(l[int(G.FS * 6.2):] + rr[int(G.FS * 6.2):]) + gate(f"3 {tname} {vname}: TIME 1/4, TAIL 127, 95 BPM: bit for bit, and silent 4.2 s after the input stops", ok) + + # 4. cost: also at the dearest setting and on TAIL's ring-freeze path (TIME 1/4, RPT 1, TAIL 127) + for t, tname in enumerate(R.TYPE_NAMES): + meters["dear " + tname] = G.run(asm, [G.Instance(tl, nl, knobs=knobs(R.DEAREST, type=t))], tag="dear").meter + frz = list(knobs(R.DEAREST, type=t, time=4, rpt=0, act=40)) + frz[5] = 127 + meters["freeze " + tname] = G.run(asm, [G.Instance(tl, nl, knobs=tuple(frz))], tag="freeze").meter + print("[INFO] cycle meter, looping at every slice: " + ", ".join(f"{k} {v}" for k, v in meters.items())) + print(f"[INFO] dsp_gate.py {G.provenance(HERE)['dsp_gate.py']}") + gate.finish() + + +if __name__ == "__main__": + main() From 4ae8946d75ca4fff2c5a8b1323f04351e99bba8a Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 18:46:53 -0600 Subject: [PATCH 02/32] Loopbox: loops overlap and change over head by head, even SLIDE glides, stereo LAYER and SLIDE, SHUFL slices on the grid, cheaper Every head takes the newest window at its own wrap, where its fade is nothing, so old and new loops overlap without a gap or a click; a loop starting over a tail picks up from there. The chunk envelope gives way to a level that rises in 5 ms and falls at TAIL's rate (TAIL 0 is now a 50 ms release). SLIDE glides by x (1 + c) a block, even in semitones; WIDE spreads LAYER's and SLIDE's extra heads left and right; a SHUFL slice starts as far in as its event is late. Heads share the newest window's length; SHUFL's fade is set once a chunk. verify.py bit-exact; test_reference.py 20/20; cycle meter 302-322 executed a sample (SPRING REV 314). Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/README.md | 10 +- sdk/drafts/loopbox/engine.asm | 739 ++++++++++++++++----------- sdk/drafts/loopbox/reference.py | 273 +++++----- sdk/drafts/loopbox/test_reference.py | 92 +++- sdk/drafts/loopbox/verify.py | 6 +- 5 files changed, 669 insertions(+), 451 deletions(-) diff --git a/sdk/drafts/loopbox/README.md b/sdk/drafts/loopbox/README.md index b45e736526..2b3006956b 100644 --- a/sdk/drafts/loopbox/README.md +++ b/sdk/drafts/loopbox/README.md @@ -9,7 +9,7 @@ Loopbox is an automatic micro-looper for an audio track's FX2 slot. It keeps the - **SHUFL** cuts the loop into slices and replays them in a new order, as a repeating sequence. - **SLIDE** glides two overlapping loops in pitch. -Each type has variations A to D. Each read head fades in and out of the loop by its own position, so loops at any speed are click-free. MIX sets how far the loops replace the track, and TAIL lets a loop ring on after it ends. +Each type has variations A to D. Each read head fades in and out of the loop by its own position, so loops at any speed are click-free. When a new loop comes along, the heads change over to it one by one as they come round, so old and new loops overlap for a moment instead of leaving a gap. MIX sets how far the loops replace the track, and TAIL lets a loop ring on after it ends. ## Controls @@ -20,11 +20,11 @@ Each type has variations A to D. Each read head fades in and out of the loop by | Main | C | SHAP | 0-127 | 32 | The loops' fades: short at 0 (1/64 of a loop), rising evenly to a full swell. | | Main | D | RPT | 1-8 | 2 | How many times the loop cycles in a chunk: 1 plays the whole chunk once, 8 loops an eighth of it eight times. | | Main | E | MIX | 0-127 | 64 | Up to 96 the track plays dry between loops and ducks under each one; from 96 to 127 the dry fades out, so 127 is the loops alone. | -| Main | F | TAIL | 0-127 | 64 | After a loop, its heads loop on and fade: 0 none, 127 about 3 s. | +| Main | F | TAIL | 0-127 | 64 | After a loop, its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s. A loop that starts over a tail picks up from there. | | Setup | A | TYPE | LAYER, SHUFL, SLIDE | LAYER | Which kind of loop (above). | | Setup | B | DIRT | 0-127 | 0 | Grit on the loops: sample-rate reduction, harder crush and clipping drive. | -| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. SHUFL: A 4 slices, B 8, C 4 with every other one reversed, D 8 slices each played as a ratchet. SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed. | -| Setup | D | WIDE | 0-127 | 0 | Ping-pong: loops alternate left and right this far. | +| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. SHUFL: A 4 slices, B 8, C 4 with every other one reversed, D 8 slices each played as a ratchet. SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed; each glide is even in semitones. | +| Setup | D | WIDE | 0-127 | 0 | Stereo: LAYER's and SLIDE's extra loops spread left and right this far; SHUFL's slices ping-pong. | | Setup | E | RAND | 0-127 | 0 | Chaos: random loop counts, speeds, glide targets and places. | | Setup | F | DGRD | 0-127 | 0 | Degrade: a tail grows dirtier as it fades. | @@ -61,5 +61,5 @@ None yet. ## Develop -- Hear it: `npm run module:dev -- loopbox --cycles 331 --cycles-kind executed --state 120 --buffer 15870 --slots fx2`. +- Hear it: `npm run module:dev -- loopbox --cycles 340 --cycles-kind executed --state 123 --buffer 15870 --slots fx2`. - Check it: `npm run module:doctor -- --draft loopbox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model. diff --git a/sdk/drafts/loopbox/engine.asm b/sdk/drafts/loopbox/engine.asm index 7a79560106..7cd05b64a5 100644 --- a/sdk/drafts/loopbox/engine.asm +++ b/sdk/drafts/loopbox/engine.asm @@ -9,66 +9,71 @@ ; A slice is TIME (1/64 to 1/2) at the project's tempo (tempo24 at r6+$13). ; It plays as 1, 2, 4, 8, 16 or 32 chunks of at most 7,900 samples. At each ; slice boundary, judged at the start of a call (a block of 16 frames at most) -; and with a chunk captured, ACT is the chance that the slice loops. A loop -; takes the latest chunk / RPT of the ring as its window, once a chunk, and -; plays it with three read heads that wrap inside the window: +; and with a chunk captured, ACT is the chance that the slice loops. Each chunk +; of a loop makes the latest chunk / RPT of the ring the newest window, played +; by three read heads: ; LAYER heads at 1/2, 1/4 and 1/4: the loop at its speed, and A an octave ; up and down, B a fifth up and a fourth down, C reversed and an ; octave down, D two random speeds -; SHUFL one head: the window cut into 4 (A, C) or 8 (B, D) slices played in -; a shuffled order, RPT times (C reverses every other slice, D plays -; each slice's first half twice) -; SLIDE two heads half a window apart, gliding over the chunk: A up an -; octave, B down an octave, C one up and one down, D to a random speed -; Each head fades by its own position, min(p, W - p) x K (K = 2^28 / F, F the -; window x SHAP's share, at least 64 samples), so a head at any speed wraps -; without a click; the chunk has its own envelope over it. The window always -; lies behind the write position and a loop lasts a chunk at a time, so the -; writer never reaches it. TAIL (slot 5): when a loop ends its heads loop on, -; steady in pitch, under a gain that decays a sample at c (about 3 s to -; -60 dB at 127; 0 no tail) until -72 dB or the next loop. Should the writer -; come within 32 samples of the window, the ring freezes; a loop due then ends -; the tail and waits for a fresh chunk. After a second of silence in no loop -; starts; after four, any loop or tail stops and the ring records again. +; SHUFL head 0: the window cut into 4 (A, C) or 8 (B, D) slices played in a +; shuffled order, RPT times, each as far in as its event is late (C +; reverses every other slice, D plays each slice's first half twice) +; SLIDE heads 1 and 2, half a window apart, gliding over the chunk by +; x (1 + c) a block, even in semitones: A up an octave, B down an +; octave, C one up and one down, D to a random speed +; Every head wraps at the newest window's length and, at a wrap, takes the +; newest window: there its fade, min(p, W - p) x K (K = 2^28 / F, F the +; window x SHAP's share, at least 64 samples), is nothing, so the heads change +; over one by one and old and new loops overlap without a click. A loop that +; starts from silence sets every head on its window at once. The loop's level +; G rises to whole in about 5 ms when a loop starts and, when it ends, falls at +; TAIL's rate (about 50 ms to -60 dB at 0, 3 s at 127) while the heads loop on, +; steady in pitch; a loop starting over a tail picks up from there. WIDE spreads +; heads 1 and 2 left and right (LAYER, SLIDE) or ping-pongs SHUFL's slices. +; Should the writer come within 32 samples of a window still sounding during a +; tail, the ring freezes; while a loop plays, a head whose window it nears +; takes the newest at once. After a second of silence in no loop starts; after +; four, any loop or tail stops and the ring records again. ; ; Knobs (value<<16): page 1 TIME r6+0 (0-5), ACT r6+1, SHAP r6+2, RPT r6+3 ; (0-7: 1-8 cycles), MIX r6+4, TAIL r6+5; page 2 TYPE slot 6 (r6+$c bits 16-23, ; 0-2), DIRT slot 7, VAR slot 8 (r6+$d bits 16-23, 0-3), WIDE slot 9, RAND ; slot 10, DGRD slot 11. MIX glides per sample and snaps within 64 LSB. Between ; loops the track plays dry (a tail echoes over it at MIX); while a loop plays -; the dry ducks by D x the chunk's envelope (D = 4/3 MIX, whole at 96); from 96 -; to 127 the dry fades out everywhere: 127 is the loops alone. +; the dry ducks by D x G (D = 4/3 MIX, whole at 96); from 96 to 127 the dry +; fades out everywhere: 127 is the loops alone. ; -; State (X, offsets from r7; init clears $00..$77): +; State (X, offsets from r7; init clears $00..$7a): ; $00 ring base (Y) $01 live (an FX2-sized slot) $02 write index ; $03 the write step (1) $04 samples captured $05 LFSR $06 playing -; $07 samples into the slice $08 a chunk $09 events left in the chunk -; $0a event number $0b window start (Y) $0c W, the window less one +; $07 samples into the slice (after an event: how late it is) $08 a chunk +; $09 events left in the chunk $0a event number $0b head 0's window (Y) ; $0d/$0e head 0 position hi/lo $0f head 0 rate (Q21) -; $10 the chunk's phase u $11 its step $12 its fade slope Am $13 K, the heads' fade slope -; $14 crush mask (whole) $15 the tail's gain $16 the loop (chunk / RPT) $17 the tail's decay +; $10 the newest window (Y) $11 its W, the length less one $13 K, the heads' fade slope +; $14 crush mask (whole) $15 G, the loop's level $16 the loop (chunk / RPT) $17 G's rate ; $18 a tail playing $19 samples to the next event $1a/$1b MIX target/run $1c the dry's gain -; $1d TYPE $1e VAR $1f ACT $20 Am from SHAP $21 RPT $22 TIME $23 tempo24 -; $24-$27 random speeds (Q21) $2c seeded $2d the phase's wrap (never) $2e/$2f the frame's L/R -; $30 the heads' sum $31 the loop $32 TAIL's decay $33 SHAP's share of a window $34 the chunk now -; $36-$3b LAYER's speeds for A-C $3f P (1 in a loop) +; $1d TYPE $1e VAR $1f ACT $20 G's target $21 RPT $22 TIME $23 tempo24 +; $24-$27 the speeds T0 (Q21) $28-$2b |ln T0| / 2 (Q23) $2c seeded $2e/$2f the frame's L/R +; $30 the heads' sum $32 TAIL's decay $33 SHAP's share of a window $34 the chunk now +; $36-$3b LAYER's speeds for A-C $3c/$3d the side's gains (heads 1 and 2) $3f P (1 in a loop) ; $40 chunks in a slice of TIME $41 the chunk's place in it $42 chunks left in the loop ; $43 D, the loop's gain $44 K, the dry's ceiling $45 events in a chunk (RPT, x N for SHUFL) ; $46 the crush mask (DIRT's) $47 DIRT's hold N $48 its countdown $49 the held sample -; $4a/$4b DIRT's drive and level $4c/$4d WIDE's left/right gain $4e WIDE $4f RAND $50 DGRD +; $4a/$4b DIRT's drive and level $4c/$4d WIDE's ping-pong gains $4e WIDE $4f RAND $50 DGRD ; $51 DIRT $52 scratch $53 samples of silence in $54 the call's loudest input ; $55-$57 the heads' faded reads (scratch) $58-$5f DIRT's crush masks -; $60-$64 head 1: position hi/lo, rate, glide, gain $65-$69 head 2: the same (no glide) -; $6a/$6b head 0's glide and gain $6c SHUFL's N $6d a slice $6e the window's ring index -; $6f-$76 SHUFL's slice order $77 the tail's hold (the chunk's envelope whole) -; Nothing above $77 is touched. Every product is the signed mpy/mac x0,y1 +; $60-$62 head 1: position hi/lo, rate $63 its glide $64 its gain +; $65-$67 head 2: the same $68 its glide $69 its gain $6b head 0's gain +; $6c SHUFL's N $6d a slice $6e the newest window's ring index $6f-$76 SHUFL's slice order +; $77 the side $78 head 1's window (Y) $7a head 2's window (Y) +; Nothing above $7a is touched. Every product is the signed mpy/mac x0,y1 ; form. Labels are gb and two characters, so none is another's prefix. ; CYCLES_FORWARD_BRANCHES init: clr a move r7,r5 move #>$ffffff,m5 - do #$78,>gbi0 + do #$7b,>gbi0 move a,x:(r5)+ gbi0: nop @@ -78,6 +83,9 @@ gbi0: move x:(r4),x0 move x0,x:(r7+$00) move x0,x:(r7+$0b) + move x0,x:(r7+$78) + move x0,x:(r7+$7a) + move x0,x:(r7+$10) move x0,a move #>$4000,x0 sub x0,a @@ -88,9 +96,6 @@ gbi0: move b,x:(r7+$01) move #>$1,x0 move x0,x:(r7+$03) - move #>$7fffff,x0 - move x0,x:(r7+$15) - move x0,x:(r7+$2d) move #>$123456,x0 move x0,x:(r7+$05) move #>$080000,x0 @@ -115,6 +120,14 @@ gbi0: move x0,x:(r7+$3b) move #>$ffffff,x0 move x0,x:(r7+$14) + move #>$58b90c,x0 + move x0,x:(r7+$28) + move #>$2c5c86,x0 + move x0,x:(r7+$29) + move #>$2c5c86,x0 + move x0,x:(r7+$2a) + move #>$464faa,x0 + move x0,x:(r7+$2b) move #>$ffffff,x0 move x0,x:(r7+$58) move #>$fff000,x0 @@ -166,10 +179,6 @@ proc: add x0,b move b1,x0 move x0,x:(r7+$33) - move #>$1ffff,a - move #>$fffffe,a0 - bsr gbdi - move x0,x:(r7+$20) ; RPT: slot 3, 0-7, one more repeat move x:(r6+$3),a and #>$7f0000,a @@ -195,11 +204,6 @@ proc: mpy x0,y1,a move #>$0001b6,y0 add y0,a - move x1,b - move #>$10000,y0 - cmp y0,b - move #>$0,y1 - tlt y1,a move a,x:(r7+$32) ; MIX: 127 and above exactly full wet move x:(r6+$4),a @@ -362,7 +366,8 @@ gbsd: move x:(r7+$1a),y0 tlt y0,b move b1,x:(r7+$1b) -; The tail: over below -72 dB; the writer kept off its window by a freeze. +; The tail: over below -72 dB; the writer kept off every window still sounding (the newest, each head's with a +; gain) by a freeze. move x:(r7+$18),a tst a beq gbt9 @@ -370,31 +375,52 @@ gbsd: move #>$002000,x0 cmp x0,a bge gbt5 - clr a - move a,x:(r7+$18) - move a,x:(r7+$12) - move a,x:(r7+$17) - move a,x:(r7+$77) - move #>$7fffff,x0 - move x0,x:(r7+$15) - move x0,x:(r7+$2d) + bsr gbqt bra gbt9 gbt5: move x:(r7+$03),a tst a beq gbt9 - move x:(r7+$6e),a - move x:(r7+$02),x0 - sub x0,a - move #>$0,y0 - move #>15870,x0 + clr b + move x:(r7+$10),a + bsr gbdd + move #>32,x0 + cmp x0,a + bgt gbf1 + move #>$1,b +gbf1: + move x:(r7+$6b),a tst a - move x0,b - tge y0,b - add b,a + beq gbf2 + move x:(r7+$0b),a + bsr gbdd + move #>32,x0 + cmp x0,a + bgt gbf2 + move #>$1,b +gbf2: + move x:(r7+$64),a + tst a + beq gbf3 + move x:(r7+$78),a + bsr gbdd + move #>32,x0 + cmp x0,a + bgt gbf3 + move #>$1,b +gbf3: + move x:(r7+$69),a + tst a + beq gbf4 + move x:(r7+$7a),a + bsr gbdd move #>32,x0 cmp x0,a - bgt gbt9 + bgt gbf4 + move #>$1,b +gbf4: + tst b + beq gbt9 clr a move a,x:(r7+$03) gbt9: @@ -413,21 +439,15 @@ gbt9: clr a move a,x:(r7+$04) gbt8: -; Four seconds of silence in (the transport stopped): no glitch, no tail, and the ring records again. +; Four seconds of silence in (the transport stopped): no loop, no tail, and the ring records again. move x:(r7+$53),a move #>176400,x0 cmp x0,a blt gbz1 + bsr gbqt clr b - move b,x:(r7+$18) - move b,x:(r7+$12) move b,x:(r7+$06) - move b,x:(r7+$17) move b,x:(r7+$04) - move b,x:(r7+$77) - move #>$7fffff,x0 - move x0,x:(r7+$15) - move x0,x:(r7+$2d) move #>$1,x0 move x0,x:(r7+$03) gbz1: @@ -438,6 +458,55 @@ gbz1: blt gbnv bsr gbev gbnv: +; While a loop plays, a head whose window the writer is about to reach takes the newest window now. + move x:(r7+$06),a + tst a + beq gbna + move x:(r7+$0b),a + bsr gbdd + move #>64,x0 + cmp x0,a + bgt gbn1 + move x:(r7+$10),x0 + move x0,x:(r7+$0b) + clr a + move a,x:(r7+$0d) + move a,x:(r7+$0e) +gbn1: + move x:(r7+$78),a + bsr gbdd + move #>64,x0 + cmp x0,a + bgt gbn2 + move x:(r7+$10),x0 + move x0,x:(r7+$78) + clr a + move a,x:(r7+$60) + move a,x:(r7+$61) +gbn2: + move x:(r7+$7a),a + bsr gbdd + move #>64,x0 + cmp x0,a + bgt gbn3 + move x:(r7+$10),x0 + move x0,x:(r7+$7a) + clr a + move a,x:(r7+$65) + move a,x:(r7+$66) +gbn3: +gbna: +; SLIDE's glides: each rate x (1 + c) a block, even in semitones. + move x:(r7+$62),x0 + move x:(r7+$63),y1 + mpy x0,y1,a + add x0,a + move a1,x:(r7+$62) + move x:(r7+$67),x0 + move x:(r7+$68),y1 + mpy x0,y1,a + add x0,a + move a1,x:(r7+$67) ; P: 1 while a glitch plays, else 0 (a tail echoes over the whole track). move x:(r7+$06),b move #>$7fffff,x0 @@ -528,38 +597,36 @@ gbd1: cmp a,b tlt a,b move b1,x:(r7+$54) -; Head 0: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. - move x:(r7+$0b),r5 +; Head 0: position += rate, wrapped into [0, W) (W the newest window's); at a wrap it takes the newest +; window, where its fade is nothing; faded by min(p, W - p) x K; an interpolated read, faded, to $55. move x:(r7+$0d),a move x:(r7+$0e),a0 move x:(r7+$0f),b asr #21,b,b add b,a - move x:(r7+$0c),x0 - move #>$0,y0 + move x:(r7+$11),x0 + clr b cmp x0,a - move x0,b - tlt y0,b + tge x0,b sub b,a + move b,x1 + clr b tst a - move x0,b - tge y0,b + tlt x0,b add b,a + add x1,b + move x:(r7+$0b),b + move x:(r7+$10),y1 + tne y1,b + move b1,x:(r7+$0b) + move b1,r5 move a1,x:(r7+$0d) move a0,x:(r7+$0e) move a1,n5 move a0,b lsr b - move b1,y1 - move (r5)+n5 - move y:(r5)+,a - move y:(r5),b - sub a,b - move b,x0 - mac x0,y1,a - move a1,x1 - move x:(r7+$0d),a - move x:(r7+$0c),b + move b1,y0 + move x0,b sub a,b cmp b,a tgt b,a @@ -567,46 +634,48 @@ gbd1: move x:(r7+$13),y1 mpy x0,y1,a asl #18,a,a - move a,x0 - move x1,y1 + move a,x1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + move y0,y1 + mac x0,y1,a + move a1,y1 + move x1,x0 mpy x0,y1,a move a,x:(r7+$55) - move x:(r7+$0f),a - move x:(r7+$6a),x0 - add x0,a - move a1,x:(r7+$0f) -; Head 1: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. - move x:(r7+$0b),r5 +; Head 1: position += rate, wrapped into [0, W) (W the newest window's); at a wrap it takes the newest +; window, where its fade is nothing; faded by min(p, W - p) x K; an interpolated read, faded, to $56. move x:(r7+$60),a move x:(r7+$61),a0 move x:(r7+$62),b asr #21,b,b add b,a - move x:(r7+$0c),x0 - move #>$0,y0 + move x:(r7+$11),x0 + clr b cmp x0,a - move x0,b - tlt y0,b + tge x0,b sub b,a + move b,x1 + clr b tst a - move x0,b - tge y0,b + tlt x0,b add b,a + add x1,b + move x:(r7+$78),b + move x:(r7+$10),y1 + tne y1,b + move b1,x:(r7+$78) + move b1,r5 move a1,x:(r7+$60) move a0,x:(r7+$61) move a1,n5 move a0,b lsr b - move b1,y1 - move (r5)+n5 - move y:(r5)+,a - move y:(r5),b - sub a,b - move b,x0 - mac x0,y1,a - move a1,x1 - move x:(r7+$60),a - move x:(r7+$0c),b + move b1,y0 + move x0,b sub a,b cmp b,a tgt b,a @@ -614,46 +683,48 @@ gbd1: move x:(r7+$13),y1 mpy x0,y1,a asl #18,a,a - move a,x0 - move x1,y1 + move a,x1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + move y0,y1 + mac x0,y1,a + move a1,y1 + move x1,x0 mpy x0,y1,a move a,x:(r7+$56) - move x:(r7+$62),a - move x:(r7+$63),x0 - add x0,a - move a1,x:(r7+$62) -; Head 2: position += rate, wrapped into [0, W); an interpolated read; faded by min(p, W - p) x K. - move x:(r7+$0b),r5 +; Head 2: position += rate, wrapped into [0, W) (W the newest window's); at a wrap it takes the newest +; window, where its fade is nothing; faded by min(p, W - p) x K; an interpolated read, faded, to $57. move x:(r7+$65),a move x:(r7+$66),a0 move x:(r7+$67),b asr #21,b,b add b,a - move x:(r7+$0c),x0 - move #>$0,y0 + move x:(r7+$11),x0 + clr b cmp x0,a - move x0,b - tlt y0,b + tge x0,b sub b,a + move b,x1 + clr b tst a - move x0,b - tge y0,b + tlt x0,b add b,a + add x1,b + move x:(r7+$7a),b + move x:(r7+$10),y1 + tne y1,b + move b1,x:(r7+$7a) + move b1,r5 move a1,x:(r7+$65) move a0,x:(r7+$66) move a1,n5 move a0,b lsr b - move b1,y1 - move (r5)+n5 - move y:(r5)+,a - move y:(r5),b - sub a,b - move b,x0 - mac x0,y1,a - move a1,x1 - move x:(r7+$65),a - move x:(r7+$0c),b + move b1,y0 + move x0,b sub a,b cmp b,a tgt b,a @@ -661,11 +732,19 @@ gbd1: move x:(r7+$13),y1 mpy x0,y1,a asl #18,a,a - move a,x0 - move x1,y1 + move a,x1 + move (r5)+n5 + move y:(r5)+,a + move y:(r5),b + sub a,b + move b,x0 + move y0,y1 + mac x0,y1,a + move a1,y1 + move x1,x0 mpy x0,y1,a move a,x:(r7+$57) -; The heads at their gains, then the crush mask (DIRT's). +; The heads at their gains, then the crush mask (DIRT's); and the side: heads 1 and 2 apart, at WIDE. move x:(r7+$55),x0 move x:(r7+$6b),y1 mpy x0,y1,a @@ -678,6 +757,13 @@ gbd1: move x:(r7+$46),x0 and x0,a move a1,x:(r7+$30) + move x:(r7+$56),x0 + move x:(r7+$3c),y1 + mpy x0,y1,a + move x:(r7+$57),x0 + move x:(r7+$3d),y1 + mac x0,y1,a + move a,x:(r7+$77) ; DIRT's hold: a new sample every N. move x:(r7+$48),a sub #>$1,a @@ -688,40 +774,10 @@ gbd1: tle x0,a move a1,x:(r7+$48) move b,x:(r7+$49) -; The envelope: min(u, 1/2 - u) at the fade's slope, from 0 to 1: the whole repeat's, which the dry follows. - move x:(r7+$10),a - move x:(r7+$11),x0 - add x0,a - move x:(r7+$2d),x0 - cmp x0,a - move #>$0,y0 - move x0,b - tlt y0,b - sub b,a - move a1,x:(r7+$10) - move a1,x0 - move x:(r7+$12),y1 - mpy x0,y1,b - asl #7,b,b - move b,x1 - move #>$400000,b - sub x0,b - move b,x0 - mpy x0,y1,b - asl #7,b,b - move b,x0 - move x1,b - cmp x0,b - tgt x0,b - tst b - move #>$0,y0 - tmi y0,b - move x:(r7+$77),x0 - cmp x0,b - tlt x0,b -; The dry ducks under the repeat as it swells and comes back in its fades: 1 - D x env x P, -; at most K, so from MIX 96 to 127 the dry fades out everywhere. - move b,y1 +; The dry ducks under the loop as its level G rises: 1 - D x G x P, at most K, so from MIX 96 to 127 the dry +; fades out everywhere. G stays in y0 to the end of the sample. + move x:(r7+$15),y0 + move y0,y1 move x:(r7+$3f),x0 mpy x0,y1,a move a,x0 @@ -734,16 +790,10 @@ gbd1: cmp x0,a tgt x0,a move a,x:(r7+$1c) - move b,y1 -; The glitch: the replay (a quarter of the mono sum) x env, then x 2 (x 0.99999 x 2): half the -; mono sum, as loud as the dry track for a mono sample; limited at full scale. - move x:(r7+$49),x0 - mpy x0,y1,a - move a,x0 - move #>$7fffff,y1 - mpy x0,y1,a +; The loop: the held sum x 2, half the mono sum, as loud as the dry track for a mono sample; DIRT's drive, +; clipped at full scale, and its level; at G. + move x:(r7+$49),a asl #1,a,a -; DIRT's drive, clipped at full scale, and its level. move a,x0 move x:(r7+$4a),y1 mpy x0,y1,a @@ -752,34 +802,47 @@ gbd1: move x:(r7+$4b),y1 mpy x0,y1,a move a,x0 - move x:(r7+$15),y1 + move y0,y1 mpy x0,y1,a - move a,x:(r7+$31) -; The tail's gain decays at c (0 outside a tail). - move x:(r7+$15),x0 - move x:(r7+$17),y1 - mpy x0,y1,b - move x0,a - sub b,a - move a1,x:(r7+$15) -; Left and right: glitch x D x WIDE's side + dry x its gain. - move x:(r7+$31),x0 + move a,x0 move x:(r7+$43),y1 mpy x0,y1,a - move a,x:(r7+$52) - move x:(r7+$52),x0 + move a,x1 +; The side at G and D, x 2. + move x:(r7+$77),x0 + move y0,y1 + mpy x0,y1,a + move a,x0 + move x:(r7+$43),y1 + mpy x0,y1,a + asl #1,a,a + move a,x:(r7+$77) +; G toward its target at its rate: the 5 ms rise of a loop, or the tail's decay. + move x:(r7+$20),a + sub y0,a + move a,x0 + move x:(r7+$17),y1 + mpy x0,y1,a + add y0,a + move a1,x:(r7+$15) +; Left and right: the loop at D (x1) x WIDE's ping-pong + dry x its gain, plus and minus the side. + move x1,x0 move x:(r7+$4c),y1 mpy x0,y1,a move x:(r7+$2e),x0 move x:(r7+$1c),y1 mac x0,y1,a + move x:(r7+$77),x0 + add x0,a move a,x:(r0)+ - move x:(r7+$52),x0 + move x1,x0 move x:(r7+$4d),y1 mpy x0,y1,a move x:(r7+$2f),x0 move x:(r7+$1c),y1 mac x0,y1,a + move x:(r7+$77),x0 + sub x0,a move a,x:(r0)+ gbsl: nop @@ -854,21 +917,13 @@ gbce: gbst: clr a move a,x:(r7+$06) - move x:(r7+$32),a - tst a - bne gbtl - move a,x:(r7+$12) - bra gbid -gbtl: - move a1,x:(r7+$17) - move #>$1,x0 - move x0,x:(r7+$18) - move #>$7fffff,x0 - move x0,x:(r7+$77) - clr a - move a,x:(r7+$6a) + move a,x:(r7+$20) move a,x:(r7+$63) move a,x:(r7+$68) + move #>$1,x0 + move x0,x:(r7+$18) + move x:(r7+$32),x0 + move x0,x:(r7+$17) bra gbid ; Idle at a chunk's end. gbiw: @@ -895,15 +950,9 @@ gbid: move x:(r7+$03),a tst a bne gbfr + bsr gbqt clr a - move a,x:(r7+$18) - move a,x:(r7+$12) - move a,x:(r7+$17) move a,x:(r7+$04) - move a,x:(r7+$77) - move #>$7fffff,x0 - move x0,x:(r7+$15) - move x0,x:(r7+$2d) move #>$1,x0 move x0,x:(r7+$03) bra gbix @@ -928,18 +977,22 @@ gbcs: add #>$1,a move a1,x:(r7+$45) gbr9: +; Fresh when nothing sounds (no loop, no tail): then every head takes the newest window at once. $52: scratch. + move x:(r7+$06),a + move x:(r7+$18),x0 + add x0,a + move a1,x:(r7+$52) move #>$1,x0 move x0,x:(r7+$06) move x0,x:(r7+$03) clr a move a,x:(r7+$0a) move a,x:(r7+$18) - move a,x:(r7+$17) - move a,x:(r7+$77) move #>$7fffff,x0 - move x0,x:(r7+$15) - move x0,x:(r7+$2d) -; The loop: a chunk / RPT, the latest audio behind the writer. + move x0,x:(r7+$20) + move #>$009445,x0 + move x0,x:(r7+$17) +; The loop: a chunk / RPT, the latest audio behind the writer: the newest window. move x:(r7+$08),a move a1,x:(r7+$34) asr #23,a,a @@ -958,51 +1011,31 @@ gbr9: move a1,x:(r7+$6e) move x:(r7+$00),x1 add x1,a - move a1,x:(r7+$0b) + move a1,x:(r7+$10) move x0,a sub #>$1,a - move a1,x:(r7+$0c) -; The chunk's own envelope, over the whole chunk. - clr a - move a,x:(r7+$10) - move #>$0,a - move #>$800000,a0 - move x:(r7+$34),b - sub #>$1,b - move b1,x0 - bsr gbdi - move x0,x:(r7+$11) - move x:(r7+$20),x0 - move x0,x:(r7+$12) -; Every head at rest: no position, glide or gain, a rate of 1. + move a1,x:(r7+$11) + move #>$1,x0 + move x0,x:(r7+$6c) clr a + move a,x:(r7+$63) + move a,x:(r7+$68) move #>$200000,x0 - move a,x:(r7+$0d) - move a,x:(r7+$0e) - move a,x:(r7+$6a) - move a,x:(r7+$6b) move x0,x:(r7+$0f) - move a,x:(r7+$60) - move a,x:(r7+$61) - move a,x:(r7+$63) - move a,x:(r7+$64) move x0,x:(r7+$62) - move a,x:(r7+$65) - move a,x:(r7+$66) - move a,x:(r7+$68) - move a,x:(r7+$69) move x0,x:(r7+$67) - move #>$1,x0 - move x0,x:(r7+$6c) move x:(r7+$1d),a tst a beq gbla move #>$2,x0 cmp x0,a beq gbgl -; SHUFL: N slices of the loop (4, or 8 for B and D) in a new order, played RPT times. +; SHUFL: N slices of the loop (4, or 8 for B and D) in a new order, played RPT times, on head 0. move #>$7fffff,x0 move x0,x:(r7+$6b) + clr a + move a,x:(r7+$64) + move a,x:(r7+$69) move #>$4,x1 move x:(r7+$1e),a and #>$1,a @@ -1065,6 +1098,17 @@ gbhs: asl #1,a,a gbh9: move a1,x:(r7+$45) +; The heads' fade for a slice (D: half a slice), once a chunk. + move x:(r7+$6d),a + move x:(r7+$1e),b + move #>$3,x0 + cmp x0,b + bne gbh7 + asr #1,a,a +gbh7: + sub #>$1,a + move a1,x0 + bsr gbfa bra gbse ; LAYER: three heads on the loop at different speeds, at 1/2, 1/4 and 1/4. gbla: @@ -1105,25 +1149,18 @@ gbl4: bsr gbt0 move x0,x:(r7+$62) gbl5: - move x:(r7+$62),a - tst a - bpl gbl6 - move x:(r7+$0c),a - sub #>$1,a - move a1,x:(r7+$60) -gbl6: + move x:(r7+$11),x0 bsr gbfa - bra gbse -; SLIDE: two heads half a loop apart, gliding over the chunk (A up an octave, B down, C apart, D to a random speed). + bra gbfs +; SLIDE: heads 1 and 2, half a window apart, gliding over the chunk (A up an octave, B down, C apart, D to a random speed). gbgl: + clr a + move a,x:(r7+$6b) move #>$400000,x0 - move x0,x:(r7+$6b) move x0,x:(r7+$64) - move x:(r7+$0c),a - asr #1,a,a - move a1,x:(r7+$60) - move #>$400000,x0 - move #>$100000,x1 + move x0,x:(r7+$69) + move #>$2,x0 + move #>$1,x1 move x:(r7+$1e),a tst a bne gbg2 @@ -1139,7 +1176,7 @@ gbg3: move #>$3,y0 cmp y0,a bne gbg4 - bsr gbt0 + bsr gbsp move x0,x1 gbg4: move x0,x:(r7+$55) @@ -1151,16 +1188,73 @@ gbg4: move x:(r7+$4f),a cmp x0,a ble gbg5 - bsr gbt0 + bsr gbsp move x0,x:(r7+$55) gbg5: move x:(r7+$55),x0 bsr gbgo - move x0,x:(r7+$6a) + move x0,x:(r7+$63) move x:(r7+$56),x0 bsr gbgo - move x0,x:(r7+$63) + move x0,x:(r7+$68) + move x:(r7+$11),x0 bsr gbfa +; From silence: every head on the newest window now, as far in as the start is late (reversed: from the end). +gbfs: + move x:(r7+$52),a + tst a + bne gbse + move x:(r7+$10),x0 + move x0,x:(r7+$0b) + clr a + move a,x:(r7+$0e) + move x:(r7+$07),a + move x:(r7+$0f),b + tst b + bpl gbp1 + move x:(r7+$11),a + sub #>$1,a + move x:(r7+$07),x0 + sub x0,a +gbp1: + move a1,x:(r7+$0d) + move x:(r7+$10),x0 + move x0,x:(r7+$78) + clr a + move a,x:(r7+$61) + move x:(r7+$07),a + move x:(r7+$62),b + tst b + bpl gbp2 + move x:(r7+$11),a + sub #>$1,a + move x:(r7+$07),x0 + sub x0,a +gbp2: + move a1,x:(r7+$60) + move x:(r7+$10),x0 + move x0,x:(r7+$7a) + clr a + move a,x:(r7+$66) + move x:(r7+$07),a + move x:(r7+$67),b + tst b + bpl gbp3 + move x:(r7+$11),a + sub #>$1,a + move x:(r7+$07),x0 + sub x0,a +gbp3: + move a1,x:(r7+$65) + move x:(r7+$1d),a + move #>$2,x0 + cmp x0,a + bne gbse + move x:(r7+$11),a + asr #1,a,a + move x:(r7+$07),x0 + add x0,a + move a1,x:(r7+$65) gbse: move x:(r7+$45),x0 move x0,x:(r7+$09) @@ -1178,7 +1272,7 @@ gbgp: move a1,x:(r7+$41) rts -; An event within the chunk: SHUFL's next slice; for every TYPE, WIDE's side. +; An event within the chunk: SHUFL's next slice on head 0, on time; WIDE's spread (LAYER, SLIDE) or ping-pong. gbsr: move x:(r7+$1d),a move #>$1,x0 @@ -1186,8 +1280,19 @@ gbsr: beq gbs1 move x:(r7+$16),x0 move x0,x:(r7+$19) - bra gbs9 -; The slice perm[k mod N]: its window, rate (C reverses every other one) and fade. + move x:(r7+$4e),y1 + move x:(r7+$64),x0 + mpy x0,y1,a + move a,x:(r7+$3c) + move x:(r7+$69),x0 + mpy x0,y1,a + neg a + move a,x:(r7+$3d) + clr a + move a,x:(r7+$52) + bra gbw2 +; The slice perm[k mod N] on head 0 and as the newest window: its window, rate (C reverses every other one) and +; position (as far in as the event is late). gbs1: move x:(r7+$6c),a sub #>$1,a @@ -1215,6 +1320,7 @@ gbs2: move x:(r7+$00),x0 add x0,a move a1,x:(r7+$0b) + move a1,x:(r7+$10) move x:(r7+$6d),a move x:(r7+$1e),b move #>$3,x0 @@ -1223,26 +1329,29 @@ gbs2: asr #1,a,a gbs3: sub #>$1,a - move a1,x:(r7+$0c) + move a1,x:(r7+$11) clr a move a,x:(r7+$0e) - move a,x:(r7+$0d) + move a,x:(r7+$3c) + move a,x:(r7+$3d) move #>$200000,x0 move x0,x:(r7+$0f) + move x:(r7+$07),a move #>$2,x0 cmp x0,b bne gbs4 - move x:(r7+$0a),a - and #>$1,a - tst a + move x:(r7+$0a),b + and #>$1,b + tst b beq gbs4 move #>$e00000,x0 move x0,x:(r7+$0f) - move x:(r7+$0c),a + move x:(r7+$11),a sub #>$1,a - move a1,x:(r7+$0d) + move x:(r7+$07),x0 + sub x0,a gbs4: - bsr gbfa + move a1,x:(r7+$0d) move x:(r7+$6d),x0 move x0,x:(r7+$19) gbs9: @@ -1288,39 +1397,47 @@ gbw2: ; The next LFSR word; x0 = a random fraction. ; x0 = a random speed from T0. gbt0: - bsr gbrn - move #>$4,y1 - mpy x0,y1,a - move a1,n1 + bsr gbsp + move x0,n1 lua (r7+$24),r1 move #>$ffffff,m1 nop move x:(r1+n1),x0 rts -; x0 = the change a sample taking a rate of 1 to x0 over the chunk: (target - 1) / chunk, Q21. -gbgo: - move x0,a - sub #>$200000,a - tfr a,b - abs a +; x0 = a random index into T0, 0-3. +gbsp: + bsr gbrn + move #>$4,y1 + mpy x0,y1,a move a1,x0 - clr a - move x0,a0 - asl a + rts + +; x0 = the change a block taking a rate of 1 to T0[x0] over the chunk, evenly in semitones: ln(T) x 16 / chunk +; (Q23), as |ln T| / 2 x 2^6 / (2 x chunk); negative for the slower speeds (indexes 0 and 1). +gbgo: + move x0,n1 + move x0,x1 + lua (r7+$28),r1 + move #>$ffffff,m1 + nop + move x:(r1+n1),a + asr #18,a,a move x:(r7+$34),x0 bsr gbdi move x0,a - tst b + move x1,b + move #>$2,y0 + cmp y0,b bge gbo1 neg a gbo1: move a1,x0 rts -; A head's fade for the window now: F = (W + 1) x SHAP's share, at least 64; K = 2^28 / F. +; The heads' fade for a window of x0 + 1: F = (x0 + 1) x SHAP's share, at least 64; K = 2^28 / F. gbfa: - move x:(r7+$0c),a + move x0,a add #>$1,a move a1,x0 move x:(r7+$33),y1 @@ -1337,6 +1454,28 @@ gbfa: move x0,x:(r7+$13) rts +; Nothing sounding: the level, its target and rate, and the tail's flag at rest. +gbqt: + clr a + move a,x:(r7+$18) + move a,x:(r7+$15) + move a,x:(r7+$20) + move a,x:(r7+$17) + rts + +; a = how far the writer has to go to reach a window starting at a (Y): (a - base) - write, wrapped into [0, R). +gbdd: + move x:(r7+$00),x0 + sub x0,a + move x:(r7+$02),x0 + sub x0,a + move #>15870,x0 + tst a + bge gbdz + add x0,a +gbdz: + rts + gbrn: move x:(r7+$05),a lsr a diff --git a/sdk/drafts/loopbox/reference.py b/sdk/drafts/loopbox/reference.py index 8103c8525d..d4a26b47b3 100644 --- a/sdk/drafts/loopbox/reference.py +++ b/sdk/drafts/loopbox/reference.py @@ -2,10 +2,12 @@ Model is engine.asm instruction by instruction, on 24-bit words and a 56-bit accumulator, so dsp_host's render must match it to the bit (verify.py). The design is original: a capture ring in the FX2 slot's buffer, a slice -clock at the project tempo, and at each slice a decision (ACT) to loop the latest audio with three read heads on -one window, as LAYER (heads at different speeds over one loop), SHUFL (the loop cut into slices and replayed in a -new order) or SLIDE (two overlapping heads gliding in pitch), each with variations A-D. Each head fades in and out -of the window by its own position, so heads at any speed loop without a click. No product's code, tables or names. +clock at the project tempo, and at each slice a decision (ACT) to loop the latest audio with three read heads, as +LAYER (heads at different speeds), SHUFL (the loop cut into slices and replayed in a new order) or SLIDE (two +overlapping heads gliding evenly in pitch), each with variations A-D. Each head fades by its own position in its +window, and takes the newest window when it wraps, where its fade is nothing: loops overlap and change over without +a click. A smooth level rises when a loop starts and falls into the tail when it ends. No product's code, tables or +names. """ import math @@ -27,22 +29,24 @@ # 2 x samples-per-note x tempo24 for each TIME (samples a beat = 63,504,000 / tempo24): (high word, low word) TIME_DIVIDENDS = ((0, 0x791fd0), (0, 0xf23fa0), (1, 0xe47f40), (3, 0xc8fe80), (7, 0x91fd00), (15, 0x23fa00)) ONE = 0x200000 # a rate of 1 (Q21) -T0 = (0x080000, 0x100000, 0x400000, 0x600000) # random rates: 0.25, 0.5, 2, 3 (Q21) +T0 = (0x080000, 0x100000, 0x400000, 0x600000) # speeds: 0.25, 0.5, 2, 3 (Q21) +LN = (0x58b90c, 0x2c5c86, 0x2c5c86, 0x464faa) # |ln T0| / 2 (Q23), for an even glide # LAYER's second and third heads for VAR A-C (Q21): an octave up and down; a fifth up and a fourth down; reversed and an octave down LAYERS = (0x400000, 0x100000, 0x2ff222, 0x17f911, 0xe00000, 0x100000) REVERSE = 0xe00000 # -1 (Q21) -SLIDE_UP, SLIDE_DOWN = 0x400000, 0x100000 # SLIDE's targets: an octave up, an octave down +UP, DOWN = 2, 1 # SLIDE's targets, as T0 indexes: an octave up, an octave down ACT_SCALE = 0x5a0000 # ACT 127 loops about 70 % of the slices MASKS = (0xffffff, 0xfff000, 0xffc000, 0xff8000, 0xff0000, 0xfe0000, 0xfc0000, 0xf80000) # DIRT's crush, by DIRT / 16 DRIVE = 0x600000 # DIRT's drive: x (1 + 3 DIRT), as (1/4 + 3/4 DIRT) x 4, then x (1 - DIRT / 2) THIRD = 0x2aaaab # 1/3: D = MIX + MIX/3, whole at MIX 96 -TAIL_MIN, TAIL_RANGE = 0x1b6, 0x64ea # the tail's decay a sample: about 3 s to -60 dB at TAIL 127, 50 ms near 0 +TAIL_MIN, TAIL_RANGE = 0x1b6, 0x64ea # the tail's decay a sample: about 3 s to -60 dB at TAIL 127, 50 ms at 0 TAIL_END = 0x2000 # -72 dB: the tail is over +ATTACK = 0x009445 # the level's rise a sample when a loop starts: a 5 ms time constant SILENT, SILENT_STOP, SILENT_MAX = 44100, 176400, 0x100000 # the silence watch: no new loop, then nothing FADE_MIN = 64 # a head's fade is at least 64 samples: K = 2^28 / F stays a word, and min(p, W - p) x K x 2^19 a 56-bit sum +NEAR = 64 # a head whose window the writer comes this close to takes the newest window at once HALF, QUARTER = 0x400000, 0x200000 SEED = 0x123456 -MAKEUP = 0x7fffff # the loop at half the mono sum: x 0.99999 then x 2, level with a mono sample LFSR_TAPS = 0xe10000 @@ -51,7 +55,9 @@ def notes(): return { "dividends": [2 * round(63504000 / d) for d in (16, 8, 4, 2, 1, 0.5)], "T0": [round(r * (1 << 21)) for r in (0.25, 0.5, 2, 3)], + "LN": [round(abs(math.log(r)) / 2 * Q) for r in (0.25, 0.5, 2, 3)], "LAYERS": [round(r * (1 << 21)) & 0xffffff for r in (2, 0.5, 2 ** (7 / 12), 2 ** (-5 / 12), -1, 0.5)], + "ATTACK": round((1 - math.exp(-1 / (0.005 * FS))) * Q), } @@ -96,9 +102,14 @@ def stepped(word, top): return min((word & 0x7f0000) >> 16, top) -# The three heads' state words: position high and low, rate, its change a sample, gain. -HEADS = ((0x0d, 0x0e, 0x0f, 0x6a, 0x6b), (0x60, 0x61, 0x62, 0x63, 0x64), (0x65, 0x66, 0x67, 0x68, 0x69)) +# Each head's words: window start (Y), position high and low, rate, gain, and the scratch word its faded read goes +# to. Every head wraps at the newest window's length (PW). +HEADS = ((0x0b, 0x0d, 0x0e, 0x0f, 0x6b, 0x55), + (0x78, 0x60, 0x61, 0x62, 0x64, 0x56), + (0x7a, 0x65, 0x66, 0x67, 0x69, 0x57)) +GLIDES = ((0x62, 0x63), (0x67, 0x68)) # SLIDE's two heads: rate and its change a block PERM = 0x6f # SHUFL's slice order, 8 words +PS, PW = 0x10, 0x11 # the newest window: start (Y) and W, which every head takes at its next wrap class Model: @@ -106,16 +117,16 @@ class Model: parameter block p (offset -> word) and returns [(left, right)].""" def __init__(self, base=0x4000, ring=None): - self.x = [0] * 0x78 + self.x = [0] * 0x7b self.ring = ring if ring is not None else [0] * R x = self.x - x[0x00] = x[0x0b] = base + x[0x00] = x[0x0b] = x[0x78] = x[0x7a] = x[PS] = base x[0x01] = 1 if ld(base) - ld(0x4000) >= 0 else 0 x[0x03] = 1 - x[0x15] = x[0x2d] = 0x7fffff x[0x14] = s24(0xffffff) x[0x05] = SEED x[0x24:0x28] = list(T0) + x[0x28:0x2c] = list(LN) x[0x36:0x3c] = [s24(v) for v in LAYERS] x[0x58:0x60] = [s24(v) for v in MASKS] @@ -129,20 +140,25 @@ def rand(self): x[0x05] = s24(v) return v & 0x7fffff + def distance(self, start): + """How far the writer has to go to reach a window starting at start (Y).""" + x = self.x + d = (start - x[0x00]) - x[0x02] + if d < 0: + d += R + return d + def call(self, frames, p): x = self.x if x[0x01] == 0: return list(frames) x[0x22] = stepped(p[0x0], 5) x[0x1f] = lim(mpy(p[0x1] & 0x7fffff, ACT_SCALE)) - f = 0x20000 + hi(mpy(p[0x2] & 0x7fffff, 0x3e0000)) - x[0x33] = f # the fade's share of a window: 1/64 to 1/2 - x[0x20] = div((0x1ffff << 24) | 0xfffffe, f) + x[0x33] = 0x20000 + hi(mpy(p[0x2] & 0x7fffff, 0x3e0000)) # the fade's share of a window: 1/64 to 1/2 x[0x21] = stepped(p[0x3], 7) + 1 t5 = p[0x5] & 0x7fffff s = lim(ld(0x7fffff) - ld(t5)) - c = lim(mpy(lim(mpy(s, lim(mpy(s, s)))), TAIL_RANGE) + ld(TAIL_MIN)) - x[0x32] = 0 if t5 < 0x10000 else c + x[0x32] = lim(mpy(lim(mpy(s, lim(mpy(s, s)))), TAIL_RANGE) + ld(TAIL_MIN)) m = p[0x4] & 0x7fffff x[0x1a] = 0x7fffff if m >= 0x7f0000 else m x[0x1d] = stepped(p[0xc], 2) @@ -177,11 +193,12 @@ def call(self, frames, p): if x[0x18]: if x[0x15] < TAIL_END: self.quiet() - elif x[0x03]: - d = x[0x6e] - x[0x02] # the loop's window, from where the writer is - if d < 0: - d += R - if d <= 32: + elif x[0x03]: # the writer kept off every window still sounding by a freeze + near = self.distance(x[PS]) <= 32 + for st, _ph, _pl, _rt, gn, _t in HEADS: + if x[gn] != 0 and self.distance(x[st]) <= 32: + near = True + if near: x[0x03] = 0 if x[0x03] == 0 and x[0x06] == 0 and x[0x18] == 0: x[0x03] = 1 @@ -192,6 +209,12 @@ def call(self, frames, p): x[0x03] = 1 if x[0x07] >= x[0x19]: self.event() + if x[0x06]: # a head the writer is about to reach takes the newest window now + for st, ph, pl, _rt, _gn, _t in HEADS: + if self.distance(x[st]) <= NEAR: + x[st], x[ph], x[pl] = x[PS], 0, 0 + for rt, gl in GLIDES: # SLIDE's glides: x (1 + c) a block, even in semitones + x[rt] = hi(mpy(x[rt], x[gl]) + ld(x[rt])) # P: 1 while a loop plays, else 0 (a tail echoes over the whole track) x[0x3f] = 0x7fffff if x[0x06] else 0 # DIRT, and in a tail DGRD x how far it has faded: the crush, the hold, the drive @@ -214,14 +237,13 @@ def call(self, frames, p): return out def quiet(self): - """No tail: the gains and the tail's flags back to rest.""" + """Nothing sounding: the level, its target and rate, and the tail's flag at rest.""" x = self.x - x[0x18] = x[0x12] = x[0x17] = x[0x77] = 0 - x[0x15] = x[0x2d] = 0x7fffff + x[0x18] = x[0x15] = x[0x20] = x[0x17] = 0 def event(self): x = self.x - x[0x07] -= x[0x19] + x[0x07] -= x[0x19] # what is left is how late this event is if x[0x07] >= x[0x19]: x[0x07] = 0 if x[0x06]: @@ -235,14 +257,11 @@ def event(self): if x[0x42] > 0: # the loop goes on through its slice of TIME self.start() return - x[0x06] = 0 # the loop is over - if x[0x32] == 0: - x[0x12] = 0 - else: # its tail: the heads loop on, decaying, steady in pitch - x[0x17] = x[0x32] - x[0x18] = 1 - x[0x77] = 0x7fffff - x[0x6a] = x[0x63] = x[0x68] = 0 + x[0x06] = 0 # the loop is over: its heads loop on into the tail, steady in pitch + x[0x18] = 1 + x[0x20] = 0 + x[0x17] = x[0x32] + x[0x63] = x[0x68] = 0 else: self.chunk() x[0x19] = x[0x08] @@ -269,20 +288,36 @@ def chunk(self): if x[0x41] >= x[0x40]: x[0x41] = 0 - def fade(self): - """A head's fade for the window now: F = W x SHAP's share, at least FADE_MIN; K = 2^28 / F.""" + def fade(self, w): + """The heads' fade for a window of w + 1: F = (w + 1) x SHAP's share, at least FADE_MIN; K = 2^28 / F.""" x = self.x - f = hi(mpy(x[0x0c] + 1, x[0x33])) + f = hi(mpy(w + 1, x[0x33])) if f < FADE_MIN: f = FADE_MIN x[0x13] = div(0x20 << 24, f) + def speed(self): + """A random index into T0.""" + return hi(mpy(self.rand(), 4)) + + def glide(self, i): + """The change a block that takes a rate of 1 to T0[i] over the chunk, evenly in semitones: ln(T) x 16 / chunk + (Q23), negative for a slower speed.""" + x = self.x + c = div(x[0x28 + i] << 6, x[0x34]) + return -c if i < 2 else c + def start(self): - """A chunk of the loop starts: the latest audio becomes its window, and the heads are set by TYPE and VAR.""" + """A chunk of the loop starts: the latest audio becomes the newest window. A loop starting from silence sets + every head on it at once; one starting while heads still sound (the next chunk, or over a tail) leaves each + head to take it at its next wrap.""" x = self.x + fresh = x[0x06] == 0 and x[0x18] == 0 + late = x[0x07] x[0x06] = x[0x03] = 1 # a loop always records: its window lies behind the writer - x[0x0a] = x[0x18] = x[0x17] = x[0x77] = 0 - x[0x15] = x[0x2d] = 0x7fffff + x[0x0a] = x[0x18] = 0 + x[0x20] = 0x7fffff + x[0x17] = ATTACK x[0x45] = x[0x21] # RAND: a random number of loops, 1-8 if x[0x4f] and x[0x4f] - self.rand() > 0: x[0x45] = hi(mpy(self.rand(), 8)) + 1 @@ -292,70 +327,63 @@ def start(self): if s < 0: s += R x[0x6e] = s - x[0x0b] = x[0x00] + s - x[0x0c] = lev - 1 - x[0x10] = 0 # the chunk's own envelope, over the whole chunk - x[0x11] = div(0x800000, x[0x34] - 1) - x[0x12] = x[0x20] + x[PS] = x[0x00] + s + x[PW] = lev - 1 kind, var = x[0x1d], x[0x1e] - # every head at rest, then TYPE's - for ph, pl, rt, dr, gn in HEADS: - x[ph] = x[pl] = x[dr] = x[gn] = 0 - x[rt] = ONE x[0x6c] = 1 x[0x6d] = lev + x[0x63] = x[0x68] = 0 + x[0x0f] = x[0x62] = x[0x67] = ONE if kind == LAYER: x[0x6b], x[0x64], x[0x69] = HALF, QUARTER, QUARTER if var == 3: - x[0x62] = x[0x24 + hi(mpy(self.rand(), 4))] - x[0x67] = x[0x24 + hi(mpy(self.rand(), 4))] + x[0x62] = x[0x24 + self.speed()] + x[0x67] = x[0x24 + self.speed()] else: x[0x62] = x[0x36 + 2 * var] x[0x67] = x[0x37 + 2 * var] if x[0x4f] and x[0x4f] - self.rand() > 0: # RAND: the second head at a random speed - x[0x62] = x[0x24 + hi(mpy(self.rand(), 4))] - if x[0x62] < 0: - x[0x60] = x[0x0c] - 1 - self.fade() + x[0x62] = x[0x24 + self.speed()] + self.fade(x[PW]) elif kind == SLIDE: - x[0x6b] = x[0x64] = HALF - x[0x60] = x[0x0c] >> 1 # the second head half a loop on: two overlapping loops - up = SLIDE_UP - down = SLIDE_DOWN if var != 0 else SLIDE_UP + x[0x6b], x[0x64], x[0x69] = 0, HALF, HALF + up, down = UP, DOWN if var == 0: - up = down = SLIDE_UP + down = UP elif var == 1: - up = down = SLIDE_DOWN + up = DOWN elif var == 3: - up = down = x[0x24 + hi(mpy(self.rand(), 4))] + up = down = self.speed() if x[0x4f] and x[0x4f] - self.rand() > 0: # RAND: a random target - up = x[0x24 + hi(mpy(self.rand(), 4))] - x[0x6a] = self.glide(up) - x[0x63] = self.glide(down) - self.fade() - else: # SHUFL: N slices of the loop in a new order, played RPT times - x[0x6b] = 0x7fffff + up = self.speed() + x[0x63] = self.glide(up) + x[0x68] = self.glide(down) + self.fade(x[PW]) + else: # SHUFL: N slices of the loop in a new order, played RPT times, on head 0 + x[0x6b], x[0x64], x[0x69] = 0x7fffff, 0, 0 n = 8 if var in (1, 3) else 4 x[0x6c] = n - x[0x6d] = div(2 * lev, n) + x[0x6d] = sl = div(2 * lev, n) for i in range(8): x[PERM + i] = i for i in range(n - 1, 0, -1): j = hi(mpy(self.rand(), i + 1)) x[PERM + i], x[PERM + j] = x[PERM + j], x[PERM + i] x[0x45] = x[0x45] * n + self.fade((sl >> 1 if var == 3 else sl) - 1) + if fresh and kind != SHUFL: # from silence: every head on the newest window now, on time + for st, ph, pl, rt, _gn, _t in HEADS: + x[st], x[pl] = x[PS], 0 + x[ph] = late + if x[rt] < 0: + x[ph] = x[PW] - 1 - late + if kind == SLIDE: + x[0x65] = (x[PW] >> 1) + late # the second loop half a window on x[0x09] = x[0x45] self.setrep() - def glide(self, target): - """The change a sample that takes a rate of 1 to target over the chunk (Q21).""" - x = self.x - d = s24(target - ONE) - q = div(2 * abs(d), x[0x34]) - return -q if d < 0 else q - def setrep(self): - """An event within the chunk: SHUFL's next slice; for every TYPE, WIDE's side.""" + """An event within the chunk: SHUFL's next slice on head 0, on time; WIDE's spread or ping-pong.""" x = self.x k = x[0x0a] if x[0x1d] == SHUFL: @@ -364,25 +392,28 @@ def setrep(self): s = x[0x6e] + j * sl if s >= R: s -= R - x[0x0b] = x[0x00] + s w = sl if x[0x1e] == 3: w = sl >> 1 # D: the slice's first half twice, a ratchet - x[0x0c] = w - 1 + x[0x0b] = x[PS] = x[0x00] + s + x[PW] = w - 1 x[0x0e] = 0 x[0x0f] = ONE - x[0x0d] = 0 + x[0x0d] = x[0x07] # as far in as the event is late: on the grid if x[0x1e] == 2 and k & 1: # C: every other slice reversed x[0x0f] = REVERSE - x[0x0d] = x[0x0c] - 1 - self.fade() + x[0x0d] = x[PW] - 1 - x[0x07] x[0x19] = sl - else: + p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) # WIDE: slices ping-pong; with RAND anywhere in it + if x[0x4f] and x[0x4f] - self.rand() > 0: + r = self.rand() + p = lim(mpy(lim(w56((ld(r) - ld(0x400000)) << 1)), x[0x4e])) + x[0x3c] = x[0x3d] = 0 + else: # LAYER and SLIDE: WIDE spreads heads 1 and 2 left and right x[0x19] = x[0x16] - p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) # WIDE: left, right, left; with RAND anywhere in it - if x[0x4f] and x[0x4f] - self.rand() > 0: - r = self.rand() - p = lim(mpy(lim(w56((ld(r) - ld(0x400000)) << 1)), x[0x4e])) + p = 0 + x[0x3c] = lim(mpy(x[0x64], x[0x4e])) + x[0x3d] = lim(-mpy(x[0x69], x[0x4e])) x[0x52] = p a = ld(0x7fffff) - ld(p) if a - ld(0x7fffff) >= 0: @@ -392,29 +423,29 @@ def setrep(self): b = ld(0x7fffff) x[0x4d], x[0x4c] = lim(a), lim(b) - def head(self, ph, pl, rt, dr, gn, acc): - """One read head: its position wraps inside the window at its rate, an interpolated read, faded by how far it - is from the window's ends, into the accumulator at its gain.""" + def head(self, st, ph, pl, rt, gn, out): + """One read head: its position wraps inside the newest window's length at its rate, and at a wrap it takes the + newest window, where its fade is nothing; faded by how far it is from the window's ends; an interpolated read; + the faded read to its scratch word.""" x, ring = self.x, self.ring a = ld(x[ph]) + (x[pl] & 0xffffff) a = w56(a + (ld(x[rt]) >> 21)) - w = x[0x0c] - if a - ld(w) >= 0: - a -= ld(w) - if a < 0: - a += ld(w) + w = x[PW] + fwd = ld(w) if a - ld(w) >= 0 else 0 + a -= fwd + back = ld(w) if a < 0 else 0 + a += back + if fwd + back != 0: + x[st] = x[PS] x[ph], x[pl] = hi(a), a & 0xffffff - x[rt] = hi(ld(x[rt]) + ld(x[dr])) fh = (a & 0xffffff) >> 1 - i = (x[0x0b] - x[0x00] + hi(a)) % R + b = ld(w) - a # the fade: min(p, W - p) x K + m = b if a - b > 0 else a + e = lim(w56(mpy(hi(m), x[0x13]) << 18)) + i = (x[st] - x[0x00] + hi(a)) % R s0, s1 = ring[i], ring[(i + 1) % R] v = hi(mac(ld(s0), lim(ld(s1) - ld(s0)), fh)) - m = x[ph] - q = w - m - if m - q > 0: - m = q - e = lim(w56(mpy(m, x[0x13]) << 18)) - return mac(acc, lim(mpy(v, e)), x[gn]) + x[out] = lim(mpy(e, v)) def sample(self, left, right): x, ring = self.x, self.ring @@ -426,42 +457,34 @@ def sample(self, left, right): ring[x[0x02]] = v = lim((ld(left) + ld(right)) >> 2) x[0x54] = max(x[0x54], abs(v)) # the mono ring word: what a loop can replay x[0x02] = (x[0x02] + x[0x03]) % R - acc = 0 for h in HEADS: - acc = self.head(*h, acc) + self.head(*h) + acc = mac(mac(mpy(x[0x55], x[0x6b]), x[0x56], x[0x64]), x[0x57], x[0x69]) rep = s24((hi(acc) & 0xffffff) & (x[0x46] & 0xffffff)) x[0x30] = rep + x[0x77] = lim(mac(mpy(x[0x56], x[0x3c]), x[0x57], x[0x3d])) # the side: heads 1 and 2 apart c = x[0x48] - 1 # DIRT's hold: a new sample every N if c <= 0: x[0x49] = rep c = x[0x47] x[0x48] = c rep = x[0x49] - u = ld(x[0x10]) + ld(x[0x11]) - if u - ld(x[0x2d]) >= 0: - u -= ld(x[0x2d]) - u = hi(u) - x[0x10] = u - e1 = lim(w56(mpy(u, x[0x12]) << 7)) - e2 = lim(w56(mpy(lim(ld(0x400000) - ld(u)), x[0x12]) << 7)) - env = min(e1, e2) # the chunk's envelope; a tail holds it whole - if env < 0: - env = 0 - if env < x[0x77]: - env = x[0x77] - # the dry ducks under the loop as it swells and comes back in its fades - a = ld(0x7fffff) - ld(lim(mpy(lim(mpy(x[0x3f], env)), x[0x43]))) + g = x[0x15] # the loop's level + # the dry ducks under the loop as its level rises + a = ld(0x7fffff) - ld(lim(mpy(lim(mpy(x[0x3f], g)), x[0x43]))) if a - ld(x[0x44]) > 0: a = ld(x[0x44]) x[0x1c] = lim(a) - w = lim(w56(mpy(lim(mpy(rep, env)), MAKEUP) << 1)) + w = lim(w56(ld(rep) << 1)) # x 2: half the mono sum, level with a mono sample w = lim(w56(mpy(w, x[0x4a]) << 2)) # DIRT's drive, clipped at full scale w = lim(mpy(w, x[0x4b])) - wet = lim(mpy(w, x[0x15])) + wet = lim(mpy(w, g)) x[0x31] = wet - x[0x15] = hi(ld(x[0x15]) - mpy(x[0x15], x[0x17])) - x[0x52] = wd = lim(mpy(wet, x[0x43])) - return (lim(mac(mpy(wd, x[0x4c]), left, x[0x1c])), lim(mac(mpy(wd, x[0x4d]), right, x[0x1c]))) + wd = lim(mpy(wet, x[0x43])) + sg = lim(w56(mpy(lim(mpy(x[0x77], g)), x[0x43]) << 1)) + x[0x15] = hi(mpy(lim(ld(x[0x20]) - ld(g)), x[0x17]) + ld(g)) # the level toward its target + return (lim(mac(mpy(wd, x[0x4c]), left, x[0x1c]) + ld(sg)), + lim(mac(mpy(wd, x[0x4d]), right, x[0x1c]) - ld(sg))) def pblock(values, raw=None): diff --git a/sdk/drafts/loopbox/test_reference.py b/sdk/drafts/loopbox/test_reference.py index df2512ca81..d7e8c78f19 100644 --- a/sdk/drafts/loopbox/test_reference.py +++ b/sdk/drafts/loopbox/test_reference.py @@ -44,11 +44,13 @@ def test_constants_round_their_formulas(self): self.assertEqual([(h << 24) | l for h, l in R.TIME_DIVIDENDS], n["dividends"]) self.assertEqual(list(R.T0), n["T0"]) self.assertEqual(list(R.LAYERS), n["LAYERS"]) + self.assertEqual(list(R.LN), n["LN"]) + self.assertEqual(R.ATTACK, n["ATTACK"]) def test_engine_carries_the_same_hex(self): text = (HERE / "engine.asm").read_text().lower() - for w in [l for _, l in R.TIME_DIVIDENDS] + list(R.T0) + list(R.LAYERS) + list(R.MASKS) + [ - R.REVERSE, R.SLIDE_UP, R.SLIDE_DOWN, R.SEED, R.LFSR_TAPS, R.MAKEUP, R.ACT_SCALE, R.TAIL_MIN, + for w in [l for _, l in R.TIME_DIVIDENDS] + list(R.T0) + list(R.LAYERS) + list(R.MASKS) + list(R.LN) + [ + R.REVERSE, R.ATTACK, R.SEED, R.LFSR_TAPS, R.ACT_SCALE, R.TAIL_MIN, R.TAIL_RANGE, R.TAIL_END, R.THIRD, R.DRIVE]: self.assertIn(f"#>${w:06x}", text) @@ -128,7 +130,8 @@ def test_shufl_plays_every_slice_once_a_cycle(self): self.assertEqual(m.x[0x6c], n) self.assertEqual(sorted(m.x[R.PERM:R.PERM + n]), list(range(n))) - def test_slide_glides_its_heads(self): + def test_slide_glides_its_heads_evenly(self): + # A both up an octave, B both down, C one up and one down: the change a block is x (1 + c), c = ln(T) x 16 / chunk. want = {0: (1, 1), 1: (-1, -1), 2: (1, -1)} for v, (up, down) in want.items(): m = R.Model() @@ -139,30 +142,83 @@ def test_slide_glides_its_heads(self): if m.x[0x06]: break sign = lambda w: (w > 0) - (w < 0) # noqa: E731 - self.assertEqual((sign(m.x[0x6a]), sign(m.x[0x63])), (up, down), v) - # half a loop on at the start, then the block just played (16 samples, gliding from a rate of 1) - self.assertLess(abs(m.x[0x60] - (m.x[0x0c] >> 1) - 16), 3) + self.assertEqual((sign(m.x[0x63]), sign(m.x[0x68])), (up, down), v) + self.assertEqual(m.x[0x6b], 0) # head 0 rests in SLIDE + # the second loop starts half a window on, plus how late the start was (under a block), then a block played + self.assertTrue(12 <= m.x[0x65] - (m.x[0x11] >> 1) <= 34, m.x[0x65] - (m.x[0x11] >> 1)) + # over a chunk an octave up lands near a rate of 2, evenly: half way it is near the square root of 2 + m = R.Model() + m.x[0x34] = 4096 + c = m.glide(R.UP) + rate, rates = R.ONE, [] + for _ in range(4096 // 16): + rate = R.hi(R.mpy(rate, c) + R.ld(rate)) + rates.append(rate) + self.assertAlmostEqual(rates[-1] / R.ONE, 2.0, delta=0.02) + self.assertAlmostEqual(rates[len(rates) // 2 - 1] / R.ONE, 2 ** 0.5, delta=0.02) def test_a_head_is_silent_at_the_window_ends(self): - # The fade by position: at either end of the window a head contributes almost nothing, so a wrap is silent. + # The fade by position: at either end of the window a head gives almost nothing, so a wrap is silent. m = R.Model() - m.x[0x0c] = 1000 + m.x[0x11] = 1000 m.x[0x33] = 0x100000 - m.fade() - for pos, most in ((0, 0), (999, 0x40000)): - m.x[0x0d], m.x[0x0e], m.x[0x0f], m.x[0x6a], m.x[0x6b] = pos, 0, 0, 0, 0x7fffff - m.ring[:] = [0x200000] * R.R - acc = m.head(*R.HEADS[0], 0) - self.assertLessEqual(abs(R.hi(acc)), most, pos) + m.fade(1000) + m.ring[:] = [0x200000] * R.R + for pos, most in ((0, 0), (999, 0x40000), (500, 0x7fffff)): + m.x[0x0d], m.x[0x0e], m.x[0x0f] = pos, 0, 0 + m.head(*R.HEADS[0]) + self.assertLessEqual(abs(m.x[0x55]), most, pos) + self.assertGreater(m.x[0x55], 0x100000) # in the middle it is whole + + def test_heads_take_the_newest_window_at_their_own_wraps(self): + # LAYER over a slice of several chunks: each head changes over to the next chunk's window as it wraps, not + # all at once, so for a while old and new loops sound together. + m = R.Model() + x = noise(10, 16 * 3000) + row = R.pblock(knobs(act=127, time=4, rpt=1, type=R.LAYER, var=0), tempo(120)) + mixed = False + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + starts = {m.x[st] for st, *_ in R.HEADS} + if m.x[0x06] and len(starts) > 1: + mixed = True + self.assertTrue(mixed) + + def test_layer_spreads_its_heads_with_wide(self): + x = noise(11) + l0, r0, _ = R.render(x, x, {0: knobs(act=127, time=1, mix=127, type=R.LAYER)}) + l1, r1, _ = R.render(x, x, {0: knobs(act=127, time=1, mix=127, type=R.LAYER, wide=127)}) + self.assertEqual(l0, r0) + self.assertNotEqual(l1, r1) + + def test_shufl_slices_start_on_the_grid(self): + # A slice that starts up to a block late starts that far in, so it sounds on time. + m = R.Model() + x = noise(12, 16 * 800) + row = R.pblock(knobs(act=127, time=1, type=R.SHUFL, var=0)) + seen = [] + setrep = m.setrep + def watched(): + setrep() + seen.append((m.x[0x0d], m.x[0x07])) + m.setrep = watched + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + self.assertTrue(seen) + self.assertTrue(all(p == late for p, late in seen)) + self.assertTrue(any(late for _, late in seen)) def test_tail_rings_on_after_a_loop(self): + # Loops, then none from block 680: the last loop ends within a slice; TAIL 0 is a short release (gone a few + # blocks on), and longer TAILs ring on for longer. x = noise(7) - def ringing(tail): + def ringing(tail, frm): rows = {0: knobs(act=127, time=1, mix=96, tail=tail), 680: knobs(act=0, time=1, mix=96, tail=tail)} out = R.render(x, x, rows)[0] - return sum(1 for a, b in zip(x[16 * 900:], out[16 * 900:]) if abs(a - b) > 2) - self.assertEqual(ringing(0), 0) - self.assertGreater(ringing(127), ringing(40)) + return sum(1 for a, b in zip(x[16 * frm:], out[16 * frm:]) if abs(a - b) > 2) + self.assertEqual(ringing(0, 900), 0) + self.assertGreater(ringing(40, 900), 0) + self.assertGreater(ringing(127, 900), ringing(40, 900)) def test_it_falls_silent_after_the_input_stops(self): x = noise(8, FS * 7) diff --git a/sdk/drafts/loopbox/verify.py b/sdk/drafts/loopbox/verify.py index ceacfd895a..0d054abbc6 100644 --- a/sdk/drafts/loopbox/verify.py +++ b/sdk/drafts/loopbox/verify.py @@ -11,7 +11,7 @@ Gates: 1. Every instruction decodes as written (signed mpy/mac x0,y1, no rep, no mpysu/macsu), no label is a - prefix of another (case-blind), the state stays inside X:(r7+$00..$77), and proc returns with every + prefix of another (case-blind), the state stays inside X:(r7+$00..$7a), and proc returns with every modifier register it set to a modulus linear again. 2. Bit for bit the model: every TYPE and VAR looping at every slice, the defaults at three tempos, TIME 1/4 and 1/2 through every chunk, every @@ -41,7 +41,7 @@ def _library(): import reference as R # noqa: E402 SOURCE = HERE / "engine.asm" -STATE_LAST = 0x77 +STATE_LAST = 0x7a def knobs(base=R.DEFAULTS, **kw): @@ -91,7 +91,7 @@ def main(): and int(re.search(r"\(r[0-7]\+\$([0-9a-fA-F]+)\)", l).group(1), 16) > 0x3f] gate("1 every lua (Rn+aa) offset is within its 7 bits (at most $3f)", not far, "; ".join(far)) offsets = G.state_offsets(SOURCE.read_text()) - gate("1 state inside X:(r7+$00..$77)", bool(offsets) and offsets[-1] <= STATE_LAST, f"(highest ${offsets[-1]:02x})") + gate("1 state inside X:(r7+$00..$7a)", bool(offsets) and offsets[-1] <= STATE_LAST, f"(highest ${offsets[-1]:02x})") # 2. bit for bit the model n = 16 * 3000 From 4b6d19e274fe9bca10446dde5079815177743d4a Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 18:55:26 -0600 Subject: [PATCH 03/32] Loopbox: the performance record (perf.py: worst 345.4 executed a sample with a trig split, 1.10x SPRING REV; stress clean) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/evidence/performance.json | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sdk/drafts/loopbox/evidence/performance.json diff --git a/sdk/drafts/loopbox/evidence/performance.json b/sdk/drafts/loopbox/evidence/performance.json new file mode 100644 index 0000000000..354a72e5f8 --- /dev/null +++ b/sdk/drafts/loopbox/evidence/performance.json @@ -0,0 +1,34 @@ +{ + "schema": 1, + "module": "loopbox", + "version": "0.1.0", + "sourceSha256": "2642052fb1a92fa4445d6de179f2f268b7760fba0e4c506429f640e82034f544", + "kind": "dsp", + "cycles": { + "unit": "instructions/sample", + "static": 316, + "measured": 345.4, + "instancesPerCore": 4, + "method": "static: perf.py, by the rule tools/build/cycle_count.py prices straight-line code (one cycle a word): the per-sample loop between `do n7,>gbsl` and gbsl, 316 words; it has no branch, bsr, nested do or rep, so every sample runs every word. measured: perf.py in dsp_host on verify.py's synthetic image, executed instructions a sample from dsp_host's meter, 80 cases (the defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 302.4 (defaults) to 323.2 (moving); worst 345.4, the moving pattern with a split of 12 frames, where the per-call setup (events, SHUFL's slice, the heads' changeover checks, SLIDE's glides) runs twice a block." + }, + "stock": { + "comparator": "SPRING REV", + "comparatorWorst": 314.19, + "dearestWorst": 330.94, + "baseline": "E-Verb's record (perf.py bench on the original image): SPRING REV, the cost target for new FX, worst 314.19 with trig splits (257.50 unsplit); DJ EQ, the dearest stock effect, 330.94 (293.38 unsplit), through fixed, moving and trig-split-1-15 cases. Not re-run for Glitchbox; its own cases match those (fixed, moving, a split at every position 1-15).", + "stockSha256": "164f31224bf61181e3f50e7dec40df9afcae5b16dbf6e4c0d0cc5e986af0a84e", + "justification": "No stock effect loops a captured ring with several heads; SPRING REV is the cost target for a new FX and, like Loopbox, reads and writes a delay buffer every sample. Loopbox's worst, 345.40, is 1.10x SPRING REV's 314.19 and 1.04x DJ EQ's 330.94; unsplit 323.2 against 257.50 and 293.38. Per sample it writes the mono sum into a 15,870-word ring and runs three read heads, each with its own position, wrap and changeover to the newest window, an interpolated two-word read and a fade by its position; then the heads' sum and side, DIRT's crush, hold and drive, the loop's level, the dry's duck and two outputs. The third head is what puts it over SPRING REV: LAYER needs it for its two layers over the loop." + }, + "stress": { + "instancesPerCore": 4, + "tracks": 8, + "lfosPerTrack": 3, + "lockedSlots": 12, + "seconds": 2, + "guard": true, + "dirty": true, + "clobbers": 0, + "hangs": 0, + "method": "perf.py --stress: the load is driven straight into dsp_host on verify.py's synthetic image with both cores: eight Loopbox instances, four a core, each on its own stem (decaying noise bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence, a three-note chord) for 2 s plus a 2 s tail; all twelve parameter words given a new value every block through the moving pattern, trig splits of 1, 3, 7, 8, 12 and 15 frames, -guard 0x4000 -guard-shared and -dirty: dsp_host exit 0, 0 stray writes, 0 clobbers, per-core peaks 1371.5 and 1257.0 of 3120. dsp_host hands every instance the same allocator entry, so the eight rings overlap here; on a unit each slot has its own buffer." + } +} From 9382d4d629b4ec66676a859a26a51ae1f0efd88a Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 19:13:33 -0600 Subject: [PATCH 04/32] Loopbox: TESTING records the trials and the test procedure on package 4537ab44 (steps 1-11 passed) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/TESTING.md | 74 ++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/drafts/loopbox/TESTING.md index eb29333dfb..e61be0df10 100644 --- a/sdk/drafts/loopbox/TESTING.md +++ b/sdk/drafts/loopbox/TESTING.md @@ -4,7 +4,66 @@ Record what you ran, on which build and which unit, and what you saw. "Not teste ## On the unit -Not tested. +1. 2 December 2026, the author's MKII on development twin 117eb07f of base ddb56b72 (OS 1.40C), RAM trials of 120 s with `npm run module:dev -- loopbox --cycles 331 --state 120 --buffer 15870 --slots fx2`, Loopbox picked on T1 FX2 and checked running, each rolled back with no crash, stall, freeze or skipped track logged. Reported: "Sounds really good!" Asked for improvements; with the author's OK: loops change over head by head (overlap), the chunk envelope replaced by a level with a 5 ms rise and TAIL's fall (TAIL 0 a 50 ms release), SLIDE's glides even in semitones, WIDE spreads LAYER's and SLIDE's extra heads, SHUFL's slices on the grid, and cheaper heads. +2. That build (4ae8946d), two more trials (`--cycles 340 --state 123`), the same verdicts. Reported: "Sounds awesome". + +### Test procedure: loopbox 0.1.0, 2026-12-03 + +Build: revision `4b6d19e274fe`, package `loopbox.mwrm` SHA-256 `4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run`, 588 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | passed | `npm run module:doctor -- --draft loopbox` | logs/01-software.log | +| 2 | Beside every other module | contract | not run: a draft is judged beside every other module by module:doctor --draft (its compatibility line, step 1) | | | +| 3 | Name the build | host | passed | | logs/03-build.log | +| 4 | DSP cost model | contract | passed | `node scripts/cycle-scan.mjs check` | logs/04-cost-model.log | +| 5 | Emulator rehearsal | emulator | not run: no emulator session: left out with --no-emulator | | | +| 6 | Read the unit | unit | passed: Part 1 on A01: working = saved, saved once so that RELOAD works at the end | `node scripts/device.mjs status --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs read --socket /tmp/modwerk-share.sock --out /part-start.json`
`node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | logs/06-unit-read.log | +| 7 | Scripted unit pass | unit | passed | `npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry /device-test.md /../loopbox.mwrm` | logs/07-unit-pass.log | +| 8 | Soak | unit | passed: Part 1 on A01: transport stopped, back on A01 from A04, Part 1 on A01 reloaded; working = saved | `node scripts/device.mjs try /../loopbox.mwrm --seconds 420 --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-soak.mjs --seconds 120 --programs 0-3 --pc-channel 11 --auto-channel 11 --log /soak.json`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/08-soak.log | +| 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox.mwrm` | logs/09-cost-unit.log | +| 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | +| 11 | Agent by hand | unit | passed: on 4537ab44, the pattern played 8 s at TIME 1/2, RPT 1, TAIL 127, WIDE 127 (the heads' changeover between chunks, the stereo side and the tail; freeze-set.png), frame interrupt peak 87.4 %, latest entry 7.4 us late while playing, no skipped frame, stall or crash; STOP, Part reloaded, the trial rolled back. Before PLAY the guard noted one entry 306 us late (0 in its 80-190 us window), most likely at the pick. MAIN and CUE not recorded over USB: the recorder is not built on this computer | `device try`, `pick:T1:FX2:LOOPBOX`, `png:`, `guard`, `late`, `health`, `stall`, `reload` | freeze-set.png | +| 12 | Submitter's own stage | unit | to do: the author's listening, Keep and power cycle | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- an effect slot: FX1 and FX2, both DSP cores, eight instances at once; one edited while another plays (docs/MODULE_QUALIFICATION.md#essential-persistence-and-instance-checks--8-october-2026) +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Both DSP cores | the ring is read and written every sample, by three heads | step 7 (alone on T1, then T5); step 9 on T1 FX2 | passed: T1 peak 514 per mille of a frame, admitted in 117 ms; T5 peak 584 per mille, admitted in 116 ms; step 9 in use: DSP T1-T4 +10.9, frame +0 | +| Eight instances at once | each instance its own ring and 123 state words | step 7: picked on T1-T8 FX2, playing | passed: CPU 723, T1-4 peak 780 per mille; two refused by the base for budget, no crash, stall or dropped frame | +| The instance curve | the price of each instance on a busy pattern | step 9: `device:price --curve T1,T3,T6,T7` | noisy on this scene: adds -5.2, -4.5, -4.4, -6.1 points (every reading with it lower than without), recorded as rest 3.8, first 0, each 0; empty and medium admitted, 0 dropped, 0 stalls | +| Heads changing over between chunks (TIME 1/2) | a head takes the newest window at its wrap; the writer must never reach a window still sounding | step 11 by hand; verify.py bit for bit at TIME 1/4 and 1/2 and at 30 BPM; test_reference.py: heads change over one by one | passed on the unit (no fault) and in dsp_host | +| A loop due while a tail froze the ring | it must not replay audio from before the freeze | verify.py and test_reference.py | passed in dsp_host | +| WIDE's stereo spread | the side signal bypasses the mono path | step 11 at WIDE 127; test_reference.py: L and R differ only with WIDE | passed | +| TIME 1/2 at 30 BPM | the ring's reach | verify.py, 32 chunks, LAYER and SHUFL | passed in dsp_host; not run on the unit at 30 BPM | +| STOP while looping (the silence watch) | loops follow the tempo, not the transport | verify.py: every TYPE and VAR silent 4.2 s after the input stops | passed in dsp_host | +| A Part change while installed | per-instance state and the ring across Parts | step 7 (Part switches) and step 8 (soak) | passed | +| A trial ending while in use | the loader rolls back a slot that runs it | step 8 | passed | +| Beside Sidechain Compressor | its key window starts right after the ring (+$3DFE) | not run | not run: the ring stops at +$3DFD (`Claims(buffer_words=15870)`) | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Tested on a unit: package 4537ab44f4d1, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage not yet. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). + ## Stock flows @@ -16,4 +75,15 @@ Not tested. npm run fx:audit checks aliasing, DC, clipping and idle behaviour (d ## Performance -Not measured. Listing it needs evidence/performance.json: npm run perf:audit -- template dsp (docs/MODULE_PERFORMANCE.md). +`python3 -B perf.py` in dsp_host (verify.py's synthetic image), then `npm run perf:audit -- check evidence/performance.json --stamp`, 2 December 2026: + +- Static floor: 316 words in the per-sample loop (straight-line, no branch). +- Measured, executed instructions a sample, 80 cases (defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 302.4 (defaults) to 323.2 (moving); worst 345.4, the moving pattern with a split of 12 frames. The package declares 346. +- Stress: eight instances, four a core, every parameter word changed every block, trig splits, -guard 0x4000 -guard-shared and -dirty: exit 0, no hang, 0 stray writes, 0 clobbers, per-core peaks 1371.5 and 1257.0. + +| Check | Result | +|---|---| +| record | dsp record for loopbox@0.1.0 | +| cycles | 4 x 316 = 1264 of 3120 per sample per core (41%), measured 345.4 per instance | +| stock benchmark | 345.4 vs SPRING REV 314.19 (1.10x); the dearest stock effect is 330.94; justified in the record | +| stress | 4 per core, eight tracks, 3 LFOs and 12 locked slots, 2 s, no clobber, no hang | From a064267c1ea42dc5f1ba66cddec81d0c3f6cb974 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 19:19:09 -0600 Subject: [PATCH 05/32] Loopbox: TESTING records the author's stage on package 4537ab44 (kept, listened, survived a power cycle) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/TESTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/drafts/loopbox/TESTING.md index e61be0df10..88e06da3e1 100644 --- a/sdk/drafts/loopbox/TESTING.md +++ b/sdk/drafts/loopbox/TESTING.md @@ -24,7 +24,7 @@ Build: revision `4b6d19e274fe`, package `loopbox.mwrm` SHA-256 `4537ab44f4d176c3 | 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox.mwrm` | logs/09-cost-unit.log | | 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | | 11 | Agent by hand | unit | passed: on 4537ab44, the pattern played 8 s at TIME 1/2, RPT 1, TAIL 127, WIDE 127 (the heads' changeover between chunks, the stereo side and the tail; freeze-set.png), frame interrupt peak 87.4 %, latest entry 7.4 us late while playing, no skipped frame, stall or crash; STOP, Part reloaded, the trial rolled back. Before PLAY the guard noted one entry 306 us late (0 in its 80-190 us window), most likely at the pick. MAIN and CUE not recorded over USB: the recorder is not built on this computer | `device try`, `pick:T1:FX2:LOOPBOX`, `png:`, `guard`, `late`, `health`, `stall`, `reload` | freeze-set.png | -| 12 | Submitter's own stage | unit | to do: the author's listening, Keep and power cycle | | | +| 12 | Submitter's own stage | unit | done on 4537ab44: see the author's stage below | | | #### Edge cases for this change @@ -61,10 +61,14 @@ Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.m #### For the pull request -Tested on a unit: package 4537ab44f4d1, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage not yet. +Tested on a unit: package 4537ab44f4d1, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage on 4537ab44: kept, listened, Part and power cycle survived. Edge cases: the table above, one row a case (or "Edge cases: none, because …"). +#### The author's stage (package 4537ab44) + +2 December 2026, the author's MKII on its flashed base ddb56b72 (OS 1.40C) after a power cycle: package 4537ab44 kept with `npm run device -- try --accept` beside the 26 kept modules (the card set read 27 modules after, nothing removed; no crash, stall, freeze or skipped track logged). Asked to put Loopbox on a track's FX2 and play it, save and reload the Part (and optionally the project), power-cycle and check it is still there with the same settings and sound. Reported: "everything sounds good and survived". + ## Stock flows Not tested. List the stock flows you compared with and without the module (docs/module-guides/README.md, Leave stock flows alone). From 6d255caee5b65ade84ef1f521b8083c3ef5b6f68 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 19:23:14 -0600 Subject: [PATCH 06/32] Loopbox 0.1.0-experimental: screenshots from the author's unit, thumbnail, release notes; the version string (package bytes unchanged, 4537ab44) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/CHANGELOG.json | 13 ++++++ sdk/drafts/loopbox/README.md | 2 +- sdk/drafts/loopbox/evidence/performance.json | 4 +- sdk/drafts/loopbox/media/LICENSE.md | 12 +++++ sdk/drafts/loopbox/media/capture.json | 22 +++++++++ sdk/drafts/loopbox/media/ot-controls.png | Bin 0 -> 1142 bytes sdk/drafts/loopbox/media/ot-location.png | Bin 0 -> 1165 bytes sdk/drafts/loopbox/octamod.module.json | 2 +- sdk/drafts/loopbox/presentation/thumbnail.svg | 44 ++++++++++++++++++ 9 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 sdk/drafts/loopbox/CHANGELOG.json create mode 100644 sdk/drafts/loopbox/media/LICENSE.md create mode 100644 sdk/drafts/loopbox/media/capture.json create mode 100644 sdk/drafts/loopbox/media/ot-controls.png create mode 100644 sdk/drafts/loopbox/media/ot-location.png create mode 100644 sdk/drafts/loopbox/presentation/thumbnail.svg diff --git a/sdk/drafts/loopbox/CHANGELOG.json b/sdk/drafts/loopbox/CHANGELOG.json new file mode 100644 index 0000000000..2ef6232a42 --- /dev/null +++ b/sdk/drafts/loopbox/CHANGELOG.json @@ -0,0 +1,13 @@ +[ + { + "version": "0.1.0-experimental", + "date": "2026-12-02", + "changes": [ + "New: Loopbox, an automatic micro-looper for FX2 of any track, at the project tempo.", + "Three types on the setup page: LAYER stacks loops at different speeds, SHUFL replays slices in a new order, SLIDE glides two loops in pitch.", + "TIME sets the grid from 1/64 to 1/2; ACT how often a slice loops; RPT how many times a loop cycles.", + "Loops change over head by head, so old and new overlap without a gap; TAIL lets them ring on.", + "DIRT, WIDE (stereo spread), RAND and DGRD on the setup page add grit, width, chaos and rotting tails." + ] + } +] diff --git a/sdk/drafts/loopbox/README.md b/sdk/drafts/loopbox/README.md index 2b3006956b..21b683ecda 100644 --- a/sdk/drafts/loopbox/README.md +++ b/sdk/drafts/loopbox/README.md @@ -1,6 +1,6 @@ # Loopbox -Version 0.1.0 · by @jrs1717 · a draft: bit for bit against its model in `dsp_host`, not yet run on a unit. +Version 0.1.0-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4537ab44, steps 1-11); the author kept it, listened and power-cycled: "everything sounds good and survived". ## Overview diff --git a/sdk/drafts/loopbox/evidence/performance.json b/sdk/drafts/loopbox/evidence/performance.json index 354a72e5f8..842347dbb5 100644 --- a/sdk/drafts/loopbox/evidence/performance.json +++ b/sdk/drafts/loopbox/evidence/performance.json @@ -1,8 +1,8 @@ { "schema": 1, "module": "loopbox", - "version": "0.1.0", - "sourceSha256": "2642052fb1a92fa4445d6de179f2f268b7760fba0e4c506429f640e82034f544", + "version": "0.1.0-experimental", + "sourceSha256": "c013950079d8e5734a13d6a08cf52ad2d60be3b11e132649cbb4b97b52c43b90", "kind": "dsp", "cycles": { "unit": "instructions/sample", diff --git a/sdk/drafts/loopbox/media/LICENSE.md b/sdk/drafts/loopbox/media/LICENSE.md new file mode 100644 index 0000000000..60f91a4bea --- /dev/null +++ b/sdk/drafts/loopbox/media/LICENSE.md @@ -0,0 +1,12 @@ +# OT UI capture rights and attribution + +These original LCD captures were taken on the module author's own Octatrack on 2 December 2026, read over USB from the +running Modwerk base (its screen capture request), for Modwerk module documentation. Credit: jrs1717. + +LicenseRef-OT-UI-Documentation covers the original capture/documentation contribution for use in Modwerk module +documentation. Underlying Octatrack interface artwork, labels and other Elektron material retain their owners' rights; +this declaration does not grant a licence to those underlying works or assert that they are MIT/CC licensed. Reviewer +verification of reuse rights is required before publication and is not automatic legal clearance. + +Only rendered PNG screenshots and capture metadata belong in this folder. No firmware, raw LCD/RAM dump, card, +recording or private log is included. diff --git a/sdk/drafts/loopbox/media/capture.json b/sdk/drafts/loopbox/media/capture.json new file mode 100644 index 0000000000..7aa911fd34 --- /dev/null +++ b/sdk/drafts/loopbox/media/capture.json @@ -0,0 +1,22 @@ +{ + "firmware": "1.40C", + "baseIdentity": "ddb56b72d1ac0b606f5969bc4984b6b22662e87d1b1d56a480ef0da1aac53b49", + "packageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "method": "python3 -B scripts/device-send.py png:FILE through npm run device -- serve: the base's on-demand screen frame (Screen capability), 256x128, unmodified.", + "screens": [ + { + "path": "media/ot-location.png", + "sha256": "54c3b7f89628e7b2d82a0feacdc491df60b6a44486174df23602704a80798d53", + "keys": "TRACK, FUNC+FX2", + "shows": "FX2 SETUP: Loopbox selected at the end of the effect list; TYPE (SHUFL), DIRT, VAR, WIDE, RAND and DGRD" + }, + { + "path": "media/ot-controls.png", + "sha256": "289805fe06eb2d4e7c6d9a3d5a2d305b4ad8af54301f91c32b0b15ee4d977b97", + "keys": "FX2", + "shows": "FX2 main page: TIME, ACT, SHAP, RPT, MIX, TAIL" + } + ], + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237" +} diff --git a/sdk/drafts/loopbox/media/ot-controls.png b/sdk/drafts/loopbox/media/ot-controls.png new file mode 100644 index 0000000000000000000000000000000000000000..9a2add543770296d5d766746595c9df6ed93f76b GIT binary patch literal 1142 zcmV-+1d02JP)Vf?n$63lawA2z81CSrwKbAZZhAW0-ylMmU$cd$e3lt z3IGByS|l0M%q#BF6@c+JF>k*9D`v zQUG*n76AU&Gg>PAjRTQIf=fX5c_lCc(7y`+ooucI3Yls;811_l>pG@ z77ZsFaJK1r3qTY=`@a>+@0|el>k7d7CO86sd>!Tyb`O-)Q{a^V^!G!KLD{Saz8t`u ztpJG5eN9&Y)^CC{#y3G(K1~7OKLHAOkFFJf0RY+-`L@IH0+B&kKS74B0B8U-1uGGH z)$zXZG*#5(KIVIQv!ZsUc0Xw0XSO-F0K5dKB$mdy z;ehXeqT33<_W;OFHl`~8&DaEKxJ_+u2oj&dYej)jwV%Qj-NY&IdI0j$(+@LJB zvQ+}$m{Gvlx&kl)z{Bo;@gu=>pOF%z`K32>xq?xl-b0q{cG zXHfvU9Ron)Ph|lZ1JDagUT65$NW)k&KAO%hd-mvh#sxqQ=L?Nu!98oH4<>7S%hl2nEPM())q((yhgt!M1K{6$*kSx@3SXtDm-WD{1x+K+1ph18z*qTGN!}tN;K207*qo IM6N<$f`=ydcmMzZ literal 0 HcmV?d00001 diff --git a/sdk/drafts/loopbox/media/ot-location.png b/sdk/drafts/loopbox/media/ot-location.png new file mode 100644 index 0000000000000000000000000000000000000000..1c50143da44d7e842456b08a9a40751c2c800166 GIT binary patch literal 1165 zcmV;81akX{P)TN?uT(x4Uq2|(ZT7Hju$8N@(Y3BZJazUM90?jH?cH;3_e<=DCk zf&J|O)*iagl3T05Ckh472JPp<3W=_guNUY9W2UZ20k~xqwr&9!e+%5@$gUbBU4{=o zTFTnC4VpEX%5-t#I?Pf5@Brv(KAKrvy6x2tW4p{&Z+~&)7J#)`0A>JqX1zlg+rD-H zkGvlOJR}${=Bf6e07N=L-@V=ei;Lda{UOk#0C)gAvwD0MK%3V;`clIlTsGYgOhQc}lMUFaUD9ywSN< z{vr-XEnd^Za$W!q0O*=+RNJU+Fy}?jmH2TaTMrwt0)QsG5U{_q0H8~rU3`B=PXZAk zu)Q4sOM*uT;9V!hvw{G;^6EYJ^-wH;Koxiu0MG0?(FYN?&U|3WY^-Nj!|?(TF_15q zig*h4QzHW4K-p*kU;uha(7Ns)zqnY}vC#T6HUhxYv#U*40c-3f0HjOUKJWrLQz%&p zd$0@^fNluzbc3Vz>IDgR9#fz{=d4}*H88%!!eP*u!d|oSjw_XAGE&%!K7Jz6H^cr0+1-5(4k*LGjdIcaF0=yhzyTg7* zocZ_=co_iJTtq{GhsM~Er!Kv(0^t2~l!X9}esc)4^$P&HGy>p%3dtijb|mU>wqDZ| zA+Wt2K=czcPY|zeqwrJKYqt=$+y&F`B*B*hu&%8Z4ZsUH_MTn6l#P10zXIU7);~me zlw^5{ARGa(A)r@duoxV>P63F03(Oua&!rIn-I!#CfTxEm7XS|c2VxHw9?Hn}y(90J zLGRM5*+50T0+0~`kt+t^3B3Zq09aG@aO&W|0<#K0woLQ^F9)#Rk*D4jfX@YR&$C*0 zaunC#W7gt1y#l}h_#Z=egn(S5H?Oy`sNVF~;A;R_bzb%wfUGjek`x + Loopbox — the latest audio, looped three ways + Original illustration: one short loop of a track and what each type makes of it. LAYER stacks the loop at its speed with one twice as fast and one half as fast; SHUFL cuts it into slices and plays them in a new order; SLIDE glides two overlapping loops up in pitch. A conceptual drawing, not a measured render or an Octatrack screenshot. + + + + LOOPBOX + FX2 + TIME · ACT · RPT + MIX · TAIL + LAYER + SHUFL + SLIDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3142 + 1x2x½ + + From 0519ffd88f72086aa00aa94e5e160af452e86d69 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 19:39:41 -0600 Subject: [PATCH 07/32] Loopbox: the procedure record at 0.1.0-experimental (package 4537ab44, steps 1-11) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/TESTING.md | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/drafts/loopbox/TESTING.md index 88e06da3e1..240c765789 100644 --- a/sdk/drafts/loopbox/TESTING.md +++ b/sdk/drafts/loopbox/TESTING.md @@ -7,6 +7,66 @@ Record what you ran, on which build and which unit, and what you saw. "Not teste 1. 2 December 2026, the author's MKII on development twin 117eb07f of base ddb56b72 (OS 1.40C), RAM trials of 120 s with `npm run module:dev -- loopbox --cycles 331 --state 120 --buffer 15870 --slots fx2`, Loopbox picked on T1 FX2 and checked running, each rolled back with no crash, stall, freeze or skipped track logged. Reported: "Sounds really good!" Asked for improvements; with the author's OK: loops change over head by head (overlap), the chunk envelope replaced by a level with a 5 ms rise and TAIL's fall (TAIL 0 a 50 ms release), SLIDE's glides even in semitones, WIDE spreads LAYER's and SLIDE's extra heads, SHUFL's slices on the grid, and cheaper heads. 2. That build (4ae8946d), two more trials (`--cycles 340 --state 123`), the same verdicts. Reported: "Sounds awesome". +### Test procedure: loopbox 0.1.0-experimental, 2026-12-03 + +Build: revision `6d255caee5b6`, package `loopbox-exp.mwrm` SHA-256 `4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157`. `npm run test:procedure -- loopbox --package /../loopbox-exp.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run2`, 588 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | passed | `npm run module:doctor -- --draft loopbox` | logs/01-software.log | +| 2 | Beside every other module | contract | not run: a draft is judged beside every other module by module:doctor --draft (its compatibility line, step 1) | | | +| 3 | Name the build | host | passed | | logs/03-build.log | +| 4 | DSP cost model | contract | passed | `node scripts/cycle-scan.mjs check` | logs/04-cost-model.log | +| 5 | Emulator rehearsal | emulator | not run: no emulator session: left out with --no-emulator | | | +| 6 | Read the unit | unit | passed: Part 1 on A01: working = saved, saved once so that RELOAD works at the end | `node scripts/device.mjs status --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs read --socket /tmp/modwerk-share.sock --out /part-start.json`
`node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | logs/06-unit-read.log | +| 7 | Scripted unit pass | unit | passed | `npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry /device-test.md /../loopbox-exp.mwrm` | logs/07-unit-pass.log | +| 8 | Soak | unit | passed: Part 1 on A01: transport stopped, back on A01 from A03, Part 1 on A01 reloaded; working = saved | `node scripts/device.mjs try /../loopbox-exp.mwrm --seconds 420 --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-soak.mjs --seconds 120 --programs 0-3 --pc-channel 11 --auto-channel 11 --log /soak.json`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/08-soak.log | +| 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox-exp.mwrm` | logs/09-cost-unit.log | +| 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | +| 11 | Agent by hand | unit | passed: on 4537ab44, the pattern played 8 s at TIME 1/2, RPT 1, TAIL 127, WIDE 127 (the heads' changeover between chunks, the stereo side and the tail; freeze-set.png), frame interrupt peak 86.8 %, latest entry 10.0 us late while playing (0 in the guard's 80-190 us window), no skipped frame, stall or crash; STOP, Part reloaded, the trial rolled back. MAIN and CUE not recorded over USB: the recorder is not built on this computer | `device try`, `pick:T1:FX2:LOOPBOX`, `png:`, `guard`, `late`, `health`, `stall`, `reload` | freeze-set.png | +| 12 | Submitter's own stage | unit | done on 4537ab44 (the same package): see the author's stage below | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- an effect slot: FX1 and FX2, both DSP cores, eight instances at once; one edited while another plays (docs/MODULE_QUALIFICATION.md#essential-persistence-and-instance-checks--8-october-2026) +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Both DSP cores | the ring is read and written every sample, by three heads | step 7 (alone on T1, then T5); step 9 on T1 FX2 | passed: T1 peak 507 per mille of a frame, admitted in 174 ms; T5 peak 593 per mille, admitted in 115 ms; step 9 in use: DSP T1-T4 +11.7, frame +0 | +| Eight instances at once | each instance its own ring and 123 state words | step 7: picked on T1-T8 FX2, playing | passed: CPU 725, T1-4 peak 745, T5-8 peak 818 per mille; two refused by the base for budget, no crash, stall or dropped frame | +| The instance curve | the price of each instance on a busy pattern | step 9: `device:price --curve T1,T3,T6,T7` | noisy on this scene: adds -0.6, -7.4, -3.8, -8.0 points (every reading with it lower than without), recorded as rest 6.8, first 0, each 0; empty and medium admitted, 0 dropped, 0 stalls | +| Heads changing over between chunks (TIME 1/2) | a head takes the newest window at its wrap; the writer must never reach a window still sounding | step 11 by hand; verify.py bit for bit at TIME 1/4 and 1/2 and at 30 BPM; test_reference.py: heads change over one by one | passed on the unit (no fault) and in dsp_host | +| A loop due while a tail froze the ring | it must not replay audio from before the freeze | verify.py and test_reference.py | passed in dsp_host | +| WIDE's stereo spread | the side signal bypasses the mono path | step 11 at WIDE 127; test_reference.py: L and R differ only with WIDE | passed | +| TIME 1/2 at 30 BPM | the ring's reach | verify.py, 32 chunks, LAYER and SHUFL | passed in dsp_host; not run on the unit at 30 BPM | +| STOP while looping (the silence watch) | loops follow the tempo, not the transport | verify.py: every TYPE and VAR silent 4.2 s after the input stops | passed in dsp_host | +| A Part change while installed | per-instance state and the ring across Parts | step 7 (Part switches) and step 8 (soak) | passed | +| A trial ending while in use | the loader rolls back a slot that runs it | step 8 | passed | +| Beside Sidechain Compressor | its key window starts right after the ring (+$3DFE) | not run | not run: the ring stops at +$3DFD (`Claims(buffer_words=15870)`) | + + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Tested on a unit: package 4537ab44f4d1, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage on the same package: kept, listened, Part and power cycle survived. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). + +The record below is the first run, under the version string 0.1.0 (the same package bytes, 4537ab44): module:qualify binds a record to its version, so the run above repeated it at 0.1.0-experimental. + ### Test procedure: loopbox 0.1.0, 2026-12-03 Build: revision `4b6d19e274fe`, package `loopbox.mwrm` SHA-256 `4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run`, 588 s. Emulator results are not hardware evidence; only what ran on the unit is. From b562ddbb155289b0baf4bf0c6f98b639ebf7ab02 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 20:56:55 -0600 Subject: [PATCH 08/32] Loopbox: the tutorial and screenshots in the module record Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/octamod.module.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sdk/drafts/loopbox/octamod.module.json b/sdk/drafts/loopbox/octamod.module.json index b788169fcd..a89fba3561 100644 --- a/sdk/drafts/loopbox/octamod.module.json +++ b/sdk/drafts/loopbox/octamod.module.json @@ -179,7 +179,25 @@ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", "Owner-reviewed real-hardware evidence with actual coverage and limitations" - ] + ], + "qualification": { + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D.", + "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", + "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." + ] + }, + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ], + "screenshotStyle": "black-and-white" + } + } }, "license": { "spdx": "MIT", From a6795e4579e01194e59721a747d8fe86f0936606 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 20:57:45 -0600 Subject: [PATCH 09/32] Loopbox: the access steps and the screenshots' media entries Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/octamod.module.json | 68 +++++++++++++++++--------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/sdk/drafts/loopbox/octamod.module.json b/sdk/drafts/loopbox/octamod.module.json index a89fba3561..f21a5de0ea 100644 --- a/sdk/drafts/loopbox/octamod.module.json +++ b/sdk/drafts/loopbox/octamod.module.json @@ -179,37 +179,59 @@ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", "Owner-reviewed real-hardware evidence with actual coverage and limitations" - ], - "qualification": { - "documentation": { - "tutorial": { - "title": "Quick tutorial", - "steps": [ - "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", - "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D.", - "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", - "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." - ] - }, - "screenshots": [ - "media/ot-location.png", - "media/ot-controls.png" - ], - "screenshotStyle": "black-and-white" - } - } + ] }, "license": { "spdx": "MIT", "file": "LICENSE", "declaration": "Replace with accurate authorship, attribution and original/licensed source and media rights. Never include Elektron firmware, extracted routines or tables." }, - "media": [], + "media": [ + { + "path": "media/ot-location.png", + "captureType": "hardware", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.", + "otUi": { + "page": "FX2 SETUP", + "shows": "location", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237" + } + }, + { + "path": "media/ot-controls.png", + "captureType": "hardware", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "Press FX2 for the main page: TIME, ACT and SHAP on top, RPT, MIX and TAIL below.", + "alt": "FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.", + "otUi": { + "page": "FX2", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237" + } + } + ], "access": { - "location": "Describe the exact OT page or menu where the module is selected or enabled.", + "location": "FX2 SETUP page of any audio track (the effect list).", "steps": [ - "Describe prerequisites, track/machine selection and the exact button/menu sequence." + "Select an audio track with its TRACK key.", + "Hold FUNC and press FX2 to open the effect's SETUP, turn LEVEL to LOOPBOX and press YES.", + "Press FX2 for TIME, ACT, SHAP, RPT, MIX and TAIL; hold FUNC and press FX2 again for TYPE (A), DIRT (B), VAR (C), WIDE (D), RAND (E) and DGRD (F)." ], - "screenshots": [] + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ] } } From b2b1f81b3d1546a6380fdfd053493f3eb7ff7c4b Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 20:58:53 -0600 Subject: [PATCH 10/32] Loopbox: the qualification record (package 4537ab44 at 0.1.0-experimental: 346 cycles, memory with the FX2 ring, the price, the author's stage) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/loopbox/TESTING.md | 2 + sdk/drafts/loopbox/evidence/cpu-price.json | 146 +++++++++++++++++ sdk/drafts/loopbox/evidence/frame-cost.json | 55 +++++++ sdk/drafts/loopbox/octamod.module.json | 164 ++++++++++++++++++-- 4 files changed, 351 insertions(+), 16 deletions(-) create mode 100644 sdk/drafts/loopbox/evidence/cpu-price.json create mode 100644 sdk/drafts/loopbox/evidence/frame-cost.json diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/drafts/loopbox/TESTING.md index 240c765789..93f08cbb06 100644 --- a/sdk/drafts/loopbox/TESTING.md +++ b/sdk/drafts/loopbox/TESTING.md @@ -65,6 +65,8 @@ Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.m Tested on a unit: package 4537ab44f4d1, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage on the same package: kept, listened, Part and power cycle survived. Edge cases: the table above, one row a case (or "Edge cases: none, because …"). +After the run, step 9's price was measured again with the same package file named for its id (`npm run device:price -- … --curve T1,T3,T6,T7 loopbox.mwrm`, SHA-256 4537ab44): the run had named it loopbox-exp, which module:qualify could not match. At rest frame +0, CPU -0.4; in use frame +0, CPU -0.2, DSP +11.5; curve adds -0.2, -6.0, +0.3, -5.7 (first 0.3, each 0.3); empty and medium admitted, 0 dropped, 0 stalls. The run's own reading is kept beside it as price-as-loopbox-exp.json. + The record below is the first run, under the version string 0.1.0 (the same package bytes, 4537ab44): module:qualify binds a record to its version, so the run above repeated it at 0.1.0-experimental. ### Test procedure: loopbox 0.1.0, 2026-12-03 diff --git a/sdk/drafts/loopbox/evidence/cpu-price.json b/sdk/drafts/loopbox/evidence/cpu-price.json new file mode 100644 index 0000000000..8bb83191dc --- /dev/null +++ b/sdk/drafts/loopbox/evidence/cpu-price.json @@ -0,0 +1,146 @@ +{ + "module": "loopbox", + "version": "0.1.0-experimental", + "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", + "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", + "inputs": { + "transport": "playing" + }, + "seconds": 8, + "readings": 3, + "measuredAt": "2026-12-03T02:52:15.047Z", + "result": { + "id": "loopbox", + "version": "file", + "packageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "before": { + "frame": 52.8, + "frameMax": 90.4, + "frames": 67341, + "skipped": 0, + "cpu": 70.3, + "dsp1to4": 39.4, + "dsp5to8": 49.2, + "dsp1to4Peak": 41.5, + "dsp5to8Peak": 50.2, + "readings": 3, + "spread": { + "frame": 0, + "cpu": 0.4, + "dsp1to4": 0.2, + "dsp5to8": 0, + "frameMax": 4.6, + "dsp1to4Peak": 0, + "dsp5to8Peak": 0.5 + } + }, + "atRest": { + "frame": 52.8, + "frameMax": 91.3, + "frames": 67319, + "skipped": 0, + "cpu": 69.9, + "dsp1to4": 39.5, + "dsp5to8": 49.2, + "dsp1to4Peak": 41.5, + "dsp5to8Peak": 50.6, + "readings": 3, + "spread": { + "frame": 0.1, + "cpu": 0.6, + "dsp1to4": 1.5, + "dsp5to8": 0, + "frameMax": 7.5, + "dsp1to4Peak": 0, + "dsp5to8Peak": 0.9 + } + }, + "atRestAdds": { + "frame": 0, + "cpu": -0.4, + "dsp1to4": 0.1, + "dsp5to8": 0, + "dsp1to4Peak": 0, + "dsp5to8Peak": 0.4 + }, + "inUse": { + "frame": 52.8, + "frameMax": 92.2, + "frames": 67305, + "skipped": 0, + "cpu": 70.1, + "dsp1to4": 50.9, + "dsp5to8": 48.9, + "dsp1to4Peak": 53.1, + "dsp5to8Peak": 50.2, + "readings": 3, + "spread": { + "frame": 0, + "cpu": 0.6, + "dsp1to4": 0.2, + "dsp5to8": 0.4, + "frameMax": 6.7, + "dsp1to4Peak": 0.2, + "dsp5to8Peak": 0.5 + } + }, + "inUseAdds": { + "frame": 0, + "cpu": -0.2, + "dsp1to4": 11.5, + "dsp5to8": -0.3, + "dsp1to4Peak": 11.6, + "dsp5to8Peak": 0 + }, + "inUseOn": "T1 FX2", + "curve": { + "tracks": [ + "T1", + "T3", + "T6", + "T7" + ], + "points": [ + 91.3, + 91.1, + 85.3, + 91.6, + 85.6 + ], + "adds": [ + -0.2, + -6, + 0.3, + -5.7 + ], + "first": 0.3, + "each": 0.3, + "notes": [], + "admission": [ + { + "pattern": "empty", + "number": 2, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 36.5, + "frame": 28, + "dropped": 0, + "stalls": 0 + }, + { + "pattern": "medium", + "number": 1, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 85, + "frame": 52.8, + "dropped": 0, + "stalls": 0 + } + ] + }, + "rolledBack": true + } +} diff --git a/sdk/drafts/loopbox/evidence/frame-cost.json b/sdk/drafts/loopbox/evidence/frame-cost.json new file mode 100644 index 0000000000..f68cb1ff56 --- /dev/null +++ b/sdk/drafts/loopbox/evidence/frame-cost.json @@ -0,0 +1,55 @@ +{ + "module": "loopbox", + "version": "0.1.0-experimental", + "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", + "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", + "seconds": 8, + "measuredAt": "2026-12-03T02:52:15.047Z", + "tracks": [ + "T1", + "T3", + "T6", + "T7" + ], + "rest": 0, + "first": 0.3, + "each": 0.3, + "points": [ + 91.3, + 91.1, + 85.3, + 91.6, + 85.6 + ], + "adds": [ + -0.2, + -6, + 0.3, + -5.7 + ], + "admission": [ + { + "pattern": "empty", + "number": 2, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 36.5, + "frame": 28, + "dropped": 0, + "stalls": 0 + }, + { + "pattern": "medium", + "number": 1, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 85, + "frame": 52.8, + "dropped": 0, + "stalls": 0 + } + ], + "notes": [] +} diff --git a/sdk/drafts/loopbox/octamod.module.json b/sdk/drafts/loopbox/octamod.module.json index f21a5de0ea..10549a9591 100644 --- a/sdk/drafts/loopbox/octamod.module.json +++ b/sdk/drafts/loopbox/octamod.module.json @@ -150,36 +150,168 @@ "effectId": 10 }, "resources": { - "recorded": "Not measured", + "recorded": "2026-12-03", "storage": { - "label": "Storage", - "display": "Not measured", + "label": "DSP program / state", + "display": "1774 words / 123-word state", "value": null, - "unit": "unknown", - "method": "unmeasured", - "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "unit": "see display", + "method": "static", + "conditions": "The USB package 4537ab44 (ABI 6): 1,774 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", "source": "TESTING.md" }, "processing": { - "label": "CPU / DSP load", - "display": "Not measured", + "label": "DSP instruction peak", + "display": "345 instructions/sample per instance", "value": null, - "unit": "unknown", - "method": "unmeasured", - "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", - "source": "TESTING.md" + "unit": "see display", + "method": "emulator", + "conditions": "perf:audit record (perf.py in dsp_host): worst 345.4 executed instructions a sample, the moving pattern with a trig split of 12 frames; unsplit 302.4 to 323.2; static loop 316. Against SPRING REV 314.19 (1.10x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.5 points with it on T1 FX2.", + "source": "evidence/performance.json" + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-03", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.8 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70.3 % before, 69.9 % at rest, 70.1 % in use.", + "source": "evidence/cpu-price.json" + }, + "impact": { + "conditions": "One instance at the dearest setting in dsp_host; on the author's MKII (twin 117eb07f of base ddb56b72) the frame-interrupt price on the test bank (Mang112 95 bank A, Part 1, pattern A01), and six instances admitted at once while playing (device:test).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern read first 0.3 and each 0.3 points, admitted on the empty and the medium pattern.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "high", + "basis": "measured-comparison", + "rationale": "345.4 executed instructions a sample worst case (1.10 of SPRING REV's 314.19, 1.04 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read and fade, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,384 of 3,120. On the unit one instance raised its core's load about 11.5 points; six were admitted at once.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "low", + "basis": "source-estimate", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 6,518 bytes shared.", + "source": "TESTING.md" + } } }, "tests": { "report": "TESTING.md", - "summary": "No tests have been run. Add tests.qualification with worst-case cycles, exact memory and attributed owner-reviewed hardware evidence before submitting. This scaffold cannot pass publication checks.", - "hardwareStatus": "untested", - "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4537ab44 passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"everything sounds good and survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 345.4 instructions a sample (1.10x SPRING REV).", + "hardwareStatus": "reported", + "evidenceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", "Owner-reviewed real-hardware evidence with actual coverage and limitations" - ] + ], + "qualification": { + "moduleVersion": "0.1.0-experimental", + "sourceSha256": "82ba1ce312c18a7dc89c5f7598152ae2ee10750cbadf2baf93db462f83d871b0", + "cycles": [ + { + "processor": "dsp", + "worstCase": 346, + "maxConfiguration": 1384, + "maxInstances": 8, + "budget": 3120, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "346 cycles a sample covers the measured worst case in dsp_host, 345.4 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 12 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 316. Executed instructions, not chip cycles.", + "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", + "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", + "maxLoad": "4 instances a core, 8 on both: 4 x 346 = 1,384 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1371.5 and 1257.0. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "DSP program, the package's effect on each core it runs on", + "space": "dsp-p", + "words": 1774, + "wordBits": 24, + "bytes": 5322, + "scope": "shared" + }, + { + "name": "DSP state per instance, the package's state words", + "space": "dsp-x", + "words": 123, + "wordBits": 24, + "bytes": 369, + "scope": "instance" + }, + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 1196, + "wordBits": 8, + "bytes": 1196, + "scope": "shared" + }, + { + "name": "FX2 slot delay buffer, the stock allocator's 16K Y block reused as the capture ring", + "space": "dsp-y", + "words": 15870, + "wordBits": 24, + "bytes": 47610, + "scope": "instance" + } + ], + "perInstanceBytes": 47979, + "sharedBytes": 6518, + "maxInstances": 8, + "totalBytes": 390350, + "conditions": "From the header of the USB package 4537ab44 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "report": "TESTING.md" + }, + "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-03", + "tester": "jrs1717", + "sourceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", + "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "summary": "On the author's Octatrack MKII, OS 1.40C, 2 December 2026: npm run test:procedure on package 4537ab44 at 0.1.0-experimental, on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve first 0.3 and each 0.3, admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"everything sounds good and survived\".", + "limitations": [ + "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", + "Not run: an emulator rehearsal.", + "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", + "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", + "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", + "The price was re-measured after the procedure with the same package file named for its id (the run had named it loopbox-exp, which module:qualify could not match); the readings agree: frame +0, DSP +11.5 to +11.7 in use." + ], + "report": "TESTING.md" + }, + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D.", + "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", + "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." + ] + }, + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ], + "screenshotStyle": "black-and-white" + } + } }, "license": { "spdx": "MIT", From 9d15e976331943bcaa679d8afe692020aebbd350 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:00:04 -0600 Subject: [PATCH 11/32] Loopbox: listed after its qualification module:list moved the draft to sdk/octatrack/modules/loopbox with its catalogue entry, build order, descriptor guard and package row (fx2, 346 executed cycles, 123 state words, a 15,870-word buffer); the qualification rehashed for the moved folder (records only); modules:generate. Co-Authored-By: Claude Opus 5.5 --- scripts/build-module-packages.py | 10 ++- sdk/catalog.json | 5 ++ sdk/drafts/loopbox/qualification.example.json | 84 ------------------ .../loopbox/resource-impact.example.json | 21 ----- .../modules}/loopbox/LICENSE | 0 .../modules}/loopbox/README.md | 0 .../modules}/loopbox/TESTING.md | 0 .../modules}/loopbox/engine.asm | 0 .../modules}/loopbox/evidence/cpu-price.json | 0 .../modules}/loopbox/evidence/frame-cost.json | 0 .../loopbox/evidence/performance.json | 0 .../modules}/loopbox/manifest.py | 0 .../modules}/loopbox/media/LICENSE.md | 0 .../modules}/loopbox/media/capture.json | 0 .../modules}/loopbox/media/ot-controls.png | Bin .../modules}/loopbox/media/ot-location.png | Bin .../modules}/loopbox/octamod.module.json | 2 +- .../modules}/loopbox/perf.py | 0 .../loopbox/presentation/thumbnail.svg | 0 .../modules}/loopbox/reference.py | 0 .../modules}/loopbox/test_reference.py | 0 .../modules}/loopbox/verify.py | 0 .../community/module-changelogs/loopbox.json | 0 .../assets/octatrack-module-packages.json | 10 +++ 24 files changed, 25 insertions(+), 107 deletions(-) delete mode 100644 sdk/drafts/loopbox/qualification.example.json delete mode 100644 sdk/drafts/loopbox/resource-impact.example.json rename sdk/{drafts => octatrack/modules}/loopbox/LICENSE (100%) rename sdk/{drafts => octatrack/modules}/loopbox/README.md (100%) rename sdk/{drafts => octatrack/modules}/loopbox/TESTING.md (100%) rename sdk/{drafts => octatrack/modules}/loopbox/engine.asm (100%) rename sdk/{drafts => octatrack/modules}/loopbox/evidence/cpu-price.json (100%) rename sdk/{drafts => octatrack/modules}/loopbox/evidence/frame-cost.json (100%) rename sdk/{drafts => octatrack/modules}/loopbox/evidence/performance.json (100%) rename sdk/{drafts => octatrack/modules}/loopbox/manifest.py (100%) rename sdk/{drafts => octatrack/modules}/loopbox/media/LICENSE.md (100%) rename sdk/{drafts => octatrack/modules}/loopbox/media/capture.json (100%) rename sdk/{drafts => octatrack/modules}/loopbox/media/ot-controls.png (100%) rename sdk/{drafts => octatrack/modules}/loopbox/media/ot-location.png (100%) rename sdk/{drafts => octatrack/modules}/loopbox/octamod.module.json (99%) rename sdk/{drafts => octatrack/modules}/loopbox/perf.py (100%) rename sdk/{drafts => octatrack/modules}/loopbox/presentation/thumbnail.svg (100%) rename sdk/{drafts => octatrack/modules}/loopbox/reference.py (100%) rename sdk/{drafts => octatrack/modules}/loopbox/test_reference.py (100%) rename sdk/{drafts => octatrack/modules}/loopbox/verify.py (100%) rename sdk/drafts/loopbox/CHANGELOG.json => src/community/module-changelogs/loopbox.json (100%) diff --git a/scripts/build-module-packages.py b/scripts/build-module-packages.py index 4e660a87c7..55dde67ed5 100644 --- a/scripts/build-module-packages.py +++ b/scripts/build-module-packages.py @@ -8,7 +8,7 @@ import argparse, hashlib, importlib.util, json, os, re, shutil, struct, subprocess, sys, tempfile APP = Path(__file__).resolve().parents[1] -ORDER = ['miniverb', 'tapeecho', 'euclid', 'repitch', 'tapehead', 'airwindows-chorus', 'everb', 'bbd', 'lofi2', 'ring-sc', 'vibrato', 'resonator', 'mackity', 'midiverb', 'ringbank', 'void'] +ORDER = ['miniverb', 'tapeecho', 'euclid', 'repitch', 'tapehead', 'airwindows-chorus', 'everb', 'bbd', 'lofi2', 'ring-sc', 'vibrato', 'resonator', 'mackity', 'midiverb', 'ringbank', 'void', 'loopbox'] # DSP code that stock code reaches through hooks. Output Matrix has no FX menu entry and is also a requested ColdFire module. HOOKED = ['sidechain-compressor', 'output-matrix'] REQUESTED = ['analog-bassdrum', 'usb-audio-out-tracks-main-cue', 'quantizer', 'synth', 'vector', 'playmodes', 'mute-modes', 'recorder-loop-fix', 'poly8', 'output-matrix', 'quantize-live-rec-toggle', 'apply-scene', 'direct-jump-kyoti', 'dejavu', 'arp-key-locks', 'temp-save', 'tuner', 'scope', 'slow-lfo', 'bar-led', 'stem-rec', 'songbook', 'arr-rows', 'smart-reload'] @@ -611,6 +611,14 @@ def at(base): donorSha256='3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f', fx2Slot=0x400d6004, slotSha256='79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a')) + if not any(row['id'] == 'loopbox' for row in descriptor_guards): + # The DARK REV donor and stock NONE at unused FX2 id 0x0a, with the hashes the effects above recorded for + # them (npm run module:list); the build checks both against the private OS 1.40C. Never retain stock bytes. + descriptor_guards.append(dict(id='loopbox', key='LOOPBOX', author='jrs1717', + fxId=0x0a, donorAddress=0x400d58f0, + donorSha256='3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f', + fx2Slot=0x400d6004, + slotSha256='79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a')) for old in descriptor_guards: module = byid[old['id']] if module.menu.donor_desc + 0x38 != old['donorAddress'] or module.menu.fx2_id != old['fxId']: diff --git a/sdk/catalog.json b/sdk/catalog.json index ed32963373..b3f16df5d6 100644 --- a/sdk/catalog.json +++ b/sdk/catalog.json @@ -82,6 +82,11 @@ "version": "0.1.0-experimental", "addedAt": "2026-12-01T20:48:00Z" }, + { + "id": "loopbox", + "version": "0.1.0-experimental", + "addedAt": "2026-12-03T02:58:54Z" + }, { "id": "analog-bassdrum", "version": "0.1.7-experimental", diff --git a/sdk/drafts/loopbox/qualification.example.json b/sdk/drafts/loopbox/qualification.example.json deleted file mode 100644 index f24ba06cd4..0000000000 --- a/sdk/drafts/loopbox/qualification.example.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "moduleVersion": "0.1.0", - "sourceSha256": "REPLACE_WITH_NATIVE_SOURCE_SHA256", - "imageSha256": "REPLACE_WITH_LOCAL_TESTED_IMAGE_SHA256", - "cycles": [ - { - "processor": "dsp", - "worstCase": null, - "maxConfiguration": null, - "maxInstances": null, - "budget": null, - "unit": "cycles/sample", - "method": "emulator", - "conditions": { - "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", - "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", - "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", - "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", - "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." - }, - "report": "TESTING.md" - } - ], - "memory": { - "regions": [ - { - "name": "Replace with each code, state, table, buffer, stack/heap and padding allocation", - "space": "dsp-p", - "words": null, - "wordBits": 24, - "bytes": null, - "scope": "shared" - } - ], - "perInstanceBytes": null, - "sharedBytes": null, - "maxInstances": null, - "totalBytes": null, - "conditions": "State exact build options, alignment, accounting convention, allocator/stack bounds and reused stock/shared memory; justify every absent allocation class.", - "report": "TESTING.md" - }, - "hardware": { - "status": "pending", - "model": "MKII", - "testedOn": "YYYY-MM-DD", - "tester": "Your credited tester handle; no email", - "project": { - "name": "Your local stress project", - "sha256": "REPLACE_WITH_PROJECT_FINGERPRINT", - "recipe": "Record generator/tool revision and command, local source template fingerprint, sample recipe, all settings and modifications needed to reproduce this stress project. Keep the project/card/firmware local." - }, - "durationMinutes": null, - "audioTracks": 8, - "midiTracks": null, - "conditions": { - "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", - "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", - "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", - "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", - "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." - }, - "checks": { - "audioContinuity": "failed", - "transport": "failed", - "controls": "failed", - "memoryIntegrity": "failed", - "recovery": "failed" - }, - "report": "TESTING.md", - "maxInstances": null - }, - "documentation": { - "tutorial": { - "title": "Quick tutorial", - "steps": [ - "Explain setup and exactly where to select or enable the module.", - "Demonstrate the main controls with a useful example setting.", - "Explain what to hear/observe and how to stop, reset or bypass." - ] - }, - "screenshots": [], - "screenshotStyle": "black-and-white" - } -} diff --git a/sdk/drafts/loopbox/resource-impact.example.json b/sdk/drafts/loopbox/resource-impact.example.json deleted file mode 100644 index 8f7457a054..0000000000 --- a/sdk/drafts/loopbox/resource-impact.example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "conditions": "Describe the active workload, expensive modes, changing controls, instance count, and whether shared/stock allocations are included.", - "cpu": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose minimal, low, moderate or high from source inspection or a documented workload comparison. Explain the ColdFire work and cite the record; do not invent a utilization percentage.", - "source": "TESTING.md" - }, - "dsp": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose a relative demand tier covering the expensive DSP modes and modulation. Minimal needs an explanation of the small or absent added DSP path.", - "source": "TESTING.md" - }, - "memory": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose a relative footprint tier covering code, state, tables and buffers. Distinguish shared reservations and reused stock buffers from extra per-instance memory.", - "source": "TESTING.md" - } -} diff --git a/sdk/drafts/loopbox/LICENSE b/sdk/octatrack/modules/loopbox/LICENSE similarity index 100% rename from sdk/drafts/loopbox/LICENSE rename to sdk/octatrack/modules/loopbox/LICENSE diff --git a/sdk/drafts/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md similarity index 100% rename from sdk/drafts/loopbox/README.md rename to sdk/octatrack/modules/loopbox/README.md diff --git a/sdk/drafts/loopbox/TESTING.md b/sdk/octatrack/modules/loopbox/TESTING.md similarity index 100% rename from sdk/drafts/loopbox/TESTING.md rename to sdk/octatrack/modules/loopbox/TESTING.md diff --git a/sdk/drafts/loopbox/engine.asm b/sdk/octatrack/modules/loopbox/engine.asm similarity index 100% rename from sdk/drafts/loopbox/engine.asm rename to sdk/octatrack/modules/loopbox/engine.asm diff --git a/sdk/drafts/loopbox/evidence/cpu-price.json b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json similarity index 100% rename from sdk/drafts/loopbox/evidence/cpu-price.json rename to sdk/octatrack/modules/loopbox/evidence/cpu-price.json diff --git a/sdk/drafts/loopbox/evidence/frame-cost.json b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json similarity index 100% rename from sdk/drafts/loopbox/evidence/frame-cost.json rename to sdk/octatrack/modules/loopbox/evidence/frame-cost.json diff --git a/sdk/drafts/loopbox/evidence/performance.json b/sdk/octatrack/modules/loopbox/evidence/performance.json similarity index 100% rename from sdk/drafts/loopbox/evidence/performance.json rename to sdk/octatrack/modules/loopbox/evidence/performance.json diff --git a/sdk/drafts/loopbox/manifest.py b/sdk/octatrack/modules/loopbox/manifest.py similarity index 100% rename from sdk/drafts/loopbox/manifest.py rename to sdk/octatrack/modules/loopbox/manifest.py diff --git a/sdk/drafts/loopbox/media/LICENSE.md b/sdk/octatrack/modules/loopbox/media/LICENSE.md similarity index 100% rename from sdk/drafts/loopbox/media/LICENSE.md rename to sdk/octatrack/modules/loopbox/media/LICENSE.md diff --git a/sdk/drafts/loopbox/media/capture.json b/sdk/octatrack/modules/loopbox/media/capture.json similarity index 100% rename from sdk/drafts/loopbox/media/capture.json rename to sdk/octatrack/modules/loopbox/media/capture.json diff --git a/sdk/drafts/loopbox/media/ot-controls.png b/sdk/octatrack/modules/loopbox/media/ot-controls.png similarity index 100% rename from sdk/drafts/loopbox/media/ot-controls.png rename to sdk/octatrack/modules/loopbox/media/ot-controls.png diff --git a/sdk/drafts/loopbox/media/ot-location.png b/sdk/octatrack/modules/loopbox/media/ot-location.png similarity index 100% rename from sdk/drafts/loopbox/media/ot-location.png rename to sdk/octatrack/modules/loopbox/media/ot-location.png diff --git a/sdk/drafts/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json similarity index 99% rename from sdk/drafts/loopbox/octamod.module.json rename to sdk/octatrack/modules/loopbox/octamod.module.json index 10549a9591..6ebd30f4ef 100644 --- a/sdk/drafts/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -212,7 +212,7 @@ ], "qualification": { "moduleVersion": "0.1.0-experimental", - "sourceSha256": "82ba1ce312c18a7dc89c5f7598152ae2ee10750cbadf2baf93db462f83d871b0", + "sourceSha256": "edb63a05e887312aa1ea3f6b0672ee796e875ec970728c639335d8a4e9421aec", "cycles": [ { "processor": "dsp", diff --git a/sdk/drafts/loopbox/perf.py b/sdk/octatrack/modules/loopbox/perf.py similarity index 100% rename from sdk/drafts/loopbox/perf.py rename to sdk/octatrack/modules/loopbox/perf.py diff --git a/sdk/drafts/loopbox/presentation/thumbnail.svg b/sdk/octatrack/modules/loopbox/presentation/thumbnail.svg similarity index 100% rename from sdk/drafts/loopbox/presentation/thumbnail.svg rename to sdk/octatrack/modules/loopbox/presentation/thumbnail.svg diff --git a/sdk/drafts/loopbox/reference.py b/sdk/octatrack/modules/loopbox/reference.py similarity index 100% rename from sdk/drafts/loopbox/reference.py rename to sdk/octatrack/modules/loopbox/reference.py diff --git a/sdk/drafts/loopbox/test_reference.py b/sdk/octatrack/modules/loopbox/test_reference.py similarity index 100% rename from sdk/drafts/loopbox/test_reference.py rename to sdk/octatrack/modules/loopbox/test_reference.py diff --git a/sdk/drafts/loopbox/verify.py b/sdk/octatrack/modules/loopbox/verify.py similarity index 100% rename from sdk/drafts/loopbox/verify.py rename to sdk/octatrack/modules/loopbox/verify.py diff --git a/sdk/drafts/loopbox/CHANGELOG.json b/src/community/module-changelogs/loopbox.json similarity index 100% rename from sdk/drafts/loopbox/CHANGELOG.json rename to src/community/module-changelogs/loopbox.json diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index 3d6101ddb0..08d4ee19e6 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -962,6 +962,16 @@ "bytes": 6060, "sha256": "333dd706bd70bfbf4248e469c1de641cda8d53060e434379e611e2a73512336c", "path": "octatrack-modules/void/0.1.0-experimental.mwrm" + }, + { + "id": "loopbox", + "slots": "fx2", + "cycles": 346, + "cyclesKind": "executed", + "state": 123, + "buffer": 15870, + "version": "0.1.0-experimental", + "path": "octatrack-modules/loopbox/0.1.0-experimental.mwrm" } ], "usbAudio": { From 22ccc685e850c82b5aa4e4ed5cb097a6d6468184 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:00:53 -0600 Subject: [PATCH 12/32] Loopbox: README tutorial matches the record, screenshots embedded; modules:generate Co-Authored-By: Claude Opus 5.5 --- sdk/machines/octatrack/frame-costs.json | 1 + sdk/octatrack/modules/loopbox/README.md | 22 +- src/catalog/module-documents.json | 369 ++++++++++++++++++++++++ 3 files changed, 385 insertions(+), 7 deletions(-) diff --git a/sdk/machines/octatrack/frame-costs.json b/sdk/machines/octatrack/frame-costs.json index a413ff6c15..b13c634e3a 100644 --- a/sdk/machines/octatrack/frame-costs.json +++ b/sdk/machines/octatrack/frame-costs.json @@ -10,6 +10,7 @@ "everb": {"first":0.7,"each":0.2,"rest":0,"points":[0.7,0.8,1,-0.6],"measured":"everb 0.1.2-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, "grain": {"first":16.1,"each":8.6,"rest":0.4,"points":[16.1,24.7],"measured":"grain 0.2.0-experimental on T1 T3: A01 at 120 BPM, 16 steps, trigs on steps 1/5/9/13 of T1-T4, T6, T7: T1 and T3 Flex with a loaded 16-bit stereo sample (0.91 MB), T2 and T4 stock samples with time stretch off, T6 and T7 no sample, T5 and T8 empty; picks on empty A02; the author's MKI; package 520215cb; base 4c7eb79b (development base booted in RAM); 8 s a reading; 2026-11-30 (evidence/frame-cost.json)","paused":4.7}, "lofi2": {"first":1,"each":0,"rest":0,"points":[1,-1.5,-0.3,-1.3],"measured":"lofi2 0.1.1-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples), picks on empty C02; owner's MKII; base 0.8 twin 28 053fd054; 8 s a reading; 2026-11-22"}, + "loopbox": {"first":0.3,"each":0.3,"rest":0,"points":[-0.2,-6,0.3,-5.7],"measured":"loopbox 0.1.0-experimental on T1 T3 T6 T7: the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, "mackity": {"first":0.9,"each":0.9,"rest":0,"points":[-1.8,-2.2,0.9,-2.9],"measured":"mackity 0.1.0-experimental on T1 T3 T6 T7: Project on the owner's development unit, bank C, Part 1 reloaded in RAM to its saved copy; picks on the empty C02, readings on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7) at the project tempo; transport played by the tool; base development twin 8fd6d456 of base 0.8.1 (eb6679620d0c9ed7), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-25 (evidence/frame-cost.json)"}, "midiverb": {"first":2,"each":2,"rest":0,"points":[0.9,0.2,2.2,1],"measured":"midiverb 0.2.0-experimental on T1 T3 T6 T7: Dev17 bank C: C04 Part 2 (working = saved), picks on the empty C02, the curve on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7), transport stopped; twin ed5474c6 of base 0.8.3 (main 80ea1e584); base development twin ed5474c6 of base 0.8.3 (main 80ea1e584), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-27 (evidence/frame-cost.json)"}, "miniverb": {"first":1.5,"each":0,"rest":0,"points":[1.5,1.4,1.2,1.2],"measured":"miniverb 0.2.3-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 21b683ecda..f936a3d3d2 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -34,10 +34,10 @@ Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end ## Quick tutorial -1. Put Loopbox on FX2 of a track playing a drum loop. At the defaults it is LAYER A at 1/16, looping about half the slices. -2. Turn ACT to 127 and MIX to 127 to hear only the loops, then step TYPE through LAYER, SHUFL and SLIDE. -3. Set TIME to 1/4 and RPT to 1 for longer phrases, and raise TAIL to let each loop ring on. -4. Turn MIX back to 64 to blend the loops with the track again. +1. Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices. +2. Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D. +3. Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right. +4. Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone. ## Compatibility and limitations @@ -57,9 +57,17 @@ Original code by @jrs1717 under the MIT licence in LICENSE. It starts from the a ## Screens and audio -None yet. +![FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.](media/ot-location.png) + +Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below. + +![FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.](media/ot-controls.png) + +Press FX2 for the main page: TIME, ACT and SHAP on top, RPT, MIX and TAIL below. + +Captured over USB on the author's Octatrack (OS 1.40C, base ddb56b72); see `media/capture.json`. No audio preview yet. ## Develop -- Hear it: `npm run module:dev -- loopbox --cycles 340 --cycles-kind executed --state 123 --buffer 15870 --slots fx2`. -- Check it: `npm run module:doctor -- --draft loopbox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model. +- Hear it: `npm run module:dev -- loopbox --cycles 346 --cycles-kind executed --state 123 --buffer 15870 --slots fx2`. +- Check it: `npm run module:doctor -- loopbox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model. diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index eccff8cb3b..58191ff3d4 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -5565,6 +5565,375 @@ } ] }, + { + "schemaVersion": 2, + "id": "loopbox", + "key": "LOOPBOX", + "name": "Loopbox", + "version": "0.1.0-experimental", + "category": "effects", + "access": { + "location": "FX2 SETUP page of any audio track (the effect list).", + "steps": [ + "Select an audio track with its TRACK key.", + "Hold FUNC and press FX2 to open the effect's SETUP, turn LEVEL to LOOPBOX and press YES.", + "Press FX2 for TIME, ACT, SHAP, RPT, MIX and TAIL; hold FUNC and press FX2 again for TYPE (A), DIRT (B), VAR (C), WIDE (D), RAND (E) and DGRD (F)." + ], + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ] + }, + "author": { + "github": "jrs1717", + "credits": [ + "jrs1717" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "LOOP", + "family": "Looper", + "summary": "Automatic micro-loops on FX2: overlapping loops at different speeds, slices replayed in a new order, or loops gliding in pitch, all at the project's tempo.", + "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, SHUFL cuts the loop into slices and replays them in a shuffled order, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", + "highlights": [ + "Three types, four variations each: LAYER, SHUFL and SLIDE", + "Loops on a note grid from 1/64 to 1/2 at the project's tempo", + "Each read head fades by its own position, so loops at any speed are click-free", + "DIRT, WIDE ping-pong, RAND and a degrading TAIL on the setup page" + ], + "usage": [ + "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SHUFL and SLIDE." + ] + }, + "controls": [ + { + "name": "TIME", + "default": 2, + "count": 6, + "doc": "Slice length at the tempo, 1/64 to 1/2; loops start on it and last it, in chunks of 179 ms at most.", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ] + }, + { + "name": "ACT", + "default": 64, + "count": 128, + "doc": "The share of slices that loop: 0 none, 127 about 70 %.", + "labels": null + }, + { + "name": "SHAP", + "default": 32, + "count": 128, + "doc": "The loops' fades: 1/64 of a loop at 0, rising evenly to a full swell.", + "labels": null + }, + { + "name": "RPT", + "default": 1, + "count": 8, + "doc": "How many times a loop cycles in a chunk: 1 the whole chunk once, 8 an eighth of it eight times.", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "name": "MIX", + "default": 64, + "count": 128, + "doc": "How far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone.", + "labels": null + }, + { + "name": "TAIL", + "default": 64, + "count": 128, + "doc": "After a loop its heads loop on and fade: 0 none, 127 about 3 s.", + "labels": null + }, + { + "name": "TYPE", + "default": 0, + "count": 3, + "doc": "LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch.", + "labels": [ + "LAYER", + "SHUFL", + "SLIDE" + ] + }, + { + "name": "DIRT", + "default": 0, + "count": 128, + "doc": "Grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean.", + "labels": null + }, + { + "name": "VAR", + "default": 0, + "count": 4, + "doc": "Variation A-D: octaves, fifths, reversed or random layers; 4 or 8 slices, reversed or ratcheted; up, down, apart or random glides.", + "labels": [ + "A", + "B", + "C", + "D" + ] + }, + { + "name": "WIDE", + "default": 0, + "count": 128, + "doc": "Ping-pong: loops alternate left and right this far; with RAND anywhere in it.", + "labels": null + }, + { + "name": "RAND", + "default": 0, + "count": 128, + "doc": "Chaos: random loop counts, speeds, glide targets and places; 0 as set.", + "labels": null + }, + { + "name": "DGRD", + "default": 0, + "count": 128, + "doc": "Degrade: a tail grows dirtier as it fades; 0 a clean fade.", + "labels": null + } + ], + "compatibility": { + "firmware": "1.40C", + "effectId": 10, + "location": "FX1", + "conflicts": [], + "uiClaims": [], + "limitations": [ + "Scaffold only; audio behavior and hardware operation have not been tested." + ] + }, + "resources": { + "recorded": "2026-12-03", + "storage": { + "label": "DSP program / state", + "display": "1774 words / 123-word state", + "value": null, + "unit": "see display", + "method": "static", + "conditions": "The USB package 4537ab44 (ABI 6): 1,774 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "source": "TESTING.md" + }, + "processing": { + "label": "DSP instruction peak", + "display": "345 instructions/sample per instance", + "value": null, + "unit": "see display", + "method": "emulator", + "conditions": "perf:audit record (perf.py in dsp_host): worst 345.4 executed instructions a sample, the moving pattern with a trig split of 12 frames; unsplit 302.4 to 323.2; static loop 316. Against SPRING REV 314.19 (1.10x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.5 points with it on T1 FX2.", + "source": "evidence/performance.json" + }, + "impact": { + "conditions": "One instance at the dearest setting in dsp_host; on the author's MKII (twin 117eb07f of base ddb56b72) the frame-interrupt price on the test bank (Mang112 95 bank A, Part 1, pattern A01), and six instances admitted at once while playing (device:test).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern read first 0.3 and each 0.3 points, admitted on the empty and the medium pattern.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "high", + "basis": "measured-comparison", + "rationale": "345.4 executed instructions a sample worst case (1.10 of SPRING REV's 314.19, 1.04 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read and fade, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,384 of 3,120. On the unit one instance raised its core's load about 11.5 points; six were admitted at once.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "low", + "basis": "source-estimate", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 6,518 bytes shared.", + "source": "TESTING.md" + } + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-03", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.8 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70.3 % before, 69.9 % at rest, 70.1 % in use.", + "source": "evidence/cpu-price.json" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4537ab44 passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"everything sounds good and survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 345.4 instructions a sample (1.10x SPRING REV).", + "hardwareStatus": "reported", + "evidenceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ], + "qualification": { + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D.", + "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", + "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." + ] + }, + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ], + "screenshotStyle": "black-and-white" + }, + "moduleVersion": "0.1.0-experimental", + "sourceSha256": "edb63a05e887312aa1ea3f6b0672ee796e875ec970728c639335d8a4e9421aec", + "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "cycles": [ + { + "processor": "dsp", + "worstCase": 346, + "maxConfiguration": 1384, + "maxInstances": 8, + "budget": 3120, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "346 cycles a sample covers the measured worst case in dsp_host, 345.4 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 12 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 316. Executed instructions, not chip cycles.", + "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", + "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", + "maxLoad": "4 instances a core, 8 on both: 4 x 346 = 1,384 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1371.5 and 1257.0. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "DSP program, the package's effect on each core it runs on", + "space": "dsp-p", + "words": 1774, + "wordBits": 24, + "bytes": 5322, + "scope": "shared" + }, + { + "name": "DSP state per instance, the package's state words", + "space": "dsp-x", + "words": 123, + "wordBits": 24, + "bytes": 369, + "scope": "instance" + }, + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 1196, + "wordBits": 8, + "bytes": 1196, + "scope": "shared" + }, + { + "name": "FX2 slot delay buffer, the stock allocator's 16K Y block reused as the capture ring", + "space": "dsp-y", + "words": 15870, + "wordBits": 24, + "bytes": 47610, + "scope": "instance" + } + ], + "perInstanceBytes": 47979, + "sharedBytes": 6518, + "maxInstances": 8, + "totalBytes": 390350, + "conditions": "From the header of the USB package 4537ab44 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "report": "TESTING.md" + }, + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-03", + "tester": "jrs1717", + "sourceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", + "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "summary": "On the author's Octatrack MKII, OS 1.40C, 2 December 2026: npm run test:procedure on package 4537ab44 at 0.1.0-experimental, on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve first 0.3 and each 0.3, admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"everything sounds good and survived\".", + "limitations": [ + "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", + "Not run: an emulator rehearsal.", + "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", + "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", + "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", + "The price was re-measured after the procedure with the same package file named for its id (the run had named it loopbox-exp, which module:qualify could not match); the readings agree: frame +0, DSP +11.5 to +11.7 in use." + ], + "report": "TESTING.md" + } + } + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Replace with accurate authorship, attribution and original/licensed source and media rights. Never include Elektron firmware, extracted routines or tables." + }, + "media": [ + { + "path": "media/ot-location.png", + "captureType": "hardware", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2 SETUP", + "shows": "location", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + }, + { + "path": "media/ot-controls.png", + "captureType": "hardware", + "caption": "Press FX2 for the main page: TIME, ACT and SHAP on top, RPT, MIX and TAIL below.", + "alt": "FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + } + ] + }, { "schemaVersion": 2, "id": "analog-bassdrum", From d4eee732df2daf3056ebcf02d53cb9af3a3fa9a7 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:02:07 -0600 Subject: [PATCH 13/32] Loopbox: the source-built packages imported, the USB package built (4537ab44, the tested and kept package), Tape Echo and Euclid recipes re-pinned Co-Authored-By: Claude Opus 5.5 --- .../loopbox/0.1.0-experimental.mwrm | Bin 0 -> 8386 bytes .../module-adapters/standalone-recipes.json | 12 +- src/engine/assets/descriptor-recipes.json | 460 ++++++++++++++++++ src/engine/assets/dsp-packages.json | 41 ++ src/engine/assets/menu-recipes.json | 123 +++++ src/engine/assets/module-build.json | 19 +- .../assets/octatrack-module-packages.json | 11 +- 7 files changed, 650 insertions(+), 16 deletions(-) create mode 100644 public/octatrack-modules/loopbox/0.1.0-experimental.mwrm diff --git a/public/octatrack-modules/loopbox/0.1.0-experimental.mwrm b/public/octatrack-modules/loopbox/0.1.0-experimental.mwrm new file mode 100644 index 0000000000000000000000000000000000000000..cb7d1bafe682ad9e8519d5a94bcde28326151367 GIT binary patch literal 8386 zcmd5>3viXi6+ZvopPLwNNB|{NQuALxQ0o{#8XO(q-sFZPn2PND5s+p$)r&QwdMt&yg}vLg*HIduz4)L={J4xLFu;AnyT-e9_UZcW?sY4= z*M~$RUPF6RO{%ct#8q?eKkwul-#>C}$L>w9?|SD%%M;Vu*N?dW&Z^(0pS$Zss!ZhS zQ4#YPM2Zy15<41MYR8l;vtuC3?dZu0#b2jmryWIB>bOeBE*)3vxJJics>D+|?$`0O zj?cQ$GYUVia9rWvC|scMVTD6Wey{KtUH_B9;}kxo@c9ZKSNH;jPbxf7;WreXqA>JN z#rBLB)!(~B@z9faPxbUF6c2qY9{QyGTUxwI#X}E^haMI`U-4hFV_dFRc)J~YG}qRA5r+T3O{Pcn0!v*$8`O6g@0^EU%sgD&vbpO!n+mzvcgX( ze6NE&(2d5QXZMdDE&d34Yu$Sf!p=@lcNs#7w5#`I9H=bjw%p@b(xUFSD{ zftt$D?zbhLehag4&pa8tIPJw{hhfQr_pl@msZ-)opI%hmEJN7Dzql-{ZJk%23)j=d z;W`KsGREz3lnd>8q^Extd-G9a5;7_+l~N@PRSby}E5=uf?@|e5tW10z5q#}JxPD0D zxAt1K+7@HLU*`$@W5!~AvRx-Ga}=n&&0@+2rJ!dsFza>PAf{%s1Y1G#8qg^O20{bG z&%)wi9uqUI7W)rGI8!ue=VNBJi79b&CX2amv&BPO%pD#q#q4nSWpG0g^ z{Lx|c9)j;2yvV@=A$*O4dqeo+4u(#S{#py4j^M=>emjDfSoj|iyc9F&ns?axx3G9V zVtaEGvoN+MzFoZ3Q?ilNrHBk;gtHq+wU~7&G5vjF;)fj#Y)K-tHK4f$RDleL*|=ZK zDCLo}KF6-_mE;2=?V#sv8K43XHU|c=M|lFDm75pI^-=>^@x*M|CuUrZ{M$s@z;7dD z1=1^Eme&!@LQyw}RhreVLo2p$`ISwR_3m6t5H04f`vU z9_v|M4QSOzJWs}-)Lk^eN$yIX)(wr~FatiUu8zlC5gPLc3;uPz*eM&vRJd z^z#1z9DH2XkNdHI7!Ol+7%~{|aF6fycyHwBLO)N>`q}@r@^E=kSj-sZA%@7Oa@A`V zY?~YErvCN!oM9i@BkT+N0Q#k%2Srwv>9}0&Qy=?}orT8+>lepkrSe#X5rtk>U_{}U z>p(MrF9n!&m3Xdq>H6w-t#`o}JFHxHmyE?aViVw;4ei4o<|Jx!*A9z!d5QJ*LpE>S zo_a|h<^4?gO`zM0uh`v5FgHS>vX#o>nMV9HF^M?|DtW!lak~%>M&Vk z_B&XA3F|Sy7g~6o*30-2qJN5dkgXeu(uCb_x^dT`mhgVP8pdP{e&7ad!jU7vMz@;NC&!Z+jop_yXVo*fv>`zrcEf$dccQEVc4VZ9W7@ zhd_2qatp=>I3G|yv|?mlEyK7MBhLZtT=8$&;`YK0wa58ry|u~Z4dvWn<^1<;V-C|c zo=@7w^GVyf{sY_ic5tzBwr$93BsDRH!$INm|K6-RpF zc&~&woNb(Mv!^fGXWqOohflkhHy!O5?4y%AJ!`%!Of{`)yR zua0=S+&_anoE7J<9;?@xbYc${+HSV6F1A=1W~n=KtQV$zpFLAfmwGGLJb^o^hrSGb z4H>9)ZTS6y=g-kLDD9y$&}J+x948audXvXmnL*9$lSxMb<31%nQ^tFNF<1z=*7lct zhX!&Ze6|{Ej8}_$dw@QWPuX_`kf=)?SZ596-tazbfs7-7!ye)s+~u@8<@U`!j(ID1 z!|swk)M@wL4&QFJPm1n(7d!jbvGTA7`eu6%-uD-yKjb^b<&&8TUrN|>L3TOc8v~$2 zFH+v8Jp(U=gwBtujg=7(mv@!Qrv|iFVU9ki4DYNh%pvCTbvmxrdmj9|(3c)S+?Ec4 z_W)?Z9_3e259|ENUQ&Br@8>Fiq4Uqfw7C`g(@^;*>O1XuydOE84c_7#89(A1LH8(p zPB`qN>HA&;s2@1!U9vT+BlKEQYO!Kb5^f1_%7@f%i-rPr!((ev&H=eA=|(MzBN<9 z=Y>Ah;LE^=Hc$`BUx)S0z|kJ$ZxQn@6XmOYJIy|AZ3=d}{N)|$bh!y<l1dz}o{<4{H? zaLl&*LC(5w}E~w{IT8DI$SF)OndyXemH+kR#`X7#N*&(&q=o= z@6Psg)FGbVi&TD2S{8*gp5^oIJubJ`f)8U7_Ia(s-&f*9`KO#*?-b;+uCzuuV*3i@ z40}rcv5ze1c@eW#3s(c4w+8)+u2*B8tK zLEdb1Jv7&c(UzLXHrix;=zSC80C>3^NnsYoF9UxE5zH836Jp5Nan12(?z;13-|Mh1 z?5F**Y64fp1(g=bpd!(Jxh z$DY*j>{OX`urJKf8>~$!NO1DA_BvZl^xFmPcR9-#;CDHss`KF(J*&)V)<9i`H(FEY= z@8%p^tFVsyA$)t{-D%&o==Bt|6=&t+ za-B6UjUyyX=_^;V|OPpZu!=Z1kQ}HHl(0CYd(8i`VO^xD(|9R%-L}y z)L-eSCOEnj^r((%xG8Q@K54s$b=Apc&V*;_T+}`I8NV61K52o<>;%mKdQ#ru)PcS1 z0KN*~_G1iv+N}9_3+NcbY)#|2XHUVt*S>#`hc$6{-NYt6x9pj3v~uW+q#xF%n}AC> z-R+%3-RnTh+(x|f+&yW^(eL0s`d4a`!F@$r_`3#erET<40Peh-m~+{9g|)C4cI|-g zX)k>l_HPB2_T_Nzd*r6`Cu*nlIe9F24}P?-0`_bLO*2N;W}eSb-g%l6H>=HD3v1FS zUAsQIpHtXv>n6e(#+otB@@JfzZT|3X&3zxRhPZs9E)6-qf$(j;So_<4tkqMB%05Q| z)M&pX9o1CEqxOWBT;r{`!$FsKH)ns*{53p)~W9H1A!K9c*`U-k7chG;C z_WicsHA@-KM9v$+y(Mf8X+M?KE#+uS*zZgNZ^9#N4!wd|fZtP0$v)_e|DQoTLObO2 cE{TutMWgUH@p@DCoKWTnv&lc`zY;(8PY=?yqW}N^ literal 0 HcmV?d00001 diff --git a/sdk/machines/octatrack/module-adapters/standalone-recipes.json b/sdk/machines/octatrack/module-adapters/standalone-recipes.json index 61090f5c53..f5b0527e5d 100644 --- a/sdk/machines/octatrack/module-adapters/standalone-recipes.json +++ b/sdk/machines/octatrack/module-adapters/standalone-recipes.json @@ -233,9 +233,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "ec6204ee389b7c9c8c2418636ae2b1aa70f3b282aabf081c7e6fddcc279e74b8", - "src/engine/assets/descriptor-recipes.json": "84e5fe2c0f3566e2418f8991025d5a2c38a7d5f93cb71269920e65865db90f7d", - "src/engine/assets/menu-recipes.json": "0ee0dbe220fff8d4bc36ec9c7255c94368fdf591e6320f236d6b844cc39473f2", + "src/engine/assets/dsp-packages.json": "7d9944dfa589579bc3a6be7e92e501128c3fdea9d6247a8b805a35a3d5665947", + "src/engine/assets/descriptor-recipes.json": "2089f5a96da5f965fce91e07f9af679343ea988ec510f3e2ee6ae67d4958a29d", + "src/engine/assets/menu-recipes.json": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", @@ -468,9 +468,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "ec6204ee389b7c9c8c2418636ae2b1aa70f3b282aabf081c7e6fddcc279e74b8", - "src/engine/assets/descriptor-recipes.json": "84e5fe2c0f3566e2418f8991025d5a2c38a7d5f93cb71269920e65865db90f7d", - "src/engine/assets/menu-recipes.json": "0ee0dbe220fff8d4bc36ec9c7255c94368fdf591e6320f236d6b844cc39473f2", + "src/engine/assets/dsp-packages.json": "7d9944dfa589579bc3a6be7e92e501128c3fdea9d6247a8b805a35a3d5665947", + "src/engine/assets/descriptor-recipes.json": "2089f5a96da5f965fce91e07f9af679343ea988ec510f3e2ee6ae67d4958a29d", + "src/engine/assets/menu-recipes.json": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", diff --git a/src/engine/assets/descriptor-recipes.json b/src/engine/assets/descriptor-recipes.json index 2422007e57..c8be3f0d27 100644 --- a/src/engine/assets/descriptor-recipes.json +++ b/src/engine/assets/descriptor-recipes.json @@ -5457,6 +5457,466 @@ "value": "" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "fxId": 10, + "donorAddress": 1074616560, + "donorSha256": "3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f", + "fx2Slot": 1074618372, + "slotSha256": "79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a", + "sourceSha256": "e4838a6829df17b901499676feb9ca0ff5ff60ae9e503c71eae3f8b788f25aa4", + "integers": [ + { + "offset": 3, + "width": 1, + "value": 10 + }, + { + "offset": 94, + "width": 1, + "value": 2 + }, + { + "offset": 95, + "width": 1, + "value": 64 + }, + { + "offset": 96, + "width": 1, + "value": 32 + }, + { + "offset": 97, + "width": 1, + "value": 1 + }, + { + "offset": 98, + "width": 1, + "value": 64 + }, + { + "offset": 99, + "width": 1, + "value": 64 + }, + { + "offset": 100, + "width": 1, + "value": 0 + }, + { + "offset": 101, + "width": 1, + "value": 0 + }, + { + "offset": 102, + "width": 1, + "value": 0 + }, + { + "offset": 103, + "width": 1, + "value": 0 + }, + { + "offset": 104, + "width": 1, + "value": 0 + }, + { + "offset": 105, + "width": 1, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 0 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 206, + "width": 4, + "value": 0 + }, + { + "offset": 254, + "width": 4, + "value": 0 + }, + { + "offset": 210, + "width": 4, + "value": 0 + }, + { + "offset": 258, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 0 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 218, + "width": 4, + "value": 0 + }, + { + "offset": 266, + "width": 4, + "value": 0 + }, + { + "offset": 222, + "width": 4, + "value": 0 + }, + { + "offset": 270, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 0 + }, + { + "offset": 274, + "width": 4, + "value": 0 + }, + { + "offset": 230, + "width": 4, + "value": 0 + }, + { + "offset": 278, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 0 + }, + { + "offset": 282, + "width": 4, + "value": 0 + }, + { + "offset": 238, + "width": 4, + "value": 0 + }, + { + "offset": 286, + "width": 4, + "value": 0 + }, + { + "offset": 242, + "width": 4, + "value": 0 + }, + { + "offset": 290, + "width": 4, + "value": 0 + }, + { + "offset": 246, + "width": 4, + "value": 0 + }, + { + "offset": 294, + "width": 4, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 1073989400 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 298, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 1073989400 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 310, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 1073989400 + }, + { + "offset": 274, + "width": 4, + "value": 1074033236 + }, + { + "offset": 322, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 1073989400 + }, + { + "offset": 282, + "width": 4, + "value": 1074033236 + }, + { + "offset": 330, + "width": 4, + "value": 0 + }, + { + "offset": 154, + "width": 4, + "value": 6 + }, + { + "offset": 106, + "width": 4, + "value": 0 + }, + { + "offset": 158, + "width": 4, + "value": 128 + }, + { + "offset": 110, + "width": 4, + "value": 0 + }, + { + "offset": 162, + "width": 4, + "value": 128 + }, + { + "offset": 114, + "width": 4, + "value": 0 + }, + { + "offset": 166, + "width": 4, + "value": 8 + }, + { + "offset": 118, + "width": 4, + "value": 0 + }, + { + "offset": 170, + "width": 4, + "value": 128 + }, + { + "offset": 122, + "width": 4, + "value": 0 + }, + { + "offset": 174, + "width": 4, + "value": 128 + }, + { + "offset": 126, + "width": 4, + "value": 0 + }, + { + "offset": 178, + "width": 4, + "value": 3 + }, + { + "offset": 130, + "width": 4, + "value": 0 + }, + { + "offset": 182, + "width": 4, + "value": 128 + }, + { + "offset": 134, + "width": 4, + "value": 0 + }, + { + "offset": 186, + "width": 4, + "value": 4 + }, + { + "offset": 138, + "width": 4, + "value": 0 + }, + { + "offset": 190, + "width": 4, + "value": 128 + }, + { + "offset": 142, + "width": 4, + "value": 0 + }, + { + "offset": 194, + "width": 4, + "value": 128 + }, + { + "offset": 146, + "width": 4, + "value": 0 + }, + { + "offset": 198, + "width": 4, + "value": 128 + }, + { + "offset": 150, + "width": 4, + "value": 0 + }, + { + "offset": 398, + "width": 4, + "value": 286331153 + }, + { + "offset": 394, + "width": 4, + "value": 4369 + } + ], + "strings": [ + { + "offset": 4, + "width": 5, + "value": "LOOP" + }, + { + "offset": 9, + "width": 13, + "value": "LOOPBOX" + }, + { + "offset": 22, + "width": 6, + "value": "TIME" + }, + { + "offset": 28, + "width": 6, + "value": "ACT" + }, + { + "offset": 34, + "width": 6, + "value": "SHAP" + }, + { + "offset": 40, + "width": 6, + "value": "RPT" + }, + { + "offset": 46, + "width": 6, + "value": "MIX" + }, + { + "offset": 52, + "width": 6, + "value": "TAIL" + }, + { + "offset": 58, + "width": 6, + "value": "TYPE" + }, + { + "offset": 64, + "width": 6, + "value": "DIRT" + }, + { + "offset": 70, + "width": 6, + "value": "VAR" + }, + { + "offset": 76, + "width": 6, + "value": "WIDE" + }, + { + "offset": 82, + "width": 6, + "value": "RAND" + }, + { + "offset": 88, + "width": 6, + "value": "DGRD" + } + ] } ] } diff --git a/src/engine/assets/dsp-packages.json b/src/engine/assets/dsp-packages.json index 2e8dcdf058..3fbf0b1bf8 100644 --- a/src/engine/assets/dsp-packages.json +++ b/src/engine/assets/dsp-packages.json @@ -239,6 +239,47 @@ } ] }, + { + "id": "loopbox", + "version": "0.1.0-experimental", + "key": "LOOPBOX", + "author": "jrs1717", + "sources": { + "modules/loopbox/engine.asm": "85fd1780126c7d430881966bad4505ee774e185e4ac2301eff2181e8d111d6bd", + "modules/loopbox/manifest.py": "e4838a6829df17b901499676feb9ca0ff5ff60ae9e503c71eae3f8b788f25aa4" + }, + "fxId": 10, + "words": 1774, + "code": "20001322f50005f425ffffff067b80000006565d0000000064f00000021305f424ffffff00000044e400020784022fc40a77840000780a778400007a024784208e0044f40000400020004420001b44f4000000012000030230480207cf44f400000001020fc444f4001234560217c444f40008000002978444f4001000000297c444f400400000029f8444f400600000029fc444f40040000002df8444f40010000002dfc444f4002ff22202e78444f40017f91102e7c444f400e0000002ef8444f40010000002efc444f400ffffff02578444f40058b90c02a78444f4002c5c8602a7c444f4002c5c8602af8444f400464faa02afc444f400ffffff0a778400005844f400fff0000a778400005944f400ffc0000a778400005a44f400ff80000a778400005b44f400ff00000a778400005c44f400fe00000a778400005d44f400fc00000a778400005e44f400f800000a778400005f00000c0207de2000030d104a00037105f424ffffff05f425ffffff02069e0140c67f00000c1c2044f400000005200045027040028f8c0206de0140c67fffff21840047f4005a00002000c0027fce020e9e0140c67fffff21840047f4003e00002000c821a40057f40002000020004821a40002cfc4020ede0140c67f00000c1c2044f4000000072000450270400140c00000010287cc0216de0140c67fffff21850056f4007fffff20006421c4002087002000c021c7002000c021c40047f4000064ea2000c046f4000001b620005002cf8e02169e0140c67fffff218400208e0046f4007f000020005547f4007fffff021070026f8c02369e0140c67f00000c1c2044f4000000022000450270400277cc0236de0140c67f00000c1c2044f400000003200045027040027f8c02369e0140c600ff000c1d100a778c0000510236de0140c600ff000c1d100a778c00004e023e9e0140c67f00000a778c00004f023e9e0140c600ff000c1d100a778c000050024edf0c1c9121a400208f0044f4000002d020004d44f400000b4002904844f400001c2020004d027048028fcd028f9f56f40000000050f400791fd044f40000000120004d0d104900002a56f40000000050f400f23fa044f40000000220004d0d104900002156f40000000150f400e47f4044f40000000320004d0d104900001856f40000000350f400c8fe8044f40000000420004d0d104900000f56f40000000750f40091fd0044f40000000520004d0d104900000656f40000000f50f40023fa00028fd40d10800005b9208f0045f40000000144f400001edc20004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850002278d0a778500004002b79e2000030d104200000c026f94026fc444f4007fffff0277840227940267c444f40000000102b784026f9e026fd420004420002644f400000040200045026fdf026f96029058026fcd02679e2000030d104a00004f0257de44f4000020002000450d10410000060d10800005420d10c0000045020fde2000030d104a00004120001b02479e0d108000053e44f4000000202000450d104700000457f4000000010a77ce00006b2000030d104a00000c022fde0d108000052f44f4000000202000450d104700000457f4000000010a77ce0000642000030d104a00000d0a77ce0000780d108000051f44f4000000202000450d104700000457f4000000010a77ce0000692000030d104a00000d0a77ce00007a0d108000050f44f4000000202000450d104700000457f40000000120000b0d104a000004200013020fce020fde2000030d104200000f021f9e2000030d104200000b02679e2000030d104200000744f400000001020fc420001302178e0a77ce00005344f40002b1102000450d104900000a0d10800004e320001b021f8f02178f44f400000001020fc4021fde0267d42000450d10490000040d10800001f6021f9e2000030d104a000031022fde0d10800004d544f4000000402000450d1047000007024794022fc42000130237ce023f8e0a77ce0000780d10800004c744f4000000402000450d104700000a0247940a77840000782000130a778e0000600a778e0000610a77ce00007a0d10800004b644f4000000402000450d104700000a0247940a778400007a2000130a778e0000650a778e0000660a77c40000620a77c70000632000c02000400a778c0000620a77c40000670a77c70000682000c02000400a778c000067021f9f44f4007fffff20001320000b02204002ffcc0a77ce00005102679f20000b0d104a00000b0257d457f4007fffff20004c21e4000a77c70000502000c820001021c400208e000c1c280140c000005821990022f10005f421ffffff00000046e90002579e2000560a778c000046208e000c1c260140c00000010a778c00004747f4006000002000c00140c02000000a778e00004a208e000c1c0221860057f4007fffff20005c0a778f00004b02079e020f9420004021940005f424003dfd0a77dc00000305f425003dfd70f40000000106df000003bd026f9e026fd42000440c1c0c200040026fcc026fd447f4002aaaab2000c02000400a778e00004356f4007fffff2000440c1d040a778e00004445e00046e80002bf8502bfc620ae002000500c1c045e6400204c0021c400208e002000260a77cf00005420000d0290080a778d0000540237de023f98023fdf0c1cab2000100247d420001b20004502104820001421e50020001b200003029048200010200068022fdf024797022078022fcd21b5000237cc023f88219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2421c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000550a77ce0000600a77c80000610a77cf0000620c1cab2000100247d420001b20004502104820001421e50020001b2000030290482000102000680a77cf0000780247970220780a778d00007821b5000a778c0000600a7788000061219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2421c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000560a77ce0000650a77c80000660a77cf0000670c1cab2000100247d420001b20004502104820001421e50020001b2000030290482000102000680a77cf00007a0247970220780a778d00007a21b5000a778c0000650a7788000066219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2421c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000570a77c40000550a77c700006b2000c00a77c40000560a77c70000642000c20a77c40000570a77c70000692000c20a77c400004620004602c78c0a77c400005602f7972000c00a77c400005702f7d72000c20a778e0000770a77ce0000480140c40000010a77cf00004902c7950a77c400004702f06802f0400a778c0000480a778f0000490257d620c70002ffd42000c021c4000a77c70000432000c021c40056f4007fffff2000440a77c400004420004502704002778e0a77ce0000490c1d0221c4000a77c700004a2000c00c1d0421c4000a77c700004b2000c021c40020c7002000c021c4000a77c70000432000c021c5000a77c400007720c7002000c021c4000a77c70000432000c00c1d020a778e00007702879e20005421c400025fd72000c02000500257cc20a4000a77c700004c2000c002bf940277972000c20a77c400007720004056580020a4000a77c700004d2000c002bfd40277972000c20a77c4000077200044565800000000228e00020794200044020f8c23e400021fde200040021fcc0a77cf00005320004845f40010000020006d0270680a77ce00005447f40000004020007546f4000000000210580a778d0000532000130a778e000054020fdf20000b0d104a00000902179e20004046f400003dee20005502705002178c05f424ffffff05f425ffffff00000c021fde0267d420004420004546f400000000021050021fcc021f9e2000030d104a0000290227de0140c40000010227cc2000030d104a000009022f9e0140c0000001022f8c0d10800001f400000c0d10800001e40a77ce0000420140c40000010a778c0000422000030d104700003b200013021f8e02878e0a778e0000630a778e00006844f40000000102678402cf94025fc40d10c00000040d10800001cb0227940267c40a77ce0000412000030d10420001c30a77ce00005346f40000ac442000550d10410001bc02179e2000450d10490001b80d10800002aa027fde2000450d104f0001b2020fde2000030d104200000b0d108000028f20001302178e44f400000001020fc40d10c00001a50a77c40000400a77840000420287d40a77840000450a77ce00004f2000030d104a0000120d108000028b0a77ce00004f2000450d104f00000b0d108000028447f4000000082000c00140c00000010a778c000045021f9e0267942000400a778c00005244f400000001021f84020fc4200013022f8e02678e44f4007fffff02878444f400009445025fc402279e02d78c0c1c2e0a77c40000450d1080000270025f840a778400006d020f9e20004446f40000000045f400003dfe20000320af000210582000100a778c00006e02079520006002478c208e000140c40000010247cc44f4000000010a778400006c2000130a778e0000630a778e00006844f400200000023fc40a77840000620a77840000670277de2000030d104a00007744f4000000022000450d104a0000af44f4007fffff0a778400006b2000130a778e0000640a778e00006945f400000004027f9e0140c60000012000030d104a00000445f4000000080a778500006c025f9e0c1d0221880054f40000000020a4000d10800002240a778400006d22ee000140c000006f21910005f421ffffff2000130608800004d35459000140c000000100000022ee000140c000006f2191000a77ce00006c0140c40000010a778c00005521840006c4000004fa0d10800001fa0a77ce0000550140c00000012187002000c021990000000046e9000a77d900005500000045e9004669002199000000004569000a77ce0000550140c40000010a778c0000550000000a77ce0000450c1d040a77cf00006c44f40000000820004d0d10420000030c1d020a778c0000450a77ce00006d027f9f44f40000000320004d0d10420000030c1c020140c40000012184000d10800001a10d10c00000cc44f4004000000a778400006b44f4002000000a77840000640a7784000069027f9e44f4000000032000450d104a0000120c1d0221990005f421ffffff041f6100000044e9000a7784000062041f7100000044e9000a77840000670d10c000000a0d10800001580a77840000620d10800001540a77840000670a77ce00004f2000030d104a00000d0d10800001960a77ce00004f2000450d104f0000060d10800001440a77840000620247d40d10800001640d10c00000492000130a778e00006b44f4004000000a77840000640a778400006944f40000000245f400000001027f9e2000030d10420000052085000d10c000001246f4000000012000550d104200000520a4000d10c000000a46f4000000032000550d10420000050d10800001232085000a77840000550a77850000560a77ce00004f2000030d104a00000d0d10800001590a77ce00004f2000450d104f0000060d10800001100a77840000550a77c40000550d10800001110a77840000630a77c40000560d108000010b0a77840000680247d40d108000011b0a77ce0000522000030d1042000043024794022fc4200013023f8e021fde023fdf20000b0d10430000070247de0140c4000001021fd42000440237cc0247940a77840000782000130a778e000061021fde0a77cf00006220000b0d10430000070247de0140c4000001021fd42000440a778c0000600247940a778400007a2000130a778e000066021fde0a77cf00006720000b0d10430000070247de0140c4000001021fd42000440a778c0000650277de44f4000000022000450d10420000080247de0c1c02021fd42000400a778c0000650a77c40000450227c40d108000001000000c0a77ce0000410140c00000010a77c400004020004546f4000000000210500a778c00004100000c0277de44f4000000012000450d104a000014025f940267c40a77c700004e0a77c40000642000c002f78e0a77c40000692000c020003602f7ce2000130a778e0000520d10c00000720a77ce00006c0140c4000001218400022f9e20004621990022ee000140c000006f21910005f421ffffff00000044e9000a77c700006d2000c00c1c022104000a77ce00006e20004044f400003dfe2000450d1049000003200044020794200040022fcc02478c0a77ce00006d027f9f44f40000000320004d0d10420000030c1c020140c40000010247cc200013023f8e02f78e02f7ce44f400200000023fc4021fde44f40000000220004d0d1042000010022f9f0140ce00000120000b0d104a00000a44f400e00000023fc40247de0140c4000001021fd42000440237cc0a77c400006d0267c40a77ce00004e022f9f0140ce00000120000b0d104a0000032000360a778e0000520a77cf00004f20000b0d104a0000150d10800000710a77ce00004f2000450d104f00000e0d108000006a208e000140c44000000c1d0221c4000a77c700004e2000c00a778e0000520a77c400005246f4007fffff56f4007fffff2000442000550210500a778e00004d57f4007fffff20004820005d0210580a778f00004c00000c0d108000000920990004174105f421ffffff00000044e90000000c0d108000004247f4000000042000c021840000000c20990020850004178105f421ffffff00000056e9000c1c2402d7940d108000003e208e0020af0046f40000000220005d0d104100000320003621840000000c208e000140c000000121840002cfd72000c0218400208e0046f40000004020005502905021840056f40000002050f4000000000d1080000021024fc400000c20001302678e0257ce02878e025fce00000c020794200044020f9420004444f400003dfe2000030d104100000320004000000c0217de2000230d104000000544f400e100002000430217cc0140c67fffff21840000000c00feb90618800006eb01804021040000000c", + "sha256": "47d46f402f7a5fbccc49563e5460e08990822625c421c062cfe71349c07da7a6", + "relocations": [ + 5, + 641, + 1232, + 1249, + 1770 + ], + "init": 0, + "proc": 115, + "proofs": [ + { + "base": 4096, + "sha256": "6f91f8fb7aaeb184734262297125d50c9788dd473a2d37a8d96234f0c257f07e" + }, + { + "base": 5120, + "sha256": "234f68397f86f6dec8f651a1d5b4c122a237ba1e632fa9c63950c10d103c4ad4" + }, + { + "base": 6145, + "sha256": "ebbed19748755f366656ab14438b8ec38eb5049692e36046c720befb0bb038b5" + }, + { + "base": 9223, + "sha256": "1f0069a58a8152f234c06210e2579b26c80d109d371aa9059462c645f8668f4b" + } + ] + }, { "id": "mackity", "version": "0.1.0-experimental", diff --git a/src/engine/assets/menu-recipes.json b/src/engine/assets/menu-recipes.json index f58ec89a72..42d2a19fa1 100644 --- a/src/engine/assets/menu-recipes.json +++ b/src/engine/assets/menu-recipes.json @@ -1166,6 +1166,129 @@ "sha256": "056c4c117d0d2212bba34e0d77fbd33fa4d1fd6bfe6f542feeaa18ad52cc0846" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 0, + "name": "TIME", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ], + "renames": {}, + "wideMaximum": 5, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + }, + { + "namesAddress": 1074623350, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 3, + "name": "RPT", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ], + "renames": {}, + "wideMaximum": 7, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + }, + { + "namesAddress": 1074623350, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 6, + "name": "TYPE", + "labels": [ + "LAYER", + "SHUFL", + "SLIDE" + ], + "renames": { + "0": { + "6": "LAYER" + }, + "1": { + "6": "SHUFL" + }, + "2": { + "6": "SLIDE" + } + }, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 168, + "sha256": "7b126c5c6efd88ac26d95eef69afc18a1e6b0cebbbffa3f08f8e94d30cbe632b" + }, + { + "namesAddress": 1074623350, + "bytes": 168, + "sha256": "f259dc6aeb2b95eee67e97379b4ac79e2354aa18412e2d24cf8a2c35560b6500" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 8, + "name": "VAR", + "labels": [ + "A", + "B", + "C", + "D" + ], + "renames": {}, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + }, + { + "namesAddress": 1074623350, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + } + ] } ], "repitchPatches": [ diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 81bc5107bf..1dbee8231a 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "f3575f3bf3323c86d72667bb5879bd18f33d1a18", + "sourceCommit": "22ccc685e850c82b5aa4e4ed5cb097a6d6468184", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "e52c525da84ff57410bc880291f071741e675da3898be4587de898d356c07079", - "compilerSha256": "508d6ef9697fa1e55c990c43481c50b298483abf4ba6ca490306fbadb7d56bcd", + "sourceTreeSha256": "b72572d6402f4e121e717f68b343af65f687ba4ffecc07ba4585227ddba59a54", + "compilerSha256": "88ffa809a26e143272326111e4a04bfea10fa5d053e7a96316bd87a269d70dd2", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -22,6 +22,7 @@ "midiverb": "0.2.0-experimental", "ringbank": "0.1.0-experimental", "void": "0.1.0-experimental", + "loopbox": "0.1.0-experimental", "analog-bassdrum": "0.1.7-experimental", "usb-audio-out-tracks-main-cue": "0.4.3-experimental", "quantizer": "0.1.5-experimental", @@ -52,8 +53,8 @@ }, "files": { "dsp-packages.json": { - "bytes": 108681, - "sha256": "ec6204ee389b7c9c8c2418636ae2b1aa70f3b282aabf081c7e6fddcc279e74b8" + "bytes": 120518, + "sha256": "7d9944dfa589579bc3a6be7e92e501128c3fdea9d6247a8b805a35a3d5665947" }, "resident-dsp.json": { "bytes": 6981, @@ -72,12 +73,12 @@ "sha256": "f4b17e0eb4e297e6dbfc61781fe5aed41262c1e7263e42579184c7cc15fa843e" }, "menu-recipes.json": { - "bytes": 33966, - "sha256": "0ee0dbe220fff8d4bc36ec9c7255c94368fdf591e6320f236d6b844cc39473f2" + "bytes": 36665, + "sha256": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4" }, "descriptor-recipes.json": { - "bytes": 102879, - "sha256": "84e5fe2c0f3566e2418f8991025d5a2c38a7d5f93cb71269920e65865db90f7d" + "bytes": 111421, + "sha256": "2089f5a96da5f965fce91e07f9af679343ea988ec510f3e2ee6ae67d4958a29d" }, "platform-writes.json": { "bytes": 15585, diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index 08d4ee19e6..fd16da49a9 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -971,7 +971,16 @@ "state": 123, "buffer": 15870, "version": "0.1.0-experimental", - "path": "octatrack-modules/loopbox/0.1.0-experimental.mwrm" + "path": "octatrack-modules/loopbox/0.1.0-experimental.mwrm", + "abi": 6, + "features": 0, + "sites": 0, + "copies": 0, + "fills": 0, + "name": "Loopbox", + "module": "4fd229d0", + "bytes": 8386, + "sha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157" } ], "usbAudio": { From a123ae135d449a41bfe0bf43a85656303036170b Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:05:19 -0600 Subject: [PATCH 14/32] Loopbox: performance re-measured and stamped on the listed source (same numbers) Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/loopbox/evidence/performance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/octatrack/modules/loopbox/evidence/performance.json b/sdk/octatrack/modules/loopbox/evidence/performance.json index 842347dbb5..bcb4d73397 100644 --- a/sdk/octatrack/modules/loopbox/evidence/performance.json +++ b/sdk/octatrack/modules/loopbox/evidence/performance.json @@ -2,7 +2,7 @@ "schema": 1, "module": "loopbox", "version": "0.1.0-experimental", - "sourceSha256": "c013950079d8e5734a13d6a08cf52ad2d60be3b11e132649cbb4b97b52c43b90", + "sourceSha256": "828ea43b23742821698fc5ac514613c8c6e1247b46b28c11436aaad2af4d68be", "kind": "dsp", "cycles": { "unit": "instructions/sample", From 6196e583645d8bfa03643bb84729f78ae9f989d0 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:24:05 -0600 Subject: [PATCH 15/32] Loopbox 0.1.1-experimental: the code review's fixes A head still past the end after a wrap (the window shrank under it) lands at the start, where its fade is nothing; each head's gain glides a call toward its target and fades out before a forced changeover; a chunk's last event takes what is left of it (no drift); a SHUFL slice lasts at least a block; SLIDE's glide step is scaled by the frames in a call; a fade is at most half its window (short loops reach full level). Text: FX2 as the location, the real limitations and licence declaration, the proof note, TAIL 0's release, the setup gesture. verify.py bit-exact; test_reference.py 26/26; perf.py worst 362.7 (1.15x SPRING REV), the package declares 363. Co-Authored-By: Claude Opus 5.5 --- .../loopbox/0.1.0-experimental.mwrm | Bin 8386 -> 0 bytes sdk/catalog.json | 2 +- sdk/octatrack/modules/loopbox/README.md | 4 +- sdk/octatrack/modules/loopbox/engine.asm | 346 ++++++++++++++---- .../modules/loopbox/evidence/performance.json | 14 +- sdk/octatrack/modules/loopbox/manifest.py | 6 +- .../modules/loopbox/octamod.module.json | 15 +- sdk/octatrack/modules/loopbox/reference.py | 72 +++- .../modules/loopbox/test_reference.py | 80 ++++ src/community/module-changelogs/loopbox.json | 4 +- .../assets/octatrack-module-packages.json | 15 +- 11 files changed, 437 insertions(+), 121 deletions(-) delete mode 100644 public/octatrack-modules/loopbox/0.1.0-experimental.mwrm diff --git a/public/octatrack-modules/loopbox/0.1.0-experimental.mwrm b/public/octatrack-modules/loopbox/0.1.0-experimental.mwrm deleted file mode 100644 index cb7d1bafe682ad9e8519d5a94bcde28326151367..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8386 zcmd5>3viXi6+ZvopPLwNNB|{NQuALxQ0o{#8XO(q-sFZPn2PND5s+p$)r&QwdMt&yg}vLg*HIduz4)L={J4xLFu;AnyT-e9_UZcW?sY4= z*M~$RUPF6RO{%ct#8q?eKkwul-#>C}$L>w9?|SD%%M;Vu*N?dW&Z^(0pS$Zss!ZhS zQ4#YPM2Zy15<41MYR8l;vtuC3?dZu0#b2jmryWIB>bOeBE*)3vxJJics>D+|?$`0O zj?cQ$GYUVia9rWvC|scMVTD6Wey{KtUH_B9;}kxo@c9ZKSNH;jPbxf7;WreXqA>JN z#rBLB)!(~B@z9faPxbUF6c2qY9{QyGTUxwI#X}E^haMI`U-4hFV_dFRc)J~YG}qRA5r+T3O{Pcn0!v*$8`O6g@0^EU%sgD&vbpO!n+mzvcgX( ze6NE&(2d5QXZMdDE&d34Yu$Sf!p=@lcNs#7w5#`I9H=bjw%p@b(xUFSD{ zftt$D?zbhLehag4&pa8tIPJw{hhfQr_pl@msZ-)opI%hmEJN7Dzql-{ZJk%23)j=d z;W`KsGREz3lnd>8q^Extd-G9a5;7_+l~N@PRSby}E5=uf?@|e5tW10z5q#}JxPD0D zxAt1K+7@HLU*`$@W5!~AvRx-Ga}=n&&0@+2rJ!dsFza>PAf{%s1Y1G#8qg^O20{bG z&%)wi9uqUI7W)rGI8!ue=VNBJi79b&CX2amv&BPO%pD#q#q4nSWpG0g^ z{Lx|c9)j;2yvV@=A$*O4dqeo+4u(#S{#py4j^M=>emjDfSoj|iyc9F&ns?axx3G9V zVtaEGvoN+MzFoZ3Q?ilNrHBk;gtHq+wU~7&G5vjF;)fj#Y)K-tHK4f$RDleL*|=ZK zDCLo}KF6-_mE;2=?V#sv8K43XHU|c=M|lFDm75pI^-=>^@x*M|CuUrZ{M$s@z;7dD z1=1^Eme&!@LQyw}RhreVLo2p$`ISwR_3m6t5H04f`vU z9_v|M4QSOzJWs}-)Lk^eN$yIX)(wr~FatiUu8zlC5gPLc3;uPz*eM&vRJd z^z#1z9DH2XkNdHI7!Ol+7%~{|aF6fycyHwBLO)N>`q}@r@^E=kSj-sZA%@7Oa@A`V zY?~YErvCN!oM9i@BkT+N0Q#k%2Srwv>9}0&Qy=?}orT8+>lepkrSe#X5rtk>U_{}U z>p(MrF9n!&m3Xdq>H6w-t#`o}JFHxHmyE?aViVw;4ei4o<|Jx!*A9z!d5QJ*LpE>S zo_a|h<^4?gO`zM0uh`v5FgHS>vX#o>nMV9HF^M?|DtW!lak~%>M&Vk z_B&XA3F|Sy7g~6o*30-2qJN5dkgXeu(uCb_x^dT`mhgVP8pdP{e&7ad!jU7vMz@;NC&!Z+jop_yXVo*fv>`zrcEf$dccQEVc4VZ9W7@ zhd_2qatp=>I3G|yv|?mlEyK7MBhLZtT=8$&;`YK0wa58ry|u~Z4dvWn<^1<;V-C|c zo=@7w^GVyf{sY_ic5tzBwr$93BsDRH!$INm|K6-RpF zc&~&woNb(Mv!^fGXWqOohflkhHy!O5?4y%AJ!`%!Of{`)yR zua0=S+&_anoE7J<9;?@xbYc${+HSV6F1A=1W~n=KtQV$zpFLAfmwGGLJb^o^hrSGb z4H>9)ZTS6y=g-kLDD9y$&}J+x948audXvXmnL*9$lSxMb<31%nQ^tFNF<1z=*7lct zhX!&Ze6|{Ej8}_$dw@QWPuX_`kf=)?SZ596-tazbfs7-7!ye)s+~u@8<@U`!j(ID1 z!|swk)M@wL4&QFJPm1n(7d!jbvGTA7`eu6%-uD-yKjb^b<&&8TUrN|>L3TOc8v~$2 zFH+v8Jp(U=gwBtujg=7(mv@!Qrv|iFVU9ki4DYNh%pvCTbvmxrdmj9|(3c)S+?Ec4 z_W)?Z9_3e259|ENUQ&Br@8>Fiq4Uqfw7C`g(@^;*>O1XuydOE84c_7#89(A1LH8(p zPB`qN>HA&;s2@1!U9vT+BlKEQYO!Kb5^f1_%7@f%i-rPr!((ev&H=eA=|(MzBN<9 z=Y>Ah;LE^=Hc$`BUx)S0z|kJ$ZxQn@6XmOYJIy|AZ3=d}{N)|$bh!y<l1dz}o{<4{H? zaLl&*LC(5w}E~w{IT8DI$SF)OndyXemH+kR#`X7#N*&(&q=o= z@6Psg)FGbVi&TD2S{8*gp5^oIJubJ`f)8U7_Ia(s-&f*9`KO#*?-b;+uCzuuV*3i@ z40}rcv5ze1c@eW#3s(c4w+8)+u2*B8tK zLEdb1Jv7&c(UzLXHrix;=zSC80C>3^NnsYoF9UxE5zH836Jp5Nan12(?z;13-|Mh1 z?5F**Y64fp1(g=bpd!(Jxh z$DY*j>{OX`urJKf8>~$!NO1DA_BvZl^xFmPcR9-#;CDHss`KF(J*&)V)<9i`H(FEY= z@8%p^tFVsyA$)t{-D%&o==Bt|6=&t+ za-B6UjUyyX=_^;V|OPpZu!=Z1kQ}HHl(0CYd(8i`VO^xD(|9R%-L}y z)L-eSCOEnj^r((%xG8Q@K54s$b=Apc&V*;_T+}`I8NV61K52o<>;%mKdQ#ru)PcS1 z0KN*~_G1iv+N}9_3+NcbY)#|2XHUVt*S>#`hc$6{-NYt6x9pj3v~uW+q#xF%n}AC> z-R+%3-RnTh+(x|f+&yW^(eL0s`d4a`!F@$r_`3#erET<40Peh-m~+{9g|)C4cI|-g zX)k>l_HPB2_T_Nzd*r6`Cu*nlIe9F24}P?-0`_bLO*2N;W}eSb-g%l6H>=HD3v1FS zUAsQIpHtXv>n6e(#+otB@@JfzZT|3X&3zxRhPZs9E)6-qf$(j;So_<4tkqMB%05Q| z)M&pX9o1CEqxOWBT;r{`!$FsKH)ns*{53p)~W9H1A!K9c*`U-k7chG;C z_WicsHA@-KM9v$+y(Mf8X+M?KE#+uS*zZgNZ^9#N4!wd|fZtP0$v)_e|DQoTLObO2 cE{TutMWgUH@p@DCoKWTnv&lc`zY;(8PY=?yqW}N^ diff --git a/sdk/catalog.json b/sdk/catalog.json index b3f16df5d6..fc24bf66fd 100644 --- a/sdk/catalog.json +++ b/sdk/catalog.json @@ -84,7 +84,7 @@ }, { "id": "loopbox", - "version": "0.1.0-experimental", + "version": "0.1.1-experimental", "addedAt": "2026-12-03T02:58:54Z" }, { diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index f936a3d3d2..4f7dbb84bb 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -1,6 +1,6 @@ # Loopbox -Version 0.1.0-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4537ab44, steps 1-11); the author kept it, listened and power-cycled: "everything sounds good and survived". +Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4537ab44, steps 1-11); the author kept it, listened and power-cycled: "everything sounds good and survived". ## Overview @@ -30,7 +30,7 @@ Each type has variations A to D. Each read head fades in and out of the loop by ## Usage -Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. FX2 shows the main page; press FX2 again for the setup page. +Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. Press FX2 for the main page (TIME, ACT, SHAP, RPT, MIX, TAIL); hold FUNC and press FX2 for the setup page (TYPE, DIRT, VAR, WIDE, RAND, DGRD). ## Quick tutorial diff --git a/sdk/octatrack/modules/loopbox/engine.asm b/sdk/octatrack/modules/loopbox/engine.asm index 7cd05b64a5..cbdb256a0b 100644 --- a/sdk/octatrack/modules/loopbox/engine.asm +++ b/sdk/octatrack/modules/loopbox/engine.asm @@ -19,20 +19,25 @@ ; shuffled order, RPT times, each as far in as its event is late (C ; reverses every other slice, D plays each slice's first half twice) ; SLIDE heads 1 and 2, half a window apart, gliding over the chunk by -; x (1 + c) a block, even in semitones: A up an octave, B down an +; x (1 + c x frames / 16) a call, even in semitones: A up an octave, B down an ; octave, C one up and one down, D to a random speed ; Every head wraps at the newest window's length and, at a wrap, takes the -; newest window: there its fade, min(p, W - p) x K (K = 2^28 / F, F the -; window x SHAP's share, at least 64 samples), is nothing, so the heads change -; over one by one and old and new loops overlap without a click. A loop that +; newest window: there its fade, min(p, W - p) x K (K = 2^25 / F, F the +; window x SHAP's share, at least 64 samples, at most half the window, never +; under 5), is nothing, so the heads change over one by one and old and new +; loops overlap without a click; a head still past the end after a wrap (the +; window shrank under it) lands at the start. Each head's gain moves an eighth +; of the way to its target a call: TYPE's, or nothing while the writer nears a +; window it still plays, where it takes the newest window once faded out. +; A chunk's last event takes what is left of it, so loops keep the grid; a +; SHUFL slice lasts at least a block (N halves until it does). A loop that ; starts from silence sets every head on its window at once. The loop's level ; G rises to whole in about 5 ms when a loop starts and, when it ends, falls at ; TAIL's rate (about 50 ms to -60 dB at 0, 3 s at 127) while the heads loop on, ; steady in pitch; a loop starting over a tail picks up from there. WIDE spreads ; heads 1 and 2 left and right (LAYER, SLIDE) or ping-pongs SHUFL's slices. ; Should the writer come within 32 samples of a window still sounding during a -; tail, the ring freezes; while a loop plays, a head whose window it nears -; takes the newest at once. After a second of silence in no loop starts; after +; tail, the ring freezes. After a second of silence in no loop starts; after ; four, any loop or tail stops and the ring records again. ; ; Knobs (value<<16): page 1 TIME r6+0 (0-5), ACT r6+1, SHAP r6+2, RPT r6+3 @@ -458,53 +463,140 @@ gbz1: blt gbnv bsr gbev gbnv: -; While a loop plays, a head whose window the writer is about to reach takes the newest window now. - move x:(r7+$06),a - tst a - beq gbna - move x:(r7+$0b),a +; Each head's gain an eighth of the way to its target a call: TYPE's ($55-$57, gbtg), or nothing while the writer +; nears a window the head still plays; close enough, while a loop plays, the head takes the newest window, faded out. + bsr gbtg + move x:(r7+$0b),x0 + move x:(r7+$10),a + cmp x0,a + beq gba1 + move x0,a bsr gbdd + move #>1088,x0 + cmp x0,a + bgt gbb1 + clr b + move b,x:(r7+$55) +gbb1: + move x:(r7+$06),b + tst b + beq gba1 move #>64,x0 cmp x0,a - bgt gbn1 + bgt gba1 move x:(r7+$10),x0 move x0,x:(r7+$0b) - clr a - move a,x:(r7+$0d) - move a,x:(r7+$0e) -gbn1: - move x:(r7+$78),a + clr b + move b,x:(r7+$0d) + move b,x:(r7+$0e) +gba1: + move x:(r7+$55),a + move x:(r7+$6b),x0 + sub x0,a + asr #3,a,a + add x0,a + move a1,x:(r7+$6b) + move x:(r7+$78),x0 + move x:(r7+$10),a + cmp x0,a + beq gba2 + move x0,a bsr gbdd + move #>1088,x0 + cmp x0,a + bgt gbb2 + clr b + move b,x:(r7+$56) +gbb2: + move x:(r7+$06),b + tst b + beq gba2 move #>64,x0 cmp x0,a - bgt gbn2 + bgt gba2 move x:(r7+$10),x0 move x0,x:(r7+$78) - clr a - move a,x:(r7+$60) - move a,x:(r7+$61) -gbn2: - move x:(r7+$7a),a + clr b + move b,x:(r7+$60) + move b,x:(r7+$61) +gba2: + move x:(r7+$56),a + move x:(r7+$64),x0 + sub x0,a + asr #3,a,a + add x0,a + move a1,x:(r7+$64) + move x:(r7+$7a),x0 + move x:(r7+$10),a + cmp x0,a + beq gba3 + move x0,a bsr gbdd + move #>1088,x0 + cmp x0,a + bgt gbb3 + clr b + move b,x:(r7+$57) +gbb3: + move x:(r7+$06),b + tst b + beq gba3 move #>64,x0 cmp x0,a - bgt gbn3 + bgt gba3 move x:(r7+$10),x0 move x0,x:(r7+$7a) + clr b + move b,x:(r7+$65) + move b,x:(r7+$66) +gba3: + move x:(r7+$57),a + move x:(r7+$69),x0 + sub x0,a + asr #3,a,a + add x0,a + move a1,x:(r7+$69) +; The side's gains: WIDE spreads heads 1 and 2 at their gains now (LAYER, SLIDE); none for SHUFL. + move x:(r7+$1d),a + move #>$1,x0 + cmp x0,a + bne gbsx clr a - move a,x:(r7+$65) - move a,x:(r7+$66) -gbn3: -gbna: -; SLIDE's glides: each rate x (1 + c) a block, even in semitones. - move x:(r7+$62),x0 - move x:(r7+$63),y1 + move a,x:(r7+$3c) + move a,x:(r7+$3d) + bra gbsy +gbsx: + move x:(r7+$4e),y1 + move x:(r7+$64),x0 + mpy x0,y1,a + move a,x:(r7+$3c) + move x:(r7+$69),x0 + mpy x0,y1,a + neg a + move a,x:(r7+$3d) +gbsy: +; SLIDE's glides: each rate x (1 + c x frames / 16) a call, even in semitones whatever the splits. + move n7,a + asl #18,a,a + move a1,y0 + move x:(r7+$63),x0 + move y0,y1 + mpy x0,y1,a + asl #1,a,a + move a,x0 + move x:(r7+$62),y1 mpy x0,y1,a + move x:(r7+$62),x0 add x0,a move a1,x:(r7+$62) - move x:(r7+$67),x0 - move x:(r7+$68),y1 + move x:(r7+$68),x0 + move y0,y1 + mpy x0,y1,a + asl #1,a,a + move a,x0 + move x:(r7+$67),y1 mpy x0,y1,a + move x:(r7+$67),x0 add x0,a move a1,x:(r7+$67) ; P: 1 while a glitch plays, else 0 (a tail echoes over the whole track). @@ -611,6 +703,8 @@ gbd1: sub b,a move b,x1 clr b + cmp x0,a + tge b,a tst a tlt x0,b add b,a @@ -633,7 +727,7 @@ gbd1: move a1,x0 move x:(r7+$13),y1 mpy x0,y1,a - asl #18,a,a + asl #22,a,a move a,x1 move (r5)+n5 move y:(r5)+,a @@ -660,6 +754,8 @@ gbd1: sub b,a move b,x1 clr b + cmp x0,a + tge b,a tst a tlt x0,b add b,a @@ -682,7 +778,7 @@ gbd1: move a1,x0 move x:(r7+$13),y1 mpy x0,y1,a - asl #18,a,a + asl #22,a,a move a,x1 move (r5)+n5 move y:(r5)+,a @@ -709,6 +805,8 @@ gbd1: sub b,a move b,x1 clr b + cmp x0,a + tge b,a tst a tlt x0,b add b,a @@ -731,7 +829,7 @@ gbd1: move a1,x0 move x:(r7+$13),y1 mpy x0,y1,a - asl #18,a,a + asl #22,a,a move a,x1 move (r5)+n5 move y:(r5)+,a @@ -1030,12 +1128,8 @@ gbr9: move #>$2,x0 cmp x0,a beq gbgl -; SHUFL: N slices of the loop (4, or 8 for B and D) in a new order, played RPT times, on head 0. - move #>$7fffff,x0 - move x0,x:(r7+$6b) - clr a - move a,x:(r7+$64) - move a,x:(r7+$69) +; SHUFL: N slices of the loop (4, or 8 for B and D; halved until a slice lasts a block) in a new order, played RPT +; times, on head 0. move #>$4,x1 move x:(r7+$1e),a and #>$1,a @@ -1044,11 +1138,63 @@ gbr9: move #>$8,x1 gbh8: move x1,x:(r7+$6c) + move x:(r7+$6c),x0 + move x0,a + move #>$1,y0 + cmp y0,a + ble gbhn move x:(r7+$16),a asl #1,a,a move a1,a0 move #>$0,a1 - move x1,x0 + bsr gbdi + move x0,a + move #>16,y0 + cmp y0,a + bge gbhn + move x:(r7+$6c),a + asr #1,a,a + move a1,x:(r7+$6c) + move x:(r7+$6c),x0 + move x0,a + move #>$1,y0 + cmp y0,a + ble gbhn + move x:(r7+$16),a + asl #1,a,a + move a1,a0 + move #>$0,a1 + bsr gbdi + move x0,a + move #>16,y0 + cmp y0,a + bge gbhn + move x:(r7+$6c),a + asr #1,a,a + move a1,x:(r7+$6c) + move x:(r7+$6c),x0 + move x0,a + move #>$1,y0 + cmp y0,a + ble gbhn + move x:(r7+$16),a + asl #1,a,a + move a1,a0 + move #>$0,a1 + bsr gbdi + move x0,a + move #>16,y0 + cmp y0,a + bge gbhn + move x:(r7+$6c),a + asr #1,a,a + move a1,x:(r7+$6c) +gbhn: + move x:(r7+$16),a + asl #1,a,a + move a1,a0 + move #>$0,a1 + move x:(r7+$6c),x0 bsr gbdi move x0,x:(r7+$6d) move r7,a @@ -1068,6 +1214,8 @@ gbhp: sub #>$1,a move a1,x:(r7+$55) move a1,x0 + tst a + beq gbhs do x0,>gbhs bsr gbrn move x:(r7+$55),a @@ -1090,11 +1238,18 @@ gbhp: gbhs: nop move x:(r7+$45),a - asl #2,a,a move x:(r7+$6c),b + move #>$2,x0 + cmp x0,b + blt gbh9 + asl #1,a,a + move #>$4,x0 + cmp x0,b + blt gbh9 + asl #1,a,a move #>$8,x0 cmp x0,b - bne gbh9 + blt gbh9 asl #1,a,a gbh9: move a1,x:(r7+$45) @@ -1109,14 +1264,9 @@ gbh7: sub #>$1,a move a1,x0 bsr gbfa - bra gbse + bra gbfg ; LAYER: three heads on the loop at different speeds, at 1/2, 1/4 and 1/4. gbla: - move #>$400000,x0 - move x0,x:(r7+$6b) - move #>$200000,x0 - move x0,x:(r7+$64) - move x0,x:(r7+$69) move x:(r7+$1e),a move #>$3,x0 cmp x0,a @@ -1154,11 +1304,6 @@ gbl5: bra gbfs ; SLIDE: heads 1 and 2, half a window apart, gliding over the chunk (A up an octave, B down, C apart, D to a random speed). gbgl: - clr a - move a,x:(r7+$6b) - move #>$400000,x0 - move x0,x:(r7+$64) - move x0,x:(r7+$69) move #>$2,x0 move #>$1,x1 move x:(r7+$1e),a @@ -1203,7 +1348,7 @@ gbg5: gbfs: move x:(r7+$52),a tst a - bne gbse + bne gbfg move x:(r7+$10),x0 move x0,x:(r7+$0b) clr a @@ -1249,12 +1394,24 @@ gbp3: move x:(r7+$1d),a move #>$2,x0 cmp x0,a - bne gbse + bne gbfg move x:(r7+$11),a asr #1,a,a move x:(r7+$07),x0 add x0,a move a1,x:(r7+$65) +; From silence: every gain at TYPE's at once. +gbfg: + move x:(r7+$52),a + tst a + bne gbse + bsr gbtg + move x:(r7+$55),x0 + move x0,x:(r7+$6b) + move x:(r7+$56),x0 + move x0,x:(r7+$64) + move x:(r7+$57),x0 + move x0,x:(r7+$69) gbse: move x:(r7+$45),x0 move x0,x:(r7+$09) @@ -1280,14 +1437,7 @@ gbsr: beq gbs1 move x:(r7+$16),x0 move x0,x:(r7+$19) - move x:(r7+$4e),y1 - move x:(r7+$64),x0 - mpy x0,y1,a - move a,x:(r7+$3c) - move x:(r7+$69),x0 - mpy x0,y1,a - neg a - move a,x:(r7+$3d) + bsr gbrm clr a move a,x:(r7+$52) bra gbw2 @@ -1332,8 +1482,6 @@ gbs3: move a1,x:(r7+$11) clr a move a,x:(r7+$0e) - move a,x:(r7+$3c) - move a,x:(r7+$3d) move #>$200000,x0 move x0,x:(r7+$0f) move x:(r7+$07),a @@ -1354,6 +1502,7 @@ gbs4: move a1,x:(r7+$0d) move x:(r7+$6d),x0 move x0,x:(r7+$19) + bsr gbrm gbs9: ; WIDE: the repeat's side, + on even repeats and - on odd; with RAND anywhere within it. move x:(r7+$4e),a @@ -1435,10 +1584,12 @@ gbo1: move a1,x0 rts -; The heads' fade for a window of x0 + 1: F = (x0 + 1) x SHAP's share, at least 64; K = 2^28 / F. +; The heads' fade for a window of x0 + 1: F = (x0 + 1) x SHAP's share, at least 64, at most half the window (so a +; short window still reaches full level), never under 5; K = 2^25 / F. gbfa: move x0,a add #>$1,a + move a1,x1 move a1,x0 move x:(r7+$33),y1 mpy x0,y1,a @@ -1447,13 +1598,68 @@ gbfa: move #>64,y0 cmp y0,a tlt y0,a + move x1,b + asr #1,b,b + cmp b,a + tgt b,a + move #>5,y0 + cmp y0,a + tlt y0,a move a1,x0 - move #>$20,a + move #>$4,a move #>$0,a0 bsr gbdi move x0,x:(r7+$13) rts +; The heads' gains for TYPE into $55-$57: LAYER 1/2, 1/4, 1/4; SLIDE 0, 1/2, 1/2; SHUFL head 0 whole. +gbtg: + move x:(r7+$1d),a + tst a + bne gbu1 + move #>$400000,x0 + move x0,x:(r7+$55) + move #>$200000,x0 + move x0,x:(r7+$56) + move x0,x:(r7+$57) + rts +gbu1: + move #>$2,x0 + cmp x0,a + bne gbu2 + clr b + move b,x:(r7+$55) + move #>$400000,x0 + move x0,x:(r7+$56) + move x0,x:(r7+$57) + rts +gbu2: + move #>$7fffff,x0 + move x0,x:(r7+$55) + clr b + move b,x:(r7+$56) + move b,x:(r7+$57) + rts + +; The chunk's last event ($09 = 1) takes what is left of it: $19 = chunk - (events - 1) x $19. +gbrm: + move x:(r7+$09),a + move #>$1,x0 + cmp x0,a + bne gbq1 + move x:(r7+$45),a + sub #>$1,a + move a1,x0 + move x:(r7+$19),y1 + mpy x0,y1,a + asr #1,a,a + move a0,x0 + move x:(r7+$34),a + sub x0,a + move a1,x:(r7+$19) +gbq1: + rts + ; Nothing sounding: the level, its target and rate, and the tail's flag at rest. gbqt: clr a diff --git a/sdk/octatrack/modules/loopbox/evidence/performance.json b/sdk/octatrack/modules/loopbox/evidence/performance.json index bcb4d73397..d67de2be9c 100644 --- a/sdk/octatrack/modules/loopbox/evidence/performance.json +++ b/sdk/octatrack/modules/loopbox/evidence/performance.json @@ -1,15 +1,15 @@ { "schema": 1, "module": "loopbox", - "version": "0.1.0-experimental", - "sourceSha256": "828ea43b23742821698fc5ac514613c8c6e1247b46b28c11436aaad2af4d68be", + "version": "0.1.1-experimental", + "sourceSha256": "fc231c7b09d870d352957db4f01ef56a25a8db78b0096da431694cd1edaeba5c", "kind": "dsp", "cycles": { "unit": "instructions/sample", - "static": 316, - "measured": 345.4, + "static": 322, + "measured": 362.7, "instancesPerCore": 4, - "method": "static: perf.py, by the rule tools/build/cycle_count.py prices straight-line code (one cycle a word): the per-sample loop between `do n7,>gbsl` and gbsl, 316 words; it has no branch, bsr, nested do or rep, so every sample runs every word. measured: perf.py in dsp_host on verify.py's synthetic image, executed instructions a sample from dsp_host's meter, 80 cases (the defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 302.4 (defaults) to 323.2 (moving); worst 345.4, the moving pattern with a split of 12 frames, where the per-call setup (events, SHUFL's slice, the heads' changeover checks, SLIDE's glides) runs twice a block." + "method": "static: perf.py, by the rule tools/build/cycle_count.py prices straight-line code (one cycle a word): the per-sample loop between `do n7,>gbsl` and gbsl, 322 words; it has no branch, bsr, nested do or rep, so every sample runs every word. measured: perf.py in dsp_host on verify.py's synthetic image, executed instructions a sample from dsp_host's meter, 80 cases (the defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 313.7 (defaults) to 336.8 (moving); worst 362.7, the moving pattern with a split of 4 frames, where the per-call setup (events, SHUFL's slice, each head's gain glide and the forced changeover's fade, the side's gains, SLIDE's glides) runs twice a block." }, "stock": { "comparator": "SPRING REV", @@ -17,7 +17,7 @@ "dearestWorst": 330.94, "baseline": "E-Verb's record (perf.py bench on the original image): SPRING REV, the cost target for new FX, worst 314.19 with trig splits (257.50 unsplit); DJ EQ, the dearest stock effect, 330.94 (293.38 unsplit), through fixed, moving and trig-split-1-15 cases. Not re-run for Glitchbox; its own cases match those (fixed, moving, a split at every position 1-15).", "stockSha256": "164f31224bf61181e3f50e7dec40df9afcae5b16dbf6e4c0d0cc5e986af0a84e", - "justification": "No stock effect loops a captured ring with several heads; SPRING REV is the cost target for a new FX and, like Loopbox, reads and writes a delay buffer every sample. Loopbox's worst, 345.40, is 1.10x SPRING REV's 314.19 and 1.04x DJ EQ's 330.94; unsplit 323.2 against 257.50 and 293.38. Per sample it writes the mono sum into a 15,870-word ring and runs three read heads, each with its own position, wrap and changeover to the newest window, an interpolated two-word read and a fade by its position; then the heads' sum and side, DIRT's crush, hold and drive, the loop's level, the dry's duck and two outputs. The third head is what puts it over SPRING REV: LAYER needs it for its two layers over the loop." + "justification": "No stock effect loops a captured ring with several heads; SPRING REV is the cost target for a new FX and, like Loopbox, reads and writes a delay buffer every sample. Loopbox's worst, 362.70, is 1.15x SPRING REV's 314.19 and 1.10x DJ EQ's 330.94; unsplit 336.8 against 257.50 and 293.38. Per sample it writes the mono sum into a 15,870-word ring and runs three read heads, each with its own position, wrap and changeover to the newest window, an interpolated two-word read and a fade by its position; then the heads' sum and side, DIRT's crush, hold and drive, the loop's level, the dry's duck and two outputs. The third head is what puts it over SPRING REV: LAYER needs it for its two layers over the loop. The code review's fixes (a head past a shrunk window landing at its start, heads fading out before a forced changeover, gains gliding a call) added about 17 a sample." }, "stress": { "instancesPerCore": 4, @@ -29,6 +29,6 @@ "dirty": true, "clobbers": 0, "hangs": 0, - "method": "perf.py --stress: the load is driven straight into dsp_host on verify.py's synthetic image with both cores: eight Loopbox instances, four a core, each on its own stem (decaying noise bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence, a three-note chord) for 2 s plus a 2 s tail; all twelve parameter words given a new value every block through the moving pattern, trig splits of 1, 3, 7, 8, 12 and 15 frames, -guard 0x4000 -guard-shared and -dirty: dsp_host exit 0, 0 stray writes, 0 clobbers, per-core peaks 1371.5 and 1257.0 of 3120. dsp_host hands every instance the same allocator entry, so the eight rings overlap here; on a unit each slot has its own buffer." + "method": "perf.py --stress: the load is driven straight into dsp_host on verify.py's synthetic image with both cores: eight Loopbox instances, four a core, each on its own stem (decaying noise bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence, a three-note chord) for 2 s plus a 2 s tail; all twelve parameter words given a new value every block through the moving pattern, trig splits of 1, 3, 7, 8, 12 and 15 frames, -guard 0x4000 -guard-shared and -dirty: dsp_host exit 0, 0 stray writes, 0 clobbers, per-core peaks 1363.6 and 1308.8 of 3120. dsp_host hands every instance the same allocator entry, so the eight rings overlap here; on a unit each slot has its own buffer." } } diff --git a/sdk/octatrack/modules/loopbox/manifest.py b/sdk/octatrack/modules/loopbox/manifest.py index efb920aaab..46340c37ee 100644 --- a/sdk/octatrack/modules/loopbox/manifest.py +++ b/sdk/octatrack/modules/loopbox/manifest.py @@ -8,7 +8,7 @@ alone at 127). Timing follows the tempo word only: slices are free-running at the tempo, not locked to the pattern's steps or swing. -verify.py holds engine.asm to reference.py's model bit for bit in dsp_host. Not yet run on a unit. +verify.py holds engine.asm to reference.py's model bit for bit in dsp_host. The test procedure passed on the author's MKII (TESTING.md). """ import importlib.util import pathlib @@ -30,7 +30,7 @@ doc="Micro-loop effect on FX2: LAYER, SHUFL, SLIDE loops of the track at the tempo.", category=Category.TRACK, author="jrs1717", author_url="https://github.com/jrs1717", proof=Proof.RENDER, - proof_note="verify.py bit-exact against reference.py in dsp_host; not yet run on a unit", + proof_note="verify.py bit-exact against reference.py in dsp_host; test procedure steps 1-11 on the author's MKII (TESTING.md)", menu=MenuEntry( fx2_id=0x0a, @@ -52,7 +52,7 @@ Param(b"MIX", 64, 128, active=True, formatter=P, doc="how far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone"), Param(b"TAIL", 64, 128, active=True, formatter=P, - doc="after a loop its heads loop on and fade: 0 none, 127 about 3 s"), + doc="after a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s"), Param(b"TYPE", 0, 3, active=True, formatter=S, labels=_ref.TYPE_NAMES, doc="LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch"), Param(b"DIRT", 0, 128, active=True, formatter=P, diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index 6ebd30f4ef..4e637ded95 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -3,7 +3,7 @@ "id": "loopbox", "key": "LOOPBOX", "name": "Loopbox", - "version": "0.1.0-experimental", + "version": "0.1.1-experimental", "category": "effects", "author": { "github": "jrs1717", @@ -84,7 +84,7 @@ "name": "TAIL", "default": 64, "count": 128, - "doc": "After a loop its heads loop on and fade: 0 none, 127 about 3 s.", + "doc": "After a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s; a loop that starts over a tail picks up from there.", "labels": null }, { @@ -141,11 +141,16 @@ ], "compatibility": { "firmware": "1.40C", - "location": "FX1", + "location": "FX2", "conflicts": [], "uiClaims": [], "limitations": [ - "Scaffold only; audio behavior and hardware operation have not been tested." + "FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words). On FX1 it passes the track dry.", + "Mono capture: the loops replay the track's mono sum; WIDE spreads LAYER's and SLIDE's extra loops left and right.", + "Loops follow the project's tempo, not yet the pattern's steps, track speed or swing; the owner agreed on issue #2491 that free-running tempo slices are fine until the base has a step clock for effects.", + "After a second of silent input no loop starts; after four seconds any loop or tail stops. The watch listens to the mono sum the ring records, so a source exactly out of phase between L and R counts as silence.", + "It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits.", + "Its worst case is 1.10x stock SPRING REV (the third read head); four a core fit within a core's budget." ], "effectId": 10 }, @@ -316,7 +321,7 @@ "license": { "spdx": "MIT", "file": "LICENSE", - "declaration": "Replace with accurate authorship, attribution and original/licensed source and media rights. Never include Elektron firmware, extracted routines or tables." + "declaration": "Original code by jrs1717 under the MIT licence in LICENSE: an original design inspired by micro-loop effects in general, starting from the author's own Glitchbox engine; no third-party code, tables, samples or names. Never includes Elektron firmware, extracted routines or tables." }, "media": [ { diff --git a/sdk/octatrack/modules/loopbox/reference.py b/sdk/octatrack/modules/loopbox/reference.py index d4a26b47b3..2295254d89 100644 --- a/sdk/octatrack/modules/loopbox/reference.py +++ b/sdk/octatrack/modules/loopbox/reference.py @@ -43,8 +43,11 @@ TAIL_END = 0x2000 # -72 dB: the tail is over ATTACK = 0x009445 # the level's rise a sample when a loop starts: a 5 ms time constant SILENT, SILENT_STOP, SILENT_MAX = 44100, 176400, 0x100000 # the silence watch: no new loop, then nothing -FADE_MIN = 64 # a head's fade is at least 64 samples: K = 2^28 / F stays a word, and min(p, W - p) x K x 2^19 a 56-bit sum +FADE_MIN = 64 # a head's fade is at least 64 samples, or half its window if that is shorter, and never under 5: +FADE_FLOOR = 5 # K = 2^25 / F stays a word; F >= W / 64 keeps min(p, W - p) x K x 2^22 a 56-bit sum NEAR = 64 # a head whose window the writer comes this close to takes the newest window at once +ZONE = NEAR + 1024 # ... after fading out from here, over 64 blocks +SLICE_MIN = 16 # a SHUFL slice lasts at least a block: N halves until it does HALF, QUARTER = 0x400000, 0x200000 SEED = 0x123456 LFSR_TAPS = 0xe10000 @@ -209,12 +212,26 @@ def call(self, frames, p): x[0x03] = 1 if x[0x07] >= x[0x19]: self.event() - if x[0x06]: # a head the writer is about to reach takes the newest window now - for st, ph, pl, _rt, _gn, _t in HEADS: - if self.distance(x[st]) <= NEAR: + n = len(frames) + for h, (st, ph, pl, _rt, gn, _t) in enumerate(HEADS): + # each head's gain an eighth of the way to its target a call: TYPE's, or nothing while the writer nears a + # window it still plays (then, close enough, it takes the newest window, faded out by then) + tgt = self.target(h) + if x[st] != x[PS]: + d = self.distance(x[st]) + if d <= ZONE: + tgt = 0 + if x[0x06] and d <= NEAR: x[st], x[ph], x[pl] = x[PS], 0, 0 - for rt, gl in GLIDES: # SLIDE's glides: x (1 + c) a block, even in semitones - x[rt] = hi(mpy(x[rt], x[gl]) + ld(x[rt])) + x[gn] = hi(ld(x[gn]) + ((ld(tgt) - ld(x[gn])) >> 3)) + if x[0x1d] == SHUFL: # the side: WIDE spreads heads 1 and 2 (LAYER, SLIDE) at their gains now + x[0x3c] = x[0x3d] = 0 + else: + x[0x3c] = lim(mpy(x[0x64], x[0x4e])) + x[0x3d] = lim(-mpy(x[0x69], x[0x4e])) + for rt, gl in GLIDES: # SLIDE's glides: x (1 + c x frames / 16) a call, even in semitones + c = lim(w56(mpy(x[gl], n << 18) << 1)) + x[rt] = hi(mpy(x[rt], c) + ld(x[rt])) # P: 1 while a loop plays, else 0 (a tail echoes over the whole track) x[0x3f] = 0x7fffff if x[0x06] else 0 # DIRT, and in a tail DGRD x how far it has faded: the crush, the hold, the drive @@ -226,7 +243,6 @@ def call(self, frames, p): x[0x4a] = lim(mpy(d, DRIVE) + ld(0x200000)) x[0x4b] = lim(ld(0x7fffff) - ld(d >> 1)) out = [self.sample(left, right) for left, right in frames] - n = len(frames) x[0x07] += n x[0x53] = min(x[0x53] + n, SILENT_MAX) if x[0x54] >= 64: @@ -289,12 +305,27 @@ def chunk(self): x[0x41] = 0 def fade(self, w): - """The heads' fade for a window of w + 1: F = (w + 1) x SHAP's share, at least FADE_MIN; K = 2^28 / F.""" + """The heads' fade for a window of w + 1: F = (w + 1) x SHAP's share, at least 64, at most half the window (so a + short window still reaches full level), never under 5; K = 2^25 / F.""" x = self.x f = hi(mpy(w + 1, x[0x33])) if f < FADE_MIN: f = FADE_MIN - x[0x13] = div(0x20 << 24, f) + h = (w + 1) >> 1 + if f > h: + f = h + if f < FADE_FLOOR: + f = FADE_FLOOR + x[0x13] = div(4 << 24, f) + + def target(self, h): + """Head h's gain for TYPE: LAYER 1/2, 1/4, 1/4; SHUFL head 0 whole; SLIDE heads 1 and 2 at 1/2.""" + kind = self.x[0x1d] + if kind == LAYER: + return (HALF, QUARTER, QUARTER)[h] + if kind == SLIDE: + return (0, HALF, HALF)[h] + return (0x7fffff, 0, 0)[h] def speed(self): """A random index into T0.""" @@ -335,7 +366,6 @@ def start(self): x[0x63] = x[0x68] = 0 x[0x0f] = x[0x62] = x[0x67] = ONE if kind == LAYER: - x[0x6b], x[0x64], x[0x69] = HALF, QUARTER, QUARTER if var == 3: x[0x62] = x[0x24 + self.speed()] x[0x67] = x[0x24 + self.speed()] @@ -346,7 +376,6 @@ def start(self): x[0x62] = x[0x24 + self.speed()] self.fade(x[PW]) elif kind == SLIDE: - x[0x6b], x[0x64], x[0x69] = 0, HALF, HALF up, down = UP, DOWN if var == 0: down = UP @@ -360,8 +389,9 @@ def start(self): x[0x68] = self.glide(down) self.fade(x[PW]) else: # SHUFL: N slices of the loop in a new order, played RPT times, on head 0 - x[0x6b], x[0x64], x[0x69] = 0x7fffff, 0, 0 n = 8 if var in (1, 3) else 4 + while n > 1 and div(2 * lev, n) < SLICE_MIN: + n >>= 1 x[0x6c] = n x[0x6d] = sl = div(2 * lev, n) for i in range(8): @@ -371,6 +401,8 @@ def start(self): x[PERM + i], x[PERM + j] = x[PERM + j], x[PERM + i] x[0x45] = x[0x45] * n self.fade((sl >> 1 if var == 3 else sl) - 1) + if fresh: # from silence: every gain at TYPE's at once + x[0x6b], x[0x64], x[0x69] = self.target(0), self.target(1), self.target(2) if fresh and kind != SHUFL: # from silence: every head on the newest window now, on time for st, ph, pl, rt, _gn, _t in HEADS: x[st], x[pl] = x[PS], 0 @@ -403,17 +435,17 @@ def setrep(self): if x[0x1e] == 2 and k & 1: # C: every other slice reversed x[0x0f] = REVERSE x[0x0d] = x[PW] - 1 - x[0x07] - x[0x19] = sl + per = sl p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) # WIDE: slices ping-pong; with RAND anywhere in it if x[0x4f] and x[0x4f] - self.rand() > 0: r = self.rand() p = lim(mpy(lim(w56((ld(r) - ld(0x400000)) << 1)), x[0x4e])) - x[0x3c] = x[0x3d] = 0 - else: # LAYER and SLIDE: WIDE spreads heads 1 and 2 left and right - x[0x19] = x[0x16] + else: # LAYER and SLIDE: no ping-pong (WIDE spreads heads 1 and 2, in the call) + per = x[0x16] p = 0 - x[0x3c] = lim(mpy(x[0x64], x[0x4e])) - x[0x3d] = lim(-mpy(x[0x69], x[0x4e])) + x[0x19] = per + if x[0x09] == 1: # the chunk's last event takes what is left of it: the loop keeps the grid + x[0x19] = x[0x34] - (x[0x45] - 1) * per x[0x52] = p a = ld(0x7fffff) - ld(p) if a - ld(0x7fffff) >= 0: @@ -435,13 +467,15 @@ def head(self, st, ph, pl, rt, gn, out): a -= fwd back = ld(w) if a < 0 else 0 a += back + if a - ld(w) >= 0: # still past the end (the window shrank under it): its start + a = 0 if fwd + back != 0: x[st] = x[PS] x[ph], x[pl] = hi(a), a & 0xffffff fh = (a & 0xffffff) >> 1 b = ld(w) - a # the fade: min(p, W - p) x K m = b if a - b > 0 else a - e = lim(w56(mpy(hi(m), x[0x13]) << 18)) + e = lim(w56(mpy(hi(m), x[0x13]) << 22)) i = (x[st] - x[0x00] + hi(a)) % R s0, s1 = ring[i], ring[(i + 1) % R] v = hi(mac(ld(s0), lim(ld(s1) - ld(s0)), fh)) diff --git a/sdk/octatrack/modules/loopbox/test_reference.py b/sdk/octatrack/modules/loopbox/test_reference.py index d7e8c78f19..e0d54292a4 100644 --- a/sdk/octatrack/modules/loopbox/test_reference.py +++ b/sdk/octatrack/modules/loopbox/test_reference.py @@ -208,6 +208,86 @@ def watched(): self.assertTrue(all(p == late for p, late in seen)) self.assertTrue(any(late for _, late in seen)) + def test_a_head_past_a_shrunk_window_lands_on_its_start(self): + # The newest window shrank under a head (RAND's repeat count, RPT or TIME turned): after the wrap it is still + # past the end, so it lands at the start, where the fade is nothing; never a negative, inverted fade. + m = R.Model() + m.x[R.PW] = 986 + m.x[0x33] = 0x100000 + m.fade(986) + m.ring[:] = [0x200000] * R.R + m.x[0x0d], m.x[0x0e], m.x[0x0f] = 5000, 0, R.ONE + m.head(*R.HEADS[0]) + self.assertEqual(m.x[0x0d], 0) + self.assertGreaterEqual(m.x[0x55], 0) + + def test_short_windows_reach_full_level(self): + # A window shorter than two minimum fades fades over half of itself, so its middle is whole. + m = R.Model() + m.x[R.PW] = 20 + m.x[0x33] = 0x020000 + m.fade(20) + m.ring[:] = [0x200000] * R.R + m.x[0x0d], m.x[0x0e], m.x[0x0f] = 9, 0, 0 + m.head(*R.HEADS[0]) + self.assertGreater(m.x[0x55], 0x1c0000) + + def test_a_chunk_lasts_its_grid_while_looping(self): + # The chunk's last event takes what is left, so a loop's events add up to the chunk exactly (no drift). + for kind, var in ((R.SHUFL, 1), (R.LAYER, 0)): + m = R.Model() + x = noise(13, 16 * 400) + lengths, setrep = [], m.setrep + def watched(): + setrep() + lengths.append((m.x[0x09], m.x[0x19], m.x[0x34])) + m.setrep = watched + row = R.pblock(knobs(act=127, time=0, rpt=7, type=kind, var=var)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + if lengths and lengths[-1][0] == 1: + break + self.assertEqual(sum(l for _, l, _c in lengths), lengths[0][2], kind) + + def test_shufl_slices_last_a_block(self): + m = R.Model() + x = noise(14, 16 * 400) + row = R.pblock(knobs(act=127, time=0, rpt=7, type=R.SHUFL, var=1), tempo(240)) + for b in range(0, len(x), 16): + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + if m.x[0x06]: + break + self.assertGreaterEqual(m.x[0x6d], R.SLICE_MIN) + self.assertLess(m.x[0x6c], 8) + + def test_slide_glides_the_same_with_trig_splits(self): + def rate(split): + x = noise(15, 16 * 900) + return R.render(x, x, {0: knobs(act=127, time=3, rpt=0, type=R.SLIDE, var=0)}, split=split)[2].x[0x62] + self.assertAlmostEqual(rate(5) / rate(0), 1.0, delta=0.03) + + def test_a_head_fades_out_before_a_forced_changeover(self): + # A slow head the writer is about to reach: its gain falls toward nothing inside the zone, and at the last + # moment it takes the newest window at its start. + m = R.Model() + m.x[0x1d] = R.LAYER + m.x[0x06] = 1 # a loop playing, with no event due during the test + m.x[0x19], m.x[0x2c] = 0x100000, 1 + m.x[0x64] = R.QUARTER + m.x[0x02] = 1000 + m.x[0x78] = m.x[0x00] + 1000 + 500 # 500 samples ahead of the writer: inside the zone + m.x[R.PS] = m.x[0x00] + 100 + m.x[0x60] = 300 + p = R.pblock(knobs(act=0, type=R.LAYER)) + gains = [] + for _ in range(28): + m.call([(0, 0)] * 16, p) + gains.append(m.x[0x64]) + self.assertTrue(all(b <= a for a, b in zip(gains, gains[1:]))) + self.assertLess(gains[-1], R.QUARTER // 20) + m.call([(0, 0)] * 16, p) # within NEAR of the writer now + self.assertEqual((m.x[0x78], m.x[0x60]), (m.x[R.PS], 0)) + def test_tail_rings_on_after_a_loop(self): # Loops, then none from block 680: the last loop ends within a slice; TAIL 0 is a short release (gone a few # blocks on), and longer TAILs ring on for longer. diff --git a/src/community/module-changelogs/loopbox.json b/src/community/module-changelogs/loopbox.json index 2ef6232a42..092b7b53a2 100644 --- a/src/community/module-changelogs/loopbox.json +++ b/src/community/module-changelogs/loopbox.json @@ -1,7 +1,7 @@ [ { - "version": "0.1.0-experimental", - "date": "2026-12-02", + "version": "0.1.1-experimental", + "date": "2026-12-03", "changes": [ "New: Loopbox, an automatic micro-looper for FX2 of any track, at the project tempo.", "Three types on the setup page: LAYER stacks loops at different speeds, SHUFL replays slices in a new order, SLIDE glides two loops in pitch.", diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index fd16da49a9..c93de1f0a8 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -966,21 +966,12 @@ { "id": "loopbox", "slots": "fx2", - "cycles": 346, + "cycles": 363, "cyclesKind": "executed", "state": 123, "buffer": 15870, - "version": "0.1.0-experimental", - "path": "octatrack-modules/loopbox/0.1.0-experimental.mwrm", - "abi": 6, - "features": 0, - "sites": 0, - "copies": 0, - "fills": 0, - "name": "Loopbox", - "module": "4fd229d0", - "bytes": 8386, - "sha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157" + "version": "0.1.1-experimental", + "path": "octatrack-modules/loopbox/0.1.1-experimental.mwrm" } ], "usbAudio": { From 110cbfaabb5588cc1c77c9c3ca9b62da92af6951 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 21:25:24 -0600 Subject: [PATCH 16/32] Loopbox 0.1.1-experimental: the source-built packages imported, the USB package built (4dc3d0cc), Tape Echo and Euclid recipes re-pinned Co-Authored-By: Claude Opus 5.5 --- .../loopbox/0.1.1-experimental.mwrm | Bin 0 -> 9434 bytes .../module-adapters/standalone-recipes.json | 8 ++--- src/engine/assets/descriptor-recipes.json | 2 +- src/engine/assets/dsp-packages.json | 28 +++++++++--------- src/engine/assets/module-build.json | 12 ++++---- .../assets/octatrack-module-packages.json | 11 ++++++- 6 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 public/octatrack-modules/loopbox/0.1.1-experimental.mwrm diff --git a/public/octatrack-modules/loopbox/0.1.1-experimental.mwrm b/public/octatrack-modules/loopbox/0.1.1-experimental.mwrm new file mode 100644 index 0000000000000000000000000000000000000000..328f0e9b6b522e598cd1821db8b0cdd972afcbc7 GIT binary patch literal 9434 zcmd5>dvKK16+e4-vx#v-LJ&eRl3gC6)*3;KRtMRIge01fGz1c?5X4}hf}!>iiZdlz z9<~!6cJR?Ug+3hZSgUPk)X_g`WKwln1RspnYQc7BtNx+L_$Z8${(kqIZ}$rlvCnB{ zmV3{+=braH_uP-hww6YTOGG4gzvy4gMrnHf>}N&t-<7;V2i#X8*F|oeajc=cd-c-p zH35-Gq_M5JHeJ+y=+c>YjXwPT&kwx0bJtDpJ^In1*2m9pTa$O!=Gm`gUf6ahT_JMC zh%ECcM2Zy3Vm~_R@MBt*_%SJ0`!OO*4S$V|oqiNqX5+OscGCmcio$(Z+hvO$S}3zCkX*xUjiK((zbzeM_s%iANV?T0|P+v9|i^8fl5gS~7F1 zr5)?FE!D{5Jdx;hX~w@eF!*=9)QQA>3PyL!PeCzVq<|SOv9HR-BFRcANb~}XFLSFU zb5zDoJHJreO(KJX&plCDCk1nlq$8IUNJ2)+7&%=kWa8Ays_8Pd@`7pjXKEGxxfnlU zriJ(woP=MAl*(z~I9A3h%)*)$8N??3#bsXI{5cI_ zxPdMX)#%=s7Uzlw{JeDf0&!(JXR^3E)_Xj(#a!`VDQ>6Ym-u-Ie;`DE zK=GA_Cy4u-;>(VV#9Z;Oaqrt9`nMHNAGkKfw?CQ?cdyRRy=o)oO5^7bDt=DWec~Qe zJol*RwGTV(a2NB$9qo){(j#kztH*c9T*gZgpDR);@9Z{YnE{QV4A=Xs!fRQu@WM z+aqp-@d&M7=GUK=)ZHR&pyzFwLLvJZxC4k ze(NABDV>rU0N+ijOX?{bfuoMn`KH%#4(E}FF>i+KE#Nm)U*;xh=!2xp_j}3Tm8=%m z4g0H%9_u+>9cax*JLuw`5auAHX8aNpc!j4QBU*qv0kHzg=mV6Cg0QC`jOe= z^D^KQH=1HkGw~?$YU@7e+KUSMxX=eRjJrgX|M*vpe-m)HL(0D;se2Ibz4$%AcsNNR zw^Yyn9~w7hGx7wAp>VoKc0j)P)1L|Sc7mQP}xQf81gij6mm~g)FN3AO!P#$Gl%!YY>&Hb_j zc>12_uu%2NdjmN5xMC~r$E`znxQhLd!FUIIV!Fqzvb{Uu-+ewlN<*KY?(b-Se)4{= z{9>9TMJ0?E?}XE#7Y-I`q^sBoIIulo^27A`;E!Caq)pKCqP^l~ZZ*5+V?>emF|Wp1 zjDsc(9P8nAwzlRt{l}BfYfaZS(}($dysj(6_1Ia)nNwXg|9swl zfP3+SJ+-&1&!YXnD6HXpB~dE}cY`P6hx@fFoU2%G+vjVK z?rD(J!9c%e?0*`+674Itz^?MM(EId*PrIbPhj-FD?2A*`zIVvxk!zxjhTjQO<$o7+Sv6Uu#q)0Y~$LHjg&_lul*myF{qi0Cu<)25XN`_bJ|ZF>)$TJ zk)Al#zyOCck8|&y>dWqPAKVe*gBt$feY|$isw;j8;uq{&Bth~JuMt36X1H6&l*~dTG}TQ4+2K7M1HP<_XT4x z4{)7-JMbGrQdYrd%dy6Iwd%VP^hx=ee=`D!dex3~);8`Pg*ju~3K<6g2R+g$=+kI- zTKCO(3v={Qt6_Ipp9J4hf_J&^fwO&_#?HTEy*%uJzPY}VJ;&MT{rLt(aF9=K3VbO+ zKMmQHd`tH0T4kU0gLQxtHow?xoR#IFc{j`W)PnX>%+cdkpjX($9HO1q*tpz!EXeM{ zn`1BH)-hoHM9_a$WZx(1PreiEJ>$wu{yg>1{j_;L_Gjo|^PTmx&UB7`9^W4rKjND} z7l+RY2X7?$zE>nV9ysV-wk4+{dTrn9M2~)A-v#f0O8B`;b>@BSHmz5>?cf35 zx+&oEQXgvZdEi4Es0ZXb&~~f`j`kpbi|(st;Abks9Kdgcyt0%zHE?9e)gE2WjT<4^tcP-qW(3d=X- zx#s6e_?C5xF*=!?^FBe&UBk#p{R?tV`vf^R4I?N2gmO;gm%x|mpHwy{nctI}^+oW}2Kog;h<@h~;PlJ3?zs~o)ST4S2NSxu!d(2|QGqMMW`6fT2 zy%^3F`*HrU2QTb-8MFBwt^qt}1$sPNufaUWgUo}TThWq{P(yGI*X=akQKOv&exOB;1wP^TRqy-Aof!ME{-{3(Dx3R) zb5g1~4I6{^NUY*&(2G=ie=u%KC06m}<8WQZ*S;e}7Q$|&Rk`eg2zQy!!nLo+bbBSV z7SulbCKRE)%8xz0@?2&z(^=p88pL}FXIx`XU*H=9jqOAYp2(hiKfxZ>dD=rh1AbH){1!qy>mKn7%+}F{NAH%ke==~);g*oC zv$2jl(tjVp-82)mp7%Z8MA|dV20g!_gzoeT_IuU(#=%~dzXrIV24C%YXdd%@&HHb7 zKANAb^8qh@TL^ev8{)+`_ov~t%-46#)u5&`E(P8W=DG7W1oz&u6ZoY>{V4BaP5rHQ z2H%AkNBX_f*4d8}USTlq#wonpdx2vImjIr=&t&U|@=e30n(UqEN}55(I-l`-KK`wQ zcN4xHbRcH)c`Z(!MItYysyMjI7f<$AR3@7LSLF z57&aaG{V*%@OLBYY#O_VewUgH`u-4q=3R@=4fb8(w-jrQ<_dLb41KHNcZo&z7TAil z21+s6r$`cYI#!m+)@m&JSm$UqTF=P)1$P@$8vD7AH8ECp(~!LjP~#KjlhFTdHyJm3 z``FKE55)7g2x}SeQU7ImLiOM+!2k0g-tEpJ(*PrM)be@Oh(Gjf%t(6@cpE6nA3rr5ujn7*T84A1N{eVbzSPO;C#B5c)oE4yLN+y zy5TILcXw@j{9DO&kOzE_AG|+x^zy71&&4XOv}Np-C&FIBd0w|aVV1- Date: Wed, 2 Dec 2026 21:31:51 -0600 Subject: [PATCH 17/32] Loopbox 0.1.1-experimental: the price and curve measured on package 4dc3d0cc (device:price --write) Co-Authored-By: Claude Opus 5.5 --- sdk/machines/octatrack/frame-costs.json | 2 +- .../modules/loopbox/evidence/cpu-price.json | 116 +++++++++--------- .../modules/loopbox/evidence/frame-cost.json | 34 ++--- .../modules/loopbox/octamod.module.json | 2 +- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/sdk/machines/octatrack/frame-costs.json b/sdk/machines/octatrack/frame-costs.json index b13c634e3a..3acaf2d8d0 100644 --- a/sdk/machines/octatrack/frame-costs.json +++ b/sdk/machines/octatrack/frame-costs.json @@ -10,7 +10,7 @@ "everb": {"first":0.7,"each":0.2,"rest":0,"points":[0.7,0.8,1,-0.6],"measured":"everb 0.1.2-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, "grain": {"first":16.1,"each":8.6,"rest":0.4,"points":[16.1,24.7],"measured":"grain 0.2.0-experimental on T1 T3: A01 at 120 BPM, 16 steps, trigs on steps 1/5/9/13 of T1-T4, T6, T7: T1 and T3 Flex with a loaded 16-bit stereo sample (0.91 MB), T2 and T4 stock samples with time stretch off, T6 and T7 no sample, T5 and T8 empty; picks on empty A02; the author's MKI; package 520215cb; base 4c7eb79b (development base booted in RAM); 8 s a reading; 2026-11-30 (evidence/frame-cost.json)","paused":4.7}, "lofi2": {"first":1,"each":0,"rest":0,"points":[1,-1.5,-0.3,-1.3],"measured":"lofi2 0.1.1-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples), picks on empty C02; owner's MKII; base 0.8 twin 28 053fd054; 8 s a reading; 2026-11-22"}, - "loopbox": {"first":0.3,"each":0.3,"rest":0,"points":[-0.2,-6,0.3,-5.7],"measured":"loopbox 0.1.0-experimental on T1 T3 T6 T7: the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, + "loopbox": {"first":0,"each":0,"rest":0,"points":[-5.8,-4.2,-6.2,-5.2],"measured":"loopbox 0.1.1-experimental on T1 T3 T6 T7: Mang112 95 bank A, Part 1, stopped (test bank); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, "mackity": {"first":0.9,"each":0.9,"rest":0,"points":[-1.8,-2.2,0.9,-2.9],"measured":"mackity 0.1.0-experimental on T1 T3 T6 T7: Project on the owner's development unit, bank C, Part 1 reloaded in RAM to its saved copy; picks on the empty C02, readings on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7) at the project tempo; transport played by the tool; base development twin 8fd6d456 of base 0.8.1 (eb6679620d0c9ed7), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-25 (evidence/frame-cost.json)"}, "midiverb": {"first":2,"each":2,"rest":0,"points":[0.9,0.2,2.2,1],"measured":"midiverb 0.2.0-experimental on T1 T3 T6 T7: Dev17 bank C: C04 Part 2 (working = saved), picks on the empty C02, the curve on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7), transport stopped; twin ed5474c6 of base 0.8.3 (main 80ea1e584); base development twin ed5474c6 of base 0.8.3 (main 80ea1e584), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-27 (evidence/frame-cost.json)"}, "miniverb": {"first":1.5,"each":0,"rest":0,"points":[1.5,1.4,1.2,1.2],"measured":"miniverb 0.2.3-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, diff --git a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json index 8bb83191dc..b93b559f0a 100644 --- a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json +++ b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json @@ -1,95 +1,95 @@ { "module": "loopbox", - "version": "0.1.0-experimental", + "version": "0.1.1-experimental", "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", - "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", + "scene": "Mang112 95 bank A, Part 1, stopped (test bank)", "inputs": { "transport": "playing" }, "seconds": 8, "readings": 3, - "measuredAt": "2026-12-03T02:52:15.047Z", + "measuredAt": "2026-12-03T03:27:17.363Z", "result": { "id": "loopbox", - "version": "file", - "packageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "version": "0.1.1-experimental", + "packageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", "before": { "frame": 52.8, - "frameMax": 90.4, - "frames": 67341, + "frameMax": 92.7, + "frames": 67193, "skipped": 0, - "cpu": 70.3, - "dsp1to4": 39.4, - "dsp5to8": 49.2, + "cpu": 70, + "dsp1to4": 39.8, + "dsp5to8": 48.9, "dsp1to4Peak": 41.5, "dsp5to8Peak": 50.2, "readings": 3, "spread": { "frame": 0, - "cpu": 0.4, - "dsp1to4": 0.2, - "dsp5to8": 0, - "frameMax": 4.6, - "dsp1to4Peak": 0, + "cpu": 0.5, + "dsp1to4": 0, + "dsp5to8": 0.5, + "frameMax": 7.4, + "dsp1to4Peak": 0.1, "dsp5to8Peak": 0.5 } }, "atRest": { - "frame": 52.8, - "frameMax": 91.3, - "frames": 67319, + "frame": 52.7, + "frameMax": 91.7, + "frames": 67176, "skipped": 0, - "cpu": 69.9, - "dsp1to4": 39.5, - "dsp5to8": 49.2, + "cpu": 70.3, + "dsp1to4": 39.8, + "dsp5to8": 49.1, "dsp1to4Peak": 41.5, "dsp5to8Peak": 50.6, "readings": 3, "spread": { "frame": 0.1, - "cpu": 0.6, - "dsp1to4": 1.5, - "dsp5to8": 0, - "frameMax": 7.5, - "dsp1to4Peak": 0, + "cpu": 0.2, + "dsp1to4": 0, + "dsp5to8": 0.4, + "frameMax": 7.2, + "dsp1to4Peak": 0.1, "dsp5to8Peak": 0.9 } }, "atRestAdds": { - "frame": 0, - "cpu": -0.4, - "dsp1to4": 0.1, - "dsp5to8": 0, + "frame": -0.1, + "cpu": 0.3, + "dsp1to4": 0, + "dsp5to8": 0.2, "dsp1to4Peak": 0, "dsp5to8Peak": 0.4 }, "inUse": { "frame": 52.8, - "frameMax": 92.2, - "frames": 67305, + "frameMax": 93.1, + "frames": 67114, "skipped": 0, - "cpu": 70.1, - "dsp1to4": 50.9, - "dsp5to8": 48.9, - "dsp1to4Peak": 53.1, + "cpu": 70.3, + "dsp1to4": 51.1, + "dsp5to8": 48.8, + "dsp1to4Peak": 53.5, "dsp5to8Peak": 50.2, "readings": 3, "spread": { "frame": 0, "cpu": 0.6, - "dsp1to4": 0.2, - "dsp5to8": 0.4, - "frameMax": 6.7, - "dsp1to4Peak": 0.2, + "dsp1to4": 0, + "dsp5to8": 0.1, + "frameMax": 1, + "dsp1to4Peak": 0.4, "dsp5to8Peak": 0.5 } }, "inUseAdds": { "frame": 0, - "cpu": -0.2, - "dsp1to4": 11.5, - "dsp5to8": -0.3, - "dsp1to4Peak": 11.6, + "cpu": 0.3, + "dsp1to4": 11.3, + "dsp5to8": -0.1, + "dsp1to4Peak": 12, "dsp5to8Peak": 0 }, "inUseOn": "T1 FX2", @@ -101,20 +101,20 @@ "T7" ], "points": [ - 91.3, - 91.1, - 85.3, - 91.6, - 85.6 + 91.7, + 85.9, + 87.5, + 85.5, + 86.5 ], "adds": [ - -0.2, - -6, - 0.3, - -5.7 + -5.8, + -4.2, + -6.2, + -5.2 ], - "first": 0.3, - "each": 0.3, + "first": 0, + "each": 0, "notes": [], "admission": [ { @@ -123,8 +123,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.5, - "frame": 28, + "frameMax": 36.7, + "frame": 27.9, "dropped": 0, "stalls": 0 }, @@ -134,7 +134,7 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 85, + "frameMax": 86.8, "frame": 52.8, "dropped": 0, "stalls": 0 diff --git a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json index f68cb1ff56..86e6134d07 100644 --- a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json +++ b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json @@ -1,10 +1,10 @@ { "module": "loopbox", - "version": "0.1.0-experimental", + "version": "0.1.1-experimental", "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", - "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", + "scene": "Mang112 95 bank A, Part 1, stopped (test bank)", "seconds": 8, - "measuredAt": "2026-12-03T02:52:15.047Z", + "measuredAt": "2026-12-03T03:27:17.363Z", "tracks": [ "T1", "T3", @@ -12,20 +12,20 @@ "T7" ], "rest": 0, - "first": 0.3, - "each": 0.3, + "first": 0, + "each": 0, "points": [ - 91.3, - 91.1, - 85.3, - 91.6, - 85.6 + 91.7, + 85.9, + 87.5, + 85.5, + 86.5 ], "adds": [ - -0.2, - -6, - 0.3, - -5.7 + -5.8, + -4.2, + -6.2, + -5.2 ], "admission": [ { @@ -34,8 +34,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.5, - "frame": 28, + "frameMax": 36.7, + "frame": 27.9, "dropped": 0, "stalls": 0 }, @@ -45,7 +45,7 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 85, + "frameMax": 86.8, "frame": 52.8, "dropped": 0, "stalls": 0 diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index 4e637ded95..bf82b9a8d6 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -180,7 +180,7 @@ "measure": "frame-interrupt", "tool": "npm run device:price -- --write", "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.8 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70.3 % before, 69.9 % at rest, 70.1 % in use.", + "conditions": "Mang112 95 bank A, Part 1, stopped (test bank); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.7 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70 % before, 70.3 % at rest, 70.3 % in use.", "source": "evidence/cpu-price.json" }, "impact": { From 09d9ae5e5474035286063047c714aea094b6827d Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 22:11:55 -0600 Subject: [PATCH 18/32] Loopbox 0.1.1-experimental: TESTING records the procedure on package 4dc3d0cc and the author's stage on it Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/loopbox/README.md | 4 +- sdk/octatrack/modules/loopbox/TESTING.md | 74 ++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 4f7dbb84bb..4111c7d675 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -1,6 +1,6 @@ # Loopbox -Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4537ab44, steps 1-11); the author kept it, listened and power-cycled: "everything sounds good and survived". +Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4dc3d0cc, steps 1-11); the author kept it, listened and power-cycled: "sounds good, everything survived". ## Overview @@ -69,5 +69,5 @@ Captured over USB on the author's Octatrack (OS 1.40C, base ddb56b72); see `medi ## Develop -- Hear it: `npm run module:dev -- loopbox --cycles 346 --cycles-kind executed --state 123 --buffer 15870 --slots fx2`. +- Hear it: `npm run module:dev -- loopbox --cycles 363 --cycles-kind executed --state 123 --buffer 15870 --slots fx2`. - Check it: `npm run module:doctor -- loopbox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model. diff --git a/sdk/octatrack/modules/loopbox/TESTING.md b/sdk/octatrack/modules/loopbox/TESTING.md index 93f08cbb06..8ce6c18263 100644 --- a/sdk/octatrack/modules/loopbox/TESTING.md +++ b/sdk/octatrack/modules/loopbox/TESTING.md @@ -7,6 +7,80 @@ Record what you ran, on which build and which unit, and what you saw. "Not teste 1. 2 December 2026, the author's MKII on development twin 117eb07f of base ddb56b72 (OS 1.40C), RAM trials of 120 s with `npm run module:dev -- loopbox --cycles 331 --state 120 --buffer 15870 --slots fx2`, Loopbox picked on T1 FX2 and checked running, each rolled back with no crash, stall, freeze or skipped track logged. Reported: "Sounds really good!" Asked for improvements; with the author's OK: loops change over head by head (overlap), the chunk envelope replaced by a level with a 5 ms rise and TAIL's fall (TAIL 0 a 50 ms release), SLIDE's glides even in semitones, WIDE spreads LAYER's and SLIDE's extra heads, SHUFL's slices on the grid, and cheaper heads. 2. That build (4ae8946d), two more trials (`--cycles 340 --state 123`), the same verdicts. Reported: "Sounds awesome". +3. 3 December 2026, the code review's fixes (0.1.1-experimental): a head still past the end after a wrap lands at the window's start (no negative, inverted fade when the window shrinks); each head's gain glides a call toward its target and fades out before a forced changeover; a chunk's last event takes what is left of it (no drift off the grid); a SHUFL slice lasts at least a block; SLIDE's glide step is scaled by the frames in a call; a fade is at most half its window (short loops reach full level). perf.py: worst 362.7, the package declares 363. The price and curve were measured on package 4dc3d0cc with `device:price --write` before the procedure (step 1 of an update checks them). The procedure below ran on that package. + +#### The author's stage (package 4dc3d0cc) + +3 December 2026, the author's MKII on its flashed base ddb56b72 (OS 1.40C) after a power cycle: package 4dc3d0cc kept with `npm run device -- try --accept` in place of 4537ab44 beside the 26 other kept modules (27 before and after, nothing removed; no crash, stall, freeze or skipped track logged). Asked to play it (suggested: RAND with LAYER, TIME 1/64 with RPT 8 and SHUFL B, SLIDE with trigs), save and reload the Part, power-cycle and check it. Reported: "sounds good, everything survived". + +### Test procedure: loopbox 0.1.1-experimental (package 4dc3d0cc, the code review's fixes), 2026-12-03 + +Build: revision `00bc3507a670`, package `loopbox.mwrm` SHA-256 `4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run`, 585 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | passed | `npm run module:doctor -- --procedure loopbox` | logs/01-software.log | +| 2 | Beside every other module | contract | passed | `npm run modules:compat -- loopbox` | logs/02-compat.log | +| 3 | Name the build | host | passed | | logs/03-build.log | +| 4 | DSP cost model | contract | passed | `node scripts/cycle-scan.mjs check` | logs/04-cost-model.log | +| 5 | Emulator rehearsal | emulator | not run: no emulator session: left out with --no-emulator | | | +| 6 | Read the unit | unit | passed: Part 1 on A01: working = saved, saved once so that RELOAD works at the end | `node scripts/device.mjs status --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs read --socket /tmp/modwerk-share.sock --out /part-start.json`
`node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | logs/06-unit-read.log | +| 7 | Scripted unit pass | unit | passed | `npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry /device-test.md /../loopbox.mwrm` | logs/07-unit-pass.log | +| 8 | Soak | unit | passed: Part 1 on A01: transport stopped, back on A01 from A04, Part 1 on A01 reloaded; working = saved | `node scripts/device.mjs try /../loopbox.mwrm --seconds 420 --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-soak.mjs --seconds 120 --programs 0-3 --pc-channel 11 --auto-channel 11 --log /soak.json`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/08-soak.log | +| 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox.mwrm` | logs/09-cost-unit.log | +| 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | +| 11 | Agent by hand | unit | passed: on 4dc3d0cc, the pattern played 8 s at TIME 1/2, RPT 1, TAIL 127, WIDE 127 (the heads' changeover between chunks with the gain glides, the stereo side and the tail; freeze-set.png), frame interrupt peak 92.1 %, latest entry 7.2 us late while playing (0 in the guard's 80-190 us window), no skipped frame, stall or crash; STOP, Part reloaded, the trial rolled back. MAIN and CUE not recorded over USB: the recorder is not built on this computer | `device try`, `pick:T1:FX2:LOOPBOX`, `png:`, `guard`, `late`, `health`, `stall`, `reload` | freeze-set.png | +| 12 | Submitter's own stage | unit | done on 4dc3d0cc: see the author's stage below | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- an effect slot: FX1 and FX2, both DSP cores, eight instances at once; one edited while another plays (docs/MODULE_QUALIFICATION.md#essential-persistence-and-instance-checks--8-october-2026) +- memory: the module pool nearly full; a delay buffer next to it; the largest set it can join (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Both DSP cores | the ring is read and written every sample, by three heads | step 7 (alone on T1, then T5); step 9 on T1 FX2 | passed: T1 peak 532 per mille of a frame, admitted in 117 ms; T5 peak 608 per mille, admitted in 119 ms; step 9 in use: DSP T1-T4 +13.4, frame +0 | +| Eight instances at once | each instance its own ring and 123 state words | step 7: picked on T1-T8 FX2, playing | passed: CPU 735, T1-4 peak 778, T5-8 peak 851 per mille; two refused by the base for budget, no crash, stall or dropped frame | +| The instance curve | the price of each instance on a busy pattern | step 9: `device:price --curve T1,T3,T6,T7` | noisy on this scene: adds -6.9, -0.3, -6.2, -6.5 points (every reading with it lower than without), recorded as rest 0, first 0, each 0; empty and medium admitted (longest frame 36.4 % and 90.9 %), 0 dropped, 0 stalls; empty and medium admitted, 0 dropped, 0 stalls | +| Heads changing over between chunks (TIME 1/2) | a head takes the newest window at its wrap; the writer must never reach a window still sounding | step 11 by hand; verify.py bit for bit at TIME 1/4 and 1/2 and at 30 BPM; test_reference.py: heads change over one by one | passed on the unit (no fault) and in dsp_host | +| A loop due while a tail froze the ring | it must not replay audio from before the freeze | verify.py and test_reference.py | passed in dsp_host | +| WIDE's stereo spread | the side signal bypasses the mono path | step 11 at WIDE 127; test_reference.py: L and R differ only with WIDE | passed | +| TIME 1/2 at 30 BPM | the ring's reach | verify.py, 32 chunks, LAYER and SHUFL | passed in dsp_host; not run on the unit at 30 BPM | +| STOP while looping (the silence watch) | loops follow the tempo, not the transport | verify.py: every TYPE and VAR silent 4.2 s after the input stops | passed in dsp_host | +| A Part change while installed | per-instance state and the ring across Parts | step 7 (Part switches) and step 8 (soak) | passed | +| A trial ending while in use | the loader rolls back a slot that runs it | step 8 | passed | +| Beside Sidechain Compressor | its key window starts right after the ring (+$3DFE) | not run | not run: the ring stops at +$3DFD (`Claims(buffer_words=15870)`) | + + +| A window shrinking under a head (RAND's repeats, RPT or TIME turned) | a head past the new end faded negative: an inverted burst (review) | test_reference.py: it lands at the start, fade never negative; verify.py bit for bit with every knob swept | passed in the model and dsp_host | +| A slow head the writer catches up with | the forced changeover cut it mid-fade (review) | test_reference.py: its gain falls every call inside the zone, then it changes over at its start | passed in the model and dsp_host | +| Loops keeping the TIME grid | each looping chunk ran up to RPT - 1 samples short (review) | test_reference.py: a chunk's events add up to the chunk | passed | +| SHUFL at its shortest | slices under a block fired late (review) | test_reference.py: a slice lasts at least 16 samples | passed | +| SLIDE with trig splits | the glide stepped twice for a split block (review) | test_reference.py: the same glide with and without splits, within 3 % | passed | +| Short windows | a 64-sample minimum fade kept them quiet (review) | test_reference.py: a 21-sample window reaches full level | passed | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Tested on a unit: package 4dc3d0ccfef9, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage on 4dc3d0cc: kept, listened, Part and power cycle survived. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). + +The records below are 0.1.0-experimental's, on package 4537ab44. + ### Test procedure: loopbox 0.1.0-experimental, 2026-12-03 Build: revision `6d255caee5b6`, package `loopbox-exp.mwrm` SHA-256 `4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157`. `npm run test:procedure -- loopbox --package /../loopbox-exp.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run2`, 588 s. Emulator results are not hardware evidence; only what ran on the unit is. From 6ceaefeffd08be5dd90e9d1f556925c09b66ec64 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 2 Dec 2026 22:16:06 -0600 Subject: [PATCH 19/32] Loopbox 0.1.1-experimental: the qualification record from package 4dc3d0cc, screenshots retaken on it Co-Authored-By: Claude Opus 5.5 --- sdk/machines/octatrack/frame-costs.json | 2 +- sdk/octatrack/modules/loopbox/README.md | 4 +- .../modules/loopbox/evidence/cpu-price.json | 118 +++++++++--------- .../modules/loopbox/evidence/frame-cost.json | 28 ++--- .../modules/loopbox/media/LICENSE.md | 2 +- .../modules/loopbox/media/capture.json | 10 +- .../modules/loopbox/media/ot-controls.png | Bin 1142 -> 1130 bytes .../modules/loopbox/media/ot-location.png | Bin 1165 -> 1167 bytes .../modules/loopbox/octamod.module.json | 64 +++++----- src/catalog/module-documents.json | 79 ++++++------ 10 files changed, 156 insertions(+), 151 deletions(-) diff --git a/sdk/machines/octatrack/frame-costs.json b/sdk/machines/octatrack/frame-costs.json index 3acaf2d8d0..7086a4601c 100644 --- a/sdk/machines/octatrack/frame-costs.json +++ b/sdk/machines/octatrack/frame-costs.json @@ -10,7 +10,7 @@ "everb": {"first":0.7,"each":0.2,"rest":0,"points":[0.7,0.8,1,-0.6],"measured":"everb 0.1.2-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, "grain": {"first":16.1,"each":8.6,"rest":0.4,"points":[16.1,24.7],"measured":"grain 0.2.0-experimental on T1 T3: A01 at 120 BPM, 16 steps, trigs on steps 1/5/9/13 of T1-T4, T6, T7: T1 and T3 Flex with a loaded 16-bit stereo sample (0.91 MB), T2 and T4 stock samples with time stretch off, T6 and T7 no sample, T5 and T8 empty; picks on empty A02; the author's MKI; package 520215cb; base 4c7eb79b (development base booted in RAM); 8 s a reading; 2026-11-30 (evidence/frame-cost.json)","paused":4.7}, "lofi2": {"first":1,"each":0,"rest":0,"points":[1,-1.5,-0.3,-1.3],"measured":"lofi2 0.1.1-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples), picks on empty C02; owner's MKII; base 0.8 twin 28 053fd054; 8 s a reading; 2026-11-22"}, - "loopbox": {"first":0,"each":0,"rest":0,"points":[-5.8,-4.2,-6.2,-5.2],"measured":"loopbox 0.1.1-experimental on T1 T3 T6 T7: Mang112 95 bank A, Part 1, stopped (test bank); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, + "loopbox": {"first":0,"each":0,"rest":0,"points":[-6.9,-0.3,-6.2,-6.5],"measured":"loopbox 0.1.1-experimental on T1 T3 T6 T7: the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, "mackity": {"first":0.9,"each":0.9,"rest":0,"points":[-1.8,-2.2,0.9,-2.9],"measured":"mackity 0.1.0-experimental on T1 T3 T6 T7: Project on the owner's development unit, bank C, Part 1 reloaded in RAM to its saved copy; picks on the empty C02, readings on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7) at the project tempo; transport played by the tool; base development twin 8fd6d456 of base 0.8.1 (eb6679620d0c9ed7), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-25 (evidence/frame-cost.json)"}, "midiverb": {"first":2,"each":2,"rest":0,"points":[0.9,0.2,2.2,1],"measured":"midiverb 0.2.0-experimental on T1 T3 T6 T7: Dev17 bank C: C04 Part 2 (working = saved), picks on the empty C02, the curve on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7), transport stopped; twin ed5474c6 of base 0.8.3 (main 80ea1e584); base development twin ed5474c6 of base 0.8.3 (main 80ea1e584), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-27 (evidence/frame-cost.json)"}, "miniverb": {"first":1.5,"each":0,"rest":0,"points":[1.5,1.4,1.2,1.2],"measured":"miniverb 0.2.3-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 4111c7d675..5acd3d5058 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -57,9 +57,9 @@ Original code by @jrs1717 under the MIT licence in LICENSE. It starts from the a ## Screens and audio -![FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.](media/ot-location.png) +![FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SLIDE, DIRT, VAR, WIDE, RAND and DGRD.](media/ot-location.png) -Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below. +Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SLIDE), DIRT and VAR on the top row and WIDE, RAND and DGRD below. ![FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.](media/ot-controls.png) diff --git a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json index b93b559f0a..e841901954 100644 --- a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json +++ b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json @@ -2,95 +2,95 @@ "module": "loopbox", "version": "0.1.1-experimental", "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", - "scene": "Mang112 95 bank A, Part 1, stopped (test bank)", + "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", "inputs": { "transport": "playing" }, "seconds": 8, "readings": 3, - "measuredAt": "2026-12-03T03:27:17.363Z", + "measuredAt": "2026-12-03T03:38:17.136Z", "result": { "id": "loopbox", "version": "0.1.1-experimental", "packageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", "before": { - "frame": 52.8, - "frameMax": 92.7, - "frames": 67193, + "frame": 52.3, + "frameMax": 91.3, + "frames": 67313, "skipped": 0, - "cpu": 70, - "dsp1to4": 39.8, - "dsp5to8": 48.9, - "dsp1to4Peak": 41.5, - "dsp5to8Peak": 50.2, + "cpu": 69.9, + "dsp1to4": 37.7, + "dsp5to8": 46.6, + "dsp1to4Peak": 39.5, + "dsp5to8Peak": 48.3, "readings": 3, "spread": { "frame": 0, "cpu": 0.5, "dsp1to4": 0, - "dsp5to8": 0.5, - "frameMax": 7.4, + "dsp5to8": 1.3, + "frameMax": 6.5, "dsp1to4Peak": 0.1, - "dsp5to8Peak": 0.5 + "dsp5to8Peak": 0.4 } }, "atRest": { - "frame": 52.7, - "frameMax": 91.7, - "frames": 67176, + "frame": 52.3, + "frameMax": 92.2, + "frames": 67312, "skipped": 0, - "cpu": 70.3, - "dsp1to4": 39.8, - "dsp5to8": 49.1, - "dsp1to4Peak": 41.5, - "dsp5to8Peak": 50.6, + "cpu": 69.8, + "dsp1to4": 37.7, + "dsp5to8": 45.5, + "dsp1to4Peak": 39.5, + "dsp5to8Peak": 48.3, "readings": 3, "spread": { - "frame": 0.1, - "cpu": 0.2, + "frame": 0, + "cpu": 0.4, "dsp1to4": 0, - "dsp5to8": 0.4, - "frameMax": 7.2, + "dsp5to8": 1.4, + "frameMax": 1.6, "dsp1to4Peak": 0.1, - "dsp5to8Peak": 0.9 + "dsp5to8Peak": 0.4 } }, "atRestAdds": { - "frame": -0.1, - "cpu": 0.3, + "frame": 0, + "cpu": -0.1, "dsp1to4": 0, - "dsp5to8": 0.2, + "dsp5to8": -1.1, "dsp1to4Peak": 0, - "dsp5to8Peak": 0.4 + "dsp5to8Peak": 0 }, "inUse": { - "frame": 52.8, - "frameMax": 93.1, - "frames": 67114, + "frame": 52.3, + "frameMax": 87.2, + "frames": 67326, "skipped": 0, - "cpu": 70.3, + "cpu": 70.1, "dsp1to4": 51.1, - "dsp5to8": 48.8, - "dsp1to4Peak": 53.5, - "dsp5to8Peak": 50.2, + "dsp5to8": 47.3, + "dsp1to4Peak": 53.8, + "dsp5to8Peak": 47.9, "readings": 3, "spread": { "frame": 0, - "cpu": 0.6, - "dsp1to4": 0, - "dsp5to8": 0.1, + "cpu": 0.3, + "dsp1to4": 2.7, + "dsp5to8": 0, "frameMax": 1, - "dsp1to4Peak": 0.4, - "dsp5to8Peak": 0.5 + "dsp1to4Peak": 2.4, + "dsp5to8Peak": 0.1 } }, "inUseAdds": { "frame": 0, - "cpu": 0.3, - "dsp1to4": 11.3, - "dsp5to8": -0.1, - "dsp1to4Peak": 12, - "dsp5to8Peak": 0 + "cpu": 0.2, + "dsp1to4": 13.4, + "dsp5to8": 0.7, + "dsp1to4Peak": 14.3, + "dsp5to8Peak": -0.4 }, "inUseOn": "T1 FX2", "curve": { @@ -101,17 +101,17 @@ "T7" ], "points": [ - 91.7, - 85.9, - 87.5, - 85.5, - 86.5 + 92.2, + 85.3, + 91.9, + 86, + 85.7 ], "adds": [ - -5.8, - -4.2, + -6.9, + -0.3, -6.2, - -5.2 + -6.5 ], "first": 0, "each": 0, @@ -123,8 +123,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.7, - "frame": 27.9, + "frameMax": 36.4, + "frame": 27.5, "dropped": 0, "stalls": 0 }, @@ -134,8 +134,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 86.8, - "frame": 52.8, + "frameMax": 90.9, + "frame": 52.4, "dropped": 0, "stalls": 0 } diff --git a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json index 86e6134d07..3bf1de4883 100644 --- a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json +++ b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json @@ -2,9 +2,9 @@ "module": "loopbox", "version": "0.1.1-experimental", "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", - "scene": "Mang112 95 bank A, Part 1, stopped (test bank)", + "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", "seconds": 8, - "measuredAt": "2026-12-03T03:27:17.363Z", + "measuredAt": "2026-12-03T03:38:17.136Z", "tracks": [ "T1", "T3", @@ -15,17 +15,17 @@ "first": 0, "each": 0, "points": [ - 91.7, - 85.9, - 87.5, - 85.5, - 86.5 + 92.2, + 85.3, + 91.9, + 86, + 85.7 ], "adds": [ - -5.8, - -4.2, + -6.9, + -0.3, -6.2, - -5.2 + -6.5 ], "admission": [ { @@ -34,8 +34,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.7, - "frame": 27.9, + "frameMax": 36.4, + "frame": 27.5, "dropped": 0, "stalls": 0 }, @@ -45,8 +45,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 86.8, - "frame": 52.8, + "frameMax": 90.9, + "frame": 52.4, "dropped": 0, "stalls": 0 } diff --git a/sdk/octatrack/modules/loopbox/media/LICENSE.md b/sdk/octatrack/modules/loopbox/media/LICENSE.md index 60f91a4bea..26139cc695 100644 --- a/sdk/octatrack/modules/loopbox/media/LICENSE.md +++ b/sdk/octatrack/modules/loopbox/media/LICENSE.md @@ -1,6 +1,6 @@ # OT UI capture rights and attribution -These original LCD captures were taken on the module author's own Octatrack on 2 December 2026, read over USB from the +These original LCD captures were taken on the module author's own Octatrack on 2 and 3 December 2026, read over USB from the running Modwerk base (its screen capture request), for Modwerk module documentation. Credit: jrs1717. LicenseRef-OT-UI-Documentation covers the original capture/documentation contribution for use in Modwerk module diff --git a/sdk/octatrack/modules/loopbox/media/capture.json b/sdk/octatrack/modules/loopbox/media/capture.json index 7aa911fd34..617113efb4 100644 --- a/sdk/octatrack/modules/loopbox/media/capture.json +++ b/sdk/octatrack/modules/loopbox/media/capture.json @@ -1,19 +1,19 @@ { "firmware": "1.40C", "baseIdentity": "ddb56b72d1ac0b606f5969bc4984b6b22662e87d1b1d56a480ef0da1aac53b49", - "packageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", - "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "packageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", "method": "python3 -B scripts/device-send.py png:FILE through npm run device -- serve: the base's on-demand screen frame (Screen capability), 256x128, unmodified.", "screens": [ { "path": "media/ot-location.png", - "sha256": "54c3b7f89628e7b2d82a0feacdc491df60b6a44486174df23602704a80798d53", + "sha256": "4f9df8c5b6a79dc3320ed5cfa1dcc2d33ee55851caecb7c111c7d50fe95e8199", "keys": "TRACK, FUNC+FX2", - "shows": "FX2 SETUP: Loopbox selected at the end of the effect list; TYPE (SHUFL), DIRT, VAR, WIDE, RAND and DGRD" + "shows": "FX2 SETUP: Loopbox selected at the end of the effect list; TYPE (SLIDE), DIRT, VAR, WIDE, RAND and DGRD" }, { "path": "media/ot-controls.png", - "sha256": "289805fe06eb2d4e7c6d9a3d5a2d305b4ad8af54301f91c32b0b15ee4d977b97", + "sha256": "287c080a616e8b9f9c8e814ff87afebba2a3ef7f15d17ac751ca5b12a071a076", "keys": "FX2", "shows": "FX2 main page: TIME, ACT, SHAP, RPT, MIX, TAIL" } diff --git a/sdk/octatrack/modules/loopbox/media/ot-controls.png b/sdk/octatrack/modules/loopbox/media/ot-controls.png index 9a2add543770296d5d766746595c9df6ed93f76b..63999ba6639aa0637808696becf0c3b51add8318 100644 GIT binary patch delta 1109 zcmV-b1giV?2e@ zs6R#6@o?32A6$1bZz-WzO9uesZDQU|AJtR!S|6&YBV1v{ zp|w2?_tUfh@EHK@ZS`3|xF`B`8>f-#8LbBZd;s-B9{^oOBY#xU63_r5C7|JGjaM!@ zQvl#1FD*Jc51_rH0CbX(60mf(zt#f)IyDaf|JyTKD*SB+B8$W>0Xfzyff0b#1^_zQ zTnWf&rRy=GvF*~em;vBW=6xywSesikoM^z=rsoBKD1h>}70UKb0Q+?Su)Yb709d{b z_XxWOO6n=_N`C;l{g7i&cIyvc4q(n!07U1$rUQWWo8XM`O;DCkQ2_W)Ue^M!Mbs-Npf66wZpxltAnd zECg#**9TC00KgxLm~{=B1;B&7Pe)3iydA*$CfEZIzY0fU$kC;r0uKRTIfz+K3H1E$ z)&an(tE%1$Alm@I2Jp#Ea5mr^-4~q#v4FF6X#gVOd}9d!z&8N+)B^ySH^Cl&j7>1x z((eJiX@6c1;F{tt9RRGlx@K*bS|0LkeZh4)R?iomP5K1@d!oH2L*fb1AT=ne(uv72 z=@9_F5db|b?I5kBY@O{309F84ICz^+*wUE=;4Nnz`mH7KDgZL2LmV`;#gpJq)Zzf- z4^z6wpp2LQY#dbW0RTB=yaeRK0Yw4yZI`a;0e`?6;tNOq^#H_@p97F>dV>Xk(%A%$ zzpaCgYxRFDf#U!GUIJ7SOJm*afbW2!`vBm30Awc{(*ZznHbEM0QQMmhiC>|lS2~jp zgsS@~T+vOO04q%@S0R9Jn z>^=a90oZS=$6E!Mp*sx#dZF#JC;;7WCl=KKfDJ$|7yI(%s0Kfyl7ZzXKJ^)z)64`2!y%OMaSWZ8s z&I|y?0Cb9U5)XjizquI>3t}Otc0np#54FTbv=;+>0Bh@parvTUh&Ve=nx_^vDsG=pH0Ypkb!_gY6 zTy&-dfQziOXzx6L{*D6BNk&Ql>9D`vQUG*n76AU&Gg>PAjRTQIf=fX5c_lCc(7y`+ zooucI3Yls;811_l>pG@77ZsFaJK1r3qTY=`@a>+@0|el>k7d7CO86s zd>!Tyb`O-)Q-9!<0QC1mjzQV12fiG@oUH(e&V5Z+0M>7UGsZVTSw2kx;6DKhc#p0X zfB^v77WuZr@dA-SSwBIBt^jBNGzBXWde!m1@ibQec;69S0f+$bhRCeqvs`uNwh4TMB^P6)|)Tngzgvy-!CgurvyCzyLAO%)zzuq3n1GH00!{MO>j2g9Nib40qV78^-1H5To58#^OE?ogwb#=}9EN6MhHyXipI#$aUolW{J0C=LkCPU&0 z(I7P_s?v$cKIyRld?NsQSmGd2Qdoz56@V202nYY>6ZUjw0a(jfhkk1byb6F!=@17E z{o+aRCu(s3@`q{eF(~8ZKN|;iwiEz4WxNFB!+!xq0r<8{*YyPeb@7EG|5^ZI$-F0K5dKB$mdy;ehXeqT33<_W;OFHl`~8&DaEKxJ_+u z2oj&dYej)jwV%Qj-NY&IdI0j$(+@LJBvQ+}$m{Gvlx&kl)z{Bo;@gu=>pOF%< zJby@&?JK$hFn1HA0owqy5|x2`qZ#dhqlwMveysp_0IbqzE%J_)09wfV+6ur5fP9Ms z*rzK1e*-{vTLFjx*l(-H+X--_Ywo3sS^@Av+hR<46QY3yYRB-AQp2sL%&-`N}#@b>`#DL@ARsbvj+#z4wHd+8# z0utG3l3oe$InYn3Gb;dN06IlFi3PxJ-(3O-HIAtOtO01PyQWKBF0r$p>#hOtOMu6q n$0e1(YXE3B&oPwi>jC@&ZcNKs)0E|`00000NkvXXu0mjf+o<-Z diff --git a/sdk/octatrack/modules/loopbox/media/ot-location.png b/sdk/octatrack/modules/loopbox/media/ot-location.png index 1c50143da44d7e842456b08a9a40751c2c800166..49a4688f818ff700998c9cbeb588a4b3852fe866 100644 GIT binary patch delta 1146 zcmV-=1cm#J36BYoB!5;(L_t(|ob8!mj)X7>h4&b9|BJf6OyTipsZw=DNK9uf1^T5> z%>I2qwgkzsvc@j%_pbmfkc`d7!apwsK!=+h{0^i&5>T7Pk!fc}Q~(+PoX&RFM)}*$ z%3m5nZbXQn0Puiwoo!-ky%ewj@>8GyZ~(IW5ZifJp&8<~eKQqXBH@F#fLWTURNty&b^XL-#DX^cHxcPylVxelDz#sF!@bKqnY8 zbxsPvC0>}{0xs;zEO9j9KpqKe*W^w7Z*M=@Pz`Sc6 z=3jqGp{)WC2Y=w1^$uZd`}TnQ0Q3RZ01#h41#|=jAkqoijrN~e!HqEhT01udniK#J zfM-_E&jM)cykxRTVh^s3({8Z+ed&`O95a2Q01CH?$Rp&-vuCl zZ2^b@@QRx*fM)`^ORoSh0CKy$(K&bhMFNgmJg0}(d4B=e0bpp@bXp*pDIoFVOtv02 zVg&$Acqw52&H{ioJ-hh6uh(X^FMMAB_SXntPXQctQ9LRP0RCorJsW6G???j(+ybux z;F(<~co2C4j^gs(;nt-$TvGrdM)M^KfS0n~?8sgLU;uhW&^q;IW@K#&;AjC%+yd6Y zO8`g{*nd9o3v%Y7JbDe2h<1W}^P`Qk z?Ti8FO<8ZbdKgmymw^8^h>$O{mTkeACcZ%T40oc%1 ziw58&9DC26Udcv1++P9kLhBzQJWBFyzXr8o-Y6Yy zi1eIoRlQYb^$NgzBZMI%Al?{_%AB0l$$!Jh($ M07*qoM6N<$g8U@~0{{R3 delta 1144 zcmV-;1c&>N35^MmB!5&%L_t(|ob8!gl7uh_MQ0iAf1}Qq6}VgyqC~q}sB*LoA>>qe zSo61m>>fOa?A`2$G1B%n5mccz``Q2}TGa5#Ipc9+j~ zR6c14xgH^c0>B;4U2GRy>xF;?kRJjCfCG@}CwH-S=l1nm8-D`%(x4Uq2|(ZT7Hju$ z8N@(Y3BZJazUM90?jH?cH;3_e<=DCkf&J|O)*iagl3T05Ckh472JPp<3W=_guNUY9 zW2UZ20k~xqwr&9!e+%5@$gUbBU4{=oTFTnC4VpEX%5-t#I?Pf5@Brv(KAKrvy6x2t zW4p{&Z+~&)7Jq=XSpa4LcxJsr7~8&f0FS&M0z4!bF6OEBpa4WVLEpXJ0gH>?*!>~U zqyTsTJhOUy7C@WVKl)O`9$f3E-C_ZV0%%LI5U^&MoAK=k0Vd%6@c#o zkUzHo!~l57&1+TW9eGNx05AY@yS&l4R{kOmM=f5{!+&yK01g1?nr&3usBJLkMbDM^ zaU@$08?gd_CcF@^zq0_KOP*bPe@0IN5h1X>9RN#$M+o3uC&jaZ0KD?*J@@rcEPy~2 zcohK8>^jj05x35KV99K(XII1V0uV8fFPMsW3ieYY0^mT|XaQgVdP&f_?jOInSl6-8 z`ZG2Hz<<-Tt4&t{YwRTeq)XU7@B%qgC|L=6unZP}ZV2#ngQNE91qpW^Q=mWRtX=_# zc7lBKqm9e)o{K!C>8DkC=u-ih2f&k^Tyic6>UpCXHe5Y@X0HHzUMqaJUIF+n0Qu_{ zfM^o*8eK01wtLKxsKeQM1t1y%yc}Y?!+uAc`G5Ejco_iJTtq{GhsM~Er!Kv(0^t2~ zl!X9}esc)4^$P&HGy>p%3dtijb|mU>wqDZ|A+Wt2K=czcPY|zeqwrJKYqt=$+y&F` zB*B*hu&%8Z4ZsUH_MTn6l#P10zXIU7);~melw^5{ARGa(A)r@duoxV>P63F03(Oua z&wr&60Nt2mhJdGsD;EF{00&|Z7aq#U_PrzTmqG8+tJy$By#kOC0+A~Q;0e6~zyMfN z_HgRpzyh-hK(90APS%*zvCCSEUeYANz-$LxyIgR>lJ`_ z8PtY(qja_*(qpz&^=4hwD**G25W0+jczHFZs%4uK{Gz^dHi$WwX+U<}~br2zB+{62&NpyVI!VCgd`jC4x?0000< KMNUMnLSTY;bqZ+! diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index bf82b9a8d6..725aa50b93 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -158,20 +158,20 @@ "recorded": "2026-12-03", "storage": { "label": "DSP program / state", - "display": "1774 words / 123-word state", + "display": "2036 words / 123-word state", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 4537ab44 (ABI 6): 1,774 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "conditions": "The USB package 4dc3d0cc (ABI 6): 2,036 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", "source": "TESTING.md" }, "processing": { "label": "DSP instruction peak", - "display": "345 instructions/sample per instance", + "display": "363 instructions/sample per instance", "value": null, "unit": "see display", "method": "emulator", - "conditions": "perf:audit record (perf.py in dsp_host): worst 345.4 executed instructions a sample, the moving pattern with a trig split of 12 frames; unsplit 302.4 to 323.2; static loop 316. Against SPRING REV 314.19 (1.10x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.5 points with it on T1 FX2.", + "conditions": "perf:audit record (perf.py in dsp_host): worst 362.7 executed instructions a sample, the moving pattern with a trig split of 4 frames; unsplit 313.7 to 336.8; static loop 322. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.3 to 13.4 points with it on T1 FX2.", "source": "evidence/performance.json" }, "cpuPrice": { @@ -180,7 +180,7 @@ "measure": "frame-interrupt", "tool": "npm run device:price -- --write", "date": "2026-12-03", - "conditions": "Mang112 95 bank A, Part 1, stopped (test bank); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.7 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70 % before, 70.3 % at rest, 70.3 % in use.", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.3 % before, 52.3 % installed and used nowhere, 52.3 % on T1 FX2; CPU meter 69.9 % before, 69.8 % at rest, 70.1 % in use.", "source": "evidence/cpu-price.json" }, "impact": { @@ -188,50 +188,50 @@ "cpu": { "level": "minimal", "basis": "measured-comparison", - "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern read first 0.3 and each 0.3 points, admitted on the empty and the medium pattern.", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern, noisy there, read first 0 and each 0, admitted on the empty and the medium pattern.", "source": "evidence/cpu-price.json" }, "dsp": { "level": "high", "basis": "measured-comparison", - "rationale": "345.4 executed instructions a sample worst case (1.10 of SPRING REV's 314.19, 1.04 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read and fade, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,384 of 3,120. On the unit one instance raised its core's load about 11.5 points; six were admitted at once.", + "rationale": "362.7 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.10 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", "source": "evidence/performance.json" }, "memory": { "level": "low", "basis": "source-estimate", - "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 6,518 bytes shared.", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 7,304 bytes shared.", "source": "TESTING.md" } } }, "tests": { "report": "TESTING.md", - "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4537ab44 passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"everything sounds good and survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 345.4 instructions a sample (1.10x SPRING REV).", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4dc3d0cc passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"sounds good, everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 362.7 instructions a sample (1.15x SPRING REV).", "hardwareStatus": "reported", - "evidenceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", + "evidenceRevision": "00bc3507a670308333473d0598d513e40dcb7386", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", "Owner-reviewed real-hardware evidence with actual coverage and limitations" ], "qualification": { - "moduleVersion": "0.1.0-experimental", - "sourceSha256": "edb63a05e887312aa1ea3f6b0672ee796e875ec970728c639335d8a4e9421aec", + "moduleVersion": "0.1.1-experimental", + "sourceSha256": "0ca419c85975178cd74b7dc0f5c76085f076cac1d5ea8f31cf4546df3e65fb1f", "cycles": [ { "processor": "dsp", - "worstCase": 346, - "maxConfiguration": 1384, + "worstCase": 363, + "maxConfiguration": 1452, "maxInstances": 8, "budget": 3120, "unit": "cycles/sample", "method": "emulator", "conditions": { - "parameterExtremes": "346 cycles a sample covers the measured worst case in dsp_host, 345.4 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 12 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 316. Executed instructions, not chip cycles.", + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 362.7 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 4 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 322. Executed instructions, not chip cycles.", "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", - "maxLoad": "4 instances a core, 8 on both: 4 x 346 = 1,384 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1371.5 and 1257.0. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1363.6 and 1308.8. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." }, "report": "evidence/performance.json" @@ -242,9 +242,9 @@ { "name": "DSP program, the package's effect on each core it runs on", "space": "dsp-p", - "words": 1774, + "words": 2036, "wordBits": 24, - "bytes": 5322, + "bytes": 6108, "scope": "shared" }, { @@ -273,22 +273,22 @@ } ], "perInstanceBytes": 47979, - "sharedBytes": 6518, + "sharedBytes": 7304, "maxInstances": 8, - "totalBytes": 390350, - "conditions": "From the header of the USB package 4537ab44 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "totalBytes": 391136, + "conditions": "From the header of the USB package 4dc3d0cc (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", "report": "TESTING.md" }, - "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", "hardware": { "kind": "functional", "status": "reported", "model": "MKII", "testedOn": "2026-12-03", "tester": "jrs1717", - "sourceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", - "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", - "summary": "On the author's Octatrack MKII, OS 1.40C, 2 December 2026: npm run test:procedure on package 4537ab44 at 0.1.0-experimental, on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve first 0.3 and each 0.3, admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"everything sounds good and survived\".", + "sourceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "summary": "On the author's Octatrack MKII, OS 1.40C, 3 December 2026: npm run test:procedure on package 4dc3d0cc (0.1.1-experimental, the code review's fixes), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve, noisy on this scene, recorded as first 0 and each 0; admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"sounds good, everything survived\". Before the fixes, 0.1.0-experimental (4537ab44) passed the same procedure and the author's stage.", "limitations": [ "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", "Not run: an emulator rehearsal.", @@ -296,7 +296,7 @@ "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", - "The price was re-measured after the procedure with the same package file named for its id (the run had named it loopbox-exp, which module:qualify could not match); the readings agree: frame +0, DSP +11.5 to +11.7 in use." + "The price and curve were measured on 4dc3d0cc with device:price --write before the procedure (an update's step 1 checks them), and again in step 9; both agree: frame +0, DSP +11.3 to +13.4 in use." ], "report": "TESTING.md" }, @@ -330,14 +330,14 @@ "credit": "jrs1717 (USB screen capture on the author's unit)", "license": "LicenseRef-OT-UI-Documentation", "source": "original", - "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", - "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SLIDE), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SLIDE, DIRT, VAR, WIDE, RAND and DGRD.", "otUi": { "page": "FX2 SETUP", "shows": "location", "firmware": "1.40C", - "moduleVersion": "0.1.0-experimental", - "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "moduleVersion": "0.1.1-experimental", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237" } }, @@ -353,8 +353,8 @@ "page": "FX2", "shows": "controls", "firmware": "1.40C", - "moduleVersion": "0.1.0-experimental", - "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", + "moduleVersion": "0.1.1-experimental", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base.", "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237" } } diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 58191ff3d4..509bcbbadc 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -5570,7 +5570,7 @@ "id": "loopbox", "key": "LOOPBOX", "name": "Loopbox", - "version": "0.1.0-experimental", + "version": "0.1.1-experimental", "category": "effects", "access": { "location": "FX2 SETUP page of any audio track (the effect list).", @@ -5663,7 +5663,7 @@ "name": "TAIL", "default": 64, "count": 128, - "doc": "After a loop its heads loop on and fade: 0 none, 127 about 3 s.", + "doc": "After a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s; a loop that starts over a tail picks up from there.", "labels": null }, { @@ -5721,31 +5721,36 @@ "compatibility": { "firmware": "1.40C", "effectId": 10, - "location": "FX1", + "location": "FX2", "conflicts": [], "uiClaims": [], "limitations": [ - "Scaffold only; audio behavior and hardware operation have not been tested." + "FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words). On FX1 it passes the track dry.", + "Mono capture: the loops replay the track's mono sum; WIDE spreads LAYER's and SLIDE's extra loops left and right.", + "Loops follow the project's tempo, not yet the pattern's steps, track speed or swing; the owner agreed on issue #2491 that free-running tempo slices are fine until the base has a step clock for effects.", + "After a second of silent input no loop starts; after four seconds any loop or tail stops. The watch listens to the mono sum the ring records, so a source exactly out of phase between L and R counts as silence.", + "It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits.", + "Its worst case is 1.10x stock SPRING REV (the third read head); four a core fit within a core's budget." ] }, "resources": { "recorded": "2026-12-03", "storage": { "label": "DSP program / state", - "display": "1774 words / 123-word state", + "display": "2036 words / 123-word state", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 4537ab44 (ABI 6): 1,774 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "conditions": "The USB package 4dc3d0cc (ABI 6): 2,036 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", "source": "TESTING.md" }, "processing": { "label": "DSP instruction peak", - "display": "345 instructions/sample per instance", + "display": "363 instructions/sample per instance", "value": null, "unit": "see display", "method": "emulator", - "conditions": "perf:audit record (perf.py in dsp_host): worst 345.4 executed instructions a sample, the moving pattern with a trig split of 12 frames; unsplit 302.4 to 323.2; static loop 316. Against SPRING REV 314.19 (1.10x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.5 points with it on T1 FX2.", + "conditions": "perf:audit record (perf.py in dsp_host): worst 362.7 executed instructions a sample, the moving pattern with a trig split of 4 frames; unsplit 313.7 to 336.8; static loop 322. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.3 to 13.4 points with it on T1 FX2.", "source": "evidence/performance.json" }, "impact": { @@ -5753,19 +5758,19 @@ "cpu": { "level": "minimal", "basis": "measured-comparison", - "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern read first 0.3 and each 0.3 points, admitted on the empty and the medium pattern.", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern, noisy there, read first 0 and each 0, admitted on the empty and the medium pattern.", "source": "evidence/cpu-price.json" }, "dsp": { "level": "high", "basis": "measured-comparison", - "rationale": "345.4 executed instructions a sample worst case (1.10 of SPRING REV's 314.19, 1.04 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read and fade, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,384 of 3,120. On the unit one instance raised its core's load about 11.5 points; six were admitted at once.", + "rationale": "362.7 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.10 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", "source": "evidence/performance.json" }, "memory": { "level": "low", "basis": "source-estimate", - "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 6,518 bytes shared.", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 7,304 bytes shared.", "source": "TESTING.md" } }, @@ -5775,15 +5780,15 @@ "measure": "frame-interrupt", "tool": "npm run device:price -- --write", "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.8 % before, 52.8 % installed and used nowhere, 52.8 % on T1 FX2; CPU meter 70.3 % before, 69.9 % at rest, 70.1 % in use.", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.3 % before, 52.3 % installed and used nowhere, 52.3 % on T1 FX2; CPU meter 69.9 % before, 69.8 % at rest, 70.1 % in use.", "source": "evidence/cpu-price.json" } }, "tests": { "report": "TESTING.md", - "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4537ab44 passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"everything sounds good and survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 345.4 instructions a sample (1.10x SPRING REV).", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4dc3d0cc passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"sounds good, everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 362.7 instructions a sample (1.15x SPRING REV).", "hardwareStatus": "reported", - "evidenceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", + "evidenceRevision": "00bc3507a670308333473d0598d513e40dcb7386", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", @@ -5806,23 +5811,23 @@ ], "screenshotStyle": "black-and-white" }, - "moduleVersion": "0.1.0-experimental", - "sourceSha256": "edb63a05e887312aa1ea3f6b0672ee796e875ec970728c639335d8a4e9421aec", - "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", + "moduleVersion": "0.1.1-experimental", + "sourceSha256": "0ca419c85975178cd74b7dc0f5c76085f076cac1d5ea8f31cf4546df3e65fb1f", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", "cycles": [ { "processor": "dsp", - "worstCase": 346, - "maxConfiguration": 1384, + "worstCase": 363, + "maxConfiguration": 1452, "maxInstances": 8, "budget": 3120, "unit": "cycles/sample", "method": "emulator", "conditions": { - "parameterExtremes": "346 cycles a sample covers the measured worst case in dsp_host, 345.4 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 12 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 316. Executed instructions, not chip cycles.", + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 362.7 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 4 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 322. Executed instructions, not chip cycles.", "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", - "maxLoad": "4 instances a core, 8 on both: 4 x 346 = 1,384 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1371.5 and 1257.0. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1363.6 and 1308.8. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." }, "report": "evidence/performance.json" @@ -5833,9 +5838,9 @@ { "name": "DSP program, the package's effect on each core it runs on", "space": "dsp-p", - "words": 1774, + "words": 2036, "wordBits": 24, - "bytes": 5322, + "bytes": 6108, "scope": "shared" }, { @@ -5864,10 +5869,10 @@ } ], "perInstanceBytes": 47979, - "sharedBytes": 6518, + "sharedBytes": 7304, "maxInstances": 8, - "totalBytes": 390350, - "conditions": "From the header of the USB package 4537ab44 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "totalBytes": 391136, + "conditions": "From the header of the USB package 4dc3d0cc (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", "report": "TESTING.md" }, "hardware": { @@ -5876,9 +5881,9 @@ "model": "MKII", "testedOn": "2026-12-03", "tester": "jrs1717", - "sourceRevision": "6d255caee5b65ade84ef1f521b8083c3ef5b6f68", - "imageSha256": "4537ab44f4d176c345681bdd7d2cf898e611eb9be5413e20a0d2110df4872157", - "summary": "On the author's Octatrack MKII, OS 1.40C, 2 December 2026: npm run test:procedure on package 4537ab44 at 0.1.0-experimental, on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve first 0.3 and each 0.3, admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"everything sounds good and survived\".", + "sourceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "summary": "On the author's Octatrack MKII, OS 1.40C, 3 December 2026: npm run test:procedure on package 4dc3d0cc (0.1.1-experimental, the code review's fixes), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve, noisy on this scene, recorded as first 0 and each 0; admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"sounds good, everything survived\". Before the fixes, 0.1.0-experimental (4537ab44) passed the same procedure and the author's stage.", "limitations": [ "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", "Not run: an emulator rehearsal.", @@ -5886,7 +5891,7 @@ "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", - "The price was re-measured after the procedure with the same package file named for its id (the run had named it loopbox-exp, which module:qualify could not match); the readings agree: frame +0, DSP +11.5 to +11.7 in use." + "The price and curve were measured on 4dc3d0cc with device:price --write before the procedure (an update's step 1 checks them), and again in step 9; both agree: frame +0, DSP +11.3 to +13.4 in use." ], "report": "TESTING.md" } @@ -5895,14 +5900,14 @@ "license": { "spdx": "MIT", "file": "LICENSE", - "declaration": "Replace with accurate authorship, attribution and original/licensed source and media rights. Never include Elektron firmware, extracted routines or tables." + "declaration": "Original code by jrs1717 under the MIT licence in LICENSE: an original design inspired by micro-loop effects in general, starting from the author's own Glitchbox engine; no third-party code, tables, samples or names. Never includes Elektron firmware, extracted routines or tables." }, "media": [ { "path": "media/ot-location.png", "captureType": "hardware", - "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SHUFL), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", - "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SHUFL, DIRT, VAR, WIDE, RAND and DGRD.", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SLIDE), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SLIDE, DIRT, VAR, WIDE, RAND and DGRD.", "credit": "jrs1717 (USB screen capture on the author's unit)", "license": "LicenseRef-OT-UI-Documentation", "source": "original", @@ -5910,9 +5915,9 @@ "page": "FX2 SETUP", "shows": "location", "firmware": "1.40C", - "moduleVersion": "0.1.0-experimental", + "moduleVersion": "0.1.1-experimental", "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", - "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." } }, { @@ -5927,9 +5932,9 @@ "page": "FX2", "shows": "controls", "firmware": "1.40C", - "moduleVersion": "0.1.0-experimental", + "moduleVersion": "0.1.1-experimental", "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", - "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox (package 4537ab44) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SHUFL and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." } } ] From 270c8293a2cac6fdd8a6a30137b13cf6e4ff7030 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 19:35:45 -0600 Subject: [PATCH 20/32] Loopbox: DUB replaces SHUFL (the maintainer's review: SHUFL overlapped Glitchbox's CHOP) DUB is sound-on-sound: head 0 loops the window and writes it back as it plays, the old sample x (1 - IN) plus the live track x IN (VAR A-D: IN 0.5, 0.3, 0.15, 0.06); the writer stops and the window is kept through the whole slice, and records again (from nothing captured) when the loop ends. With IN 0 the write leaves the ring as it was, so LAYER and SLIDE are unchanged. verify.py bit for bit; test_reference.py 27/27 (four DUB tests replace SHUFL's); worst 360.1 (1.15x SPRING REV), the package still declares 363. README: when to use Loopbox or Glitchbox; the Analog BD line dropped (no declared conflict); the page's cost line 1.10x -> 1.15x. Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/loopbox/README.md | 13 +- sdk/octatrack/modules/loopbox/TESTING.md | 12 +- sdk/octatrack/modules/loopbox/engine.asm | 293 ++++++------------ .../modules/loopbox/evidence/performance.json | 12 +- sdk/octatrack/modules/loopbox/manifest.py | 8 +- .../modules/loopbox/octamod.module.json | 14 +- sdk/octatrack/modules/loopbox/reference.py | 89 +++--- .../modules/loopbox/test_reference.py | 111 ++++--- sdk/octatrack/modules/loopbox/verify.py | 2 +- 9 files changed, 234 insertions(+), 320 deletions(-) diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 5acd3d5058..4e3a416abe 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -6,7 +6,7 @@ Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the au Loopbox is an automatic micro-looper for an audio track's FX2 slot. It keeps the last third of a second of the track and, on a note grid at the project's tempo, loops what was just played: - **LAYER** stacks three loops of the same audio at different speeds. -- **SHUFL** cuts the loop into slices and replays them in a new order, as a repeating sequence. +- **DUB** records the live track into the loop as it plays, sound-on-sound: each pass keeps the old layers a little quieter and adds what you play, so the loop builds and smears like a short tape loop with the record head on. - **SLIDE** glides two overlapping loops in pitch. Each type has variations A to D. Each read head fades in and out of the loop by its own position, so loops at any speed are click-free. When a new loop comes along, the heads change over to it one by one as they come round, so old and new loops overlap for a moment instead of leaving a gap. MIX sets how far the loops replace the track, and TAIL lets a loop ring on after it ends. @@ -21,10 +21,10 @@ Each type has variations A to D. Each read head fades in and out of the loop by | Main | D | RPT | 1-8 | 2 | How many times the loop cycles in a chunk: 1 plays the whole chunk once, 8 loops an eighth of it eight times. | | Main | E | MIX | 0-127 | 64 | Up to 96 the track plays dry between loops and ducks under each one; from 96 to 127 the dry fades out, so 127 is the loops alone. | | Main | F | TAIL | 0-127 | 64 | After a loop, its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s. A loop that starts over a tail picks up from there. | -| Setup | A | TYPE | LAYER, SHUFL, SLIDE | LAYER | Which kind of loop (above). | +| Setup | A | TYPE | LAYER, DUB, SLIDE | LAYER | Which kind of loop (above). | | Setup | B | DIRT | 0-127 | 0 | Grit on the loops: sample-rate reduction, harder crush and clipping drive. | -| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. SHUFL: A 4 slices, B 8, C 4 with every other one reversed, D 8 slices each played as a ratchet. SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed; each glide is even in semitones. | -| Setup | D | WIDE | 0-127 | 0 | Stereo: LAYER's and SLIDE's extra loops spread left and right this far; SHUFL's slices ping-pong. | +| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. DUB: how long the old layers last, each pass keeping A half of the last, B 70 %, C 85 %, D 94 % (nearly endless, building slowly). SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed; each glide is even in semitones. | +| Setup | D | WIDE | 0-127 | 0 | Stereo: LAYER's and SLIDE's extra loops spread left and right this far; DUB's passes ping-pong. | | Setup | E | RAND | 0-127 | 0 | Chaos: random loop counts, speeds, glide targets and places. | | Setup | F | DGRD | 0-127 | 0 | Degrade: a tail grows dirtier as it fades. | @@ -35,17 +35,18 @@ Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end ## Quick tutorial 1. Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices. -2. Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D. +2. Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D. On DUB, play or change the track while a loop runs to hear it layered in. 3. Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right. 4. Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone. ## Compatibility and limitations +- Loopbox or Glitchbox? Loopbox keeps a short loop going under the track: layered at several speeds, overdubbed or gliding. Glitchbox (a separate module) throws parts of the track back on the beat: chopped, stuttered or stepped through pitches, a glitch at a time. Each takes a track's FX2. +- DUB stops recording the track into the ring while a dub loop plays (the loop is recorded into in place); it records again once the loop ends. - FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words, stopping short of Sidechain Compressor's key window). - Loops follow the project's tempo but not yet the pattern's steps, track speed or swing, like Glitchbox: free-running tempo slices until the base has a step clock for effects ([issue #2491](https://github.com/repeat98/modwerk/issues/2491)). - After a second of silent input no loop starts; after four seconds any loop or tail stops, so a stopped track falls silent. The watch listens to the mono sum the ring records. - It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits. -- Declared incompatible with Analog BD, which currently requires the stock DSP effects, as every custom DSP effect is. ## Tests and measurements diff --git a/sdk/octatrack/modules/loopbox/TESTING.md b/sdk/octatrack/modules/loopbox/TESTING.md index 8ce6c18263..42e1b6dea3 100644 --- a/sdk/octatrack/modules/loopbox/TESTING.md +++ b/sdk/octatrack/modules/loopbox/TESTING.md @@ -215,15 +215,15 @@ Not tested. npm run fx:audit checks aliasing, DC, clipping and idle behaviour (d ## Performance -`python3 -B perf.py` in dsp_host (verify.py's synthetic image), then `npm run perf:audit -- check evidence/performance.json --stamp`, 2 December 2026: +`python3 -B perf.py` in dsp_host (verify.py's synthetic image), then `npm run perf:audit -- check evidence/performance.json --stamp`, 5 December 2026, with DUB in place of SHUFL: -- Static floor: 316 words in the per-sample loop (straight-line, no branch). -- Measured, executed instructions a sample, 80 cases (defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 302.4 (defaults) to 323.2 (moving); worst 345.4, the moving pattern with a split of 12 frames. The package declares 346. -- Stress: eight instances, four a core, every parameter word changed every block, trig splits, -guard 0x4000 -guard-shared and -dirty: exit 0, no hang, 0 stray writes, 0 clobbers, per-core peaks 1371.5 and 1257.0. +- Static floor: 332 words in the per-sample loop (straight-line, no branch); DUB's write back adds 10. +- Measured, executed instructions a sample, 80 cases (defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 325.0 (defaults) to 334.4 (dearest SLIDE); worst 360.1, the dearest SLIDE setting with a split of 2 frames. The package declares 363. +- Stress: eight instances, four a core, every parameter word changed every block, trig splits, -guard 0x4000 -guard-shared and -dirty: exit 0, no hang, 0 stray writes, 0 clobbers, per-core peaks 1439.5 and 1355.1. | Check | Result | |---|---| | record | dsp record for loopbox@0.1.0 | -| cycles | 4 x 316 = 1264 of 3120 per sample per core (41%), measured 345.4 per instance | -| stock benchmark | 345.4 vs SPRING REV 314.19 (1.10x); the dearest stock effect is 330.94; justified in the record | +| cycles | 4 x 332 = 1328 of 3120 per sample per core (43%), measured 360.1 per instance | +| stock benchmark | 360.1 vs SPRING REV 314.19 (1.15x); the dearest stock effect is 330.94; justified in the record | | stress | 4 per core, eight tracks, 3 LFOs and 12 locked slots, 2 s, no clobber, no hang | diff --git a/sdk/octatrack/modules/loopbox/engine.asm b/sdk/octatrack/modules/loopbox/engine.asm index cbdb256a0b..f2d74f06b5 100644 --- a/sdk/octatrack/modules/loopbox/engine.asm +++ b/sdk/octatrack/modules/loopbox/engine.asm @@ -15,9 +15,10 @@ ; LAYER heads at 1/2, 1/4 and 1/4: the loop at its speed, and A an octave ; up and down, B a fifth up and a fourth down, C reversed and an ; octave down, D two random speeds -; SHUFL head 0: the window cut into 4 (A, C) or 8 (B, D) slices played in a -; shuffled order, RPT times, each as far in as its event is late (C -; reverses every other slice, D plays each slice's first half twice) +; DUB head 0 loops the window and writes it back as it plays: the old +; sample x (1 - IN) + the live track x IN (A 0.5, B 0.3, C 0.15, +; D 0.06), sound-on-sound; the writer stops and the window is kept +; through the whole slice, and records again when the loop ends ; SLIDE heads 1 and 2, half a window apart, gliding over the chunk by ; x (1 + c x frames / 16) a call, even in semitones: A up an octave, B down an ; octave, C one up and one down, D to a random speed @@ -30,12 +31,12 @@ ; of the way to its target a call: TYPE's, or nothing while the writer nears a ; window it still plays, where it takes the newest window once faded out. ; A chunk's last event takes what is left of it, so loops keep the grid; a -; SHUFL slice lasts at least a block (N halves until it does). A loop that +; DUB loop keeps its window for every chunk of its slice. A loop that ; starts from silence sets every head on its window at once. The loop's level ; G rises to whole in about 5 ms when a loop starts and, when it ends, falls at ; TAIL's rate (about 50 ms to -60 dB at 0, 3 s at 127) while the heads loop on, ; steady in pitch; a loop starting over a tail picks up from there. WIDE spreads -; heads 1 and 2 left and right (LAYER, SLIDE) or ping-pongs SHUFL's slices. +; heads 1 and 2 left and right (LAYER, SLIDE) or ping-pongs DUB's passes. ; Should the writer come within 32 samples of a window still sounding during a ; tail, the ring freezes. After a second of silence in no loop starts; after ; four, any loop or tail stops and the ring records again. @@ -62,14 +63,15 @@ ; $30 the heads' sum $32 TAIL's decay $33 SHAP's share of a window $34 the chunk now ; $36-$3b LAYER's speeds for A-C $3c/$3d the side's gains (heads 1 and 2) $3f P (1 in a loop) ; $40 chunks in a slice of TIME $41 the chunk's place in it $42 chunks left in the loop -; $43 D, the loop's gain $44 K, the dry's ceiling $45 events in a chunk (RPT, x N for SHUFL) +; $43 D, the loop's gain $44 K, the dry's ceiling $45 events in a chunk (RPT) ; $46 the crush mask (DIRT's) $47 DIRT's hold N $48 its countdown $49 the held sample ; $4a/$4b DIRT's drive and level $4c/$4d WIDE's ping-pong gains $4e WIDE $4f RAND $50 DGRD ; $51 DIRT $52 scratch $53 samples of silence in $54 the call's loudest input ; $55-$57 the heads' faded reads (scratch) $58-$5f DIRT's crush masks ; $60-$62 head 1: position hi/lo, rate $63 its glide $64 its gain ; $65-$67 head 2: the same $68 its glide $69 its gain $6b head 0's gain -; $6c SHUFL's N $6d a slice $6e the newest window's ring index $6f-$76 SHUFL's slice order +; $6c 1 $6d the loop $6e the newest window's ring index $12/$35 DUB's write back: -IN and IN +; $3e the input word (a sample) $79 a DUB going on keeps its window ; $77 the side $78 head 1's window (Y) $7a head 2's window (Y) ; Nothing above $7a is touched. Every product is the signed mpy/mac x0,y1 ; form. Labels are gb and two characters, so none is another's prefix. @@ -556,7 +558,7 @@ gba3: asr #3,a,a add x0,a move a1,x:(r7+$69) -; The side's gains: WIDE spreads heads 1 and 2 at their gains now (LAYER, SLIDE); none for SHUFL. +; The side's gains: WIDE spreads heads 1 and 2 at their gains now (LAYER, SLIDE); none for DUB. move x:(r7+$1d),a move #>$1,x0 cmp x0,a @@ -606,6 +608,38 @@ gbsy: tst b tne x0,a move a1,x:(r7+$3f) +; DUB: while a DUB loop plays, head 0 writes back s0 x (1 - IN) + the input x IN ($12 = -IN, $35 = IN, VAR's +; IN: A 0.5, B 0.3, C 0.15, D 0.06); else nothing. + clr a + move a,x:(r7+$12) + move a,x:(r7+$35) + move x:(r7+$06),a + tst a + beq gbv5 + move x:(r7+$1d),a + move #>$1,x0 + cmp x0,a + bne gbv5 + move x:(r7+$1e),b + move #>$400000,x0 + move #>$1,y0 + cmp y0,b + blt gbv4 + move #>$266666,x0 + move #>$2,y0 + cmp y0,b + blt gbv4 + move #>$133333,x0 + move #>$3,y0 + cmp y0,b + blt gbv4 + move #>$07ae14,x0 +gbv4: + move x0,x:(r7+$35) + move x0,a + neg a + move a,x:(r7+$12) +gbv5: ; d = DIRT, and in a tail DGRD x how far it has faded: the crush (MASKS[d/16] with VAR's), the hold ; (a new sample every 1 + d/8), the drive (x (1/4 + 3/4 d) x 4, clipped, then x (1 - d/2)). move x:(r7+$51),a @@ -680,6 +714,7 @@ gbd1: add y0,a asr #2,a,a move a,y:(r4) + move a,x:(r7+$3e) move (r4)+n4 ; The input's loudest sample this call, for the silence watch (the mono ring word: what a glitch can replay). move a,x0 @@ -731,6 +766,16 @@ gbd1: move a,x1 move (r5)+n5 move y:(r5)+,a +; DUB's write back: s0 + s0 x -IN + the input x IN (with IN 0, s0 itself: the ring as it was) + move a,x0 + move x:(r7+$12),y1 + tfr a,b + mac x0,y1,b + move x:(r7+$3e),x0 + move x:(r7+$35),y1 + mac x0,y1,b + move (r5)- + move b,y:(r5)+ move y:(r5),b sub a,b move b,x0 @@ -1018,6 +1063,14 @@ gbst: move a,x:(r7+$20) move a,x:(r7+$63) move a,x:(r7+$68) +; A DUB froze the writer: record again, from nothing captured. + move x:(r7+$03),b + tst b + bne gbv6 + move #>$1,x0 + move x0,x:(r7+$03) + move a,x:(r7+$04) +gbv6: move #>$1,x0 move x0,x:(r7+$18) move x:(r7+$32),x0 @@ -1080,9 +1133,25 @@ gbr9: move x:(r7+$18),x0 add x0,a move a1,x:(r7+$52) +; A DUB going on (TYPE DUB, a loop playing) keeps its window ($79); DUB stops the writer. + clr b + move b,x:(r7+$79) move #>$1,x0 + move x:(r7+$1d),a + cmp x0,a + bne gbv1 + move x:(r7+$06),a + tst a + beq gbv1 + move x0,x:(r7+$79) +gbv1: move x0,x:(r7+$06) move x0,x:(r7+$03) + move x:(r7+$1d),a + cmp x0,a + bne gbv2 + move b,x:(r7+$03) +gbv2: clr a move a,x:(r7+$0a) move a,x:(r7+$18) @@ -1098,6 +1167,9 @@ gbr9: bsr gbdi move x0,x:(r7+$16) move x0,x:(r7+$6d) + move x:(r7+$79),a + tst a + bne gbv3 move x:(r7+$02),a sub x0,a move #>$0,y0 @@ -1113,6 +1185,7 @@ gbr9: move x0,a sub #>$1,a move a1,x:(r7+$11) +gbv3: move #>$1,x0 move x0,x:(r7+$6c) clr a @@ -1128,143 +1201,10 @@ gbr9: move #>$2,x0 cmp x0,a beq gbgl -; SHUFL: N slices of the loop (4, or 8 for B and D; halved until a slice lasts a block) in a new order, played RPT -; times, on head 0. - move #>$4,x1 - move x:(r7+$1e),a - and #>$1,a - tst a - beq gbh8 - move #>$8,x1 -gbh8: - move x1,x:(r7+$6c) - move x:(r7+$6c),x0 - move x0,a - move #>$1,y0 - cmp y0,a - ble gbhn - move x:(r7+$16),a - asl #1,a,a - move a1,a0 - move #>$0,a1 - bsr gbdi - move x0,a - move #>16,y0 - cmp y0,a - bge gbhn - move x:(r7+$6c),a - asr #1,a,a - move a1,x:(r7+$6c) - move x:(r7+$6c),x0 - move x0,a - move #>$1,y0 - cmp y0,a - ble gbhn - move x:(r7+$16),a - asl #1,a,a - move a1,a0 - move #>$0,a1 - bsr gbdi - move x0,a - move #>16,y0 - cmp y0,a - bge gbhn - move x:(r7+$6c),a - asr #1,a,a - move a1,x:(r7+$6c) - move x:(r7+$6c),x0 - move x0,a - move #>$1,y0 - cmp y0,a - ble gbhn - move x:(r7+$16),a - asl #1,a,a - move a1,a0 - move #>$0,a1 - bsr gbdi - move x0,a - move #>16,y0 - cmp y0,a - bge gbhn - move x:(r7+$6c),a - asr #1,a,a - move a1,x:(r7+$6c) -gbhn: - move x:(r7+$16),a - asl #1,a,a - move a1,a0 - move #>$0,a1 - move x:(r7+$6c),x0 - bsr gbdi - move x0,x:(r7+$6d) - move r7,a - add #>$6f,a - move a1,r1 - move #>$ffffff,m1 - clr a - do #8,>gbhp - move a1,x:(r1)+ - add #>$1,a -gbhp: - nop - move r7,a - add #>$6f,a - move a1,r1 - move x:(r7+$6c),a - sub #>$1,a - move a1,x:(r7+$55) - move a1,x0 - tst a - beq gbhs - do x0,>gbhs - bsr gbrn - move x:(r7+$55),a - add #>$1,a - move a1,y1 - mpy x0,y1,a - move a1,n1 - nop - move x:(r1+n1),y0 - move x:(r7+$55),n1 - nop - move x:(r1+n1),x1 - move y0,x:(r1+n1) - move a1,n1 - nop - move x1,x:(r1+n1) - move x:(r7+$55),a - sub #>$1,a - move a1,x:(r7+$55) -gbhs: - nop - move x:(r7+$45),a - move x:(r7+$6c),b - move #>$2,x0 - cmp x0,b - blt gbh9 - asl #1,a,a - move #>$4,x0 - cmp x0,b - blt gbh9 - asl #1,a,a - move #>$8,x0 - cmp x0,b - blt gbh9 - asl #1,a,a -gbh9: - move a1,x:(r7+$45) -; The heads' fade for a slice (D: half a slice), once a chunk. - move x:(r7+$6d),a - move x:(r7+$1e),b - move #>$3,x0 - cmp x0,b - bne gbh7 - asr #1,a,a -gbh7: - sub #>$1,a - move a1,x0 +; DUB: head 0 loops the window, the live track recorded into it as it plays (sound-on-sound). + move x:(r7+$11),x0 bsr gbfa - bra gbfg + bra gbfs ; LAYER: three heads on the loop at different speeds, at 1/2, 1/4 and 1/4. gbla: move x:(r7+$1e),a @@ -1429,7 +1369,7 @@ gbgp: move a1,x:(r7+$41) rts -; An event within the chunk: SHUFL's next slice on head 0, on time; WIDE's spread (LAYER, SLIDE) or ping-pong. +; An event within the chunk: WIDE's spread (LAYER, SLIDE) or ping-pong (DUB). gbsr: move x:(r7+$1d),a move #>$1,x0 @@ -1441,66 +1381,9 @@ gbsr: clr a move a,x:(r7+$52) bra gbw2 -; The slice perm[k mod N] on head 0 and as the newest window: its window, rate (C reverses every other one) and -; position (as far in as the event is late). +; DUB: each pass the loop's length, then WIDE's ping-pong. gbs1: - move x:(r7+$6c),a - sub #>$1,a - move a1,x0 - move x:(r7+$0a),a - and x0,a - move a1,n1 - move r7,a - add #>$6f,a - move a1,r1 - move #>$ffffff,m1 - nop - move x:(r1+n1),x0 - move x:(r7+$6d),y1 - mpy x0,y1,a - asr #1,a,a - move a0,x0 - move x:(r7+$6e),a - add x0,a - move #>15870,x0 - cmp x0,a - blt gbs2 - sub x0,a -gbs2: - move x:(r7+$00),x0 - add x0,a - move a1,x:(r7+$0b) - move a1,x:(r7+$10) - move x:(r7+$6d),a - move x:(r7+$1e),b - move #>$3,x0 - cmp x0,b - bne gbs3 - asr #1,a,a -gbs3: - sub #>$1,a - move a1,x:(r7+$11) - clr a - move a,x:(r7+$0e) - move #>$200000,x0 - move x0,x:(r7+$0f) - move x:(r7+$07),a - move #>$2,x0 - cmp x0,b - bne gbs4 - move x:(r7+$0a),b - and #>$1,b - tst b - beq gbs4 - move #>$e00000,x0 - move x0,x:(r7+$0f) - move x:(r7+$11),a - sub #>$1,a - move x:(r7+$07),x0 - sub x0,a -gbs4: - move a1,x:(r7+$0d) - move x:(r7+$6d),x0 + move x:(r7+$16),x0 move x0,x:(r7+$19) bsr gbrm gbs9: @@ -1612,7 +1495,7 @@ gbfa: move x0,x:(r7+$13) rts -; The heads' gains for TYPE into $55-$57: LAYER 1/2, 1/4, 1/4; SLIDE 0, 1/2, 1/2; SHUFL head 0 whole. +; The heads' gains for TYPE into $55-$57: LAYER 1/2, 1/4, 1/4; SLIDE 0, 1/2, 1/2; DUB head 0 whole. gbtg: move x:(r7+$1d),a tst a diff --git a/sdk/octatrack/modules/loopbox/evidence/performance.json b/sdk/octatrack/modules/loopbox/evidence/performance.json index d67de2be9c..12a3a01e89 100644 --- a/sdk/octatrack/modules/loopbox/evidence/performance.json +++ b/sdk/octatrack/modules/loopbox/evidence/performance.json @@ -2,14 +2,14 @@ "schema": 1, "module": "loopbox", "version": "0.1.1-experimental", - "sourceSha256": "fc231c7b09d870d352957db4f01ef56a25a8db78b0096da431694cd1edaeba5c", + "sourceSha256": "d23948254604d36b678eaf2e0698041dce7ef4bef10f9fbafc270c01f49faff8", "kind": "dsp", "cycles": { "unit": "instructions/sample", - "static": 322, - "measured": 362.7, + "static": 332, + "measured": 360.1, "instancesPerCore": 4, - "method": "static: perf.py, by the rule tools/build/cycle_count.py prices straight-line code (one cycle a word): the per-sample loop between `do n7,>gbsl` and gbsl, 322 words; it has no branch, bsr, nested do or rep, so every sample runs every word. measured: perf.py in dsp_host on verify.py's synthetic image, executed instructions a sample from dsp_host's meter, 80 cases (the defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 313.7 (defaults) to 336.8 (moving); worst 362.7, the moving pattern with a split of 4 frames, where the per-call setup (events, SHUFL's slice, each head's gain glide and the forced changeover's fade, the side's gains, SLIDE's glides) runs twice a block." + "method": "static: perf.py, by the rule tools/build/cycle_count.py prices straight-line code (one cycle a word): the per-sample loop between `do n7,>gbsl` and gbsl, 332 words; it has no branch, bsr, nested do or rep, so every sample runs every word. measured: perf.py in dsp_host on verify.py's synthetic image, executed instructions a sample from dsp_host's meter, 80 cases (the defaults, the dearest setting for each TYPE, a moving pattern, each unsplit and with a trig split at every position 1-15): unsplit 325.0 (defaults) to 334.4 (dearest SLIDE); worst 360.1, the dearest SLIDE setting with a split of 2 frames, where the per-call setup (events, DUB's write-back gains, each head's gain glide and the forced changeover's fade, the side's gains, SLIDE's glides) runs twice a block." }, "stock": { "comparator": "SPRING REV", @@ -17,7 +17,7 @@ "dearestWorst": 330.94, "baseline": "E-Verb's record (perf.py bench on the original image): SPRING REV, the cost target for new FX, worst 314.19 with trig splits (257.50 unsplit); DJ EQ, the dearest stock effect, 330.94 (293.38 unsplit), through fixed, moving and trig-split-1-15 cases. Not re-run for Glitchbox; its own cases match those (fixed, moving, a split at every position 1-15).", "stockSha256": "164f31224bf61181e3f50e7dec40df9afcae5b16dbf6e4c0d0cc5e986af0a84e", - "justification": "No stock effect loops a captured ring with several heads; SPRING REV is the cost target for a new FX and, like Loopbox, reads and writes a delay buffer every sample. Loopbox's worst, 362.70, is 1.15x SPRING REV's 314.19 and 1.10x DJ EQ's 330.94; unsplit 336.8 against 257.50 and 293.38. Per sample it writes the mono sum into a 15,870-word ring and runs three read heads, each with its own position, wrap and changeover to the newest window, an interpolated two-word read and a fade by its position; then the heads' sum and side, DIRT's crush, hold and drive, the loop's level, the dry's duck and two outputs. The third head is what puts it over SPRING REV: LAYER needs it for its two layers over the loop. The code review's fixes (a head past a shrunk window landing at its start, heads fading out before a forced changeover, gains gliding a call) added about 17 a sample." + "justification": "No stock effect loops a captured ring with several heads; SPRING REV is the cost target for a new FX and, like Loopbox, reads and writes a delay buffer every sample. Loopbox's worst, 360.10, is 1.15x SPRING REV's 314.19 and 1.09x DJ EQ's 330.94; unsplit 334.4 against 257.50 and 293.38. Per sample it writes the mono sum into a 15,870-word ring and runs three read heads, each with its own position, wrap and changeover to the newest window, an interpolated two-word read and a fade by its position; then the heads' sum and side, DIRT's crush, hold and drive, the loop's level, the dry's duck and two outputs. The third head is what puts it over SPRING REV: LAYER needs it for its two layers over the loop. The code review's fixes (a head past a shrunk window landing at its start, heads fading out before a forced changeover, gains gliding a call) added about 17 a sample." }, "stress": { "instancesPerCore": 4, @@ -29,6 +29,6 @@ "dirty": true, "clobbers": 0, "hangs": 0, - "method": "perf.py --stress: the load is driven straight into dsp_host on verify.py's synthetic image with both cores: eight Loopbox instances, four a core, each on its own stem (decaying noise bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence, a three-note chord) for 2 s plus a 2 s tail; all twelve parameter words given a new value every block through the moving pattern, trig splits of 1, 3, 7, 8, 12 and 15 frames, -guard 0x4000 -guard-shared and -dirty: dsp_host exit 0, 0 stray writes, 0 clobbers, per-core peaks 1363.6 and 1308.8 of 3120. dsp_host hands every instance the same allocator entry, so the eight rings overlap here; on a unit each slot has its own buffer." + "method": "perf.py --stress: the load is driven straight into dsp_host on verify.py's synthetic image with both cores: eight Loopbox instances, four a core, each on its own stem (decaying noise bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence, a three-note chord) for 2 s plus a 2 s tail; all twelve parameter words given a new value every block through the moving pattern, trig splits of 1, 3, 7, 8, 12 and 15 frames, -guard 0x4000 -guard-shared and -dirty: dsp_host exit 0, 0 stray writes, 0 clobbers, per-core peaks 1439.5 and 1355.1 of 3120. dsp_host hands every instance the same allocator entry, so the eight rings overlap here; on a unit each slot has its own buffer." } } diff --git a/sdk/octatrack/modules/loopbox/manifest.py b/sdk/octatrack/modules/loopbox/manifest.py index 46340c37ee..36b66074a8 100644 --- a/sdk/octatrack/modules/loopbox/manifest.py +++ b/sdk/octatrack/modules/loopbox/manifest.py @@ -2,7 +2,7 @@ The track's mono sum goes into a capture ring in the FX2 slot's buffer. At each slice (TIME at the project's tempo) ACT decides whether the slice loops; a loop plays the latest audio with three read heads on one window, as -LAYER (heads at different speeds), SHUFL (the loop cut into slices and replayed in a new order) or SLIDE (two +LAYER (heads at different speeds), DUB (sound-on-sound: the live track recorded into the loop as it plays) or SLIDE (two overlapping heads gliding in pitch), each with four variations (VAR, page 2). SHAP sets the heads' fades, RPT how many times a loop cycles in a chunk, MIX how far a loop replaces the track (dry between loops up to 96, the loops alone at 127). Timing follows the tempo word only: slices are free-running at the tempo, not locked to the @@ -27,7 +27,7 @@ name="loopbox", key="LOOPBOX", kind=Kind.DSP_EFFECT, - doc="Micro-loop effect on FX2: LAYER, SHUFL, SLIDE loops of the track at the tempo.", + doc="Micro-loop effect on FX2: LAYER, DUB, SLIDE loops of the track at the tempo.", category=Category.TRACK, author="jrs1717", author_url="https://github.com/jrs1717", proof=Proof.RENDER, proof_note="verify.py bit-exact against reference.py in dsp_host; test procedure steps 1-11 on the author's MKII (TESTING.md)", @@ -54,7 +54,7 @@ Param(b"TAIL", 64, 128, active=True, formatter=P, doc="after a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s"), Param(b"TYPE", 0, 3, active=True, formatter=S, labels=_ref.TYPE_NAMES, - doc="LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch"), + doc="LAYER stacks heads at different speeds, DUB records the track into the loop as it plays, SLIDE glides the pitch"), Param(b"DIRT", 0, 128, active=True, formatter=P, doc="grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean"), Param(b"VAR", 0, 4, active=True, formatter=S, labels=_ref.VAR_NAMES, @@ -82,7 +82,7 @@ harness=Harness(layout_char=None, is_server=False), gates=(Gate("modules/loopbox/verify.py", remix_arg=False),), - # the shortest slices, a loop every slice, eight cycles, SHUFL's eight ratcheted slices (its dearest), full wet + # the shortest slices, a loop every slice, eight cycles, DUB D (head 0 writing the track back into the loop), full wet dear={"TIME": 0, "ACT": 127, "SHAP": 127, "RPT": 7, "MIX": 127, "TAIL": 127, "TYPE": 1, "DIRT": 127, "VAR": 3, "WIDE": 127, "RAND": 127, "DGRD": 127}, ) diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index 725aa50b93..108b17ef02 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -16,16 +16,16 @@ "label": "LOOP", "family": "Looper", "summary": "Automatic micro-loops on FX2: overlapping loops at different speeds, slices replayed in a new order, or loops gliding in pitch, all at the project's tempo.", - "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, SHUFL cuts the loop into slices and replays them in a shuffled order, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", + "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, DUB records the live track into the loop as it plays, sound-on-sound, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", "highlights": [ - "Three types, four variations each: LAYER, SHUFL and SLIDE", + "Three types, four variations each: LAYER, DUB and SLIDE", "Loops on a note grid from 1/64 to 1/2 at the project's tempo", "Each read head fades by its own position, so loops at any speed are click-free", "DIRT, WIDE ping-pong, RAND and a degrading TAIL on the setup page" ], "usage": [ "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", - "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SHUFL and SLIDE." + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try DUB and SLIDE." ] }, "controls": [ @@ -91,10 +91,10 @@ "name": "TYPE", "default": 0, "count": 3, - "doc": "LAYER stacks heads at different speeds, SHUFL replays slices in a new order, SLIDE glides the pitch.", + "doc": "LAYER stacks heads at different speeds, DUB records the track into the loop as it plays, SLIDE glides the pitch.", "labels": [ "LAYER", - "SHUFL", + "DUB", "SLIDE" ] }, @@ -150,7 +150,7 @@ "Loops follow the project's tempo, not yet the pattern's steps, track speed or swing; the owner agreed on issue #2491 that free-running tempo slices are fine until the base has a step clock for effects.", "After a second of silent input no loop starts; after four seconds any loop or tail stops. The watch listens to the mono sum the ring records, so a source exactly out of phase between L and R counts as silence.", "It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits.", - "Its worst case is 1.10x stock SPRING REV (the third read head); four a core fit within a core's budget." + "Its worst case is 1.15x stock SPRING REV (three read heads, each with its own fade); four a core fit within a core's budget." ], "effectId": 10 }, @@ -305,7 +305,7 @@ "title": "Quick tutorial", "steps": [ "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", - "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, SHUFL and SLIDE, and VAR through A to D.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D.", "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." ] diff --git a/sdk/octatrack/modules/loopbox/reference.py b/sdk/octatrack/modules/loopbox/reference.py index 2295254d89..9385e1ccb3 100644 --- a/sdk/octatrack/modules/loopbox/reference.py +++ b/sdk/octatrack/modules/loopbox/reference.py @@ -3,8 +3,8 @@ Model is engine.asm instruction by instruction, on 24-bit words and a 56-bit accumulator, so dsp_host's render must match it to the bit (verify.py). The design is original: a capture ring in the FX2 slot's buffer, a slice clock at the project tempo, and at each slice a decision (ACT) to loop the latest audio with three read heads, as -LAYER (heads at different speeds), SHUFL (the loop cut into slices and replayed in a new order) or SLIDE (two -overlapping heads gliding evenly in pitch), each with variations A-D. Each head fades by its own position in its +LAYER (heads at different speeds), DUB (sound-on-sound: the live track recorded into the loop as it plays, the +old passes fading) or SLIDE (two overlapping heads gliding evenly in pitch), each with variations A-D. Each head fades by its own position in its window, and takes the newest window when it wraps, where its fade is nothing: loops overlap and change over without a click. A smooth level rises when a loop starts and falls into the tail when it ends. No product's code, tables or names. @@ -18,10 +18,10 @@ TYPE_SLOT, VAR_SLOT = 6, 8 DEFAULTS = (2, 64, 32, 1, 64, 64, 0, 0, 0, 0, 0, 0) DEAREST = (0, 127, 127, 7, 127, 127, 1, 127, 3, 127, 127, 127) -TYPE_NAMES = ("LAYER", "SHUFL", "SLIDE") +TYPE_NAMES = ("LAYER", "DUB", "SLIDE") VAR_NAMES = ("A", "B", "C", "D") TIME_LABELS = ("1/64", "1/32", "1/16", "1/8", "1/4", "1/2") -LAYER, SHUFL, SLIDE = 0, 1, 2 +LAYER, DUB, SLIDE = 0, 1, 2 R = 15870 # the ring: words of the FX2 slot's buffer, ending at +$3DFD FRESH_MAX = R - 16 # captured samples counted up to this @@ -47,7 +47,8 @@ FADE_FLOOR = 5 # K = 2^25 / F stays a word; F >= W / 64 keeps min(p, W - p) x K x 2^22 a 56-bit sum NEAR = 64 # a head whose window the writer comes this close to takes the newest window at once ZONE = NEAR + 1024 # ... after fading out from here, over 64 blocks -SLICE_MIN = 16 # a SHUFL slice lasts at least a block: N halves until it does +DUB_IN = (0x400000, 0x266666, 0x133333, 0x07ae14) # DUB A-D: the live track's share of each pass (1 - what a pass keeps: +# A 0.5, B 0.7, C 0.85, D 0.94 of the old layers) HALF, QUARTER = 0x400000, 0x200000 SEED = 0x123456 LFSR_TAPS = 0xe10000 @@ -111,7 +112,7 @@ def stepped(word, top): (0x78, 0x60, 0x61, 0x62, 0x64, 0x56), (0x7a, 0x65, 0x66, 0x67, 0x69, 0x57)) GLIDES = ((0x62, 0x63), (0x67, 0x68)) # SLIDE's two heads: rate and its change a block -PERM = 0x6f # SHUFL's slice order, 8 words +DUB_KEEP = 0x79 # 1 while a DUB loop goes on: its next chunk keeps the window PS, PW = 0x10, 0x11 # the newest window: start (Y) and W, which every head takes at its next wrap @@ -224,7 +225,7 @@ def call(self, frames, p): if x[0x06] and d <= NEAR: x[st], x[ph], x[pl] = x[PS], 0, 0 x[gn] = hi(ld(x[gn]) + ((ld(tgt) - ld(x[gn])) >> 3)) - if x[0x1d] == SHUFL: # the side: WIDE spreads heads 1 and 2 (LAYER, SLIDE) at their gains now + if x[0x1d] == DUB: # the side: WIDE spreads heads 1 and 2 (LAYER, SLIDE) at their gains now x[0x3c] = x[0x3d] = 0 else: x[0x3c] = lim(mpy(x[0x64], x[0x4e])) @@ -234,6 +235,12 @@ def call(self, frames, p): x[rt] = hi(mpy(x[rt], c) + ld(x[rt])) # P: 1 while a loop plays, else 0 (a tail echoes over the whole track) x[0x3f] = 0x7fffff if x[0x06] else 0 + # DUB: while a DUB loop plays, head 0 writes back s0 x (1 - IN) + the input x IN ($12 = -IN, $35 = IN); else + # nothing (the write leaves the ring as it was) + x[0x12] = x[0x35] = 0 + if x[0x06] and x[0x1d] == DUB: + x[0x35] = DUB_IN[x[0x1e]] + x[0x12] = s24(-DUB_IN[x[0x1e]]) # DIRT, and in a tail DGRD x how far it has faded: the crush, the hold, the drive d = x[0x51] if x[0x18]: @@ -274,6 +281,9 @@ def event(self): self.start() return x[0x06] = 0 # the loop is over: its heads loop on into the tail, steady in pitch + if x[0x03] == 0: # a DUB froze the writer: record again, from nothing captured + x[0x03] = 1 + x[0x04] = 0 x[0x18] = 1 x[0x20] = 0 x[0x17] = x[0x32] @@ -319,7 +329,7 @@ def fade(self, w): x[0x13] = div(4 << 24, f) def target(self, h): - """Head h's gain for TYPE: LAYER 1/2, 1/4, 1/4; SHUFL head 0 whole; SLIDE heads 1 and 2 at 1/2.""" + """Head h's gain for TYPE: LAYER 1/2, 1/4, 1/4; DUB head 0 whole; SLIDE heads 1 and 2 at 1/2.""" kind = self.x[0x1d] if kind == LAYER: return (HALF, QUARTER, QUARTER)[h] @@ -345,7 +355,10 @@ def start(self): x = self.x fresh = x[0x06] == 0 and x[0x18] == 0 late = x[0x07] - x[0x06] = x[0x03] = 1 # a loop always records: its window lies behind the writer + x[DUB_KEEP] = 1 if (x[0x1d] == DUB and x[0x06] == 1) else 0 # a DUB going on keeps its window + x[0x06] = x[0x03] = 1 # a loop records: its window lies behind the writer + if x[0x1d] == DUB: # but DUB stops the writer: the loop is recorded into in place + x[0x03] = 0 x[0x0a] = x[0x18] = 0 x[0x20] = 0x7fffff x[0x17] = ATTACK @@ -354,12 +367,13 @@ def start(self): x[0x45] = hi(mpy(self.rand(), 8)) + 1 x[0x34] = x[0x08] x[0x16] = lev = div(2 * x[0x08], x[0x45]) # the loop: a chunk / RPT - s = x[0x02] - lev - if s < 0: - s += R - x[0x6e] = s - x[PS] = x[0x00] + s - x[PW] = lev - 1 + if not x[DUB_KEEP]: + s = x[0x02] - lev + if s < 0: + s += R + x[0x6e] = s + x[PS] = x[0x00] + s + x[PW] = lev - 1 kind, var = x[0x1d], x[0x1e] x[0x6c] = 1 x[0x6d] = lev @@ -388,22 +402,11 @@ def start(self): x[0x63] = self.glide(up) x[0x68] = self.glide(down) self.fade(x[PW]) - else: # SHUFL: N slices of the loop in a new order, played RPT times, on head 0 - n = 8 if var in (1, 3) else 4 - while n > 1 and div(2 * lev, n) < SLICE_MIN: - n >>= 1 - x[0x6c] = n - x[0x6d] = sl = div(2 * lev, n) - for i in range(8): - x[PERM + i] = i - for i in range(n - 1, 0, -1): - j = hi(mpy(self.rand(), i + 1)) - x[PERM + i], x[PERM + j] = x[PERM + j], x[PERM + i] - x[0x45] = x[0x45] * n - self.fade((sl >> 1 if var == 3 else sl) - 1) + else: # DUB: head 0 loops the window, the live track recorded into it + self.fade(x[PW]) if fresh: # from silence: every gain at TYPE's at once x[0x6b], x[0x64], x[0x69] = self.target(0), self.target(1), self.target(2) - if fresh and kind != SHUFL: # from silence: every head on the newest window now, on time + if fresh: # from silence: every head on the newest window now, on time for st, ph, pl, rt, _gn, _t in HEADS: x[st], x[pl] = x[PS], 0 x[ph] = late @@ -415,33 +418,16 @@ def start(self): self.setrep() def setrep(self): - """An event within the chunk: SHUFL's next slice on head 0, on time; WIDE's spread or ping-pong.""" + """An event within the chunk: WIDE's spread (LAYER, SLIDE) or ping-pong (DUB).""" x = self.x k = x[0x0a] - if x[0x1d] == SHUFL: - j = x[PERM + (k & (x[0x6c] - 1))] - sl = x[0x6d] - s = x[0x6e] + j * sl - if s >= R: - s -= R - w = sl - if x[0x1e] == 3: - w = sl >> 1 # D: the slice's first half twice, a ratchet - x[0x0b] = x[PS] = x[0x00] + s - x[PW] = w - 1 - x[0x0e] = 0 - x[0x0f] = ONE - x[0x0d] = x[0x07] # as far in as the event is late: on the grid - if x[0x1e] == 2 and k & 1: # C: every other slice reversed - x[0x0f] = REVERSE - x[0x0d] = x[PW] - 1 - x[0x07] - per = sl - p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) # WIDE: slices ping-pong; with RAND anywhere in it + per = x[0x16] + if x[0x1d] == DUB: # WIDE: the passes ping-pong; with RAND anywhere in it + p = x[0x4e] if k & 1 == 0 else lim(-ld(x[0x4e])) if x[0x4f] and x[0x4f] - self.rand() > 0: r = self.rand() p = lim(mpy(lim(w56((ld(r) - ld(0x400000)) << 1)), x[0x4e])) else: # LAYER and SLIDE: no ping-pong (WIDE spreads heads 1 and 2, in the call) - per = x[0x16] p = 0 x[0x19] = per if x[0x09] == 1: # the chunk's last event takes what is left of it: the loop keeps the grid @@ -478,6 +464,8 @@ def head(self, st, ph, pl, rt, gn, out): e = lim(w56(mpy(hi(m), x[0x13]) << 22)) i = (x[st] - x[0x00] + hi(a)) % R s0, s1 = ring[i], ring[(i + 1) % R] + if out == 0x55: # head 0: DUB's write back (s0 itself when not dubbing) + ring[i] = lim(mac(mac(ld(s0), s0, x[0x12]), x[0x3e], x[0x35])) v = hi(mac(ld(s0), lim(ld(s1) - ld(s0)), fh)) x[out] = lim(mpy(e, v)) @@ -489,6 +477,7 @@ def sample(self, left, right): x[0x44] = lim(w56((ld(0x7fffff) - ld(m)) << 2)) # K: the dry's ceiling, none at MIX 127 x[0x2e], x[0x2f] = left, right ring[x[0x02]] = v = lim((ld(left) + ld(right)) >> 2) + x[0x3e] = v # the input word, for DUB's write back x[0x54] = max(x[0x54], abs(v)) # the mono ring word: what a loop can replay x[0x02] = (x[0x02] + x[0x03]) % R for h in HEADS: diff --git a/sdk/octatrack/modules/loopbox/test_reference.py b/sdk/octatrack/modules/loopbox/test_reference.py index e0d54292a4..78db326abc 100644 --- a/sdk/octatrack/modules/loopbox/test_reference.py +++ b/sdk/octatrack/modules/loopbox/test_reference.py @@ -6,6 +6,7 @@ python3 -B test_reference.py """ +import math import pathlib import random import re @@ -118,17 +119,85 @@ def test_layer_heads_play_at_their_speeds(self): self.assertEqual((m.x[0x0f], m.x[0x62], m.x[0x67]), (R.ONE, R.s24(r1), R.s24(r2)), v) self.assertEqual((m.x[0x6b], m.x[0x64], m.x[0x69]), (R.HALF, R.QUARTER, R.QUARTER)) - def test_shufl_plays_every_slice_once_a_cycle(self): - for v, n in ((0, 4), (1, 8)): + def test_dub_records_the_track_into_the_loop(self): + # A DUB loop stops the writer and records the live track into its window as head 0 plays it: after a few + # passes the window holds the new input too. When the loop ends the writer records again, from nothing. + m = R.Model() + x = noise(5, 16 * 2000) + tone = [round(0.5 * (R.Q - 1) * math.sin(2 * math.pi * 300 * i / R.FS)) for i in range(16 * 2000)] + row = R.pblock(knobs(act=127, time=2, rpt=0, type=R.DUB, var=0)) + b = 0 + while not m.x[0x06]: + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + b += 16 + self.assertEqual(m.x[0x03], 0) + s, w = m.x[R.PS] - m.x[0x00], m.x[R.PW] + 1 + before = [m.ring[(s + i) % R.R] for i in range(w)] + for _ in range(3 * w // 16): + m.call([(tone[b + i], tone[b + i]) for i in range(16)], row) + b += 16 + if not m.x[0x06]: + break + after = [m.ring[(s + i) % R.R] for i in range(w)] + self.assertNotEqual(before, after) + drift = sum(abs(a_ - b_) for a_, b_ in zip(before, after)) / w + self.assertGreater(drift, 0x10000) + quiet = R.pblock(knobs(act=0, time=2, rpt=0, type=R.DUB, var=0)) + for _ in range(4000): + m.call([(0, 0)] * 16, quiet) + if not m.x[0x06]: + break + self.assertEqual(m.x[0x03], 1) + + def test_dub_keeps_its_window_through_the_slice(self): + # TIME 1/2 at 120 BPM is several chunks: a DUB loop keeps one window for all of them (a LAYER loop takes the + # newest at each chunk). + def windows(kind): m = R.Model() - x = noise(5, 16 * 600) - row = R.pblock(knobs(act=127, time=1, type=R.SHUFL, var=v)) + x = noise(7, 16 * 9000) + row = R.pblock(knobs(act=127, time=5, rpt=0, type=kind, tail=0), tempo(120)) + seen = set() for b in range(0, len(x), 16): m.call([(x[b + i], x[b + i]) for i in range(16)], row) if m.x[0x06]: + seen.add(m.x[R.PS]) + elif seen: break - self.assertEqual(m.x[0x6c], n) - self.assertEqual(sorted(m.x[R.PERM:R.PERM + n]), list(range(n))) + return seen + self.assertEqual(len(windows(R.DUB)), 1) + self.assertGreater(len(windows(R.LAYER)), 1) + + def test_var_sets_how_long_the_old_layers_last(self): + # Fed silence after the loop starts, each pass keeps 1 - IN of the last: A fades fastest, D slowest. + def left(var): + m = R.Model() + x = noise(8, 16 * 2000) + row = R.pblock(knobs(act=127, time=3, rpt=0, type=R.DUB, var=var, tail=127), tempo(60)) + b = 0 + while not m.x[0x06]: + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + b += 16 + s, w = m.x[R.PS] - m.x[0x00], m.x[R.PW] + 1 + e0 = sum(abs(m.ring[(s + i) % R.R]) for i in range(w)) + for _ in range(4 * w // 16): + m.call([(0, 0)] * 16, row) + return sum(abs(m.ring[(s + i) % R.R]) for i in range(w)) / e0 + kept = [left(v) for v in range(4)] + self.assertEqual(kept, sorted(kept)) + self.assertLess(kept[0], 0.2) + self.assertGreater(kept[3], 0.6) + + def test_other_loops_leave_the_ring_as_it_was(self): + # Head 0's write back is s0 itself unless a DUB loop plays: a LAYER loop reads the ring and never changes it. + m = R.Model() + x = noise(9, 16 * 1500) + row = R.pblock(knobs(act=127, time=2, type=R.LAYER)) + for b in range(0, len(x), 16): + before = list(m.ring) + w0 = m.x[0x02] + m.call([(x[b + i], x[b + i]) for i in range(16)], row) + written = {(w0 + i) % R.R for i in range(17)} + self.assertTrue(all(before[i] == m.ring[i] for i in range(R.R) if i not in written)) def test_slide_glides_its_heads_evenly(self): # A both up an octave, B both down, C one up and one down: the change a block is x (1 + c), c = ln(T) x 16 / chunk. @@ -191,23 +260,6 @@ def test_layer_spreads_its_heads_with_wide(self): self.assertEqual(l0, r0) self.assertNotEqual(l1, r1) - def test_shufl_slices_start_on_the_grid(self): - # A slice that starts up to a block late starts that far in, so it sounds on time. - m = R.Model() - x = noise(12, 16 * 800) - row = R.pblock(knobs(act=127, time=1, type=R.SHUFL, var=0)) - seen = [] - setrep = m.setrep - def watched(): - setrep() - seen.append((m.x[0x0d], m.x[0x07])) - m.setrep = watched - for b in range(0, len(x), 16): - m.call([(x[b + i], x[b + i]) for i in range(16)], row) - self.assertTrue(seen) - self.assertTrue(all(p == late for p, late in seen)) - self.assertTrue(any(late for _, late in seen)) - def test_a_head_past_a_shrunk_window_lands_on_its_start(self): # The newest window shrank under a head (RAND's repeat count, RPT or TIME turned): after the wrap it is still # past the end, so it lands at the start, where the fade is nothing; never a negative, inverted fade. @@ -234,7 +286,7 @@ def test_short_windows_reach_full_level(self): def test_a_chunk_lasts_its_grid_while_looping(self): # The chunk's last event takes what is left, so a loop's events add up to the chunk exactly (no drift). - for kind, var in ((R.SHUFL, 1), (R.LAYER, 0)): + for kind, var in ((R.DUB, 1), (R.LAYER, 0)): m = R.Model() x = noise(13, 16 * 400) lengths, setrep = [], m.setrep @@ -249,17 +301,6 @@ def watched(): break self.assertEqual(sum(l for _, l, _c in lengths), lengths[0][2], kind) - def test_shufl_slices_last_a_block(self): - m = R.Model() - x = noise(14, 16 * 400) - row = R.pblock(knobs(act=127, time=0, rpt=7, type=R.SHUFL, var=1), tempo(240)) - for b in range(0, len(x), 16): - m.call([(x[b + i], x[b + i]) for i in range(16)], row) - if m.x[0x06]: - break - self.assertGreaterEqual(m.x[0x6d], R.SLICE_MIN) - self.assertLess(m.x[0x6c], 8) - def test_slide_glides_the_same_with_trig_splits(self): def rate(split): x = noise(15, 16 * 900) diff --git a/sdk/octatrack/modules/loopbox/verify.py b/sdk/octatrack/modules/loopbox/verify.py index 0d054abbc6..5fa57206a1 100644 --- a/sdk/octatrack/modules/loopbox/verify.py +++ b/sdk/octatrack/modules/loopbox/verify.py @@ -129,7 +129,7 @@ def tempo_words(bpm): for time, label in ((4, "1/4"), (5, "1/2")): same(f"2 TIME {label} at 120 BPM: glitches on its grid, through every chunk of the slice", G.Instance(ll, lr, knobs=knobs(time=time, act=64)), **tempo_words(120)) - for t, tname in ((1, "SHUFL"), (0, "LAYER")): + for t, tname in ((1, "DUB"), (0, "LAYER")): same(f"2 {tname}, TIME 1/2 at 30 BPM: 32 chunks, each within the ring's reach", G.Instance(ll, lr, knobs=knobs(time=5, act=127, rpt=1, type=t, var=1)), **tempo_words(30)) frz2 = list(knobs(time=4, rpt=0, act=40, type=1)) From c7d839dd4afdb75e0d7be9cf42683e89016ad687 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 19:42:36 -0600 Subject: [PATCH 21/32] Loopbox: release notes name DUB Co-Authored-By: Claude Opus 5.5 --- src/community/module-changelogs/loopbox.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/community/module-changelogs/loopbox.json b/src/community/module-changelogs/loopbox.json index 092b7b53a2..c684132128 100644 --- a/src/community/module-changelogs/loopbox.json +++ b/src/community/module-changelogs/loopbox.json @@ -4,7 +4,7 @@ "date": "2026-12-03", "changes": [ "New: Loopbox, an automatic micro-looper for FX2 of any track, at the project tempo.", - "Three types on the setup page: LAYER stacks loops at different speeds, SHUFL replays slices in a new order, SLIDE glides two loops in pitch.", + "Three types on the setup page: LAYER stacks loops at different speeds, DUB records the track into the loop as it plays (sound-on-sound), SLIDE glides two loops in pitch.", "TIME sets the grid from 1/64 to 1/2; ACT how often a slice loops; RPT how many times a loop cycles.", "Loops change over head by head, so old and new overlap without a gap; TAIL lets them ring on.", "DIRT, WIDE (stereo spread), RAND and DGRD on the setup page add grit, width, chaos and rotting tails." From 6c3ddcb855010379ef64c09c576bd4948e13c968 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 19:43:42 -0600 Subject: [PATCH 22/32] Loopbox: the DUB packages imported and the USB package built (5d3bf7c3), recipes re-pinned Co-Authored-By: Claude Opus 5.5 --- .../loopbox/0.1.1-experimental.mwrm | Bin 9434 -> 8702 bytes .../module-adapters/standalone-recipes.json | 12 ++++----- src/engine/assets/descriptor-recipes.json | 2 +- src/engine/assets/dsp-packages.json | 24 ++++++++---------- src/engine/assets/menu-recipes.json | 12 ++++----- src/engine/assets/module-build.json | 14 +++++----- .../assets/octatrack-module-packages.json | 4 +-- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/public/octatrack-modules/loopbox/0.1.1-experimental.mwrm b/public/octatrack-modules/loopbox/0.1.1-experimental.mwrm index 328f0e9b6b522e598cd1821db8b0cdd972afcbc7..5ff4fe8a65655bae8946dab279e64889f347b570 100644 GIT binary patch delta 1051 zcmaJ=O-NKx6h8O7_q1_-eB+eQnqOx`7^q|#h%hkCu`+})b&4n*sF>WCix$JI#>GHE zFb!V8AgCY+7Z$`@r(*gcfgJ{!1GTa0(}&_ z2mpSFl)=WeC?E8MdCXlz^|y6>=YD|dvN`A}uwn#!fax;e`VwGRNGMXG4KTk6sUM^U zOiEKb5CSYdwc_3Mb#4bAC0;*8nk=k6my;M0w}v?_%$H0`OljK#suo!P>L8h^TK*$& zQkXN}H!6(X=8O7-g4<<&%KIVOS_Oh;iSD4^N5JhFqODu^NCqG~YHoWMRF>ci%_lr; zj*PkNd9X+PS96T@@_-QxW8)X1I0+H0)maWiyVzI-G^msjMV9B+jUz=i2@Uxr${M!K z&!>o)A!ZK|#woite;NY2W!J(BG^|a^6MIQhe2kREw-~ahC@N1;C&ws8i!jRj9Juwj z#JNOutH6I6i4ex6hxD%Ijz*NHS`t?xwEKqqL((qnYSAKX52EIQe-^D$e#y$maLMj` zU%o=IWnOCOin1-hY)Ph1NGpXs?HuAOEsx_aSy*ho_8>dyfv(xjvNWC47~JKRK-Q~E zy&DpBO$TF%X(_(9&pJB+wsr`+k^w#vyo2zSSA!kFvHy@)xgKgh4xgmPO*-i%!DXqv zDC4xxnqAm1M?y))Uh@0l=ZEL1Cm$uzzYB(BA90$>j5*$VP4S%uHq{NSDxvh=G{s-v F`4@6Q$Q1wp delta 1754 zcmbVMOK4PA82-Y|IvrS!3B!0`bM>LQC)gS0DkBdtckjp=vJJ)DYE#&*6tnf% zn+`r=@sn3xbU<*hSFQ+kaxg1Pp_CjB#W=VQ*UcR4koVNlBqQOA;)%Q(UbC!7wUH4b zdz?5uMcgw+NypEG+u!Kx_1aI_KI!eKJ1)FpgoRiuk2VzL z?+v%*g~grT^Ttv@ER&a!{e62$GJKrPGfmu{}(S>ipTa2+CA29lAAf3c}2xnQJss}oK5c}yPE$Rj97=;r| z&S|1u8r$^BW0%sli?7BTN(E=|AFYeg^Bp`ygV+E^FN3d{|nKHd5MUs z=Hqea1*()&k2@FPs2fJ_JVi${6R5-|@2DlrC{|41SQ%vSg{eXqks7L zlRE?))iPI@(iX@8$J-t!D5&)IkLE9AO!Ng4fFS3TvY#O5b47!`KOxxsid#Xyb9mN#>t%l+9= zxa!XqG1TJ*+oI(@2tF{u7=u=cOjSddUtGdD0sRkhx@AwpAYh=Py+&J*{qdA|Adkjd zmI%e+E4gRN80?o<;zwAll#$l7_)6L3h5Eh9u7Iz$Yf8F$4XX}WP-Ka#&T9isPa@(oCXl~Zexbs1&m?@K#9ik!K@zCk zRmL8BXu76WmFm1|8a8WsoZ3Z3WvX_LTA6A`)oA12aD%fZ)+iolN WCy9{^sif4(xA~cU*8ZaEkG}w+oI4u; diff --git a/sdk/machines/octatrack/module-adapters/standalone-recipes.json b/sdk/machines/octatrack/module-adapters/standalone-recipes.json index 180fa6778b..4bbcf610ee 100644 --- a/sdk/machines/octatrack/module-adapters/standalone-recipes.json +++ b/sdk/machines/octatrack/module-adapters/standalone-recipes.json @@ -233,9 +233,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "c154217b7e4b4e98868b1c81023f4eab935ffb4caa274059b5df8a2d6f93baec", - "src/engine/assets/descriptor-recipes.json": "7d762a29dde619c9706c78082b2dfb534d795f6795324e1c8928ecd92e603b56", - "src/engine/assets/menu-recipes.json": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4", + "src/engine/assets/dsp-packages.json": "5c095bf7cd78c1381ab2d5e57e4e8250c4001f1ec756925873193c120d57c8e0", + "src/engine/assets/descriptor-recipes.json": "3515e32bcd22a171e4b04786b31a18351a4905b222c405a667106af99476c4ce", + "src/engine/assets/menu-recipes.json": "0e77fef25a1d659105a83d1dafed5a4c600ed2de3bc12fa93300d000fdb9bdad", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", @@ -468,9 +468,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "c154217b7e4b4e98868b1c81023f4eab935ffb4caa274059b5df8a2d6f93baec", - "src/engine/assets/descriptor-recipes.json": "7d762a29dde619c9706c78082b2dfb534d795f6795324e1c8928ecd92e603b56", - "src/engine/assets/menu-recipes.json": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4", + "src/engine/assets/dsp-packages.json": "5c095bf7cd78c1381ab2d5e57e4e8250c4001f1ec756925873193c120d57c8e0", + "src/engine/assets/descriptor-recipes.json": "3515e32bcd22a171e4b04786b31a18351a4905b222c405a667106af99476c4ce", + "src/engine/assets/menu-recipes.json": "0e77fef25a1d659105a83d1dafed5a4c600ed2de3bc12fa93300d000fdb9bdad", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", diff --git a/src/engine/assets/descriptor-recipes.json b/src/engine/assets/descriptor-recipes.json index 9abace7884..f16208b02e 100644 --- a/src/engine/assets/descriptor-recipes.json +++ b/src/engine/assets/descriptor-recipes.json @@ -5467,7 +5467,7 @@ "donorSha256": "3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f", "fx2Slot": 1074618372, "slotSha256": "79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a", - "sourceSha256": "2d84252145cc1f8d618914e6ac51a11d114d0a855e068714a36414fe02e7f636", + "sourceSha256": "2ca5087d8ccf38eafe15c361f9439102c23aa3017a48a322a95727af03d7c3d4", "integers": [ { "offset": 3, diff --git a/src/engine/assets/dsp-packages.json b/src/engine/assets/dsp-packages.json index 79a34c633a..937b051fac 100644 --- a/src/engine/assets/dsp-packages.json +++ b/src/engine/assets/dsp-packages.json @@ -245,38 +245,36 @@ "key": "LOOPBOX", "author": "jrs1717", "sources": { - "modules/loopbox/engine.asm": "84bc893a2d16985f3c56b48855cd69b204d5eeaffff7eed1d94abd42734d26b0", - "modules/loopbox/manifest.py": "2d84252145cc1f8d618914e6ac51a11d114d0a855e068714a36414fe02e7f636" + "modules/loopbox/engine.asm": "f88df875944ea88dd05804dbe463a9008fd7bb9f3f17744e9a84e79eb9a75f34", + "modules/loopbox/manifest.py": "2ca5087d8ccf38eafe15c361f9439102c23aa3017a48a322a95727af03d7c3d4" }, "fxId": 10, - "words": 2036, - "code": "20001322f50005f425ffffff067b80000006565d0000000064f00000021305f424ffffff00000044e400020784022fc40a77840000780a778400007a024784208e0044f40000400020004420001b44f4000000012000030230480207cf44f400000001020fc444f4001234560217c444f40008000002978444f4001000000297c444f400400000029f8444f400600000029fc444f40040000002df8444f40010000002dfc444f4002ff22202e78444f40017f91102e7c444f400e0000002ef8444f40010000002efc444f400ffffff02578444f40058b90c02a78444f4002c5c8602a7c444f4002c5c8602af8444f400464faa02afc444f400ffffff0a778400005844f400fff0000a778400005944f400ffc0000a778400005a44f400ff80000a778400005b44f400ff00000a778400005c44f400fe00000a778400005d44f400fc00000a778400005e44f400f800000a778400005f00000c0207de2000030d104a0003e805f424ffffff05f425ffffff02069e0140c67f00000c1c2044f400000005200045027040028f8c0206de0140c67fffff21840047f4005a00002000c0027fce020e9e0140c67fffff21840047f4003e00002000c821a40057f40002000020004821a40002cfc4020ede0140c67f00000c1c2044f4000000072000450270400140c00000010287cc0216de0140c67fffff21850056f4007fffff20006421c4002087002000c021c7002000c021c40047f4000064ea2000c046f4000001b620005002cf8e02169e0140c67fffff218400208e0046f4007f000020005547f4007fffff021070026f8c02369e0140c67f00000c1c2044f4000000022000450270400277cc0236de0140c67f00000c1c2044f400000003200045027040027f8c02369e0140c600ff000c1d100a778c0000510236de0140c600ff000c1d100a778c00004e023e9e0140c67f00000a778c00004f023e9e0140c600ff000c1d100a778c000050024edf0c1c9121a400208f0044f4000002d020004d44f400000b4002904844f400001c2020004d027048028fcd028f9f56f40000000050f400791fd044f40000000120004d0d104900002a56f40000000050f400f23fa044f40000000220004d0d104900002156f40000000150f400e47f4044f40000000320004d0d104900001856f40000000350f400c8fe8044f40000000420004d0d104900000f56f40000000750f40091fd0044f40000000520004d0d104900000656f40000000f50f40023fa00028fd40d10800006bf208f0045f40000000144f400001edc20004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850002278d0a778500004002b79e2000030d104200000c026f94026fc444f4007fffff0277840227940267c444f40000000102b784026f9e026fd420004420002644f400000040200045026fdf026f96029058026fcd02679e2000030d104a00004f0257de44f4000020002000450d10410000060d10800006480d10c0000045020fde2000030d104a00004120001b02479e0d108000064444f4000000202000450d104700000457f4000000010a77ce00006b2000030d104a00000c022fde0d108000063544f4000000202000450d104700000457f4000000010a77ce0000642000030d104a00000d0a77ce0000780d108000062544f4000000202000450d104700000457f4000000010a77ce0000692000030d104a00000d0a77ce00007a0d108000061544f4000000202000450d104700000457f40000000120000b0d104a000004200013020fce020fde2000030d104200000f021f9e2000030d104200000b02679e2000030d104200000744f400000001020fc420001302178e0a77ce00005344f40002b1102000450d104900000a0d10800005e920001b021f8f02178f44f400000001020fc4021fde0267d42000450d10490000040d108000026d0d108000059f022fd402479e2000450d104a00001b208e000d10800005d844f4000004402000450d104700000520001b0a778f000055021f9f20000b0d104a00000c44f4000000402000450d1047000007024794022fc420001b0237cf023f8f0a77ce0000550a77c400006b2000440c1c062000400a778c00006b0a77c400007802479e2000450d104a00001e208e000d10800005b044f4000004402000450d104700000520001b0a778f000056021f9f20000b0d104a00000f44f4000000402000450d104700000a0247940a778400007820001b0a778f0000600a778f0000610a77ce0000560a77c40000642000440c1c062000400a778c0000640a77c400007a02479e2000450d104a00001e208e000d108000058544f4000004402000450d104700000520001b0a778f000057021f9f20000b0d104a00000f44f4000000402000450d104700000a0247940a778400007a20001b0a778f0000650a778f0000660a77ce0000570a77c40000692000440c1c062000400a778c0000690277de44f4000000012000450d104200000720001302f78e02f7ce0d10c000000d0a77c700004e0a77c40000642000c002f78e0a77c40000692000c020003602f7ce23ee000c1d242186000a77c400006320c7002000c00c1d0221c4000a77c70000622000c00a77c40000622000400a778c0000620a77c400006820c7002000c00c1d0221c4000a77c70000672000c00a77c40000672000400a778c000067021f9f44f4007fffff20001320000b02204002ffcc0a77ce00005102679f20000b0d104a00000b0257d457f4007fffff20004c21e4000a77c70000502000c820001021c400208e000c1c280140c000005821990022f10005f421ffffff00000046e90002579e2000560a778c000046208e000c1c260140c00000010a778c00004747f4006000002000c00140c02000000a778e00004a208e000c1c0221860057f4007fffff20005c0a778f00004b02079e020f9420004021940005f424003dfd0a77dc00000305f425003dfd70f40000000106df00000434026f9e026fd42000440c1c0c200040026fcc026fd447f4002aaaab2000c02000400a778e00004356f4007fffff2000440c1d040a778e00004445e00046e80002bf8502bfc620ae002000500c1c045e6400204c0021c400208e002000260a77cf00005420000d0290080a778d0000540237de023f98023fdf0c1cab2000100247d420001b20004502104820001421e50020001b200045021000200003029048200010200068022fdf024797022078022fcd21b5000237cc023f88219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000550a77ce0000600a77c80000610a77cf0000620c1cab2000100247d420001b20004502104820001421e50020001b2000450210002000030290482000102000680a77cf0000780247970220780a778d00007821b5000a778c0000600a7788000061219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000560a77ce0000650a77c80000660a77cf0000670c1cab2000100247d420001b20004502104820001421e50020001b2000450210002000030290482000102000680a77cf00007a0247970220780a778d00007a21b5000a778c0000650a7788000066219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000570a77c40000550a77c700006b2000c00a77c40000560a77c70000642000c20a77c40000570a77c70000692000c20a77c400004620004602c78c0a77c400005602f7972000c00a77c400005702f7d72000c20a778e0000770a77ce0000480140c40000010a77cf00004902c7950a77c400004702f06802f0400a778c0000480a778f0000490257d620c70002ffd42000c021c4000a77c70000432000c021c40056f4007fffff2000440a77c400004420004502704002778e0a77ce0000490c1d0221c4000a77c700004a2000c00c1d0421c4000a77c700004b2000c021c40020c7002000c021c4000a77c70000432000c021c5000a77c400007720c7002000c021c4000a77c70000432000c00c1d020a778e00007702879e20005421c400025fd72000c02000500257cc20a4000a77c700004c2000c002bf940277972000c20a77c400007720004056580020a4000a77c700004d2000c002bfd40277972000c20a77c4000077200044565800000000228e00020794200044020f8c23e400021fde200040021fcc0a77cf00005320004845f40010000020006d0270680a77ce00005447f40000004020007546f4000000000210580a778d0000532000130a778e000054020fdf20000b0d104a00000902179e20004046f400003dee20005502705002178c05f424ffffff05f425ffffff00000c021fde0267d420004420004546f400000000021050021fcc021f9e2000030d104a0000290227de0140c40000010227cc2000030d104a000009022f9e0140c0000001022f8c0d108000024800000c0d10800002380a77ce0000420140c40000010a778c0000422000030d104700003b200013021f8e02878e0a778e0000630a778e00006844f40000000102678402cf94025fc40d10c00000040d108000021f0227940267c40a77ce0000412000030d10420002170a77ce00005346f40000ac442000550d104100021002179e2000450d104900020c0d1080000339027fde2000450d104f000206020fde2000030d104200000b0d108000031e20001302178e44f400000001020fc40d10c00001f90a77c40000400a77840000420287d40a77840000450a77ce00004f2000030d104a0000120d108000031a0a77ce00004f2000450d104f00000b0d108000031347f4000000082000c00140c00000010a778c000045021f9e0267942000400a778c00005244f400000001021f84020fc4200013022f8e02678e44f4007fffff02878444f400009445025fc402279e02d78c0c1c2e0a77c40000450d10800002ff025f840a778400006d020f9e20004446f40000000045f400003dfe20000320af000210582000100a778c00006e02079520006002478c208e000140c40000010247cc44f4000000010a778400006c2000130a778e0000630a778e00006844f400200000023fc40a77840000620a77840000670277de2000030d104a0000cb44f4000000022000450d104a0000f945f400000004027f9e0140c60000012000030d104a00000445f4000000080a778500006c0a77c400006c208e0046f4000000012000550d104f000048025f9e0c1d0221880054f4000000000d10800002b5208e0046f4000000102000550d104100003b0a77ce00006c0c1c020a778c00006c0a77c400006c208e0046f4000000012000550d104f00002e025f9e0c1d0221880054f4000000000d108000029b208e0046f4000000102000550d10410000210a77ce00006c0c1c020a778c00006c0a77c400006c208e0046f4000000012000550d104f000014025f9e0c1d0221880054f4000000000d1080000281208e0046f4000000102000550d10410000070a77ce00006c0c1c020a778c00006c025f9e0c1d0221880054f4000000000a77c400006c0d108000026d0a778400006d22ee000140c000006f21910005f421ffffff2000130608800005905459000140c000000100000022ee000140c000006f2191000a77ce00006c0140c40000010a778c0000552184002000030d104a00001d06c4000005ba0d10800002400a77ce0000550140c00000012187002000c021990000000046e9000a77d900005500000045e9004669002199000000004569000a77ce0000550140c40000010a778c0000550000000a77ce0000450a77cf00006c44f40000000220004d0d104900000f0c1d0244f40000000420004d0d10490000090c1d0244f40000000820004d0d10490000030c1d020a778c0000450a77ce00006d027f9f44f40000000320004d0d10420000030c1c020140c40000012184000d10800001980d10c00000b9027f9e44f4000000032000450d104a0000120c1d0221990005f421ffffff041f6100000044e9000a7784000062041f7100000044e9000a77840000670d10c000000a0d10800001590a77840000620d10800001550a77840000670a77ce00004f2000030d104a00000d0d10800001db0a77ce00004f2000450d104f0000060d10800001450a77840000620247d40d10800001650d10c000004044f40000000245f400000001027f9e2000030d10420000052085000d10c000001246f4000000012000550d104200000520a4000d10c000000a46f4000000032000550d10420000050d108000012d2085000a77840000550a77850000560a77ce00004f2000030d104a00000d0d10800001a70a77ce00004f2000450d104f0000060d108000011a0a77840000550a77c40000550d108000011b0a77840000630a77c40000560d10800001150a77840000680247d40d10800001250a77ce0000522000030d1042000043024794022fc4200013023f8e021fde023fdf20000b0d10430000070247de0140c4000001021fd42000440237cc0247940a77840000782000130a778e000061021fde0a77cf00006220000b0d10430000070247de0140c4000001021fd42000440a778c0000600247940a778400007a2000130a778e000066021fde0a77cf00006720000b0d10430000070247de0140c4000001021fd42000440a778c0000650277de44f4000000022000450d10420000080247de0c1c02021fd42000400a778c0000650a77ce0000522000030d10420000100d10800000f60a77c40000550a778400006b0a77c40000560a77840000640a77c40000570a77840000690a77c40000450227c40d108000001000000c0a77ce0000410140c00000010a77c400004020004546f4000000000210500a778c00004100000c0277de44f4000000012000450d104a00000b025f940267c40d10800000f52000130a778e0000520d10c00000720a77ce00006c0140c4000001218400022f9e20004621990022ee000140c000006f21910005f421ffffff00000044e9000a77c700006d2000c00c1c022104000a77ce00006e20004044f400003dfe2000450d1049000003200044020794200040022fcc02478c0a77ce00006d027f9f44f40000000320004d0d10420000030c1c020140c40000010247cc200013023f8e44f400200000023fc4021fde44f40000000220004d0d1042000010022f9f0140ce00000120000b0d104a00000a44f400e00000023fc40247de0140c4000001021fd42000440237cc0a77c400006d0267c40d10800000a30a77ce00004e022f9f0140ce00000120000b0d104a0000032000360a778e0000520a77cf00004f20000b0d104a0000150d10800000b50a77ce00004f2000450d104f00000e0d10800000ae208e000140c44000000c1d0221c4000a77c700004e2000c00a778e0000520a77c400005246f4007fffff56f4007fffff2000442000550210500a778e00004d57f4007fffff20004820005d0210580a778f00004c00000c0d108000000920990004174105f421ffffff00000044e90000000c0d108000008647f4000000042000c021840000000c20990020850004178105f421ffffff00000056e9000c1c2402d7940d1080000082208e0020af0046f40000000220005d0d104100000320003621840000000c208e000140c000000121850021840002cfd72000c0218400208e0046f40000004020005502905020af000c1c8320000502700046f40000000520005502905021840056f40000000450f4000000000d108000005c024fc400000c0277de2000030d104200000d44f4004000000a778400005544f4002000000a77840000560a778400005700000c44f4000000022000450d104200000c20001b0a778f00005544f4004000000a77840000560a778400005700000c44f4007fffff0a778400005520001b0a778f0000560a778f00005700000c0227de44f4000000012000450d104200000e0a77ce0000450140c40000012184000267d72000c00c1c0221040002d79e2000440267cc00000c20001302678e0257ce02878e025fce00000c020794200044020f9420004444f400003dfe2000030d104100000320004000000c0217de2000230d104000000544f400e100002000430217cc0140c67fffff21840000000c00feb90618800007f101804021040000000c", - "sha256": "4e867153d852100522d221187604b6ee7c3ca982e6a6676fa53de6e16d504e88", + "words": 1854, + "code": "20001322f50005f425ffffff067b80000006565d0000000064f00000021305f424ffffff00000044e400020784022fc40a77840000780a778400007a024784208e0044f40000400020004420001b44f4000000012000030230480207cf44f400000001020fc444f4001234560217c444f40008000002978444f4001000000297c444f400400000029f8444f400600000029fc444f40040000002df8444f40010000002dfc444f4002ff22202e78444f40017f91102e7c444f400e0000002ef8444f40010000002efc444f400ffffff02578444f40058b90c02a78444f4002c5c8602a7c444f4002c5c8602af8444f400464faa02afc444f400ffffff0a778400005844f400fff0000a778400005944f400ffc0000a778400005a44f400ff80000a778400005b44f400ff00000a778400005c44f400fe00000a778400005d44f400fc00000a778400005e44f400f800000a778400005f00000c0207de2000030d104a00041b05f424ffffff05f425ffffff02069e0140c67f00000c1c2044f400000005200045027040028f8c0206de0140c67fffff21840047f4005a00002000c0027fce020e9e0140c67fffff21840047f4003e00002000c821a40057f40002000020004821a40002cfc4020ede0140c67f00000c1c2044f4000000072000450270400140c00000010287cc0216de0140c67fffff21850056f4007fffff20006421c4002087002000c021c7002000c021c40047f4000064ea2000c046f4000001b620005002cf8e02169e0140c67fffff218400208e0046f4007f000020005547f4007fffff021070026f8c02369e0140c67f00000c1c2044f4000000022000450270400277cc0236de0140c67f00000c1c2044f400000003200045027040027f8c02369e0140c600ff000c1d100a778c0000510236de0140c600ff000c1d100a778c00004e023e9e0140c67f00000a778c00004f023e9e0140c600ff000c1d100a778c000050024edf0c1c9121a400208f0044f4000002d020004d44f400000b4002904844f400001c2020004d027048028fcd028f9f56f40000000050f400791fd044f40000000120004d0d104900002a56f40000000050f400f23fa044f40000000220004d0d104900002156f40000000150f400e47f4044f40000000320004d0d104900001856f40000000350f400c8fe8044f40000000420004d0d104900000f56f40000000750f40091fd0044f40000000520004d0d104900000656f40000000f50f40023fa00028fd40d1080000609208f0045f40000000144f400001edc20004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850020004d0d104f0000080c1c8321a60020cf0020ae000c1d0221850002278d0a778500004002b79e2000030d104200000c026f94026fc444f4007fffff0277840227940267c444f40000000102b784026f9e026fd420004420002644f400000040200045026fdf026f96029058026fcd02679e2000030d104a00004f0257de44f4000020002000450d10410000060d10800005920d10c0000045020fde2000030d104a00004120001b02479e0d108000058e44f4000000202000450d104700000457f4000000010a77ce00006b2000030d104a00000c022fde0d108000057f44f4000000202000450d104700000457f4000000010a77ce0000642000030d104a00000d0a77ce0000780d108000056f44f4000000202000450d104700000457f4000000010a77ce0000692000030d104a00000d0a77ce00007a0d108000055f44f4000000202000450d104700000457f40000000120000b0d104a000004200013020fce020fde2000030d104200000f021f9e2000030d104200000b02679e2000030d104200000744f400000001020fc420001302178e0a77ce00005344f40002b1102000450d104900000a0d108000053320001b021f8f02178f44f400000001020fc4021fde0267d42000450d10490000040d10800002a00d10800004e9022fd402479e2000450d104a00001b208e000d108000052244f4000004402000450d104700000520001b0a778f000055021f9f20000b0d104a00000c44f4000000402000450d1047000007024794022fc420001b0237cf023f8f0a77ce0000550a77c400006b2000440c1c062000400a778c00006b0a77c400007802479e2000450d104a00001e208e000d10800004fa44f4000004402000450d104700000520001b0a778f000056021f9f20000b0d104a00000f44f4000000402000450d104700000a0247940a778400007820001b0a778f0000600a778f0000610a77ce0000560a77c40000642000440c1c062000400a778c0000640a77c400007a02479e2000450d104a00001e208e000d10800004cf44f4000004402000450d104700000520001b0a778f000057021f9f20000b0d104a00000f44f4000000402000450d104700000a0247940a778400007a20001b0a778f0000650a778f0000660a77ce0000570a77c40000692000440c1c062000400a778c0000690277de44f4000000012000450d104200000720001302f78e02f7ce0d10c000000d0a77c700004e0a77c40000642000c002f78e0a77c40000692000c020003602f7ce23ee000c1d242186000a77c400006320c7002000c00c1d0221c4000a77c70000622000c00a77c40000622000400a778c0000620a77c400006820c7002000c00c1d0221c4000a77c70000672000c00a77c40000672000400a778c000067021f9f44f4007fffff20001320000b02204002ffcc200013024f8e02d7ce021f9e2000030d104a0000240277de44f4000000012000450d104200001e027f9f44f40040000046f40000000120005d0d104900001244f40026666646f40000000220005d0d104900000b44f40013333346f40000000320005d0d104900000444f40007ae1402d7c4208e00200036024f8e0a77ce00005102679f20000b0d104a00000b0257d457f4007fffff20004c21e4000a77c70000502000c820001021c400208e000c1c280140c000005821990022f10005f421ffffff00000046e90002579e2000560a778c000046208e000c1c260140c00000010a778c00004747f4006000002000c00140c02000000a778e00004a208e000c1c0221860057f4007fffff20005c0a778f00004b02079e020f9420004021940005f424003dfd0a77dc00000305f425003dfd70f40000000106df00000467026f9e026fd42000440c1c0c200040026fcc026fd447f4002aaaab2000c02000400a778e00004356f4007fffff2000440c1d040a778e00004445e00046e80002bf8502bfc620ae002000500c1c045e640002ff8e204c0021c400208e002000260a77cf00005420000d0290080a778d0000540237de023f98023fdf0c1cab2000100247d420001b20004502104820001421e50020001b200045021000200003029048200010200068022fdf024797022078022fcd21b5000237cc023f88219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd0021c400024f972000092000ca02ff9402d7d72000ca2055005f5d005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000550a77ce0000600a77c80000610a77cf0000620c1cab2000100247d420001b20004502104820001421e50020001b2000450210002000030290482000102000680a77cf0000780247970220780a778d00007821b5000a778c0000600a7788000061219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000560a77ce0000650a77c80000660a77cf0000670c1cab2000100247d420001b20004502104820001421e50020001b2000450210002000030290482000102000680a77cf00007a0247970220780a778d00007a21b5000a778c0000650a7788000066219d00210f0020002b21a600208f0020001c200005027000218400024fd72000c00c1d2c21c500204d005edd005fe50020001c21e40020c7002000c221870020a4002000c00a778e0000570a77c40000550a77c700006b2000c00a77c40000560a77c70000642000c20a77c40000570a77c70000692000c20a77c400004620004602c78c0a77c400005602f7972000c00a77c400005702f7d72000c20a778e0000770a77ce0000480140c40000010a77cf00004902c7950a77c400004702f06802f0400a778c0000480a778f0000490257d620c70002ffd42000c021c4000a77c70000432000c021c40056f4007fffff2000440a77c400004420004502704002778e0a77ce0000490c1d0221c4000a77c700004a2000c00c1d0421c4000a77c700004b2000c021c40020c7002000c021c4000a77c70000432000c021c5000a77c400007720c7002000c021c4000a77c70000432000c00c1d020a778e00007702879e20005421c400025fd72000c02000500257cc20a4000a77c700004c2000c002bf940277972000c20a77c400007720004056580020a4000a77c700004d2000c002bfd40277972000c20a77c4000077200044565800000000228e00020794200044020f8c23e400021fde200040021fcc0a77cf00005320004845f40010000020006d0270680a77ce00005447f40000004020007546f4000000000210580a778d0000532000130a778e000054020fdf20000b0d104a00000902179e20004046f400003dee20005502705002178c05f424ffffff05f425ffffff00000c021fde0267d420004420004546f400000000021050021fcc021f9e2000030d104a0000310227de0140c40000010227cc2000030d104a000009022f9e0140c0000001022f8c0d10800001a800000c0d10800001980a77ce0000420140c40000010a778c0000422000030d1047000043200013021f8e02878e0a778e0000630a778e000068020fdf20000b0d104200000644f400000001020fc402178e44f40000000102678402cf94025fc40d10c00000040d10800001770227940267c40a77ce0000412000030d104200016f0a77ce00005346f40000ac442000550d104100016802179e2000450d10490001640d1080000248027fde2000450d104f00015e020fde2000030d104200000b0d108000022d20001302178e44f400000001020fc40d10c00001510a77c40000400a77840000420287d40a77840000450a77ce00004f2000030d104a0000120d10800002290a77ce00004f2000450d104f00000b0d108000022247f4000000082000c00140c00000010a778c000045021f9e0267942000400a778c00005220001b0a778f00007944f4000000010277de2000450d1042000008021f9e2000030d104a0000040a7784000079021f84020fc40277de2000450d1042000003020fcf200013022f8e02678e44f4007fffff02878444f400009445025fc402279e02d78c0c1c2e0a77c40000450d10800001fc025f840a778400006d0a77ce0000792000030d1042000015020f9e20004446f40000000045f400003dfe20000320af000210582000100a778c00006e02079520006002478c208e000140c40000010247cc44f4000000010a778400006c2000130a778e0000630a778e00006844f400200000023fc40a77840000620a77840000670277de2000030d104a00000c44f4000000022000450d104a00003a0247d40d108000014f0d10c0000073027f9e44f4000000032000450d104a0000120c1d0221990005f421ffffff041f6100000044e9000a7784000062041f7100000044e9000a77840000670d10c000000a0d10800001100a77840000620d108000010c0a77840000670a77ce00004f2000030d104a00000d0d10800001920a77ce00004f2000450d104f0000060d10800000fc0a77840000620247d40d108000011c0d10c000004044f40000000245f400000001027f9e2000030d10420000052085000d10c000001246f4000000012000550d104200000520a4000d10c000000a46f4000000032000550d10420000050d10800000e42085000a77840000550a77850000560a77ce00004f2000030d104a00000d0d108000015e0a77ce00004f2000450d104f0000060d10800000d10a77840000550a77c40000550d10800000d20a77840000630a77c40000560d10800000cc0a77840000680247d40d10800000dc0a77ce0000522000030d1042000043024794022fc4200013023f8e021fde023fdf20000b0d10430000070247de0140c4000001021fd42000440237cc0247940a77840000782000130a778e000061021fde0a77cf00006220000b0d10430000070247de0140c4000001021fd42000440a778c0000600247940a778400007a2000130a778e000066021fde0a77cf00006720000b0d10430000070247de0140c4000001021fd42000440a778c0000650277de44f4000000022000450d10420000080247de0c1c02021fd42000400a778c0000650a77ce0000522000030d10420000100d10800000ad0a77c40000550a778400006b0a77c40000560a77840000640a77c40000570a77840000690a77c40000450227c40d108000001000000c0a77ce0000410140c00000010a77c400004020004546f4000000000210500a778c00004100000c0277de44f4000000012000450d104a00000b025f940267c40d10800000ac2000130a778e0000520d10c0000029025f940267c40d10800000a30a77ce00004e022f9f0140ce00000120000b0d104a0000032000360a778e0000520a77cf00004f20000b0d104a0000150d10800000b50a77ce00004f2000450d104f00000e0d10800000ae208e000140c44000000c1d0221c4000a77c700004e2000c00a778e0000520a77c400005246f4007fffff56f4007fffff2000442000550210500a778e00004d57f4007fffff20004820005d0210580a778f00004c00000c0d108000000920990004174105f421ffffff00000044e90000000c0d108000008647f4000000042000c021840000000c20990020850004178105f421ffffff00000056e9000c1c2402d7940d1080000082208e0020af0046f40000000220005d0d104100000320003621840000000c208e000140c000000121850021840002cfd72000c0218400208e0046f40000004020005502905020af000c1c8320000502700046f40000000520005502905021840056f40000000450f4000000000d108000005c024fc400000c0277de2000030d104200000d44f4004000000a778400005544f4002000000a77840000560a778400005700000c44f4000000022000450d104200000c20001b0a778f00005544f4004000000a77840000560a778400005700000c44f4007fffff0a778400005520001b0a778f0000560a778f00005700000c0227de44f4000000012000450d104200000e0a77ce0000450140c40000012184000267d72000c00c1c0221040002d79e2000440267cc00000c20001302678e0257ce02878e025fce00000c020794200044020f9420004444f400003dfe2000030d104100000320004000000c0217de2000230d104000000544f400e100002000430217cc0140c67fffff21840000000c00feb906188000073b01804021040000000c", + "sha256": "32eda7c07574f659f7f5257faf6e20d8355a39f99120ab5e1c358dcc17991b4d", "relocations": [ 5, - 754, - 1421, - 1441, - 2032 + 795, + 1850 ], "init": 0, "proc": 115, "proofs": [ { "base": 4096, - "sha256": "316e8ef9b36a25f2b59c28684e58f33502432eec0d6daecac1253a8b24bef894" + "sha256": "c18ea7b47587da58634cf4cc00c2285126bfc3745f563198304eb0665dd6dfbf" }, { "base": 5120, - "sha256": "1ef8a5de04ef5c5e4bc5931e14b5244a008da48869b7835f0bfa26df035cb0fe" + "sha256": "f2925ef972ff8b99ffd55b73ba33c5db3d62b65a22f27ddcf3b30b045a65f2bf" }, { "base": 6145, - "sha256": "cca30dda52e4acf497e6abebff746967908451995b29816e4baedb6e7385243c" + "sha256": "1dbf776c1918fb15e62ffde5a1c3ad8c55e68b69184514c845642644fe7053d3" }, { "base": 9223, - "sha256": "829055c001cebbe79b3d0de050ff5dfe1904b62cd1bf3f6a011aee17dcdf9433" + "sha256": "ed936b145ec19cb9c752af341f38344eac60239066471aa741d0250aac9f17df" } ] }, diff --git a/src/engine/assets/menu-recipes.json b/src/engine/assets/menu-recipes.json index 42d2a19fa1..95373a202a 100644 --- a/src/engine/assets/menu-recipes.json +++ b/src/engine/assets/menu-recipes.json @@ -1235,7 +1235,7 @@ "name": "TYPE", "labels": [ "LAYER", - "SHUFL", + "DUB", "SLIDE" ], "renames": { @@ -1243,7 +1243,7 @@ "6": "LAYER" }, "1": { - "6": "SHUFL" + "6": "DUB" }, "2": { "6": "SLIDE" @@ -1253,13 +1253,13 @@ "proofs": [ { "namesAddress": 1074621238, - "bytes": 168, - "sha256": "7b126c5c6efd88ac26d95eef69afc18a1e6b0cebbbffa3f08f8e94d30cbe632b" + "bytes": 166, + "sha256": "17dc25ac9ebeb75a16f0534020201013cb8481d7bfefbe09fc935e32f0237b4e" }, { "namesAddress": 1074623350, - "bytes": 168, - "sha256": "f259dc6aeb2b95eee67e97379b4ac79e2354aa18412e2d24cf8a2c35560b6500" + "bytes": 166, + "sha256": "25b80ffcbf4d8083b2c80e5c4e2f8880cce5b2963c6ccb94c55d0c644972cbce" } ] }, diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 0b0e1368be..ff2101797b 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "6196e583645d8bfa03643bb84729f78ae9f989d0", + "sourceCommit": "c7d839dd4afdb75e0d7be9cf42683e89016ad687", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "fea7b8a53398307c5191d1b15065dcec1769a98425c761b6cc0e2bbd740e628a", + "sourceTreeSha256": "ed55fe70350a149dd24c3dc13c97d5f4e5455b6e5d7d3a68f70b19e9f96fcfd2", "compilerSha256": "88ffa809a26e143272326111e4a04bfea10fa5d053e7a96316bd87a269d70dd2", "moduleVersions": { "miniverb": "0.2.3-experimental", @@ -53,8 +53,8 @@ }, "files": { "dsp-packages.json": { - "bytes": 122090, - "sha256": "c154217b7e4b4e98868b1c81023f4eab935ffb4caa274059b5df8a2d6f93baec" + "bytes": 120970, + "sha256": "5c095bf7cd78c1381ab2d5e57e4e8250c4001f1ec756925873193c120d57c8e0" }, "resident-dsp.json": { "bytes": 6981, @@ -73,12 +73,12 @@ "sha256": "f4b17e0eb4e297e6dbfc61781fe5aed41262c1e7263e42579184c7cc15fa843e" }, "menu-recipes.json": { - "bytes": 36665, - "sha256": "61f2d71dcb69ebce933b2a2a1c603b46e50a008520279b24965e9cf3d2f90ca4" + "bytes": 36661, + "sha256": "0e77fef25a1d659105a83d1dafed5a4c600ed2de3bc12fa93300d000fdb9bdad" }, "descriptor-recipes.json": { "bytes": 111421, - "sha256": "7d762a29dde619c9706c78082b2dfb534d795f6795324e1c8928ecd92e603b56" + "sha256": "3515e32bcd22a171e4b04786b31a18351a4905b222c405a667106af99476c4ce" }, "platform-writes.json": { "bytes": 15585, diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index a51d3c2932..430a93de55 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -979,8 +979,8 @@ "fills": 0, "name": "Loopbox", "module": "4fd229d0", - "bytes": 9434, - "sha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad" + "bytes": 8702, + "sha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372" } ], "usbAudio": { From 5a97662951d803332990e82209f810f8f2d4b5c9 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 19:46:58 -0600 Subject: [PATCH 23/32] Loopbox: its sleeve cover (main now requires one for every listed module) Co-Authored-By: Claude Opus 5.5 --- public/module-sleeves/loopbox.svg | 89 +++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 public/module-sleeves/loopbox.svg diff --git a/public/module-sleeves/loopbox.svg b/public/module-sleeves/loopbox.svg new file mode 100644 index 0000000000..9aa1c16427 --- /dev/null +++ b/public/module-sleeves/loopbox.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 19:50:22 -0600 Subject: [PATCH 24/32] Loopbox: packages rebuilt after main's merge (Loopbox still 5d3bf7c3, the build the author heard), recipes re-pinned, modules:generate Co-Authored-By: Claude Opus 5.5 --- .../module-adapters/standalone-recipes.json | 12 +- src/catalog/module-documents.json | 374 ++++++++++++++ src/engine/assets/descriptor-recipes.json | 460 ++++++++++++++++++ src/engine/assets/menu-recipes.json | 123 +++++ src/engine/assets/module-build.json | 19 +- 5 files changed, 973 insertions(+), 15 deletions(-) diff --git a/sdk/machines/octatrack/module-adapters/standalone-recipes.json b/sdk/machines/octatrack/module-adapters/standalone-recipes.json index 3184d27326..8aa1677c63 100644 --- a/sdk/machines/octatrack/module-adapters/standalone-recipes.json +++ b/sdk/machines/octatrack/module-adapters/standalone-recipes.json @@ -233,9 +233,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "b40acc322c9c03f69ad8bc7ab30294e271bcd656bbd93fb42023c7e4dcd24078", - "src/engine/assets/descriptor-recipes.json": "1229ed48a30d2b606533f81e69d03fd9c32e4758bc215101f798ecabedbbaf87", - "src/engine/assets/menu-recipes.json": "61507b281a85393e0351158328104d09777face828cd9980dd23682625e9e2d8", + "src/engine/assets/dsp-packages.json": "f1982c64cc610f9815c7c7af87ec36a35ed7d2a5a95e0cdea11e7c8e8b52a10c", + "src/engine/assets/descriptor-recipes.json": "f6ddad6cbc95a96cafd0a3b6ede7e5e1635a142a97f00bca82409c62ef0f599b", + "src/engine/assets/menu-recipes.json": "92d756b001ab49b55a879d6ae9d0822b85c48439fb6a6980836b59a7fd4f7a3b", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", @@ -468,9 +468,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "b40acc322c9c03f69ad8bc7ab30294e271bcd656bbd93fb42023c7e4dcd24078", - "src/engine/assets/descriptor-recipes.json": "1229ed48a30d2b606533f81e69d03fd9c32e4758bc215101f798ecabedbbaf87", - "src/engine/assets/menu-recipes.json": "61507b281a85393e0351158328104d09777face828cd9980dd23682625e9e2d8", + "src/engine/assets/dsp-packages.json": "f1982c64cc610f9815c7c7af87ec36a35ed7d2a5a95e0cdea11e7c8e8b52a10c", + "src/engine/assets/descriptor-recipes.json": "f6ddad6cbc95a96cafd0a3b6ede7e5e1635a142a97f00bca82409c62ef0f599b", + "src/engine/assets/menu-recipes.json": "92d756b001ab49b55a879d6ae9d0822b85c48439fb6a6980836b59a7fd4f7a3b", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 13d3a305a6..99c0fe3854 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -5858,6 +5858,380 @@ } ] }, + { + "schemaVersion": 2, + "id": "loopbox", + "key": "LOOPBOX", + "name": "Loopbox", + "version": "0.1.1-experimental", + "category": "effects", + "access": { + "location": "FX2 SETUP page of any audio track (the effect list).", + "steps": [ + "Select an audio track with its TRACK key.", + "Hold FUNC and press FX2 to open the effect's SETUP, turn LEVEL to LOOPBOX and press YES.", + "Press FX2 for TIME, ACT, SHAP, RPT, MIX and TAIL; hold FUNC and press FX2 again for TYPE (A), DIRT (B), VAR (C), WIDE (D), RAND (E) and DGRD (F)." + ], + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ] + }, + "author": { + "github": "jrs1717", + "credits": [ + "jrs1717" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "LOOP", + "family": "Looper", + "summary": "Automatic micro-loops on FX2: overlapping loops at different speeds, slices replayed in a new order, or loops gliding in pitch, all at the project's tempo.", + "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, DUB records the live track into the loop as it plays, sound-on-sound, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", + "highlights": [ + "Three types, four variations each: LAYER, DUB and SLIDE", + "Loops on a note grid from 1/64 to 1/2 at the project's tempo", + "Each read head fades by its own position, so loops at any speed are click-free", + "DIRT, WIDE ping-pong, RAND and a degrading TAIL on the setup page" + ], + "usage": [ + "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try DUB and SLIDE." + ] + }, + "controls": [ + { + "name": "TIME", + "default": 2, + "count": 6, + "doc": "Slice length at the tempo, 1/64 to 1/2; loops start on it and last it, in chunks of 179 ms at most.", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ] + }, + { + "name": "ACT", + "default": 64, + "count": 128, + "doc": "The share of slices that loop: 0 none, 127 about 70 %.", + "labels": null + }, + { + "name": "SHAP", + "default": 32, + "count": 128, + "doc": "The loops' fades: 1/64 of a loop at 0, rising evenly to a full swell.", + "labels": null + }, + { + "name": "RPT", + "default": 1, + "count": 8, + "doc": "How many times a loop cycles in a chunk: 1 the whole chunk once, 8 an eighth of it eight times.", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "name": "MIX", + "default": 64, + "count": 128, + "doc": "How far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone.", + "labels": null + }, + { + "name": "TAIL", + "default": 64, + "count": 128, + "doc": "After a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s; a loop that starts over a tail picks up from there.", + "labels": null + }, + { + "name": "TYPE", + "default": 0, + "count": 3, + "doc": "LAYER stacks heads at different speeds, DUB records the track into the loop as it plays, SLIDE glides the pitch.", + "labels": [ + "LAYER", + "DUB", + "SLIDE" + ] + }, + { + "name": "DIRT", + "default": 0, + "count": 128, + "doc": "Grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean.", + "labels": null + }, + { + "name": "VAR", + "default": 0, + "count": 4, + "doc": "Variation A-D: octaves, fifths, reversed or random layers; 4 or 8 slices, reversed or ratcheted; up, down, apart or random glides.", + "labels": [ + "A", + "B", + "C", + "D" + ] + }, + { + "name": "WIDE", + "default": 0, + "count": 128, + "doc": "Ping-pong: loops alternate left and right this far; with RAND anywhere in it.", + "labels": null + }, + { + "name": "RAND", + "default": 0, + "count": 128, + "doc": "Chaos: random loop counts, speeds, glide targets and places; 0 as set.", + "labels": null + }, + { + "name": "DGRD", + "default": 0, + "count": 128, + "doc": "Degrade: a tail grows dirtier as it fades; 0 a clean fade.", + "labels": null + } + ], + "compatibility": { + "firmware": "1.40C", + "effectId": 10, + "location": "FX2", + "conflicts": [], + "uiClaims": [], + "limitations": [ + "FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words). On FX1 it passes the track dry.", + "Mono capture: the loops replay the track's mono sum; WIDE spreads LAYER's and SLIDE's extra loops left and right.", + "Loops follow the project's tempo, not yet the pattern's steps, track speed or swing; the owner agreed on issue #2491 that free-running tempo slices are fine until the base has a step clock for effects.", + "After a second of silent input no loop starts; after four seconds any loop or tail stops. The watch listens to the mono sum the ring records, so a source exactly out of phase between L and R counts as silence.", + "It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits.", + "Its worst case is 1.15x stock SPRING REV (three read heads, each with its own fade); four a core fit within a core's budget." + ] + }, + "resources": { + "recorded": "2026-12-03", + "storage": { + "label": "DSP program / state", + "display": "2036 words / 123-word state", + "value": null, + "unit": "see display", + "method": "static", + "conditions": "The USB package 4dc3d0cc (ABI 6): 2,036 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "source": "TESTING.md" + }, + "processing": { + "label": "DSP instruction peak", + "display": "363 instructions/sample per instance", + "value": null, + "unit": "see display", + "method": "emulator", + "conditions": "perf:audit record (perf.py in dsp_host): worst 362.7 executed instructions a sample, the moving pattern with a trig split of 4 frames; unsplit 313.7 to 336.8; static loop 322. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.3 to 13.4 points with it on T1 FX2.", + "source": "evidence/performance.json" + }, + "impact": { + "conditions": "One instance at the dearest setting in dsp_host; on the author's MKII (twin 117eb07f of base ddb56b72) the frame-interrupt price on the test bank (Mang112 95 bank A, Part 1, pattern A01), and six instances admitted at once while playing (device:test).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern, noisy there, read first 0 and each 0, admitted on the empty and the medium pattern.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "high", + "basis": "measured-comparison", + "rationale": "362.7 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.10 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "low", + "basis": "source-estimate", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 7,304 bytes shared.", + "source": "TESTING.md" + } + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-03", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.3 % before, 52.3 % installed and used nowhere, 52.3 % on T1 FX2; CPU meter 69.9 % before, 69.8 % at rest, 70.1 % in use.", + "source": "evidence/cpu-price.json" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4dc3d0cc passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"sounds good, everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 362.7 instructions a sample (1.15x SPRING REV).", + "hardwareStatus": "reported", + "evidenceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ], + "qualification": { + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D.", + "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", + "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." + ] + }, + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ], + "screenshotStyle": "black-and-white" + }, + "moduleVersion": "0.1.1-experimental", + "sourceSha256": "480855130976067c30344888c7302c0801a44424ec0bbfd1dd5346f2cb3ed932", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "cycles": [ + { + "processor": "dsp", + "worstCase": 363, + "maxConfiguration": 1452, + "maxInstances": 8, + "budget": 3120, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 362.7 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 4 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 322. Executed instructions, not chip cycles.", + "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", + "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1363.6 and 1308.8. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "DSP program, the package's effect on each core it runs on", + "space": "dsp-p", + "words": 2036, + "wordBits": 24, + "bytes": 6108, + "scope": "shared" + }, + { + "name": "DSP state per instance, the package's state words", + "space": "dsp-x", + "words": 123, + "wordBits": 24, + "bytes": 369, + "scope": "instance" + }, + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 1196, + "wordBits": 8, + "bytes": 1196, + "scope": "shared" + }, + { + "name": "FX2 slot delay buffer, the stock allocator's 16K Y block reused as the capture ring", + "space": "dsp-y", + "words": 15870, + "wordBits": 24, + "bytes": 47610, + "scope": "instance" + } + ], + "perInstanceBytes": 47979, + "sharedBytes": 7304, + "maxInstances": 8, + "totalBytes": 391136, + "conditions": "From the header of the USB package 4dc3d0cc (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "report": "TESTING.md" + }, + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-03", + "tester": "jrs1717", + "sourceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "summary": "On the author's Octatrack MKII, OS 1.40C, 3 December 2026: npm run test:procedure on package 4dc3d0cc (0.1.1-experimental, the code review's fixes), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve, noisy on this scene, recorded as first 0 and each 0; admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"sounds good, everything survived\". Before the fixes, 0.1.0-experimental (4537ab44) passed the same procedure and the author's stage.", + "limitations": [ + "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", + "Not run: an emulator rehearsal.", + "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", + "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", + "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", + "The price and curve were measured on 4dc3d0cc with device:price --write before the procedure (an update's step 1 checks them), and again in step 9; both agree: frame +0, DSP +11.3 to +13.4 in use." + ], + "report": "TESTING.md" + } + } + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Original code by jrs1717 under the MIT licence in LICENSE: an original design inspired by micro-loop effects in general, starting from the author's own Glitchbox engine; no third-party code, tables, samples or names. Never includes Elektron firmware, extracted routines or tables." + }, + "media": [ + { + "path": "media/ot-location.png", + "captureType": "hardware", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SLIDE), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SLIDE, DIRT, VAR, WIDE, RAND and DGRD.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2 SETUP", + "shows": "location", + "firmware": "1.40C", + "moduleVersion": "0.1.1-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + }, + { + "path": "media/ot-controls.png", + "captureType": "hardware", + "caption": "Press FX2 for the main page: TIME, ACT and SHAP on top, RPT, MIX and TAIL below.", + "alt": "FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.1.1-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + } + ] + }, { "schemaVersion": 2, "id": "analog-bassdrum", diff --git a/src/engine/assets/descriptor-recipes.json b/src/engine/assets/descriptor-recipes.json index fce4479752..d0c9f84ef0 100644 --- a/src/engine/assets/descriptor-recipes.json +++ b/src/engine/assets/descriptor-recipes.json @@ -5732,6 +5732,466 @@ "value": "MODE" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "fxId": 10, + "donorAddress": 1074616560, + "donorSha256": "3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f", + "fx2Slot": 1074618372, + "slotSha256": "79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a", + "sourceSha256": "2ca5087d8ccf38eafe15c361f9439102c23aa3017a48a322a95727af03d7c3d4", + "integers": [ + { + "offset": 3, + "width": 1, + "value": 10 + }, + { + "offset": 94, + "width": 1, + "value": 2 + }, + { + "offset": 95, + "width": 1, + "value": 64 + }, + { + "offset": 96, + "width": 1, + "value": 32 + }, + { + "offset": 97, + "width": 1, + "value": 1 + }, + { + "offset": 98, + "width": 1, + "value": 64 + }, + { + "offset": 99, + "width": 1, + "value": 64 + }, + { + "offset": 100, + "width": 1, + "value": 0 + }, + { + "offset": 101, + "width": 1, + "value": 0 + }, + { + "offset": 102, + "width": 1, + "value": 0 + }, + { + "offset": 103, + "width": 1, + "value": 0 + }, + { + "offset": 104, + "width": 1, + "value": 0 + }, + { + "offset": 105, + "width": 1, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 0 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 206, + "width": 4, + "value": 0 + }, + { + "offset": 254, + "width": 4, + "value": 0 + }, + { + "offset": 210, + "width": 4, + "value": 0 + }, + { + "offset": 258, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 0 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 218, + "width": 4, + "value": 0 + }, + { + "offset": 266, + "width": 4, + "value": 0 + }, + { + "offset": 222, + "width": 4, + "value": 0 + }, + { + "offset": 270, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 0 + }, + { + "offset": 274, + "width": 4, + "value": 0 + }, + { + "offset": 230, + "width": 4, + "value": 0 + }, + { + "offset": 278, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 0 + }, + { + "offset": 282, + "width": 4, + "value": 0 + }, + { + "offset": 238, + "width": 4, + "value": 0 + }, + { + "offset": 286, + "width": 4, + "value": 0 + }, + { + "offset": 242, + "width": 4, + "value": 0 + }, + { + "offset": 290, + "width": 4, + "value": 0 + }, + { + "offset": 246, + "width": 4, + "value": 0 + }, + { + "offset": 294, + "width": 4, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 1073989400 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 298, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 1073989400 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 310, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 1073989400 + }, + { + "offset": 274, + "width": 4, + "value": 1074033236 + }, + { + "offset": 322, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 1073989400 + }, + { + "offset": 282, + "width": 4, + "value": 1074033236 + }, + { + "offset": 330, + "width": 4, + "value": 0 + }, + { + "offset": 154, + "width": 4, + "value": 6 + }, + { + "offset": 106, + "width": 4, + "value": 0 + }, + { + "offset": 158, + "width": 4, + "value": 128 + }, + { + "offset": 110, + "width": 4, + "value": 0 + }, + { + "offset": 162, + "width": 4, + "value": 128 + }, + { + "offset": 114, + "width": 4, + "value": 0 + }, + { + "offset": 166, + "width": 4, + "value": 8 + }, + { + "offset": 118, + "width": 4, + "value": 0 + }, + { + "offset": 170, + "width": 4, + "value": 128 + }, + { + "offset": 122, + "width": 4, + "value": 0 + }, + { + "offset": 174, + "width": 4, + "value": 128 + }, + { + "offset": 126, + "width": 4, + "value": 0 + }, + { + "offset": 178, + "width": 4, + "value": 3 + }, + { + "offset": 130, + "width": 4, + "value": 0 + }, + { + "offset": 182, + "width": 4, + "value": 128 + }, + { + "offset": 134, + "width": 4, + "value": 0 + }, + { + "offset": 186, + "width": 4, + "value": 4 + }, + { + "offset": 138, + "width": 4, + "value": 0 + }, + { + "offset": 190, + "width": 4, + "value": 128 + }, + { + "offset": 142, + "width": 4, + "value": 0 + }, + { + "offset": 194, + "width": 4, + "value": 128 + }, + { + "offset": 146, + "width": 4, + "value": 0 + }, + { + "offset": 198, + "width": 4, + "value": 128 + }, + { + "offset": 150, + "width": 4, + "value": 0 + }, + { + "offset": 398, + "width": 4, + "value": 286331153 + }, + { + "offset": 394, + "width": 4, + "value": 4369 + } + ], + "strings": [ + { + "offset": 4, + "width": 5, + "value": "LOOP" + }, + { + "offset": 9, + "width": 13, + "value": "LOOPBOX" + }, + { + "offset": 22, + "width": 6, + "value": "TIME" + }, + { + "offset": 28, + "width": 6, + "value": "ACT" + }, + { + "offset": 34, + "width": 6, + "value": "SHAP" + }, + { + "offset": 40, + "width": 6, + "value": "RPT" + }, + { + "offset": 46, + "width": 6, + "value": "MIX" + }, + { + "offset": 52, + "width": 6, + "value": "TAIL" + }, + { + "offset": 58, + "width": 6, + "value": "TYPE" + }, + { + "offset": 64, + "width": 6, + "value": "DIRT" + }, + { + "offset": 70, + "width": 6, + "value": "VAR" + }, + { + "offset": 76, + "width": 6, + "value": "WIDE" + }, + { + "offset": 82, + "width": 6, + "value": "RAND" + }, + { + "offset": 88, + "width": 6, + "value": "DGRD" + } + ] } ] } diff --git a/src/engine/assets/menu-recipes.json b/src/engine/assets/menu-recipes.json index 141cd7c4cc..a724299dd5 100644 --- a/src/engine/assets/menu-recipes.json +++ b/src/engine/assets/menu-recipes.json @@ -1202,6 +1202,129 @@ "sha256": "07b8c52ea73b94ee8a395a09e69a4f3c2e6082bbec0ee8e0460971207613eafb" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 0, + "name": "TIME", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ], + "renames": {}, + "wideMaximum": 5, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + }, + { + "namesAddress": 1074623350, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 3, + "name": "RPT", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ], + "renames": {}, + "wideMaximum": 7, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + }, + { + "namesAddress": 1074623350, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 6, + "name": "TYPE", + "labels": [ + "LAYER", + "DUB", + "SLIDE" + ], + "renames": { + "0": { + "6": "LAYER" + }, + "1": { + "6": "DUB" + }, + "2": { + "6": "SLIDE" + } + }, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 166, + "sha256": "17dc25ac9ebeb75a16f0534020201013cb8481d7bfefbe09fc935e32f0237b4e" + }, + { + "namesAddress": 1074623350, + "bytes": 166, + "sha256": "25b80ffcbf4d8083b2c80e5c4e2f8880cce5b2963c6ccb94c55d0c644972cbce" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 8, + "name": "VAR", + "labels": [ + "A", + "B", + "C", + "D" + ], + "renames": {}, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + }, + { + "namesAddress": 1074623350, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + } + ] } ], "repitchPatches": [ diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 2206cdfd1d..9032def611 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "9f95914946a840fa3c9e0c1e698e9d44153532c5", + "sourceCommit": "5a97662951d803332990e82209f810f8f2d4b5c9", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "66e9d69f32f72510f0f7b4aa9329562527f30a8f397634ec5c5f79c4dc66c55b", - "compilerSha256": "3c31dea368ddcf68b3263c2ccda8a1b9c3e222dda1116cca7300fe03b08e6719", + "sourceTreeSha256": "48d24e3d7e9bf87431ca4c5265f81a88be700cfca0f01e149efe4c5109730c2b", + "compilerSha256": "8fa5d6bbc3b71581eeaad29ff43ab90a8278c01041f2536921da09bd27a9a6ee", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -23,6 +23,7 @@ "ringbank": "0.1.0-experimental", "void": "0.1.0-experimental", "fuzzbox": "0.1.0-experimental", + "loopbox": "0.1.1-experimental", "analog-bassdrum": "0.1.7-experimental", "usb-audio-out-tracks-main-cue": "0.4.3-experimental", "quantizer": "0.1.5-experimental", @@ -55,8 +56,8 @@ }, "files": { "dsp-packages.json": { - "bytes": 113150, - "sha256": "b40acc322c9c03f69ad8bc7ab30294e271bcd656bbd93fb42023c7e4dcd24078" + "bytes": 125439, + "sha256": "f1982c64cc610f9815c7c7af87ec36a35ed7d2a5a95e0cdea11e7c8e8b52a10c" }, "resident-dsp.json": { "bytes": 6981, @@ -75,12 +76,12 @@ "sha256": "f4b17e0eb4e297e6dbfc61781fe5aed41262c1e7263e42579184c7cc15fa843e" }, "menu-recipes.json": { - "bytes": 34729, - "sha256": "61507b281a85393e0351158328104d09777face828cd9980dd23682625e9e2d8" + "bytes": 37424, + "sha256": "92d756b001ab49b55a879d6ae9d0822b85c48439fb6a6980836b59a7fd4f7a3b" }, "descriptor-recipes.json": { - "bytes": 108057, - "sha256": "1229ed48a30d2b606533f81e69d03fd9c32e4758bc215101f798ecabedbbaf87" + "bytes": 116599, + "sha256": "f6ddad6cbc95a96cafd0a3b6ede7e5e1635a142a97f00bca82409c62ef0f599b" }, "platform-writes.json": { "bytes": 15585, From ec17692d4a2b46669e6af6e17b705b6fbc093896 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 20:04:05 -0600 Subject: [PATCH 25/32] Loopbox: the procedure record on package 5d3bf7c3 (DUB), steps 1-11 passed, and its edge cases Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/loopbox/TESTING.md | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/sdk/octatrack/modules/loopbox/TESTING.md b/sdk/octatrack/modules/loopbox/TESTING.md index 42e1b6dea3..f1cab15faf 100644 --- a/sdk/octatrack/modules/loopbox/TESTING.md +++ b/sdk/octatrack/modules/loopbox/TESTING.md @@ -13,6 +13,64 @@ Record what you ran, on which build and which unit, and what you saw. "Not teste 3 December 2026, the author's MKII on its flashed base ddb56b72 (OS 1.40C) after a power cycle: package 4dc3d0cc kept with `npm run device -- try --accept` in place of 4537ab44 beside the 26 other kept modules (27 before and after, nothing removed; no crash, stall, freeze or skipped track logged). Asked to play it (suggested: RAND with LAYER, TIME 1/64 with RPT 8 and SHUFL B, SLIDE with trigs), save and reload the Part, power-cycle and check it. Reported: "sounds good, everything survived". +### Test procedure: loopbox (package 5d3bf7c3, DUB in place of SHUFL, the shipped build) 0.1.1-experimental, 2026-12-05 + +Build: revision `a383d6d00ac6`, package `loopbox.mwrm` SHA-256 `5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out `, 616 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | passed | `npm run module:doctor -- --procedure loopbox` | logs/01-software.log | +| 2 | Beside every other module | contract | passed | `npm run modules:compat -- loopbox` | logs/02-compat.log | +| 3 | Name the build | host | passed | | logs/03-build.log | +| 4 | DSP cost model | contract | passed | `node scripts/cycle-scan.mjs check` | logs/04-cost-model.log | +| 5 | Emulator rehearsal | emulator | not run: no emulator session: left out with --no-emulator | | | +| 6 | Read the unit | unit | passed: Part 1 on A01: working = saved, saved once so that RELOAD works at the end | `node scripts/device.mjs status --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs read --socket /tmp/modwerk-share.sock --out /part-start.json`
`node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | logs/06-unit-read.log | +| 7 | Scripted unit pass | unit | passed | `npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry /device-test.md /../loopbox.mwrm` | logs/07-unit-pass.log | +| 8 | Soak | unit | passed: Part 1 on A01: transport stopped, Part 1 on A01 reloaded; working = saved | `node scripts/device.mjs try /../loopbox.mwrm --seconds 420 --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-soak.mjs --seconds 120 --programs 0-3 --pc-channel 11 --auto-channel 11 --log /soak.json`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/08-soak.log | +| 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox.mwrm` | logs/09-cost-unit.log | +| 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | +| 11 | Agent by hand | unit | passed: on 5d3bf7c3, Loopbox on T1 and T5 FX2 (both cores) while the pattern played: TYPE stepped LAYER, DUB, SLIDE (screens); DUB with ACT, MIX and TAIL at 127; DUB VAR D; TYPE to LAYER mid-loop and back to DUB. Health after each: 0 stalls, 0 errors, no crash, CPU 706-710. After STOP: stall none recorded, latest entry 73.0 us late (0 in the guard's 80-190 us window). The sound not judged here; the author heard DUB on 5d3bf7c3 in two RAM trials ("sounds great"). STOP, Part reloaded (working = saved), the trial rolled back | `device try`, `pick:T1:FX2:LOOPBOX`, `pick:T5:FX2:LOOPBOX`, `png:`, `health`, `stall`, `late`, `reload` | type-2.png, h-dub.png, h-dub-d.png, h-dub-back.png | +| 12 | Submitter's own stage | unit | to do: the author's Keep and power cycle on 5d3bf7c3 | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- an effect slot: FX1 and FX2, both DSP cores, eight instances at once; one edited while another plays (docs/MODULE_QUALIFICATION.md#essential-persistence-and-instance-checks--8-october-2026) +- memory: the module pool nearly full; a delay buffer next to it; the largest set it can join (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| DUB records into the loop | new: head 0 writes the window back as it plays; the writer stops | test_dub_records_the_track_into_the_loop; verify.py: DUB A-D looping at every slice, bit for bit; step 11 on the unit | passed | +| DUB keeps its window through the slice | the next chunk must not take a new window | test_dub_keeps_its_window_through_the_slice (TIME 1/2: one window for DUB, several for LAYER) | passed | +| VAR sets how long layers last | IN 0.5, 0.3, 0.15, 0.06 | test_var_sets_how_long_the_old_layers_last (kept A < B < C < D) | passed | +| LAYER and SLIDE unchanged | the write back is s0 itself with IN 0 | test_other_loops_leave_the_ring_as_it_was; verify.py LAYER and SLIDE bit for bit | passed | +| TYPE changed mid-loop (DUB to LAYER and back) | the writer frozen by DUB must record again; the window rule changes | verify.py's knob sweep (TYPE stepped while looping), bit for bit; step 11 on the unit | passed | +| Both DSP cores, six at once | three heads and a ring write every sample | step 7 (T1-T8); step 11 (T1 and T5) | passed: six placed, CPU 729, core 1 peak 773, core 0 peak 856 per mille; two refused by the base for budget, no crash, stall or dropped frame | +| The frame-cost curve, playing | the per-call work on the frame | step 9: `device:price --curve T1,T3,T6,T7` | passed: empty admitted (longest frame 37.2 %), medium admitted (92.4 %), 0 dropped | +| A chunk's events add up to the chunk | the loop keeps the grid | test_a_chunk_lasts_its_grid_while_looping (DUB and LAYER) | passed | +| TIME 1/2 at 30 BPM | the ring's reach | verify.py: 32 chunks, LAYER and DUB, bit for bit | passed in dsp_host; not run on the unit at 30 BPM | +| Silence and the tail | DUB feeds the loop back into itself | verify.py: silence in, silence out at every TYPE's dearest; a burst's tail (DUB) ends in silence; every TYPE falls silent within 6 s after the input stops | passed in dsp_host | +| Persistence | knob bytes saved in the Part | step 12 | the author's stage | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Tested on a unit: package 5d3bf7c3efc0, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage not yet. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). + ### Test procedure: loopbox 0.1.1-experimental (package 4dc3d0cc, the code review's fixes), 2026-12-03 Build: revision `00bc3507a670`, package `loopbox.mwrm` SHA-256 `4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run`, 585 s. Emulator results are not hardware evidence; only what ran on the unit is. From f62851b0e9ca767ad5ecb1e5bb3802f164b2d21f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 4 Dec 2026 20:13:27 -0600 Subject: [PATCH 26/32] Loopbox: the author's stage on 5d3bf7c3 and the qualification record for it (steps 1-11, kept, Part reload and power cycle) Co-Authored-By: Claude Opus 5.5 --- sdk/machines/octatrack/frame-costs.json | 2 +- sdk/octatrack/modules/loopbox/README.md | 2 +- sdk/octatrack/modules/loopbox/TESTING.md | 10 +- .../modules/loopbox/evidence/cpu-price.json | 128 +++++++++--------- .../modules/loopbox/evidence/frame-cost.json | 30 ++-- .../modules/loopbox/octamod.module.json | 51 ++++--- src/catalog/module-documents.json | 51 ++++--- 7 files changed, 138 insertions(+), 136 deletions(-) diff --git a/sdk/machines/octatrack/frame-costs.json b/sdk/machines/octatrack/frame-costs.json index 01007aac51..7a111075bd 100644 --- a/sdk/machines/octatrack/frame-costs.json +++ b/sdk/machines/octatrack/frame-costs.json @@ -11,7 +11,7 @@ "fuzzbox": {"first":0.4,"each":0.4,"rest":0,"points":[0.2,-0.1,-0.6,0.4],"measured":"fuzzbox 0.1.0-experimental on T1 T3 T6 T7: Mang112 95 bank A, Part 1 (T1 and T2 FX2 on DELAY), stopped; picks on the empty A02, readings on A05 at the project tempo (trigs on steps 1/5/9/13 of T1-T4, T6, T7; every track a Static machine with its sample); base twin 117eb07f of ddb56b72 (no usb-input, no stream-channel); 8 s a reading; 2026-12-04 (evidence/frame-cost.json)"}, "grain": {"first":16.1,"each":8.6,"rest":0.4,"points":[16.1,24.7],"measured":"grain 0.2.0-experimental on T1 T3: A01 at 120 BPM, 16 steps, trigs on steps 1/5/9/13 of T1-T4, T6, T7: T1 and T3 Flex with a loaded 16-bit stereo sample (0.91 MB), T2 and T4 stock samples with time stretch off, T6 and T7 no sample, T5 and T8 empty; picks on empty A02; the author's MKI; package 520215cb; base 4c7eb79b (development base booted in RAM); 8 s a reading; 2026-11-30 (evidence/frame-cost.json)","paused":4.7}, "lofi2": {"first":1,"each":0,"rest":0,"points":[1,-1.5,-0.3,-1.3],"measured":"lofi2 0.1.1-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples), picks on empty C02; owner's MKII; base 0.8 twin 28 053fd054; 8 s a reading; 2026-11-22"}, - "loopbox": {"first":0,"each":0,"rest":0,"points":[-6.9,-0.3,-6.2,-6.5],"measured":"loopbox 0.1.1-experimental on T1 T3 T6 T7: the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-03 (evidence/frame-cost.json)"}, + "loopbox": {"first":0,"each":0,"rest":2,"points":[-3.7,-1.4,-7.2,-3.7],"measured":"loopbox 0.1.1-experimental on T1 T3 T6 T7: the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 8 s a reading; 2026-12-05 (evidence/frame-cost.json)"}, "mackity": {"first":0.9,"each":0.9,"rest":0,"points":[-1.8,-2.2,0.9,-2.9],"measured":"mackity 0.1.0-experimental on T1 T3 T6 T7: Project on the owner's development unit, bank C, Part 1 reloaded in RAM to its saved copy; picks on the empty C02, readings on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7) at the project tempo; transport played by the tool; base development twin 8fd6d456 of base 0.8.1 (eb6679620d0c9ed7), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-25 (evidence/frame-cost.json)"}, "midiverb": {"first":2,"each":2,"rest":0,"points":[0.9,0.2,2.2,1],"measured":"midiverb 0.2.0-experimental on T1 T3 T6 T7: Dev17 bank C: C04 Part 2 (working = saved), picks on the empty C02, the curve on C04 (trigs on steps 1/5/9/13 of T1-T4, T6, T7), transport stopped; twin ed5474c6 of base 0.8.3 (main 80ea1e584); base development twin ed5474c6 of base 0.8.3 (main 80ea1e584), the owner's MKII, OS 1.40C; 8 s a reading; 2026-11-27 (evidence/frame-cost.json)"}, "miniverb": {"first":1.5,"each":0,"rest":0,"points":[1.5,1.4,1.2,1.2],"measured":"miniverb 0.2.3-experimental on T1 T3 T6 T7: Dev17 C04 at 126 BPM, trigs on steps 1/5/9/13 of T1-T4, T6, T7 (T2 and T4 play samples; stock alone 79.4 %), picks on empty C02; base dce1d30e (0.8 twin); 8 s a reading; 2026-11-22 (npm run device:price -- --curve)"}, diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 4e3a416abe..7a7a86e185 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -1,6 +1,6 @@ # Loopbox -Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 4dc3d0cc, steps 1-11); the author kept it, listened and power-cycled: "sounds good, everything survived". +Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 5d3bf7c3, steps 1-11, with DUB); the author kept it, played it and power-cycled: "everything survived". ## Overview diff --git a/sdk/octatrack/modules/loopbox/TESTING.md b/sdk/octatrack/modules/loopbox/TESTING.md index f1cab15faf..c275030968 100644 --- a/sdk/octatrack/modules/loopbox/TESTING.md +++ b/sdk/octatrack/modules/loopbox/TESTING.md @@ -30,7 +30,7 @@ Build: revision `a383d6d00ac6`, package `loopbox.mwrm` SHA-256 `5d3bf7c3efc0fe1b | 9 | Cost on the unit | unit | passed | `npm run device:price -- --share /tmp/modwerk-share.sock --out /price.json --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 /../loopbox.mwrm` | logs/09-cost-unit.log | | 10 | Put back | unit | passed: Part 1 on A01: nothing to put back; working = saved | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-part-state.mjs restore --socket /tmp/modwerk-share.sock --start /part-start.json` | logs/10-restore.log | | 11 | Agent by hand | unit | passed: on 5d3bf7c3, Loopbox on T1 and T5 FX2 (both cores) while the pattern played: TYPE stepped LAYER, DUB, SLIDE (screens); DUB with ACT, MIX and TAIL at 127; DUB VAR D; TYPE to LAYER mid-loop and back to DUB. Health after each: 0 stalls, 0 errors, no crash, CPU 706-710. After STOP: stall none recorded, latest entry 73.0 us late (0 in the guard's 80-190 us window). The sound not judged here; the author heard DUB on 5d3bf7c3 in two RAM trials ("sounds great"). STOP, Part reloaded (working = saved), the trial rolled back | `device try`, `pick:T1:FX2:LOOPBOX`, `pick:T5:FX2:LOOPBOX`, `png:`, `health`, `stall`, `late`, `reload` | type-2.png, h-dub.png, h-dub-d.png, h-dub-back.png | -| 12 | Submitter's own stage | unit | to do: the author's Keep and power cycle on 5d3bf7c3 | | | +| 12 | Submitter's own stage | unit | passed (reported by the author): kept on the flashed base, played, Part saved and reloaded, power cycle; see below | | | #### Edge cases for this change @@ -56,7 +56,7 @@ Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.m | A chunk's events add up to the chunk | the loop keeps the grid | test_a_chunk_lasts_its_grid_while_looping (DUB and LAYER) | passed | | TIME 1/2 at 30 BPM | the ring's reach | verify.py: 32 chunks, LAYER and DUB, bit for bit | passed in dsp_host; not run on the unit at 30 BPM | | Silence and the tail | DUB feeds the loop back into itself | verify.py: silence in, silence out at every TYPE's dearest; a burst's tail (DUB) ends in silence; every TYPE falls silent within 6 s after the input stops | passed in dsp_host | -| Persistence | knob bytes saved in the Part | step 12 | the author's stage | +| Persistence | knob bytes saved in the Part | step 12, the author on the flashed base | passed (reported by the author): "everything survived" | #### Left for the submitter at their unit @@ -68,9 +68,13 @@ Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.m #### For the pull request -Tested on a unit: package 5d3bf7c3efc0, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage not yet. +Tested on a unit: package 5d3bf7c3efc0, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11; the developer's stage on 5d3bf7c3: kept, played, Part reload and power cycle survived. Edge cases: the table above, one row a case (or "Edge cases: none, because …"). +#### The author's stage on 5d3bf7c3 (as reported) + +5 December 2026 (UTC), the author's MKII on their flashed base ddb56b72 (OS 1.40C): package 5d3bf7c3 kept in place of 4dc3d0cc beside the card's 20 other modules (`npm run device -- try loopbox.mwrm --seconds 60 --accept`: no crash, stall, freeze or skipped track; the kept set otherwise unchanged). The author played Loopbox (DUB among the types) on a track's FX2, saved the Part, reloaded it and power-cycled: "everything survived". Before the procedure they heard DUB on the same package in two RAM trials: "sounds great". + ### Test procedure: loopbox 0.1.1-experimental (package 4dc3d0cc, the code review's fixes), 2026-12-03 Build: revision `00bc3507a670`, package `loopbox.mwrm` SHA-256 `4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad`. `npm run test:procedure -- loopbox --package /../loopbox.mwrm --share /tmp/modwerk-share.sock --no-emulator --soak-pc-channel 11 --soak-auto-channel 11 --out /../run`, 585 s. Emulator results are not hardware evidence; only what ran on the unit is. diff --git a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json index e841901954..a167d7fbab 100644 --- a/sdk/octatrack/modules/loopbox/evidence/cpu-price.json +++ b/sdk/octatrack/modules/loopbox/evidence/cpu-price.json @@ -8,88 +8,88 @@ }, "seconds": 8, "readings": 3, - "measuredAt": "2026-12-03T03:38:17.136Z", + "measuredAt": "2026-12-05T01:56:26.055Z", "result": { "id": "loopbox", "version": "0.1.1-experimental", - "packageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "packageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", "before": { - "frame": 52.3, - "frameMax": 91.3, - "frames": 67313, + "frame": 54.1, + "frameMax": 92.1, + "frames": 67204, "skipped": 0, - "cpu": 69.9, - "dsp1to4": 37.7, - "dsp5to8": 46.6, - "dsp1to4Peak": 39.5, - "dsp5to8Peak": 48.3, + "cpu": 71.6, + "dsp1to4": 40.7, + "dsp5to8": 49.2, + "dsp1to4Peak": 41.5, + "dsp5to8Peak": 50.6, "readings": 3, "spread": { "frame": 0, - "cpu": 0.5, - "dsp1to4": 0, - "dsp5to8": 1.3, - "frameMax": 6.5, + "cpu": 0.6, + "dsp1to4": 2.5, + "dsp5to8": 0, + "frameMax": 3.8, "dsp1to4Peak": 0.1, - "dsp5to8Peak": 0.4 + "dsp5to8Peak": 0.9 } }, "atRest": { - "frame": 52.3, - "frameMax": 92.2, - "frames": 67312, + "frame": 54.1, + "frameMax": 94.1, + "frames": 67174, "skipped": 0, - "cpu": 69.8, - "dsp1to4": 37.7, - "dsp5to8": 45.5, - "dsp1to4Peak": 39.5, - "dsp5to8Peak": 48.3, + "cpu": 71.4, + "dsp1to4": 42.3, + "dsp5to8": 48.9, + "dsp1to4Peak": 41.4, + "dsp5to8Peak": 50.6, "readings": 3, "spread": { "frame": 0, - "cpu": 0.4, - "dsp1to4": 0, - "dsp5to8": 1.4, - "frameMax": 1.6, + "cpu": 0.7, + "dsp1to4": 7.7, + "dsp5to8": 0.4, + "frameMax": 7.1, "dsp1to4Peak": 0.1, - "dsp5to8Peak": 0.4 + "dsp5to8Peak": 1.2 } }, "atRestAdds": { "frame": 0, - "cpu": -0.1, - "dsp1to4": 0, - "dsp5to8": -1.1, - "dsp1to4Peak": 0, + "cpu": -0.2, + "dsp1to4": 1.6, + "dsp5to8": -0.3, + "dsp1to4Peak": -0.1, "dsp5to8Peak": 0 }, "inUse": { - "frame": 52.3, - "frameMax": 87.2, - "frames": 67326, + "frame": 53.1, + "frameMax": 91.8, + "frames": 67178, "skipped": 0, - "cpu": 70.1, - "dsp1to4": 51.1, - "dsp5to8": 47.3, - "dsp1to4Peak": 53.8, - "dsp5to8Peak": 47.9, + "cpu": 70.5, + "dsp1to4": 51.5, + "dsp5to8": 49.2, + "dsp1to4Peak": 54.2, + "dsp5to8Peak": 50.2, "readings": 3, "spread": { - "frame": 0, - "cpu": 0.3, - "dsp1to4": 2.7, + "frame": 0.7, + "cpu": 0.4, + "dsp1to4": 0.8, "dsp5to8": 0, - "frameMax": 1, - "dsp1to4Peak": 2.4, - "dsp5to8Peak": 0.1 + "frameMax": 6.1, + "dsp1to4Peak": 0.1, + "dsp5to8Peak": 0.5 } }, "inUseAdds": { - "frame": 0, - "cpu": 0.2, - "dsp1to4": 13.4, - "dsp5to8": 0.7, - "dsp1to4Peak": 14.3, + "frame": -1, + "cpu": -1.1, + "dsp1to4": 10.8, + "dsp5to8": 0, + "dsp1to4Peak": 12.7, "dsp5to8Peak": -0.4 }, "inUseOn": "T1 FX2", @@ -101,17 +101,17 @@ "T7" ], "points": [ - 92.2, - 85.3, - 91.9, - 86, - 85.7 + 94.1, + 90.4, + 92.7, + 86.9, + 90.4 ], "adds": [ - -6.9, - -0.3, - -6.2, - -6.5 + -3.7, + -1.4, + -7.2, + -3.7 ], "first": 0, "each": 0, @@ -123,8 +123,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.4, - "frame": 27.5, + "frameMax": 37.2, + "frame": 28, "dropped": 0, "stalls": 0 }, @@ -134,8 +134,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 90.9, - "frame": 52.4, + "frameMax": 92.4, + "frame": 52.8, "dropped": 0, "stalls": 0 } diff --git a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json index 3bf1de4883..9d0313b3d5 100644 --- a/sdk/octatrack/modules/loopbox/evidence/frame-cost.json +++ b/sdk/octatrack/modules/loopbox/evidence/frame-cost.json @@ -4,28 +4,28 @@ "base": "development twin 117eb07f of base ddb56b72, MKII, OS 1.40C", "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", "seconds": 8, - "measuredAt": "2026-12-03T03:38:17.136Z", + "measuredAt": "2026-12-05T01:56:26.055Z", "tracks": [ "T1", "T3", "T6", "T7" ], - "rest": 0, + "rest": 2, "first": 0, "each": 0, "points": [ - 92.2, - 85.3, - 91.9, - 86, - 85.7 + 94.1, + 90.4, + 92.7, + 86.9, + 90.4 ], "adds": [ - -6.9, - -0.3, - -6.2, - -6.5 + -3.7, + -1.4, + -7.2, + -3.7 ], "admission": [ { @@ -34,8 +34,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 36.4, - "frame": 27.5, + "frameMax": 37.2, + "frame": 28, "dropped": 0, "stalls": 0 }, @@ -45,8 +45,8 @@ "track": "T1", "seconds": 8, "admitted": true, - "frameMax": 90.9, - "frame": 52.4, + "frameMax": 92.4, + "frame": 52.8, "dropped": 0, "stalls": 0 } diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index 108b17ef02..03c0896578 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -155,23 +155,23 @@ "effectId": 10 }, "resources": { - "recorded": "2026-12-03", + "recorded": "2026-12-05", "storage": { "label": "DSP program / state", - "display": "2036 words / 123-word state", + "display": "1854 words / 123-word state", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 4dc3d0cc (ABI 6): 2,036 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "conditions": "The USB package 5d3bf7c3 (ABI 6): 1,854 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", "source": "TESTING.md" }, "processing": { "label": "DSP instruction peak", - "display": "363 instructions/sample per instance", + "display": "360 instructions/sample per instance", "value": null, "unit": "see display", "method": "emulator", - "conditions": "perf:audit record (perf.py in dsp_host): worst 362.7 executed instructions a sample, the moving pattern with a trig split of 4 frames; unsplit 313.7 to 336.8; static loop 322. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.3 to 13.4 points with it on T1 FX2.", + "conditions": "perf:audit record (perf.py in dsp_host): worst 360.1 executed instructions a sample, the dearest SLIDE setting with a trig split of 2 frames; unsplit 325.0 to 334.4; static loop 332. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 10.8 to 12.7 points with it on T1 FX2.", "source": "evidence/performance.json" }, "cpuPrice": { @@ -179,8 +179,8 @@ "unit": "percent-of-frame", "measure": "frame-interrupt", "tool": "npm run device:price -- --write", - "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.3 % before, 52.3 % installed and used nowhere, 52.3 % on T1 FX2; CPU meter 69.9 % before, 69.8 % at rest, 70.1 % in use.", + "date": "2026-12-05", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 54.1 % before, 54.1 % installed and used nowhere, 53.1 % on T1 FX2; CPU meter 71.6 % before, 71.4 % at rest, 70.5 % in use.", "source": "evidence/cpu-price.json" }, "impact": { @@ -194,7 +194,7 @@ "dsp": { "level": "high", "basis": "measured-comparison", - "rationale": "362.7 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.10 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", + "rationale": "360.1 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.09 of DJ EQ's 330.94): a ring write and three read heads (head 0 also writing DUB's loop back), each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", "source": "evidence/performance.json" }, "memory": { @@ -207,9 +207,9 @@ }, "tests": { "report": "TESTING.md", - "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4dc3d0cc passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"sounds good, everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 362.7 instructions a sample (1.15x SPRING REV).", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 5d3bf7c3 (DUB in place of SHUFL) passed steps 1-11 (beside every other module, both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve played; by hand DUB and a TYPE change mid-loop); the author kept 5d3bf7c3 beside 20 modules, played, saved and reloaded the Part and power-cycled: \"everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR, including DUB's write back; perf:audit worst 360.1 instructions a sample.", "hardwareStatus": "reported", - "evidenceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "evidenceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", @@ -217,7 +217,7 @@ ], "qualification": { "moduleVersion": "0.1.1-experimental", - "sourceSha256": "0ca419c85975178cd74b7dc0f5c76085f076cac1d5ea8f31cf4546df3e65fb1f", + "sourceSha256": "a5822557dc420f2be6f59d999452774d6e8e78ac9c5a96bb62d1425dd951f103", "cycles": [ { "processor": "dsp", @@ -228,10 +228,10 @@ "unit": "cycles/sample", "method": "emulator", "conditions": { - "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 362.7 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 4 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 322. Executed instructions, not chip cycles.", + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 360.1 executed instructions at the dearest SLIDE setting with a trig split of 2 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 332. Executed instructions, not chip cycles.", "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", - "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1363.6 and 1308.8. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1439.5 and 1355.1. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." }, "report": "evidence/performance.json" @@ -242,9 +242,9 @@ { "name": "DSP program, the package's effect on each core it runs on", "space": "dsp-p", - "words": 2036, + "words": 1854, "wordBits": 24, - "bytes": 6108, + "bytes": 5562, "scope": "shared" }, { @@ -273,30 +273,29 @@ } ], "perInstanceBytes": 47979, - "sharedBytes": 7304, + "sharedBytes": 6758, "maxInstances": 8, - "totalBytes": 391136, - "conditions": "From the header of the USB package 4dc3d0cc (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "totalBytes": 390590, + "conditions": "From the header of the USB package 5d3bf7c3 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", "report": "TESTING.md" }, - "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", "hardware": { "kind": "functional", "status": "reported", "model": "MKII", - "testedOn": "2026-12-03", + "testedOn": "2026-12-05", "tester": "jrs1717", - "sourceRevision": "00bc3507a670308333473d0598d513e40dcb7386", - "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", - "summary": "On the author's Octatrack MKII, OS 1.40C, 3 December 2026: npm run test:procedure on package 4dc3d0cc (0.1.1-experimental, the code review's fixes), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve, noisy on this scene, recorded as first 0 and each 0; admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"sounds good, everything survived\". Before the fixes, 0.1.0-experimental (4537ab44) passed the same procedure and the author's stage.", + "sourceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", + "summary": "On the author's Octatrack MKII, OS 1.40C, 5 December 2026 (UTC): npm run test:procedure on package 5d3bf7c3 (0.1.1-experimental with DUB in place of SHUFL), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the check beside every other module, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (the curve played, admitted on the empty and the medium pattern, longest frame 92.4 %) and putting the Part back; by hand, on T1 and T5 FX2 while playing, TYPE stepped through LAYER, DUB and SLIDE, DUB with ACT, MIX and TAIL at 127, DUB VAR D, and TYPE changed mid-loop, with no stall, error or crash. The author heard DUB on the same package in two RAM trials (\"sounds great\"), then kept it in place of 4dc3d0cc on the flashed base beside 20 modules, played it, saved and reloaded the Part and power-cycled: \"everything survived\".", "limitations": [ - "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", "Not run: an emulator rehearsal.", "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", - "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host, for LAYER and DUB.", "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", - "The price and curve were measured on 4dc3d0cc with device:price --write before the procedure (an update's step 1 checks them), and again in step 9; both agree: frame +0, DSP +11.3 to +13.4 in use." + "The screens were captured on package 4dc3d0cc; the controls and their names are the same, but TYPE's middle value is now DUB (it was SHUFL)." ], "report": "TESTING.md" }, diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 99c0fe3854..13442d98a5 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -6027,23 +6027,23 @@ ] }, "resources": { - "recorded": "2026-12-03", + "recorded": "2026-12-05", "storage": { "label": "DSP program / state", - "display": "2036 words / 123-word state", + "display": "1854 words / 123-word state", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 4dc3d0cc (ABI 6): 2,036 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "conditions": "The USB package 5d3bf7c3 (ABI 6): 1,854 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", "source": "TESTING.md" }, "processing": { "label": "DSP instruction peak", - "display": "363 instructions/sample per instance", + "display": "360 instructions/sample per instance", "value": null, "unit": "see display", "method": "emulator", - "conditions": "perf:audit record (perf.py in dsp_host): worst 362.7 executed instructions a sample, the moving pattern with a trig split of 4 frames; unsplit 313.7 to 336.8; static loop 322. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 11.3 to 13.4 points with it on T1 FX2.", + "conditions": "perf:audit record (perf.py in dsp_host): worst 360.1 executed instructions a sample, the dearest SLIDE setting with a trig split of 2 frames; unsplit 325.0 to 334.4; static loop 332. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 10.8 to 12.7 points with it on T1 FX2.", "source": "evidence/performance.json" }, "impact": { @@ -6057,7 +6057,7 @@ "dsp": { "level": "high", "basis": "measured-comparison", - "rationale": "362.7 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.10 of DJ EQ's 330.94): a ring write and three read heads, each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", + "rationale": "360.1 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.09 of DJ EQ's 330.94): a ring write and three read heads (head 0 also writing DUB's loop back), each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", "source": "evidence/performance.json" }, "memory": { @@ -6072,16 +6072,16 @@ "unit": "percent-of-frame", "measure": "frame-interrupt", "tool": "npm run device:price -- --write", - "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 52.3 % before, 52.3 % installed and used nowhere, 52.3 % on T1 FX2; CPU meter 69.9 % before, 69.8 % at rest, 70.1 % in use.", + "date": "2026-12-05", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 54.1 % before, 54.1 % installed and used nowhere, 53.1 % on T1 FX2; CPU meter 71.6 % before, 71.4 % at rest, 70.5 % in use.", "source": "evidence/cpu-price.json" } }, "tests": { "report": "TESTING.md", - "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 4dc3d0cc passed steps 1-11 (both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve, TIME 1/2 with TAIL and WIDE by hand); the author kept it beside 26 modules, listened, saved the Part and power-cycled: \"sounds good, everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR; perf:audit worst 362.7 instructions a sample (1.15x SPRING REV).", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 5d3bf7c3 (DUB in place of SHUFL) passed steps 1-11 (beside every other module, both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve played; by hand DUB and a TYPE change mid-loop); the author kept 5d3bf7c3 beside 20 modules, played, saved and reloaded the Part and power-cycled: \"everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR, including DUB's write back; perf:audit worst 360.1 instructions a sample.", "hardwareStatus": "reported", - "evidenceRevision": "00bc3507a670308333473d0598d513e40dcb7386", + "evidenceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", @@ -6105,8 +6105,8 @@ "screenshotStyle": "black-and-white" }, "moduleVersion": "0.1.1-experimental", - "sourceSha256": "480855130976067c30344888c7302c0801a44424ec0bbfd1dd5346f2cb3ed932", - "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", + "sourceSha256": "a5822557dc420f2be6f59d999452774d6e8e78ac9c5a96bb62d1425dd951f103", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", "cycles": [ { "processor": "dsp", @@ -6117,10 +6117,10 @@ "unit": "cycles/sample", "method": "emulator", "conditions": { - "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 362.7 executed instructions for the moving pattern (every slot swept, TIME, RPT, TYPE and VAR stepped, everything jumped every 37 blocks) with a trig split of 4 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 322. Executed instructions, not chip cycles.", + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 360.1 executed instructions at the dearest SLIDE setting with a trig split of 2 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 332. Executed instructions, not chip cycles.", "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", - "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1363.6 and 1308.8. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1439.5 and 1355.1. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." }, "report": "evidence/performance.json" @@ -6131,9 +6131,9 @@ { "name": "DSP program, the package's effect on each core it runs on", "space": "dsp-p", - "words": 2036, + "words": 1854, "wordBits": 24, - "bytes": 6108, + "bytes": 5562, "scope": "shared" }, { @@ -6162,29 +6162,28 @@ } ], "perInstanceBytes": 47979, - "sharedBytes": 7304, + "sharedBytes": 6758, "maxInstances": 8, - "totalBytes": 391136, - "conditions": "From the header of the USB package 4dc3d0cc (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "totalBytes": 390590, + "conditions": "From the header of the USB package 5d3bf7c3 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", "report": "TESTING.md" }, "hardware": { "kind": "functional", "status": "reported", "model": "MKII", - "testedOn": "2026-12-03", + "testedOn": "2026-12-05", "tester": "jrs1717", - "sourceRevision": "00bc3507a670308333473d0598d513e40dcb7386", - "imageSha256": "4dc3d0ccfef94b8c2ed2c4604065a7ed4ca1d9387b606e4725637a164766f2ad", - "summary": "On the author's Octatrack MKII, OS 1.40C, 3 December 2026: npm run test:procedure on package 4dc3d0cc (0.1.1-experimental, the code review's fixes), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (0 % of a frame at rest and in use; the curve, noisy on this scene, recorded as first 0 and each 0; admitted on the empty and the medium pattern) and putting the Part back; by hand, TIME 1/2, RPT 1, TAIL 127 and WIDE 127 played 8 s with no late entry in the guard's window, stall or crash. The author's own stage on the same package, on the flashed base beside 26 kept modules: listened, saved and reloaded the Part, power-cycled; reported \"sounds good, everything survived\". Before the fixes, 0.1.0-experimental (4537ab44) passed the same procedure and the author's stage.", + "sourceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", + "summary": "On the author's Octatrack MKII, OS 1.40C, 5 December 2026 (UTC): npm run test:procedure on package 5d3bf7c3 (0.1.1-experimental with DUB in place of SHUFL), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the check beside every other module, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (the curve played, admitted on the empty and the medium pattern, longest frame 92.4 %) and putting the Part back; by hand, on T1 and T5 FX2 while playing, TYPE stepped through LAYER, DUB and SLIDE, DUB with ACT, MIX and TAIL at 127, DUB VAR D, and TYPE changed mid-loop, with no stall, error or crash. The author heard DUB on the same package in two RAM trials (\"sounds great\"), then kept it in place of 4dc3d0cc on the flashed base beside 20 modules, played it, saved and reloaded the Part and power-cycled: \"everything survived\".", "limitations": [ - "Not run: beside every other module on the unit; module:doctor judges its compatibility with every module.", "Not run: an emulator rehearsal.", "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", - "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host, for LAYER and DUB.", "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", - "The price and curve were measured on 4dc3d0cc with device:price --write before the procedure (an update's step 1 checks them), and again in step 9; both agree: frame +0, DSP +11.3 to +13.4 in use." + "The screens were captured on package 4dc3d0cc; the controls and their names are the same, but TYPE's middle value is now DUB (it was SHUFL)." ], "report": "TESTING.md" } From 4db21dfc6efbd21431484650adb7b77c4d5befb6 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 01:16:24 -0600 Subject: [PATCH 27/32] Loopbox: the card draws and describes DUB; the README says how many passes a DUB slice gives, and the tutorial sets TIME 1/2 and RPT 1 for DUB Text and the thumbnail only: the engine and package are still 5d3bf7c3 (qualification rehashed). Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/loopbox/README.md | 6 +++--- sdk/octatrack/modules/loopbox/octamod.module.json | 4 ++-- .../modules/loopbox/presentation/thumbnail.svg | 14 ++++++-------- src/catalog/module-documents.json | 4 ++-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sdk/octatrack/modules/loopbox/README.md b/sdk/octatrack/modules/loopbox/README.md index 7a7a86e185..7ab7b924cb 100644 --- a/sdk/octatrack/modules/loopbox/README.md +++ b/sdk/octatrack/modules/loopbox/README.md @@ -6,7 +6,7 @@ Version 0.1.1-experimental · by @jrs1717 · the test procedure passed on the au Loopbox is an automatic micro-looper for an audio track's FX2 slot. It keeps the last third of a second of the track and, on a note grid at the project's tempo, loops what was just played: - **LAYER** stacks three loops of the same audio at different speeds. -- **DUB** records the live track into the loop as it plays, sound-on-sound: each pass keeps the old layers a little quieter and adds what you play, so the loop builds and smears like a short tape loop with the record head on. +- **DUB** records the live track into the loop as it plays, sound-on-sound: each pass keeps the old layers a little quieter and adds what you play, so the loop builds and smears like a short tape loop with the record head on. It builds within one TIME slice and starts on fresh audio at the next, so how far it builds depends on how many passes fit in a slice: at 120 BPM, TIME 1/16 with RPT 2 gives 2 passes of 62.5 ms (close to a plain repeat), 1/8 gives 4, and 1/2 with RPT 1 gives 8 passes of 125 ms. Longer slices and a low RPT build the most. - **SLIDE** glides two overlapping loops in pitch. Each type has variations A to D. Each read head fades in and out of the loop by its own position, so loops at any speed are click-free. When a new loop comes along, the heads change over to it one by one as they come round, so old and new loops overlap for a moment instead of leaving a gap. MIX sets how far the loops replace the track, and TAIL lets a loop ring on after it ends. @@ -23,7 +23,7 @@ Each type has variations A to D. Each read head fades in and out of the loop by | Main | F | TAIL | 0-127 | 64 | After a loop, its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s. A loop that starts over a tail picks up from there. | | Setup | A | TYPE | LAYER, DUB, SLIDE | LAYER | Which kind of loop (above). | | Setup | B | DIRT | 0-127 | 0 | Grit on the loops: sample-rate reduction, harder crush and clipping drive. | -| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. DUB: how long the old layers last, each pass keeping A half of the last, B 70 %, C 85 %, D 94 % (nearly endless, building slowly). SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed; each glide is even in semitones. | +| Setup | C | VAR | A-D | A | LAYER: A octaves up and down, B a fifth up and a fourth down, C reversed and an octave down, D random speeds. DUB: how long the old layers last, each pass keeping A half of the last, B 70 %, C 85 %, D 94 % (the longest-lasting). SLIDE: A both up an octave, B both down, C one up and one down, D both to a random speed; each glide is even in semitones. | | Setup | D | WIDE | 0-127 | 0 | Stereo: LAYER's and SLIDE's extra loops spread left and right this far; DUB's passes ping-pong. | | Setup | E | RAND | 0-127 | 0 | Chaos: random loop counts, speeds, glide targets and places. | | Setup | F | DGRD | 0-127 | 0 | Degrade: a tail grows dirtier as it fades. | @@ -35,7 +35,7 @@ Select an audio track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end ## Quick tutorial 1. Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices. -2. Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D. On DUB, play or change the track while a loop runs to hear it layered in. +2. Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D. For DUB, set TIME to 1/2 and RPT to 1 so each loop gets eight passes, then play or change the track while a loop runs to hear it layered in. 3. Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right. 4. Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone. diff --git a/sdk/octatrack/modules/loopbox/octamod.module.json b/sdk/octatrack/modules/loopbox/octamod.module.json index 03c0896578..3307b9d67b 100644 --- a/sdk/octatrack/modules/loopbox/octamod.module.json +++ b/sdk/octatrack/modules/loopbox/octamod.module.json @@ -25,7 +25,7 @@ ], "usage": [ "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", - "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try DUB and SLIDE." + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SLIDE, and DUB at TIME 1/2 and RPT 1, where each loop gets eight passes to build." ] }, "controls": [ @@ -217,7 +217,7 @@ ], "qualification": { "moduleVersion": "0.1.1-experimental", - "sourceSha256": "a5822557dc420f2be6f59d999452774d6e8e78ac9c5a96bb62d1425dd951f103", + "sourceSha256": "eacda55bb3aed90f0dade4d5c15fec03fb63adf85a727be81d6a9b43144d80bb", "cycles": [ { "processor": "dsp", diff --git a/sdk/octatrack/modules/loopbox/presentation/thumbnail.svg b/sdk/octatrack/modules/loopbox/presentation/thumbnail.svg index a6f0bb4b2c..5ca81bff7a 100644 --- a/sdk/octatrack/modules/loopbox/presentation/thumbnail.svg +++ b/sdk/octatrack/modules/loopbox/presentation/thumbnail.svg @@ -1,6 +1,6 @@ Loopbox — the latest audio, looped three ways - Original illustration: one short loop of a track and what each type makes of it. LAYER stacks the loop at its speed with one twice as fast and one half as fast; SHUFL cuts it into slices and plays them in a new order; SLIDE glides two overlapping loops up in pitch. A conceptual drawing, not a measured render or an Octatrack screenshot. + Original illustration: one short loop of a track and what each type makes of it. LAYER stacks the loop at its speed with one twice as fast and one half as fast; DUB records the live track into the loop on every pass, each pass a little quieter under the new one; SLIDE glides two overlapping loops up in pitch. A conceptual drawing, not a measured render or an Octatrack screenshot. @@ -9,7 +9,7 @@ TIME · ACT · RPT MIX · TAIL LAYER - SHUFL + DUB SLIDE @@ -23,22 +23,20 @@ - - - - - + + + - 3142 + + 1x2x½ diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 13442d98a5..4912cee0a4 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -5897,7 +5897,7 @@ ], "usage": [ "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", - "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try DUB and SLIDE." + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SLIDE, and DUB at TIME 1/2 and RPT 1, where each loop gets eight passes to build." ] }, "controls": [ @@ -6105,7 +6105,7 @@ "screenshotStyle": "black-and-white" }, "moduleVersion": "0.1.1-experimental", - "sourceSha256": "a5822557dc420f2be6f59d999452774d6e8e78ac9c5a96bb62d1425dd951f103", + "sourceSha256": "eacda55bb3aed90f0dade4d5c15fec03fb63adf85a727be81d6a9b43144d80bb", "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", "cycles": [ { From c9038e75155b20a83b009a1bfb8c3d7f7260669c Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 04:46:07 -0600 Subject: [PATCH 28/32] Loopbox: the catalogue regenerated after main (Glitchbox listed beside it) Co-Authored-By: Claude Opus 5.5 --- src/catalog/module-documents.json | 373 ++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 0847428b8b..67b7a79cff 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -6234,6 +6234,379 @@ } ] }, + { + "schemaVersion": 2, + "id": "loopbox", + "key": "LOOPBOX", + "name": "Loopbox", + "version": "0.1.1-experimental", + "category": "effects", + "access": { + "location": "FX2 SETUP page of any audio track (the effect list).", + "steps": [ + "Select an audio track with its TRACK key.", + "Hold FUNC and press FX2 to open the effect's SETUP, turn LEVEL to LOOPBOX and press YES.", + "Press FX2 for TIME, ACT, SHAP, RPT, MIX and TAIL; hold FUNC and press FX2 again for TYPE (A), DIRT (B), VAR (C), WIDE (D), RAND (E) and DGRD (F)." + ], + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ] + }, + "author": { + "github": "jrs1717", + "credits": [ + "jrs1717" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "LOOP", + "family": "Looper", + "summary": "Automatic micro-loops on FX2: overlapping loops at different speeds, slices replayed in a new order, or loops gliding in pitch, all at the project's tempo.", + "overview": "Loopbox keeps the last third of a second of the track. On a note grid at the project's tempo, ACT decides when a slice loops; a loop plays the latest audio with three read heads on one window. LAYER stacks heads at different speeds, DUB records the live track into the loop as it plays, sound-on-sound, SLIDE glides two overlapping loops in pitch. MIX blends it with the track, TAIL lets a loop ring on after it ends.", + "highlights": [ + "Three types, four variations each: LAYER, DUB and SLIDE", + "Loops on a note grid from 1/64 to 1/2 at the project's tempo", + "Each read head fades by its own position, so loops at any speed are click-free", + "DIRT, WIDE ping-pong, RAND and a degrading TAIL on the setup page" + ], + "usage": [ + "Select a track, press FUNC + FX2 and choose LOOPBOX at the end of the list.", + "Start with TYPE LAYER, ACT 64, TIME 1/16 and MIX 64 on a drum loop, then try SLIDE, and DUB at TIME 1/2 and RPT 1, where each loop gets eight passes to build." + ] + }, + "controls": [ + { + "name": "TIME", + "default": 2, + "count": 6, + "doc": "Slice length at the tempo, 1/64 to 1/2; loops start on it and last it, in chunks of 179 ms at most.", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ] + }, + { + "name": "ACT", + "default": 64, + "count": 128, + "doc": "The share of slices that loop: 0 none, 127 about 70 %.", + "labels": null + }, + { + "name": "SHAP", + "default": 32, + "count": 128, + "doc": "The loops' fades: 1/64 of a loop at 0, rising evenly to a full swell.", + "labels": null + }, + { + "name": "RPT", + "default": 1, + "count": 8, + "doc": "How many times a loop cycles in a chunk: 1 the whole chunk once, 8 an eighth of it eight times.", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "name": "MIX", + "default": 64, + "count": 128, + "doc": "How far a loop takes over: 96 replaces the track at the loop's peak; 127 the loops alone.", + "labels": null + }, + { + "name": "TAIL", + "default": 64, + "count": 128, + "doc": "After a loop its heads loop on and fade: 0 a short release (about 50 ms), 127 about 3 s; a loop that starts over a tail picks up from there.", + "labels": null + }, + { + "name": "TYPE", + "default": 0, + "count": 3, + "doc": "LAYER stacks heads at different speeds, DUB records the track into the loop as it plays, SLIDE glides the pitch.", + "labels": [ + "LAYER", + "DUB", + "SLIDE" + ] + }, + { + "name": "DIRT", + "default": 0, + "count": 128, + "doc": "Grit on the loops: sample-rate reduction, harder crush and clipping drive; 0 clean.", + "labels": null + }, + { + "name": "VAR", + "default": 0, + "count": 4, + "doc": "Variation A-D: octaves, fifths, reversed or random layers; 4 or 8 slices, reversed or ratcheted; up, down, apart or random glides.", + "labels": [ + "A", + "B", + "C", + "D" + ] + }, + { + "name": "WIDE", + "default": 0, + "count": 128, + "doc": "Ping-pong: loops alternate left and right this far; with RAND anywhere in it.", + "labels": null + }, + { + "name": "RAND", + "default": 0, + "count": 128, + "doc": "Chaos: random loop counts, speeds, glide targets and places; 0 as set.", + "labels": null + }, + { + "name": "DGRD", + "default": 0, + "count": 128, + "doc": "Degrade: a tail grows dirtier as it fades; 0 a clean fade.", + "labels": null + } + ], + "compatibility": { + "firmware": "1.40C", + "effectId": 10, + "location": "FX2", + "conflicts": [], + "uiClaims": [], + "limitations": [ + "FX2 only: the capture ring needs an FX2 slot's buffer (15,870 words). On FX1 it passes the track dry.", + "Mono capture: the loops replay the track's mono sum; WIDE spreads LAYER's and SLIDE's extra loops left and right.", + "Loops follow the project's tempo, not yet the pattern's steps, track speed or swing; the owner agreed on issue #2491 that free-running tempo slices are fine until the base has a step clock for effects.", + "After a second of silent input no loop starts; after four seconds any loop or tail stops. The watch listens to the mono sum the ring records, so a source exactly out of phase between L and R counts as silence.", + "It prefers effect id 10, as Fuzzbox, Glitchbox and Midiverb do: over USB the base gives each its own id; in a card set only one of them fits.", + "Its worst case is 1.15x stock SPRING REV (three read heads, each with its own fade); four a core fit within a core's budget." + ] + }, + "resources": { + "recorded": "2026-12-05", + "storage": { + "label": "DSP program / state", + "display": "1854 words / 123-word state", + "value": null, + "unit": "see display", + "method": "static", + "conditions": "The USB package 5d3bf7c3 (ABI 6): 1,854 program words on each DSP core it runs on; 123 words of state per instance in its own r7 block (init clears them); 15,870 words of the FX2 slot's 16K Y delay buffer per instance, stopping short of Sidechain Compressor's key window; 1,196 bytes of ColdFire code and data (the effect's descriptor and menu), no bss.", + "source": "TESTING.md" + }, + "processing": { + "label": "DSP instruction peak", + "display": "360 instructions/sample per instance", + "value": null, + "unit": "see display", + "method": "emulator", + "conditions": "perf:audit record (perf.py in dsp_host): worst 360.1 executed instructions a sample, the dearest SLIDE setting with a trig split of 2 frames; unsplit 325.0 to 334.4; static loop 332. Against SPRING REV 314.19 (1.15x) and 330.94 for the dearest stock effect. Executed instructions, not chip cycles. On the unit the DSP load of T1-T4 rose 10.8 to 12.7 points with it on T1 FX2.", + "source": "evidence/performance.json" + }, + "impact": { + "conditions": "One instance at the dearest setting in dsp_host; on the author's MKII (twin 117eb07f of base ddb56b72) the frame-interrupt price on the test bank (Mang112 95 bank A, Part 1, pattern A01), and six instances admitted at once while playing (device:test).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No ColdFire work besides the effect's descriptor: the ColdFire only forwards the knob words, as for any effect. On the unit the frame interrupt rose 0 points with it on T1 FX2 and 0 installed and unused; the instance curve on the test pattern, noisy there, read first 0 and each 0, admitted on the empty and the medium pattern.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "high", + "basis": "measured-comparison", + "rationale": "360.1 executed instructions a sample worst case (1.15 of SPRING REV's 314.19, 1.09 of DJ EQ's 330.94): a ring write and three read heads (head 0 also writing DUB's loop back), each with its own position, wrap, changeover, interpolated read, fade and gliding gain, then the heads' sum and side, crush, hold and drive, the loop's level, the dry's duck and two outputs, every sample. Four a core is 1,452 of 3,120. On the unit one instance raised its core's load about 11 to 13 points; six were admitted at once.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "low", + "basis": "source-estimate", + "rationale": "Per instance 369 bytes of state and the FX2 slot's own delay buffer (15,870 words, which every stock reverb or delay on that slot would also take); 7,304 bytes shared.", + "source": "TESTING.md" + } + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-05", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 117eb07f of base ddb56b72, MKII, OS 1.40C; 3 readings of 8 s a state. Frame interrupt 54.1 % before, 54.1 % installed and used nowhere, 53.1 % on T1 FX2; CPU meter 71.6 % before, 71.4 % at rest, 70.5 % in use.", + "source": "evidence/cpu-price.json" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "On the author's MKII (OS 1.40C, twin 117eb07f of base ddb56b72): npm run test:procedure on package 5d3bf7c3 (DUB in place of SHUFL) passed steps 1-11 (beside every other module, both cores, six instances admitted at once, Part switches, a 120 s soak, the price and the curve played; by hand DUB and a TYPE change mid-loop); the author kept 5d3bf7c3 beside 20 modules, played, saved and reloaded the Part and power-cycled: \"everything survived\". verify.py is bit-exact against reference.py in dsp_host for every TYPE and VAR, including DUB's write back; perf:audit worst 360.1 instructions a sample.", + "hardwareStatus": "reported", + "evidenceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ], + "qualification": { + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Put Loopbox on FX2 of a track playing a drum loop: select the track, hold FUNC and press FX2, turn LEVEL to LOOPBOX at the end of the list and press YES. At the defaults it is LAYER A at 1/16, looping about half the slices.", + "Turn ACT and MIX to 127 to hear only the loops, then hold FUNC and press FX2 and step TYPE through LAYER, DUB and SLIDE, and VAR through A to D.", + "Set TIME to 1/4 and RPT to 1 for longer phrases, raise TAIL to let each loop ring on, and WIDE to spread LAYER's and SLIDE's loops left and right.", + "Turn MIX back to 64 to blend the loops with the track again, or to 0 to hear the track alone." + ] + }, + "screenshots": [ + "media/ot-location.png", + "media/ot-controls.png" + ], + "screenshotStyle": "black-and-white" + }, + "moduleVersion": "0.1.1-experimental", + "sourceSha256": "eacda55bb3aed90f0dade4d5c15fec03fb63adf85a727be81d6a9b43144d80bb", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", + "cycles": [ + { + "processor": "dsp", + "worstCase": 363, + "maxConfiguration": 1452, + "maxInstances": 8, + "budget": 3120, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "363 cycles a sample covers the measured worst case in dsp_host, 360.1 executed instructions at the dearest SLIDE setting with a trig split of 2 frames (the per-call setup runs twice a block), over the defaults, the dearest setting for each TYPE (TIME 1/64, ACT, SHAP, MIX, TAIL, DIRT, WIDE, RAND and DGRD at 127, RPT 8, VAR D) and the moving pattern, unsplit and with a split at every position 1-15 (perf.py, 80 cases). The static floor of the loop alone is 332. Executed instructions, not chip cycles.", + "parameterModulation": "Knob words reach the DSP as value<<16 every call; MIX glides per sample, the rest are read once a call, so modulation costs nothing extra. perf.py's stress run changes every parameter word every block (every slot swept, TIME, RPT, TYPE and VAR stepped): 0 clobbers, 0 hangs. verify.py renders a knob word with an LFO's fraction bits and every knob swept while looping bit for bit. The unit's soak sent program changes, transport, scenes, the crossfader and FX knob CCs.", + "modeSwitching": "TYPE and VAR are read once a call and take effect at the next chunk; their cost is inside the measured per-call setup. verify.py sweeps both while looping bit for bit; perf.py's moving case steps them; on the unit Part switches ran their own effects and the soak changed programs while it ran. There is no bypass: MIX 0 leaves the track within 1 LSB.", + "maxLoad": "4 instances a core, 8 on both: 4 x 363 = 1,452 of the 3,120 cycles a core can spend a sample. Stress in dsp_host: 4 a core, per-core peaks 1439.5 and 1355.1. On the unit six were admitted at once while playing; the base refused two to keep each core within budget.", + "inputConditions": "perf.py: stereo noise at 0.7 of full scale; the stress stems are decaying bursts, a full-scale square, a 20 Hz-20 kHz sweep, full-scale noise, impulses, full-scale DC steps, silence and a chord. The sample loop has no data-dependent branch, so the input changes no cost; verify.py checks exact silence out for silence in, a burst's tail ending in silence, and every TYPE and VAR falling silent 4.2 s after the input stops." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "DSP program, the package's effect on each core it runs on", + "space": "dsp-p", + "words": 1854, + "wordBits": 24, + "bytes": 5562, + "scope": "shared" + }, + { + "name": "DSP state per instance, the package's state words", + "space": "dsp-x", + "words": 123, + "wordBits": 24, + "bytes": 369, + "scope": "instance" + }, + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 1196, + "wordBits": 8, + "bytes": 1196, + "scope": "shared" + }, + { + "name": "FX2 slot delay buffer, the stock allocator's 16K Y block reused as the capture ring", + "space": "dsp-y", + "words": 15870, + "wordBits": 24, + "bytes": 47610, + "scope": "instance" + } + ], + "perInstanceBytes": 47979, + "sharedBytes": 6758, + "maxInstances": 8, + "totalBytes": 390590, + "conditions": "From the header of the USB package 5d3bf7c3 (ABI 6), checked against the source: the effect uses its own r7 block X:(r7+$00..$7a) (verify.py's state gate) and the first 15,870 words of the FX2 slot's 16K Y delay buffer, which the stock allocator hands every FX2 instance (modulus $3dfd, stopping short of Sidechain Compressor's key window at +$3DFE; Claims(stock_instance_buffer=True, buffer_words=15870)); on an FX1-sized slot it passes the track dry and writes nothing. No other stock tables or blocks, no absolute addresses; the stack holds only the bsr return of its per-call routines.", + "report": "TESTING.md" + }, + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-05", + "tester": "jrs1717", + "sourceRevision": "a383d6d00ac6734aae6b07cac3b4bda1bd5f44ca", + "imageSha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372", + "summary": "On the author's Octatrack MKII, OS 1.40C, 5 December 2026 (UTC): npm run test:procedure on package 5d3bf7c3 (0.1.1-experimental with DUB in place of SHUFL), on development twin 117eb07f of base ddb56b72 with the test bank, passed software checks, the check beside every other module, the DSP cost model, reading the unit, the scripted pass (self-test, both DSP cores, six instances at once with two refused for budget, Part switches), a 120 s soak with MIDI programs and AUTO changes, the price (the curve played, admitted on the empty and the medium pattern, longest frame 92.4 %) and putting the Part back; by hand, on T1 and T5 FX2 while playing, TYPE stepped through LAYER, DUB and SLIDE, DUB with ACT, MIX and TAIL at 127, DUB VAR D, and TYPE changed mid-loop, with no stall, error or crash. The author heard DUB on the same package in two RAM trials (\"sounds great\"), then kept it in place of 4dc3d0cc on the flashed base beside 20 modules, played it, saved and reloaded the Part and power-cycled: \"everything survived\".", + "limitations": [ + "Not run: an emulator rehearsal.", + "Not recorded: MAIN and CUE over USB (the recorder is not built on the author's computer); dropouts were checked by frame timing (late entries, skipped frames, stalls) and by the author's ear.", + "Not run on the unit: TIME 1/2 below 42 BPM (the 32-chunk path); verify.py holds it bit for bit at 30 BPM in dsp_host, for LAYER and DUB.", + "Not tested: MIDI, scenes and recording with it, beyond the soak's program changes, scenes and crossfader.", + "Not tested beside Sidechain Compressor on the unit; the ring stops short of its key window by design.", + "The screens were captured on package 4dc3d0cc; the controls and their names are the same, but TYPE's middle value is now DUB (it was SHUFL)." + ], + "report": "TESTING.md" + } + } + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Original code by jrs1717 under the MIT licence in LICENSE: an original design inspired by micro-loop effects in general, starting from the author's own Glitchbox engine; no third-party code, tables, samples or names. Never includes Elektron firmware, extracted routines or tables." + }, + "media": [ + { + "path": "media/ot-location.png", + "captureType": "hardware", + "caption": "Hold FUNC and press FX2: Loopbox is chosen at the end of the effect list, with TYPE (here SLIDE), DIRT and VAR on the top row and WIDE, RAND and DGRD below.", + "alt": "FX2 SETUP page with an effect list ending in Loopbox, selected; knobs labelled SLIDE, DIRT, VAR, WIDE, RAND and DGRD.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2 SETUP", + "shows": "location", + "firmware": "1.40C", + "moduleVersion": "0.1.1-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + }, + { + "path": "media/ot-controls.png", + "captureType": "hardware", + "caption": "Press FX2 for the main page: TIME, ACT and SHAP on top, RPT, MIX and TAIL below.", + "alt": "FX2 main page titled Loopbox with knobs TIME, ACT, SHAP, RPT, MIX and TAIL.", + "credit": "jrs1717 (USB screen capture on the author's unit)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "FX2", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.1.1-experimental", + "imageSha256": "2f7286525f0a4e84fc70fc6d48f8dab2171b6afd386be59a40a8b96eecfe3237", + "setup": "The author's Octatrack on its flashed Modwerk base ddb56b72, Loopbox 0.1.1-experimental (package 4dc3d0cc) kept beside 26 modules; the author's project, pattern A01, a track's FX2 on Loopbox with TYPE SLIDE and the other knobs as the author set them; transport stopped. The author pressed the keys; the agent read each frame over USB. imageSha256 is the MAIN image of base 0.8.5 ddb56b72, as recorded for Fuzzbox's and Glitchbox's captures on the same base." + } + } + ] + }, { "schemaVersion": 2, "id": "analog-bassdrum", From 06368a785e9905add690fc107024b78b9c9a7011 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 04:47:09 -0600 Subject: [PATCH 29/32] Loopbox: packages rebuilt in Docker after main and imported, recipe pins re-pinned (the USB package is still 5d3bf7c3) Co-Authored-By: Claude Opus 5.5 --- .../module-adapters/standalone-recipes.json | 12 +- src/engine/assets/descriptor-recipes.json | 460 ++++++++++++++++++ src/engine/assets/menu-recipes.json | 123 +++++ src/engine/assets/module-build.json | 19 +- 4 files changed, 599 insertions(+), 15 deletions(-) diff --git a/sdk/machines/octatrack/module-adapters/standalone-recipes.json b/sdk/machines/octatrack/module-adapters/standalone-recipes.json index 66412666d7..15c75b0f3e 100644 --- a/sdk/machines/octatrack/module-adapters/standalone-recipes.json +++ b/sdk/machines/octatrack/module-adapters/standalone-recipes.json @@ -233,9 +233,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "3f9ad5fb5b20ca6dddbaf9207fe55ba48de5b21b4df59c4a2e84140589c9e47d", - "src/engine/assets/descriptor-recipes.json": "661357e141783da67cee8e848c3cb413799a9c7c1ef7325872aee14d1433ef05", - "src/engine/assets/menu-recipes.json": "1b7eee1e48572e40a9329d8b611d24d6f76209346e20cab41f5a401ea92c3ae7", + "src/engine/assets/dsp-packages.json": "436e213f75c57dc0bb1d71e2a5c58a63662a6f2f90c8372310685432da7dfc59", + "src/engine/assets/descriptor-recipes.json": "e5cccbeb15fecc4270012a180c69dd4470baabf5f65e070f2ab5aec9a89ebca4", + "src/engine/assets/menu-recipes.json": "eb950da5cc82a83eff4031b39f84c498990cda2ebd0939f1c6704f14227e03a1", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", @@ -468,9 +468,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "3f9ad5fb5b20ca6dddbaf9207fe55ba48de5b21b4df59c4a2e84140589c9e47d", - "src/engine/assets/descriptor-recipes.json": "661357e141783da67cee8e848c3cb413799a9c7c1ef7325872aee14d1433ef05", - "src/engine/assets/menu-recipes.json": "1b7eee1e48572e40a9329d8b611d24d6f76209346e20cab41f5a401ea92c3ae7", + "src/engine/assets/dsp-packages.json": "436e213f75c57dc0bb1d71e2a5c58a63662a6f2f90c8372310685432da7dfc59", + "src/engine/assets/descriptor-recipes.json": "e5cccbeb15fecc4270012a180c69dd4470baabf5f65e070f2ab5aec9a89ebca4", + "src/engine/assets/menu-recipes.json": "eb950da5cc82a83eff4031b39f84c498990cda2ebd0939f1c6704f14227e03a1", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", diff --git a/src/engine/assets/descriptor-recipes.json b/src/engine/assets/descriptor-recipes.json index 4409e303b8..e6e7b0caaa 100644 --- a/src/engine/assets/descriptor-recipes.json +++ b/src/engine/assets/descriptor-recipes.json @@ -6192,6 +6192,466 @@ "value": "DGRD" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "fxId": 10, + "donorAddress": 1074616560, + "donorSha256": "3b3f9b15f2f6addfea9fc281f5b9fdf054bf305778059b8d43db41d390f0401f", + "fx2Slot": 1074618372, + "slotSha256": "79bc740214b4d029e385d06d21e224d04e8f91b53fb26ea08ffa4e5d70964b7a", + "sourceSha256": "2ca5087d8ccf38eafe15c361f9439102c23aa3017a48a322a95727af03d7c3d4", + "integers": [ + { + "offset": 3, + "width": 1, + "value": 10 + }, + { + "offset": 94, + "width": 1, + "value": 2 + }, + { + "offset": 95, + "width": 1, + "value": 64 + }, + { + "offset": 96, + "width": 1, + "value": 32 + }, + { + "offset": 97, + "width": 1, + "value": 1 + }, + { + "offset": 98, + "width": 1, + "value": 64 + }, + { + "offset": 99, + "width": 1, + "value": 64 + }, + { + "offset": 100, + "width": 1, + "value": 0 + }, + { + "offset": 101, + "width": 1, + "value": 0 + }, + { + "offset": 102, + "width": 1, + "value": 0 + }, + { + "offset": 103, + "width": 1, + "value": 0 + }, + { + "offset": 104, + "width": 1, + "value": 0 + }, + { + "offset": 105, + "width": 1, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 0 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 206, + "width": 4, + "value": 0 + }, + { + "offset": 254, + "width": 4, + "value": 0 + }, + { + "offset": 210, + "width": 4, + "value": 0 + }, + { + "offset": 258, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 0 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 218, + "width": 4, + "value": 0 + }, + { + "offset": 266, + "width": 4, + "value": 0 + }, + { + "offset": 222, + "width": 4, + "value": 0 + }, + { + "offset": 270, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 0 + }, + { + "offset": 274, + "width": 4, + "value": 0 + }, + { + "offset": 230, + "width": 4, + "value": 0 + }, + { + "offset": 278, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 0 + }, + { + "offset": 282, + "width": 4, + "value": 0 + }, + { + "offset": 238, + "width": 4, + "value": 0 + }, + { + "offset": 286, + "width": 4, + "value": 0 + }, + { + "offset": 242, + "width": 4, + "value": 0 + }, + { + "offset": 290, + "width": 4, + "value": 0 + }, + { + "offset": 246, + "width": 4, + "value": 0 + }, + { + "offset": 294, + "width": 4, + "value": 0 + }, + { + "offset": 202, + "width": 4, + "value": 1073989400 + }, + { + "offset": 250, + "width": 4, + "value": 0 + }, + { + "offset": 298, + "width": 4, + "value": 0 + }, + { + "offset": 214, + "width": 4, + "value": 1073989400 + }, + { + "offset": 262, + "width": 4, + "value": 0 + }, + { + "offset": 310, + "width": 4, + "value": 0 + }, + { + "offset": 226, + "width": 4, + "value": 1073989400 + }, + { + "offset": 274, + "width": 4, + "value": 1074033236 + }, + { + "offset": 322, + "width": 4, + "value": 0 + }, + { + "offset": 234, + "width": 4, + "value": 1073989400 + }, + { + "offset": 282, + "width": 4, + "value": 1074033236 + }, + { + "offset": 330, + "width": 4, + "value": 0 + }, + { + "offset": 154, + "width": 4, + "value": 6 + }, + { + "offset": 106, + "width": 4, + "value": 0 + }, + { + "offset": 158, + "width": 4, + "value": 128 + }, + { + "offset": 110, + "width": 4, + "value": 0 + }, + { + "offset": 162, + "width": 4, + "value": 128 + }, + { + "offset": 114, + "width": 4, + "value": 0 + }, + { + "offset": 166, + "width": 4, + "value": 8 + }, + { + "offset": 118, + "width": 4, + "value": 0 + }, + { + "offset": 170, + "width": 4, + "value": 128 + }, + { + "offset": 122, + "width": 4, + "value": 0 + }, + { + "offset": 174, + "width": 4, + "value": 128 + }, + { + "offset": 126, + "width": 4, + "value": 0 + }, + { + "offset": 178, + "width": 4, + "value": 3 + }, + { + "offset": 130, + "width": 4, + "value": 0 + }, + { + "offset": 182, + "width": 4, + "value": 128 + }, + { + "offset": 134, + "width": 4, + "value": 0 + }, + { + "offset": 186, + "width": 4, + "value": 4 + }, + { + "offset": 138, + "width": 4, + "value": 0 + }, + { + "offset": 190, + "width": 4, + "value": 128 + }, + { + "offset": 142, + "width": 4, + "value": 0 + }, + { + "offset": 194, + "width": 4, + "value": 128 + }, + { + "offset": 146, + "width": 4, + "value": 0 + }, + { + "offset": 198, + "width": 4, + "value": 128 + }, + { + "offset": 150, + "width": 4, + "value": 0 + }, + { + "offset": 398, + "width": 4, + "value": 286331153 + }, + { + "offset": 394, + "width": 4, + "value": 4369 + } + ], + "strings": [ + { + "offset": 4, + "width": 5, + "value": "LOOP" + }, + { + "offset": 9, + "width": 13, + "value": "LOOPBOX" + }, + { + "offset": 22, + "width": 6, + "value": "TIME" + }, + { + "offset": 28, + "width": 6, + "value": "ACT" + }, + { + "offset": 34, + "width": 6, + "value": "SHAP" + }, + { + "offset": 40, + "width": 6, + "value": "RPT" + }, + { + "offset": 46, + "width": 6, + "value": "MIX" + }, + { + "offset": 52, + "width": 6, + "value": "TAIL" + }, + { + "offset": 58, + "width": 6, + "value": "TYPE" + }, + { + "offset": 64, + "width": 6, + "value": "DIRT" + }, + { + "offset": 70, + "width": 6, + "value": "VAR" + }, + { + "offset": 76, + "width": 6, + "value": "WIDE" + }, + { + "offset": 82, + "width": 6, + "value": "RAND" + }, + { + "offset": 88, + "width": 6, + "value": "DGRD" + } + ] } ] } diff --git a/src/engine/assets/menu-recipes.json b/src/engine/assets/menu-recipes.json index f1984e3ce6..fc8b6c4384 100644 --- a/src/engine/assets/menu-recipes.json +++ b/src/engine/assets/menu-recipes.json @@ -1325,6 +1325,129 @@ "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" } ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 0, + "name": "TIME", + "labels": [ + "1/64", + "1/32", + "1/16", + "1/8", + "1/4", + "1/2" + ], + "renames": {}, + "wideMaximum": 5, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + }, + { + "namesAddress": 1074623350, + "bytes": 80, + "sha256": "e74bd4dba1bc46e87f9156eb25524f81f13faadbd3166d997d5a4a865cbbd3ef" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 3, + "name": "RPT", + "labels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ], + "renames": {}, + "wideMaximum": 7, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + }, + { + "namesAddress": 1074623350, + "bytes": 72, + "sha256": "ee7d5bc6b7657acddaea0d08c6bc71333a5382190caa5c35ade66947b1bf78a7" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 6, + "name": "TYPE", + "labels": [ + "LAYER", + "DUB", + "SLIDE" + ], + "renames": { + "0": { + "6": "LAYER" + }, + "1": { + "6": "DUB" + }, + "2": { + "6": "SLIDE" + } + }, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 166, + "sha256": "17dc25ac9ebeb75a16f0534020201013cb8481d7bfefbe09fc935e32f0237b4e" + }, + { + "namesAddress": 1074623350, + "bytes": 166, + "sha256": "25b80ffcbf4d8083b2c80e5c4e2f8880cce5b2963c6ccb94c55d0c644972cbce" + } + ] + }, + { + "id": "loopbox", + "key": "LOOPBOX", + "author": "jrs1717", + "slot": 8, + "name": "VAR", + "labels": [ + "A", + "B", + "C", + "D" + ], + "renames": {}, + "wideMaximum": null, + "proofs": [ + { + "namesAddress": 1074621238, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + }, + { + "namesAddress": 1074623350, + "bytes": 56, + "sha256": "f5641d626d17265a6e715abe4ace7d36b315ebac3450d163cc34c8ca165702b5" + } + ] } ], "repitchPatches": [ diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 5fe0515084..8360ab9a6a 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "42de4af162974445bbb67f176aac70f75f0707b8", + "sourceCommit": "c9038e75155b20a83b009a1bfb8c3d7f7260669c", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "ef16b9464383c0c37bd25763e15baf95ecbdc02ac025b15e1d2f7477c1ee2179", - "compilerSha256": "766ea9cbc6be006bb0c3cd7402571901c01fabe24d3830385a94fbce703a570e", + "sourceTreeSha256": "a6e2466d1aa5ec91ef31e6f4777df2d61998edb57d65ab3559c5fdcb02b16c35", + "compilerSha256": "76a7882f5a5e076128b6f677fc206d4ed72fc906f9f068b21839e8b95ee88a3c", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -24,6 +24,7 @@ "void": "0.1.1-experimental", "fuzzbox": "0.1.0-experimental", "glitchbox": "0.1.0-experimental", + "loopbox": "0.1.1-experimental", "analog-bassdrum": "0.1.7-experimental", "usb-audio-out-tracks-main-cue": "0.4.3-experimental", "quantizer": "0.1.5-experimental", @@ -56,8 +57,8 @@ }, "files": { "dsp-packages.json": { - "bytes": 122801, - "sha256": "3f9ad5fb5b20ca6dddbaf9207fe55ba48de5b21b4df59c4a2e84140589c9e47d" + "bytes": 135090, + "sha256": "436e213f75c57dc0bb1d71e2a5c58a63662a6f2f90c8372310685432da7dfc59" }, "resident-dsp.json": { "bytes": 6981, @@ -76,12 +77,12 @@ "sha256": "f4b17e0eb4e297e6dbfc61781fe5aed41262c1e7263e42579184c7cc15fa843e" }, "menu-recipes.json": { - "bytes": 37438, - "sha256": "1b7eee1e48572e40a9329d8b611d24d6f76209346e20cab41f5a401ea92c3ae7" + "bytes": 40133, + "sha256": "eb950da5cc82a83eff4031b39f84c498990cda2ebd0939f1c6704f14227e03a1" }, "descriptor-recipes.json": { - "bytes": 116605, - "sha256": "661357e141783da67cee8e848c3cb413799a9c7c1ef7325872aee14d1433ef05" + "bytes": 125147, + "sha256": "e5cccbeb15fecc4270012a180c69dd4470baabf5f65e070f2ab5aec9a89ebca4" }, "platform-writes.json": { "bytes": 15585, From 449b26eb2d9999af4c771cf6d78b81c3c87fe577 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 04:51:32 -0600 Subject: [PATCH 30/32] Loopbox: its USB package row back beside Glitchbox's after the merge (still 5d3bf7c3) Co-Authored-By: Claude Opus 5.5 --- .../assets/octatrack-module-packages.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index 348376e84c..97933fbb03 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -953,6 +953,25 @@ "bytes": 6910, "sha256": "1ae4be591343727b7fb82eeaf3da28bfb0715c0b61d35f73cadc75ed18d809e0" }, + { + "id": "loopbox", + "slots": "fx2", + "cycles": 363, + "cyclesKind": "executed", + "state": 123, + "buffer": 15870, + "version": "0.1.1-experimental", + "path": "octatrack-modules/loopbox/0.1.1-experimental.mwrm", + "abi": 6, + "features": 0, + "sites": 0, + "copies": 0, + "fills": 0, + "name": "Loopbox", + "module": "4fd229d0", + "bytes": 8702, + "sha256": "5d3bf7c3efc0fe1b537887f912a46536a80ad89df7caa37d5524b17098b8c372" + }, { "id": "arr-rows", "octabam": true, From 396be94f3dc4262b9cd2af2fb7679242ca1c7841 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 04:54:12 -0600 Subject: [PATCH 31/32] Loopbox: the build record names the merged commit (every package reproduced byte for byte) Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 8360ab9a6a..13f78ee5ac 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "c9038e75155b20a83b009a1bfb8c3d7f7260669c", + "sourceCommit": "449b26eb2d9999af4c771cf6d78b81c3c87fe577", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", "sourceTreeSha256": "a6e2466d1aa5ec91ef31e6f4777df2d61998edb57d65ab3559c5fdcb02b16c35", "compilerSha256": "76a7882f5a5e076128b6f677fc206d4ed72fc906f9f068b21839e8b95ee88a3c", From 57443608e35b8f7a30a5bad0dfb2c74a2ad08619 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 5 Dec 2026 19:41:58 -0600 Subject: [PATCH 32/32] Loopbox: rebuild the packages on current main and re-pin Tape Echo's and Euclid's recipes Co-Authored-By: Claude Opus 5.5 --- .../module-adapters/standalone-recipes.json | 12 ++++++------ src/engine/assets/module-build.json | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/sdk/machines/octatrack/module-adapters/standalone-recipes.json b/sdk/machines/octatrack/module-adapters/standalone-recipes.json index b1376ded28..d933d60d38 100644 --- a/sdk/machines/octatrack/module-adapters/standalone-recipes.json +++ b/sdk/machines/octatrack/module-adapters/standalone-recipes.json @@ -233,9 +233,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "cf91b4e8e376aa7103dd96dd5a1af7d72b4c7e33466d08215016e841ac3d3767", - "src/engine/assets/descriptor-recipes.json": "1cb1864d95aff572b1627a7e3b28856a500626c26ed3240f4838b217ab134890", - "src/engine/assets/menu-recipes.json": "d90270e960e7ceb197e93d1ad58bfd705311c823a6e47df641b9c550a4be5a61", + "src/engine/assets/dsp-packages.json": "14801aef9d70cb37a8f066fcaef761b016ba3e1d97b87319554f0ace9607ab65", + "src/engine/assets/descriptor-recipes.json": "497b86432e61727ff64335e80d5ac5dc2d12ca60a0adb947af813d6f816b7feb", + "src/engine/assets/menu-recipes.json": "59119cf6df843e19b66aa5e3b1c56a8ed821e02e7617c3e056f1d9dac9676f4a", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", @@ -468,9 +468,9 @@ "src/engine/coldfire-elf.ts": "319ca0d835d1b0c602c8f4b06990016d0ebfe246cedbfc596cea3cc7adfe3cd2", "src/engine/module-build.ts": "dcd8397b8cecf6fab61debd9aa2f86f612da0ca6ccf363c79d56033bc170b993", "src/catalog/modules.ts": "14304ea8450f8ec7ecaaf3ccf9e764929161288babe7b34cb37ff41e44fe1b43", - "src/engine/assets/dsp-packages.json": "cf91b4e8e376aa7103dd96dd5a1af7d72b4c7e33466d08215016e841ac3d3767", - "src/engine/assets/descriptor-recipes.json": "1cb1864d95aff572b1627a7e3b28856a500626c26ed3240f4838b217ab134890", - "src/engine/assets/menu-recipes.json": "d90270e960e7ceb197e93d1ad58bfd705311c823a6e47df641b9c550a4be5a61", + "src/engine/assets/dsp-packages.json": "14801aef9d70cb37a8f066fcaef761b016ba3e1d97b87319554f0ace9607ab65", + "src/engine/assets/descriptor-recipes.json": "497b86432e61727ff64335e80d5ac5dc2d12ca60a0adb947af813d6f816b7feb", + "src/engine/assets/menu-recipes.json": "59119cf6df843e19b66aa5e3b1c56a8ed821e02e7617c3e056f1d9dac9676f4a", "src/engine/assets/rom-packages.json": "68d9f0e5f388910e20cd00f5b00cbc1eb606258921d90d4a0d87dab934f835cb", "sdk/firmware_builder/__init__.py": "4d179f74220ab956f7e27550d315337c5af053c80a217feeba75f5db91b590ff", "sdk/firmware_builder/codec/__init__.py": "bdcd33ceb83a11ef027d0f6dd64d98c05e7665915d241bb2896e75140d1b49cb", diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 276a347e09..bb984d897d 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "4d4073fdbad7e4505fdb463f09e717a4c6dbd8bf", + "sourceCommit": "20d65473a19afa20ac4aa55a8265470e4f8556da", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "28784f6974acdcf070f72ec69760b0c060384904f3f63c1d9866e386ad16df3f", - "compilerSha256": "766ea9cbc6be006bb0c3cd7402571901c01fabe24d3830385a94fbce703a570e", + "sourceTreeSha256": "02c86c031eb0dfb5e90dc869087b1815c31b42e778e4af48fcdeee98d7755949", + "compilerSha256": "76a7882f5a5e076128b6f677fc206d4ed72fc906f9f068b21839e8b95ee88a3c", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -24,6 +24,7 @@ "void": "0.1.1-experimental", "fuzzbox": "0.2.0-experimental", "glitchbox": "0.1.0-experimental", + "loopbox": "0.1.1-experimental", "analog-bassdrum": "0.1.7-experimental", "usb-audio-out-tracks-main-cue": "0.4.3-experimental", "quantizer": "0.1.5-experimental", @@ -56,8 +57,8 @@ }, "files": { "dsp-packages.json": { - "bytes": 124674, - "sha256": "cf91b4e8e376aa7103dd96dd5a1af7d72b4c7e33466d08215016e841ac3d3767" + "bytes": 136963, + "sha256": "14801aef9d70cb37a8f066fcaef761b016ba3e1d97b87319554f0ace9607ab65" }, "resident-dsp.json": { "bytes": 6981, @@ -76,12 +77,12 @@ "sha256": "f4b17e0eb4e297e6dbfc61781fe5aed41262c1e7263e42579184c7cc15fa843e" }, "menu-recipes.json": { - "bytes": 37502, - "sha256": "d90270e960e7ceb197e93d1ad58bfd705311c823a6e47df641b9c550a4be5a61" + "bytes": 40197, + "sha256": "59119cf6df843e19b66aa5e3b1c56a8ed821e02e7617c3e056f1d9dac9676f4a" }, "descriptor-recipes.json": { - "bytes": 116967, - "sha256": "1cb1864d95aff572b1627a7e3b28856a500626c26ed3240f4838b217ab134890" + "bytes": 125509, + "sha256": "497b86432e61727ff64335e80d5ac5dc2d12ca60a0adb947af813d6f816b7feb" }, "platform-writes.json": { "bytes": 15585,