Skip to content

Loopbox 0.1.1-experimental: an automatic micro-loop effect for FX2 (LAYER, DUB, SLIDE) - #2555

Open
jrs1717 wants to merge 35 commits into
repeat98:mainfrom
jrs1717:module/loopbox
Open

jrs1717 wants to merge 35 commits into
repeat98:mainfrom
jrs1717:module/loopbox

Conversation

@jrs1717

@jrs1717 jrs1717 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What works: Loopbox 0.1.1-experimental is a new FX2 micro-loop effect for the Octatrack, a sibling of Glitchbox (#2492). It keeps the last third of a second of the track and, on a note grid at the project tempo, loops what was just played with three read heads:

  • LAYER stacks loops 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 is played (VAR A to D: how long the old layers last).
  • SLIDE glides two overlapping loops evenly in pitch.

Each type has variations A to D. The main page has TIME, ACT, SHAP, RPT, MIX and TAIL; the setup page has TYPE, DIRT, VAR, WIDE, RAND and DGRD.

  • No clicks: each head fades by its own position in the window.
  • Overlap: a new loop takes over head by head as each wraps, so old and new overlap without a gap. A loop starting over a tail picks up from there.
  • Stereo: WIDE spreads LAYER's and SLIDE's extra loops left and right; DUB's passes ping-pong.

It is listed and qualified in sdk/octatrack/modules/loopbox. The shipped USB package is 5d3bf7c3: the test procedure ran on it, and the author heard DUB, kept it, played it and power-cycled. In dsp_host it matches its reference model bit for bit for every type and variation.

Since the maintainer's 3 December review:

  • Loopbox vs Glitchbox: SHUFL is replaced by DUB. SHUFL overlapped Glitchbox's CHOP. DUB is a job Glitchbox can't do: 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 while a dub plays, the window is kept through the whole slice, and recording resumes when the loop ends. With IN 0 the write leaves the ring as it was, so LAYER and SLIDE are unchanged (a host test checks it). Four host tests replace SHUFL's; verify.py is bit for bit for every TYPE and VAR.
  • When to use which: both READMEs now say it (Loopbox keeps a loop going under the track; Glitchbox throws parts of it back on the beat).
  • The two small fixes: the page's cost line says 1.15x (it said 1.10x), and the README's Analog BD line is gone (no resource clash, no declared conflict, as with Void and Midiverb).
  • Engine fixes across the siblings: Glitchbox now has the grid-drift fix (Glitchbox 0.1.0-experimental (Octatrack): a glitch effect for FX2 with CHOP, STUT and ARPG #2492); Grainbox already had all six of this review's fixes (it started from Loopbox's engine after them); Cassettebox has its own engine with no grid repeats.
  • main merged again after Glitchbox landed: both modules' entries kept where they met, the sleeve on main's new paper #cfc6b5, every package rebuilt in the pinned toolchain and reproduced byte for byte. The engine and package are still 5d3bf7c3.

Earlier, why 0.1.1 for a first release: a fresh-session code review after the first round of testing found six engine bugs, and all six are fixed:

  • an inverted burst when the loop length shrinks under a head;
  • a hard cut when a slow head had to change over early;
  • loops drifting off the grid;
  • SHUFL (since replaced) dragging at slices under a block;
  • SLIDE overshooting with trig splits;
  • short loops playing quiet.

The bump let the procedure re-test it as an update.

Cost: the worst case is 360.1 executed DSP instructions a sample with a trig split (it declares 363), 1.15× SPRING REV (314.19). The third read head, which LAYER needs, and the review's fixes are what put it over. perf:audit passes with the justification on record.

What is open:

Who acts: a device reviewer or maintainer, review and merge. Ran on a unit: yes.

Tested on a unit: package 5d3bf7c3efc0, MKII, OS 1.40C, development twin 117eb07f of base ddb56b72, test:procedure steps 1 to 11 passed (record in TESTING.md); the developer's stage on 5d3bf7c3 on the flashed base: kept beside 20 modules, played, Part saved and reloaded, power-cycled: "everything survived".

Edge cases:

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 on the flashed base passed (reported by the author): "everything survived"
Details
  • Scaffolded with npm run module:new -- loopbox --kind dsp --author jrs1717, listed with npm run module:list. The author holds the board claim octatrack/loopbox.
  • The engine starts from the author's own Glitchbox engine. Each module builds and runs on its own, with no shared code.
  • State: X:(r7+$00..$7a), 123 words, under the $83 limit. Ring: the first 15,870 words of the FX2 slot's buffer.
  • verify.py: every gate passed. test_reference.py: 26/26. module:doctor -- loopbox: every integration point green.
  • The first round, 0.1.0-experimental on package 4537ab44, also passed the procedure and the author's stage. Its records stay in TESTING.md.
  • Inspired by micro-loop effects in general: original names and code, with no product's code, tables or names.

What the guides lacked or got wrong: module:new scaffolds version 0.1.0 while listed modules use -experimental, and module:qualify binds a procedure record to its version, so the first procedure had to run again (the package bytes were identical). This is worth a scaffold fix in its own PR. An update's step 1 also needs the price measured first (device:price --write).

🤖 Generated with Claude Code

Jason Stephenson and others added 19 commits December 2, 2026 18:02
… 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 <noreply@anthropic.com>
…s, 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 <noreply@anthropic.com>
…le with a trig split, 1.10x SPRING REV; stress clean)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 4537ab44 (steps 1-11 passed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, listened, survived a power cycle)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nail, release notes; the version string (package bytes unchanged, 4537ab44)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, steps 1-11)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntal: 346 cycles, memory with the FX2 ring, the price, the author's stage)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…dules:generate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…537ab44, the tested and kept package), Tape Echo and Euclid recipes re-pinned

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…SB package built (4dc3d0cc), Tape Echo and Euclid recipes re-pinned

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dc3d0cc (device:price --write)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4dc3d0cc and the author's stage on it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3d0cc, screenshots retaken on it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jrs1717 jrs1717 changed the title Loopbox 0.1.0 (draft): an automatic micro-loop effect for FX2 (LAYER, SHUFL, SLIDE) Loopbox 0.1.1-experimental: an automatic micro-loop effect for FX2 (LAYER, SHUFL, SLIDE) Dec 3, 2026

