musescore / musescore/MuseScore

Real-time (foot pedal) double-triggering problem when using MIDI key instead of pedal

Open
#21,151 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs review P2 regression MS4
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
  1. Preferences -> MIDI mappings, scroll to bottom entry, assign MIDI mapping to Real-time advance
  2. Press a key on the MIDI keyboard
  3. Start Real-time (foot pedal) note entry
  4. Start entering notes using the assigned MIDI key for advancing.
Screenshots/Screen recordings
Screenshot 2024-01-22 at 14 30 45 Screenshot 2024-01-22 at 14 51 24
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.