Skip to content

midi: a MIDI input chooses how its controllers are translated, and a pending RPN no longer silences it - #990

Open
jcelerier wants to merge 1 commit into
feature/midi-note-off-cablsfrom
feature/midi-controller-translation
Open

jcelerier wants to merge 1 commit into
feature/midi-note-off-cablsfrom
feature/midi-controller-translation

Conversation

@jcelerier

Copy link
Copy Markdown
Member

Stacked on #981 (base feature/midi-note-off-cabls), and needs celtera/libremidi#295, whose branch the libremidi submodule points to.

Problem

midi_protocol::midi_callback converted each incoming MIDI 1 message with libremidi's midi1_to_midi2, which kept a global RPN / data entry state and failed every call while an RPN was pending. The callback ignored that result. A keyboard sending its pitch bend range as CC 101, CC 100, CC 6 (no CC 38) therefore made every later message of the device vanish before it reached the graph, while the device explorer, fed further down the same callback, still showed the input. Every inlet reading the device went quiet. This was reproduced on the real ALSA sequencer path with the keyboard's exact sequence.

Change

Verification

The probe used the real midi_protocol, two devices on two virtual ALSA sequencer ports, and the keyboard's sequence repeated, then notes. In both modes, 300 of 300 later note-ons were queued for the graph. Raw mode delivers the three CCs as three CCs; semantic mode delivers one RPN on CC 6 and another on a later CC 38. score's test_unit_midi_controller_translation covers the same path through midi_protocol.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KdPgugz48pdcaqHJAg2vid

…pending RPN no longer silences it

libremidi's stream translator replaces the whole-buffer one midi_protocol
used per message: a keyboard sending its pitch bend range as CC 101, 100
and 6 without CC 38 left an RPN pending, after which every message of the
device was dropped before reaching the graph, while the device tree still
showed them.

midi_protocol_configuration::controllers says whether controllers reach
the graph as they were sent (raw, the default) or with RPN, NRPN and bank
select combined into MIDI 2 messages (semantic). A message the translator
cannot handle costs that message only, and is logged once per kind of
error for the device.

libremidi is moved to its stream translator, on top of master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdPgugz48pdcaqHJAg2vid
@jcelerier
jcelerier force-pushed the feature/midi-controller-translation branch from 5fd2d39 to 7f0079d Compare November 20, 2026 15:45
@jcelerier
jcelerier deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Active
@jcelerier
jcelerier temporarily deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Inactive
@jcelerier
jcelerier temporarily deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Inactive
@jcelerier
jcelerier temporarily deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Inactive
@jcelerier
jcelerier deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Active
@jcelerier
jcelerier temporarily deployed to Apple Certificate November 20, 2026 15:45 — with GitHub Actions Inactive
@jcelerier
jcelerier requested a deployment to Apple Certificate November 20, 2026 15:45 — with GitHub Actions In progress

This branch is being deployed

1 queued deployment
Apple Certificate — 7f0079d4 Deployed Nov 20, 2026 by jcelerier via Unity3D (macOS) #1402
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