musescore / musescore/MuseScore
Real-time (foot pedal) double-triggering problem when using MIDI key instead of pedal
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Other type of issue
Bug description
In MuseScore v. 4.2.0, assigning a MIDI key as the trigger for Real-time (foot pedal) input does not work properly. Instead of one trigger for a keypress (and release) there are two: one for note on and one for note off. I am using a MIDI keyboard that uses note-on messages for note offs, where the note-off is specified by a 0 key velocity. I suspect that if note-off command (hex 80 rather than 90), there would not be a problem (so the bug will only be noticeable on certain keyboards). In MusicScore v. 4.1.1, the problem is not present and Real-time (foot pedal).
Steps to reproduce
- Preferences -> MIDI mappings, scroll to bottom entry, assign MIDI mapping to Real-time advance
- Press a key on the MIDI keyboard
- Start Real-time (foot pedal) note entry
- Start entering notes using the assigned MIDI key for advancing.
Screenshots/Screen recordings
MuseScore Version
MuseScore 4.2.0
Regression
Yes, this used to work in a previous version of MuseScore 4.x
Operating system
MacOS 13.4.1
Additional context
Summary: There are two ways to do note offs in the MIDI protocol: either with 80 or 90 hex command bytes. Probably the 90 hex method is broken for Real-time (foot pedal) advancement, since a note-off with 90 hex and 0 velocity is no longer considered as a note off, so note offs also trigger advancement in MuseScore 4.2.0, which is not the case in MuseScore 4.1.1. I suspect that keyboard that use the hex 80 method for note offs do not have this problem.
Issues https://github.com/musescore/MuseScore/issues/17549 https://github.com/musescore/MuseScore/issues/18890 are somewhat relevant, but probably not related.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue through Preferences → MIDI mappings and Real-time (foot pedal) note entry using a MIDI key that sends note-on with zero velocity for release. Compare the behavior with MuseScore 4.1.1 and a standard note-off message; done means each keypress advances once, with regression coverage for both MIDI note-off forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100