You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MIDI Pick-up Mode: the rapid-movement branch is unreachable #3942
🤖 AI: Pick-up Mode's rapid-movement handling never executes. Its help text promises a control waits until the physical controller matches the software value, and an inner branch exists to also catch a controller swept fast enough that its values "skip over" that value. That branch is unreachable, for two independent reasons.
midiPickupTryApplyreturns before appending to the history buffer, so while a control is armed the buffer stays empty and the size() >= 2 guard in front of the crossing test never holds. Independently, prevMidi reads back(), while the sole call site has already pushed the incoming sample onto that same buffer — so prevMidi is the incoming sample, and the bracket test reduces to midiValue == currentValue, which the tolerance check above it has already accepted.
Driving those helpers verbatim across every strictly-bracketing two-sample crossing of the fader range, both samples outside the tolerance: on ee40cfe, 0 of 147,440 pick up. Repairing either defect alone leaves 0. Repairing both gives 147,440. What remains on stock is the tolerance window by itself — armed at fader 50, 5 of 101 controller positions are accepted, 48 through 52 — so a fader swept briskly steps over the window and stops responding, which is the case the unreachable branch was written for.
🤖 AI: Runtime, through the shipped GUI client. A JACK MIDI source feeds a stock build of 72e856af; Pick-up Mode is on, one channel fader is parked at 50, and the observable is the CHANNEL_GAIN message the client puts on the wire.
Two control-change messages 298.12 ms apart carry CC values 51 and 76 — fader 40 and 59, bracketing the parked 50 and both outside the tolerance of 2. No gain message leaves the client, and the fader does not move. Sweeping that same range one CC step at a time instead picks up at 48, the tolerance edge, and tracks from there: 12 gain messages. On a build carrying #3835's two edits the identical two-message crossing picks up and the gain for 59 goes out.
The same thing measured at the far end of the chain, with a peer sending a 1 kHz tone and the level the client itself puts out as the observable: a crossing from fader 40 to 100 moves that level by 17.47 dB with Pick-up Mode off, and by 0.00 dB with it on.
Reproducing it takes no MIDI hardware: a short script parks the fader and sends the same crossing over JSON-RPC, which reaches the same slot a control change reaches, with the same result.
Activity
ann0see commentedon Sep 10, 2026
Hmm. Ok @ignotus666 could you please have a look at this.
Needs runtime proof though.
mcfnord commentedon Sep 12, 2026
🤖 AI: Runtime, through the shipped GUI client. A JACK MIDI source feeds a stock build of
72e856af; Pick-up Mode is on, one channel fader is parked at 50, and the observable is theCHANNEL_GAINmessage the client puts on the wire.Two control-change messages 298.12 ms apart carry CC values 51 and 76 — fader 40 and 59, bracketing the parked 50 and both outside the tolerance of 2. No gain message leaves the client, and the fader does not move. Sweeping that same range one CC step at a time instead picks up at 48, the tolerance edge, and tracks from there: 12 gain messages. On a build carrying #3835's two edits the identical two-message crossing picks up and the gain for 59 goes out.
The same thing measured at the far end of the chain, with a peer sending a 1 kHz tone and the level the client itself puts out as the observable: a crossing from fader 40 to 100 moves that level by 17.47 dB with Pick-up Mode off, and by 0.00 dB with it on.
Reproducing it takes no MIDI hardware: a short script parks the fader and sends the same crossing over JSON-RPC, which reaches the same slot a control change reaches, with the same result.