Claude/general midi boop audit j8u0ks - #1885
Merged
Merged
Conversation
Previously the paired BLE-MIDI list was in-memory only, so an offline-first Raspberry Pi forgot every Bluetooth instrument on reboot, and an unexpected drop was never recovered. - New migration 031 + BluetoothDB table: paired devices persist (address, name, auto_reconnect, last_connected_at). - BluetoothManager persists on connect, removes on unpair, restores the list on startup, and opportunistically reconnects auto-reconnect devices. - Unexpected drops (out of range / powered off) trigger a bounded, backing-off reconnect (2s→30s, 5 attempts); a deliberate disconnect/unpair does not. All reconnect timers are cleared on cleanup. Guarded so tests / DB-less runs are unaffected. New integration test covers persist → restore, unpair removal, reconnect-on-unexpected-drop, and no-reconnect-on-deliberate-disconnect. Backend 1320 green; lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoexTLbJhezUpFHKKq85BP
Discrete instruments (kalimba, handpan, tuned percussion) declare a `selected_notes` set in 'discrete' note-selection mode — the only pitches they can physically produce — but nothing consumed it at playback, so off-set notes were sent verbatim and simply didn't sound. The scheduler now snaps each played note (after range folding) to the nearest value in `selectedNotes`, ties breaking downward; the GM drum channel is exempt, and instruments without a discrete set are untouched. `selected_notes` flows through CapabilityResolver → PlaybackSnapshot only when the instrument is in 'discrete' mode with a non-empty list (no key/root guessing). Left unimplemented deliberately: octave_mode's diatonic/pentatonic scale snapping (needs an instrument key/root the schema doesn't carry — would alter music on a guess), and the hand-shift travel-time anticipation (kept as documented future work rather than wired blindly or deleted). New test: discrete-note snapping. Backend 1324 green; typecheck/lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AoexTLbJhezUpFHKKq85BP
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.
No description provided.