Skip to content

Doctor: don't tell a 16-bit take to reboot into oblivion - #48

Merged
AliceLafox merged 1 commit into
mainfrom
fix/unindexed-hint-format
Aug 30, 2026
Merged

Doctor: don't tell a 16-bit take to reboot into oblivion#48
AliceLafox merged 1 commit into
mainfrom
fix/unindexed-hint-format

Conversation

@AliceLafox

Copy link
Copy Markdown
Member

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.wav sat in slot 30 with the
doctor 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 — it
claimed 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:

  • was: info slot 30 has LOOPA.wav not indexed yet — reboot the pedal to index it
  • now: warn 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 it

Why 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=1 so 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.

…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.
@AliceLafox
AliceLafox merged commit 31e812f into main Aug 30, 2026
10 checks passed
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