jamulussoftware / jamulussoftware/jamulus

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

Aperta
#3,942 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C
Stelle
1.1k
Fork
248
Merge medio
2g 3h
PR unite (30g)
9

Descrizione

**🤖 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.*

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia in src/audiomixerboard.cpp, esaminando midiPickupTryApply, il ramo di attraversamento, prevMidi e il relativo punto di chiamata; leggi il testo della guida di Pick-up Mode in src/clientsettingsdlg.cpp per capire il comportamento previsto. Segui gli aggiornamenti della cronologia e la selezione del campione precedente, quindi verifica che i movimenti rapidi che delimitano strettamente siano gestiti, mentre la finestra di tolleranza esistente rimanga corretta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
audio-video-rtc
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
76/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.