repeat98 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

@jrs1717 thanks for Loopbox. The record is thorough: the procedure on the package that ships (4dc3d0cc), your Keep and power cycle, and the review's six fixes each with a host test. Before it goes into review I need an answer from you on one question. There are also two small fixes. It still waits behind Fuzzbox and Glitchbox.

The question: what does Loopbox do that Glitchbox doesn't? The two share an engine, the ring, 11 of their 12 knobs and the same grid. SHUFL ("slices in a new order") is what Glitchbox's CHOP does, and SHUFL D (each slice as a ratchet) is close to STUT. Both modules take a track's whole FX2 slot, so a musician can't put them on the same track. They would have to pick between two very similar effects. Layered loops at several speeds (LAYER) and gliding loops (SLIDE) are something Glitchbox can't do, and that's a clear job of its own. So please either make SHUFL clearly different from CHOP or drop it, and add a line to both READMEs saying when to use which. If you'd rather put all six types into Glitchbox, tell me, and we'll talk it over before you change anything.

Who acts: you, @jrs1717. Next step: your answer here, then the fixes below. Ran on a unit: yes, 4dc3d0cc.

Two small fixes
  1. The last limitation in octamod.module.json says the worst case is 1.10x SPRING REV. Since the review fixes it is 1.15x (362.7), as the description says. It shows on the module page.
  2. The README says Loopbox is declared incompatible with Analog BD, but compatibility.conflicts is empty. Please make them agree. If there is a real clash over a resource, declare it and say which resource (docs/module-guides/effects.md, "Plan compatibility"). If not, drop the README line. Void and Midiverb declare no such conflict.

Since Loopbox and Grainbox started from Glitchbox's engine, please check any engine fix in one against the others. Glitchbox still has the grid drift your review fixed here.

Refresh: Fuzzbox and then Glitchbox will each conflict the generated lists again. Refresh once, after both are in main: merge main, run npm run pr:ready, push, and mark it ready. If SHUFL changes, the package changes too, so the procedure and your stage run again on the new package.


Generated by Claude Code

Jason Stephenson and others added 4 commits December 4, 2026 19:35
…d 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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3), recipes re-pinned

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	scripts/build-module-packages.py
#	sdk/catalog.json
#	sdk/machines/octatrack/module-adapters/standalone-recipes.json
#	src/catalog/module-documents.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/octatrack-module-packages.json
Jason Stephenson and others added 4 commits December 4, 2026 19:46
…ule)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the build the author heard), recipes re-pinned, modules:generate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…assed, and its edge cases

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for it (steps 1-11, kept, Part reload and power cycle)

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

jrs1717 commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

