Doctor: don't tell a 16-bit take to reboot into oblivion - #48
Merged
Conversation
…eath The pedal health check told every unindexed-but-present slot the same thing: "reboot the pedal to index it". That is only true for the pedal's own format. The RC-5 indexer takes 32-bit float ONLY, and a non-float file is DISCARDED from the slot on the next boot rather than indexed (hardware, issue #44/#45). So for a 16-bit take the advice was actively harmful: follow it and the take is gone. Found on real hardware: a 16-bit LOOPA.wav placed directly on the card (not through the app, which converts on push) sat in a slot with WavStat=2, and the doctor cheerfully advised a reboot. The doctor now reads the file and only keeps the reboot promise for float32; for anything else it warns that the pedal cannot index the file, that a reboot would discard it, and points at the fix — re-push through LooperCat, which converts. Unreadable or non-WAV files take the same honest warning rather than the reboot promise, since the pedal will not index those either. This changes a diagnostic message only. Nothing on the Connect, Disconnect, push/convert or downmix paths runs through here, and a freshly pushed float32 take carries WavStat=1, so it never reaches this branch at all. Also records what the card taught us: WavStat is not the 0/1 the atlas claimed. Slot 30 read WavStat=2 — audio present but not indexed, which is exactly the state a non-float file leaves. The atlas now says 0/1/2. Test comes from the guarantee: a float32 take in an unindexed slot still gets the reboot hint at info level, a 16-bit take in an unindexed slot gets the warning instead and never the reboot line. Verified against the live card too: slot 30 now warns honestly. 19/19 locally.
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.
The pedal health check gave every unindexed-but-present slot the same advice —
"reboot the pedal to index it" — regardless of the file's format. That advice
is only true for the pedal's own format.
The RC-5 indexer takes 32-bit float only. A non-float file is discarded
from the slot on the next boot, not indexed (hardware, #44/#45). So for a 16-bit
take the hint was actively harmful: follow it and the take is gone.
How it surfaced
Testing v0.9.4 on real hardware, a 16-bit
LOOPA.wavsat in slot 30 with thedoctor cheerfully advising a reboot. The file had been copied straight onto the
card in an earlier session — not pushed through the app, which converts to
float32 on the way in (verified this release: a fresh push of the same 16-bit
file landed as float32,
WavStat=1, and never triggers this banner at all).Slot 30's config carried
WavStat=2, a value the atlas did not have — itclaimed 0/1. So the field is a tri-state: 0 none, 1 indexed, 2 present-but-not
indexed, which is exactly what a non-float file leaves. Atlas updated.
The fix
The doctor now reads the unindexed file and only keeps the reboot promise for
float32. For anything else it warns that the pedal cannot index the file, that a
reboot would discard it, and points at the remedy — re-push through
LooperCat to convert. Unreadable or non-WAV files take the same honest warning.
Before → after, confirmed against the live card:
info slot 30 has LOOPA.wav not indexed yet — reboot the pedal to index itwarn slot 30 has LOOPA.wav, which the pedal cannot index: it plays 32-bit float only. Re-push it through LooperCat to convert it — a reboot would discard it, not index itWhy this is safe for the release
It changes a diagnostic message and nothing else. Connect, Disconnect,
push/convert and downmix do not run through this code, and a pushed float32 take
carries
WavStat=1so it never reaches this branch. The existing doctor test —whose unindexed file is float32 — still expects the reboot hint and still
passes; a new test pins the 16-bit case to the warning. 19/19 locally, and CI
re-proves the build on all three platforms so nothing needs re-testing by hand.