🤖 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.
midiPickupTryApply returns 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.
Present since the MIDI GUI PR.
🤖 This message was written by AI and reviewed by @mcfnord.
🤖 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 thesize() >= 2guard in front of the crossing test never holds. Independently,prevMidireadsback(), while the sole call site has already pushed the incoming sample onto that same buffer — soprevMidiis the incoming sample, and the bracket test reduces tomidiValue == 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.
Present since the MIDI GUI PR.
🤖 This message was written by AI and reviewed by @mcfnord.