musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.36k stars 2.67k forks source link

MIDI Note Off not sent on pause #19254

Open CoffeeCoder1 opened 1 year ago

CoffeeCoder1 commented 1 year ago

Issue type

General playback bug

Bug description

When pausing playback of a score, MIDI Note Off events are not sent to the MIDI output, causing notes to remain stuck on.

Steps to reproduce

  1. Set up MIDI output to an external device.
  2. Create a score with some notes that will be sent to that external device.
  3. Play back the score, but pause while a note is playing. The note will stay on.

Screenshots/Screen recordings

No response

MuseScore Version

4.1.1

Regression

I don't know

Operating system

macOS 13.5.1

Additional context

No response

CoffeeCoder1 commented 1 year ago

This also happens with VST plugins and can be triggered by moving the playhead while playing.

Here is a video demonstration of this issue, in which it is demonstrated using a VST plugin. When the issue is triggered, the note stops playing but stays pressed down in the VST plugin's virtual keyboard, so I think this is being caused by MuseScore outputting a Note On with a velocity of 0 or 1 instead of a Note Off, which causes notes to get stuck when using some software and hardware that interprets that as needing to keep the note on.

CoffeeCoder1 commented 1 year ago

I have just tested this on the MIDI output with a MIDI event logger and MuseScore appears to just not be outputting Note Off messages on pause at all. Also, the velocity of Note On events appears to always be 1 regardless of what velocity is set under the note properties.