Repository navigation
Stompbox: recordings keep every block the pump sends - #185
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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._hearnow 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.pygains 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.