@repeat98 your question from 3 December is answered on f62851b; in short, SHUFL is gone and DUB replaces it.

  • What Loopbox does that Glitchbox doesn't: it keeps a loop going under the track. LAYER (several speeds) and SLIDE (gliding) as before, and now DUB: sound-on-sound. Head 0 loops the window and records the live track into it as it plays, each pass keeping the old layers a little quieter (VAR A-D: how long they last). Glitchbox only ever replays the track; it can't build a loop up over passes. Both READMEs now say when to use which.
  • The two small fixes: the page's cost line now says 1.15x, and the README's Analog BD line is gone (no resource clash, no declared conflict).
  • Engine fixes across the siblings: Glitchbox has the grid-drift fix now (Glitchbox 0.1.0-experimental (Octatrack): a glitch effect for FX2 with CHOP, STUT and ARPG #2492), Grainbox already had all six of Loopbox's review fixes, and Cassettebox's engine has no grid repeats.

Ran on a unit: yes. Package 5d3bf7c3 (DUB) passed test:procedure 1-11; the author heard DUB ("sounds great"), kept it, reloaded the Part and power-cycled ("everything survived"). verify.py is bit for bit for every TYPE and VAR; worst case 360.1 (1.15x SPRING REV), still declared 363.

Who acts: nobody yet. It stays a draft until Glitchbox (#2492) is merged; then I merge main once more, run pr:ready and mark it ready.


Generated by Claude Code

repeat98 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

@jrs1717 thanks, that answers my question. With SHUFL gone, nothing in Loopbox replays pieces in a new order any more. DUB is something Glitchbox can't do: it feeds the live track back into the loop. With LAYER and SLIDE, Loopbox is now a loop that keeps going under the track rather than repeats thrown back on the beat, so the two can sit side by side. Both small fixes are in. The procedure and your stage are on 5d3bf7c3, the package this head ships, and the checks are green.

Two small things before it goes into review. Neither changes the package.

  1. The card still shows SHUFL. presentation/thumbnail.svg labels the middle type SHUFL, and its description says SHUFL "cuts it into slices". Please draw and describe DUB there instead. The pull request's title still says "LAYER, SHUFL, SLIDE" too.

  2. Say how far DUB builds. A DUB loop only builds within one TIME slice and starts on fresh audio at the next. In reference.py at 120 BPM, the default 1/16 with RPT 2 gives two passes of 62.5 ms, which sounds close to a plain repeat. 1/8 gives four passes, and 1/2 with RPT 1 gives eight passes of 125 ms. So "nearly endless" for VAR D, and the tutorial's "play while a loop runs to hear it layered in" at the defaults, promise more than a musician will hear. Please say in the README how many passes a slice gives, and set the tutorial's DUB step to TIME 1/2 and RPT 1.

    If you'd rather have DUB keep its loop across slices that follow each other, so it really builds, that's your call. It changes the engine, though, so it means a new package and the procedure and your stage again. The README change on its own is enough for me.

Who acts: you, @jrs1717. Ran on a unit: yes, 5d3bf7c3. Next step: these fixes, then the refresh and ready once Glitchbox (#2492) merges, as you planned.


Generated by Claude Code

…asses 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 <noreply@anthropic.com>
@jrs1717 jrs1717 changed the title Loopbox 0.1.1-experimental: an automatic micro-loop effect for FX2 (LAYER, SHUFL, SLIDE) Loopbox 0.1.1-experimental: an automatic micro-loop effect for FX2 (LAYER, DUB, SLIDE) Dec 5, 2026
@jrs1717

jrs1717 commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

@repeat98 both are in on 4db21df. Neither changes the package, which is still 5d3bf7c3.

  1. The card: thumbnail.svg now draws DUB as the same loop recorded over itself, each pass a little quieter under the new one, and its description says so. The PR title says LAYER, DUB, SLIDE.
  2. How far DUB builds: the README now says DUB builds within one TIME slice and starts fresh at the next, with your figures: at 120 BPM, 1/16 with RPT 2 gives 2 passes of 62.5 ms, 1/8 gives 4, and 1/2 with RPT 1 gives 8 passes of 125 ms. VAR D no longer says "nearly endless". The tutorial's DUB step (and the library page's tip) now sets TIME 1/2 and RPT 1.

I've kept the engine as it is: the README change covers it, as you said. The qualification is rehashed for the text-only change, and the doctor is green. Loopbox still waits for Glitchbox to merge, then gets its refresh, pr:ready and ready.

Jason Stephenson and others added 5 commits December 5, 2026 04:45
# Conflicts:
#	scripts/build-module-packages.py
#	sdk/catalog.json
#	sdk/machines/octatrack/module-adapters/standalone-recipes.json
#	src/catalog/module-documents.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/octatrack-module-packages.json
…e it)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ins re-pinned (the USB package is still 5d3bf7c3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(still 5d3bf7c3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oduced byte for byte)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jrs1717
jrs1717 marked this pull request as ready for review December 5, 2026 10:54
@jrs1717

jrs1717 commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

@repeat98 Glitchbox is in, so Loopbox is refreshed and ready on 396be94.

  • main merged: where Glitchbox's and Loopbox's entries met (build-module-packages.py, sdk/catalog.json), both are kept. The generated files are regenerated, not hand-merged.
  • The sleeve: loopbox.svg is on main's new paper #cfc6b5; the sleeve test passes.
  • Packages: rebuilt in the pinned toolchain and reproduced byte for byte from this commit. The package is still 5d3bf7c3, the build the procedure and my stage cover. pr:ready says Ready.

Who acts: you or a device reviewer, review and merge. Ran on a unit: yes, 5d3bf7c3. Grainbox follows once Loopbox merges.

Jason Stephenson and others added 2 commits December 5, 2026 19:40
…and Euclid's recipes

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

jrs1717 commented Dec 6, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed on current main. Loopbox was conflicting with main. I merged main and rebuilt the packages in Docker. Only Tape Echo's and Euclid's recipe pins moved. Loopbox's own package is unchanged (5d3bf7c3), so the unit results still apply. The packages reproduce from this commit, and pr:ready passes. The earlier red module-pr-ok was a stale run that checked the PR while it was still a draft; this push reruns it.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants