Skip to content

MIDI input handling — tracking #290

Description

@joekotvas

MIDI input handling — tracking

Live, untracked Web-MIDI device-input limitations (separate from the MIDI-entry-targets-last-measure item in the API cluster #285).

  • Web MIDI input binds only inputs[0], discards velocity, no channel filter or device-lifecycle handling

    • src/hooks/audio/useMIDI.ts:61 const device = inputs[0]; selects only the first input device. The note handler at :96 is (midiNote, _velocity) => ... — velocity is received but discarded. There is no onstatechange/device-lifecycle listener (hot-plug/disconnect) and no MIDI channel filtering. (The audit's related double-flat-enharmonic concern is now moot since transpose is key-aware per Transpose: enharmonic spelling-with-key, semitones->steps rename, remove octave coercion #239.)
  • MIDI entry spells black keys as sharps, ignoring key signature

    • src/engines/midiEngine.ts:21-23 midiNoteToPitch -> src/services/MusicService.ts:95 midiToPitch = Note.fromMidi(midi), which always returns sharps; the key signature is never consulted.

Source: 2026-06 audit re-triage (2026-06-13); each item is tagged 🔴 LIVE in docs/audit/. Some are single-pass audit/fresh-eyes findings not independently re-verified — confirm against current code before fixing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions