jamulussoftware / jamulussoftware/jamulus

MIDI Pick-up Mode: the rapid-movement branch is unreachable

Offen
#3,942 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
C
Sterne
1.1k
Forks
248
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
9

Beschreibung

**🤖 AI:** Pick-up Mode's rapid-movement handling never executes. [Its help text](https://github.com/jamulussoftware/jamulus/blob/ee40cfe20ecebe92eeec9eecc2b9ee8b948f439f/src/clientsettingsdlg.cpp#L427-L430) promises a control waits until the physical controller matches the software value, and [an inner branch](https://github.com/jamulussoftware/jamulus/blob/ee40cfe20ecebe92eeec9eecc2b9ee8b948f439f/src/audiomixerboard.cpp#L94-L96) 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](https://github.com/jamulussoftware/jamulus/blob/ee40cfe20ecebe92eeec9eecc2b9ee8b948f439f/src/audiomixerboard.cpp#L119-L129) 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()`](https://github.com/jamulussoftware/jamulus/blob/ee40cfe20ecebe92eeec9eecc2b9ee8b948f439f/src/audiomixerboard.cpp#L97-L99), while [the sole call site](https://github.com/jamulussoftware/jamulus/blob/ee40cfe20ecebe92eeec9eecc2b9ee8b948f439f/src/audiomixerboard.cpp#L113-L119) 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 ee40cfe2, 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](https://github.com/jamulussoftware/jamulus/pull/3502).

🤖 *This message was written by AI and reviewed by @mcfnord.*

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne in src/audiomixerboard.cpp bei midiPickupTryApply, dem Zweig für das Überschreiten, prevMidi und ihrer Aufrufstelle; lies den Hilfetext zu Pick-up Mode in src/clientsettingsdlg.cpp, um das vorgesehene Verhalten zu verstehen. Verfolge die Aktualisierungen der Historie und die Auswahl des vorherigen Samples und überprüfe anschließend, dass schnelle Bewegungen, die strikt auf beiden Seiten begrenzen, verarbeitet werden, während das bestehende Toleranzfenster weiterhin korrekt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
audio-video-rtc
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
76/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.