Skip to content

Make SpeedModifier a reliable deck-rate primitive - #1

Open
djdefi wants to merge 1 commit into
fix/mixer-clip-and-hotswap-loadfrom
djdefi-deck-rate-control
Open

djdefi wants to merge 1 commit into
fix/mixer-clip-and-hotswap-loadfrom
djdefi-deck-rate-control

Conversation

@djdefi

@djdefi djdefi commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Depends on CircuitMess#19.

SpeedModifier now uses a clamped Q16.16 0.5x-1.5x rate, maps the legacy midpoint (127) exactly to neutral, and exposes precise rate/get/nudge controls through MixSystem without adding sync logic. Parameter changes converge within one 256-sample block; source swaps clear buffered old audio while preserving the requested/current rate. Pitch still changes with rate and is documented explicitly.

Linear interpolation replaces nearest-neighbor resampling. A 24M-sample host microbenchmark measured 6.52 ns/sample nearest vs. 6.73 ns/sample linear (+0.21 ns/sample), while sine-reference mean absolute error dropped from 810.47 to 29.13 (96.4%). No allocation was added to generate().

Checks:

  • tests/run-speed-modifier-self-check.sh
  • Jay-D cm:esp32:jayd Arduino build: 1,026,274 bytes flash (28%), 44,464 bytes globals (13%)

Out of scope: beat detection, phase sync, firmware UI, and key lock/time stretching.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant