Restored from slopsmith/slopsmith-plugin-notedetect#43 — original issue, opened by @byrongamatos on 2026-05-17.
[restored-from: slopsmith/slopsmith-plugin-notedetect#43]
Summary
On Slopsmith Desktop (the JUCE-bridge path), arming a Reference Recording captures nothing — the take auto-saves an empty/silent WAV. Distinct from #18 (which fixed the save path); this is the capture side.
Root cause
The recording capture is a tap inside processFrame(buffer) (screen.js, gated on _recArmed && _recSongPlaying, appending the analysed buffer). On the desktop bridge:
processFrame() is never called — the bridge poll invokes matchNotes(null) directly.
- There is no browser
AudioContext/buffer — the audio lives in the native JUCE engine.
So _recArmed can be set, but no samples are ever appended; the saved WAV is empty.
Impact
No way to capture a reference DI take on desktop for tuning / benchmarking the ML detector.
Suggested fix
The capture needs an engine-side source on the bridge path. Options:
- (preferred) Add an input-recording capability to slopsmith-desktop — e.g.
audio:startInputRecording / audio:stopInputRecording that streams the engine's dry input to a WAV — and have the plugin's bridge path use it instead of the processFrame tap.
- Accumulate
getInputFrame() snapshots in the bridge poll — lossy/gappy (the ring is only 8192 samples and the poll is ~50 ms), not recommended.
Environment
Summary
On Slopsmith Desktop (the JUCE-bridge path), arming a Reference Recording captures nothing — the take auto-saves an empty/silent WAV. Distinct from #18 (which fixed the save path); this is the capture side.
Root cause
The recording capture is a tap inside
processFrame(buffer)(screen.js, gated on_recArmed && _recSongPlaying, appending the analysedbuffer). On the desktop bridge:processFrame()is never called — the bridge poll invokesmatchNotes(null)directly.AudioContext/buffer— the audio lives in the native JUCE engine.So
_recArmedcan be set, but no samples are ever appended; the saved WAV is empty.Impact
No way to capture a reference DI take on desktop for tuning / benchmarking the ML detector.
Suggested fix
The capture needs an engine-side source on the bridge path. Options:
audio:startInputRecording/audio:stopInputRecordingthat streams the engine's dry input to a WAV — and have the plugin's bridge path use it instead of theprocessFrametap.getInputFrame()snapshots in the bridge poll — lossy/gappy (the ring is only 8192 samples and the poll is ~50 ms), not recommended.Environment