Repository navigation
Freeze 0.1.0 (draft): a grid-locked, tape-like live loop on FX2 (needs a delay-ring hook) - #1971
Jacobphono wants to merge 6 commits into
Conversation
Original fixed-point engine (freeze.c) for an FX2 loop that repeats every 1-8 of the track's own steps at 0.25x-1.0x tape speed, with JTR wander, POSITION scrub, GRAB/release fades and exact dry passthrough. Host gate: 53 checks under ASan/UBSan plus a ColdFire 54454 build with no runtime calls. Not runnable yet: needs the shared delay-ring hook proposed in DELAY_HOOK_PROPOSAL.md (owner decision). Tape Echo and Ghost Cut untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for writing up the delay-ring proposal. I checked the two sites and Tape Echo still owns both of them. A shared base hook is the right place to explore this. Please keep the hook and Tape Echo migration separate from the Freeze module while we settle the interface. I added one case to the host fixture. Start a five-step hold and turn STEP down to two after the first step. The active loop ends at step two because the boundary check reads the live knob while the seam was planned for five steps. Could you have the active cycle finish on its latched length and apply the new setting at the boundary? A small test for shortening and lengthening a held loop would cover it. Please add the PR’s Edge cases table too, with the host results and the cases that need the hook and a unit. |
|
Thanks for fixing the mid-loop STEP change. I reran the host tests and all 65 passed. In both directions (5 → 2 and 2 → 5), the loop finished its original cycle before picking up the new length. Are the engine and the shared delay-ring proposal ready for review now? Do you feel the host tests cover what you wanted to check before we decide on the hook, or is there a case you’re still working on? I see why the Octatrack trial has to wait for the hook and a runnable package. Happy to talk through the hook and what to test on the first unit run in the Modwerk Discord. |
|
Hi @Jacobphono, a short update on the delay-ring hook, because two things have moved since we last talked:
The easiest next step is the way #2436 did it: move the proposal into its own Are you still planning to carry this on? If you'd rather pause, just say so. I'd close this draft for now, and you can reopen it once the hook exists. Who acts: you, @Jacobphono. Ran on a unit: no. It can't run until the hook exists. Generated by Claude Code |
Freeze (draft): a tape-like live loop on FX2, locked to the track's steps
A new, original Octatrack effect in
sdk/drafts/freeze/. It holds the last seconds of a track and plays them back slower and lower, like tape, in a loop that repeats every 1 to 8 of the track's own steps. Odd lengths (3, 5, 7) drift against a 16-step pattern, and two tracks with different lengths run independently.Status: not runnable. The engine and its host tests are here. The base hook it needs is not, and that needs an owner decision (below). Nothing has run in
ot_emuor on a unit. Ghost Cut (#1935) and Tape Echo are untouched, and Freeze does not depend on either.What is in it
freeze.c/freeze.h: freestanding fixed-point C engine with no floats, heap or runtime calls. It uses the stock per-track 4 s delay ring.0x800064f0 + track), so tempo, track speed and swing follow the sequencer. There is no clock of Freeze's own.test_freeze.c,verify.py,test_freeze.py: host gate with a simulated ring (written 16 frames a block like the stock DMA) and a simulated track sequencer (ticks per track speed, swing as a delayed tick).DELAY_HOOK_PROPOSAL.md: the shared hook Freeze needs.Owner decision needed: a shared hook for the stock delay ring
Tape Echo takes the delay routine's seam (
0x4000361a, and0x40002f44for reset) with its own detours. The base also patches three other places in the same routine (status.s). A second module cannot take the same seam, and the ring is naturally shared per track by FX2 id. The proposal:ev_delay_track(62): a call hook at0x4000361athat passes one record (track, FX2 id, knobs, ring, write frame, audio, record, tempo, run flag, tick, scale). The first handler to return nonzero takes the track. The base does the stock scratch-buffer toggle, accumulator clear, filter-iterator step and rejoin.ev_delay_reset(63): a notify hook at0x40002f44.Tape Echo would keep its detours under a
pending-migrationentry until its author moves it. Nothing here edits Tape Echo or the base. Details and open questions (page-2 knob bytes at the seam, swing on the tick byte, USB effect ids, CPU) are in the proposal.Tests
python3 -B sdk/drafts/freeze/verify.py: 65 of 65 checks pass under-fsanitize=undefined,address.m68k-elf-gccwith Tape Echo's flags (-mcpu=54454 -O3 -ffreestanding ...) builds 6,116 bytes of text with no undefined symbols.npm run module:doctor -- --draft freeze: the experimental lines and host tests are green. The listing lines (catalog, packages, CPU price, hardware) are not met yet.lerp/mulq15over INT32_MIN..INT32_MAXNot tested:
ot_emu, hardware, CPU cost,fx:audit, stock flows. Known sound limits: linear interpolation dulls the highs at fractional SPIN, and the seam lifts correlated audio up to 2.8 dB.A finding on the behavioural reference this brief started from (written by Codex, not in the repository): its two heads half a period apart with sin² gains repeat every half period (correlation 1.000 at both P and P/2 on its own model). Freeze repeats only at P.
Edge cases
test_step_change(5, 2)in the sanitized host gate; inspect both cycle boundaries and the new latched period.test_step_change(2, 5)in the same gate.ot_emu, then change STEP during a held loop on the unit at swung and changed tempo.What the guides lacked
0x800064d0/0x800064f0 + t) are documented in OCTATRACK_HARDWARE_TRAPS.md and in Deja Vu. sequencing.md points only to Euclid's PLAY-reset clock, whose PLAY sites a second module cannot patch. A sentence there would help; it will go in its ownDocs:PR rather than this module PR.Credits
Original code by @Jacobphono, written with Claude Code. The idea of jitter that slowly changes a loop comes from looking at a Reaktor ensemble's control descriptions; no Reaktor code, structure, artwork or samples are used. No Elektron firmware, code or tables.
🤖 Generated with Claude Code