Skip to content

Stompbox: recordings keep every block the pump sends - #185

Merged
bdbarnett merged 1 commit into
mainfrom
stompbox-recorder-gaps
Nov 18, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
stompbox-recorder-gaps

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

A Stompbox recording could skip audio. The app reads the pump's tap on its tick, and the tap returns its newest audio. If the pump sent another block between the app asking how much was new and reading it, the take lost one block and held another twice, with a click at each join. The count of frames stayed right, so nothing reported it.

Engine._hear now keeps a read only when the tap's count is the same before and after it. If a block arrives in between, it reads again, and if that read has nothing new it leaves the audio for the next tick, which the tap still holds.

I ran a 440 Hz clip through PurestDrive on an ESP32-P4 (firmware built with audioairwindows, default plug-in set) and recorded it from the app. With the current engine one second of the take had 29 splices, all on 64-frame block boundaries, and 440 Hz was between 3% and 84% of its power from run to run. With this change, two runs had no splices and 440 Hz was 100% of the power. The pump ran at 1.000 of real time with no starved bytes in every run. tests/stompbox_check.py gains a check that sends a block during every third read: it fails on the current engine (a step of 28109 against a limit of 1389) and passes here.

I didn't run Live or a recording on a Windows capture device; this only changes how the tap is read, which they share.

The tap hands back its newest audio, so when the pump added a block between
the recorder asking how much was new and reading it, the take lost a block
and repeated another. On an ESP32-P4 a 440 Hz tone came back with 29 splices
a second. A read now counts only if the tap's count is the same on both
sides of it.

stompbox_check.py sends a block during every third read; it fails on the old
engine with a step of 28109 and passes here.
@bdbarnett
bdbarnett merged commit adfca60 into main Nov 18, 2026
13 checks passed
@bdbarnett
bdbarnett deleted the stompbox-recorder-gaps branch November 18, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant