MIDI Keyboard Not Responded when Pressed Before Opening a Score
Bug Reproducibility
100%
Steps to Reproduce the Bug
- Launch MuseScore.
- Close any opening scores.
- Press any key on a MIDI keyboard.
- Open a new score.
- Enter Note Input mode by clicking the N icon on the toolbar or pressing N key on computer keyboard.
- Press the keys on the MIDI keyboard.
Expected Behavior
The MIDI keyboard should be working to enter notes as expected.
Actual Behavior
No response at all no matter what keys are pressed on the MIDI keyboard.
Hardware & Software
- MacBook Pro 15" Retina (2012)
- macOS High Sierra 10.13.5
- Novation Launchkey 61 USB MIDI keyboard MK2
- MuseScore 2.2.1 Revision 51b8386
Notes
- This issue has been documented exactly by https://musescore.org/en/node/233651#comment-808918
- At the third step above, if no keys on the MIDI keyboard are pressed, this bug won't be triggered.
- The second method mentioned in https://musescore.org/en/node/233651#comment-808620 can be used to work around this issue temporarily.
Comments
Thanks for filing this formally! This is indeed a problem, and a pretty serious one that for some reason keeps slipping through the cracks. I don't know that we understand all the reasons why MIDI input doesn't work for some people, but this particular one seems clear enough, and the code identified in https://musescore.org/en/node/233651#comment-808918 is almost certainly the cause.
The line in question was added here:
https://github.com/musescore/MuseScore/commit/451909c801c84ac11c1e8cf8f…
to solve #40931: Using a note to change note length disables entering chords with MIDI. I'm not up enough on what's going on to say for sure what the proper fix is, but it seems likely to be an easy fix for someone who knows the MIDI input a bit better.
That line should never have been changed to
active = 1;
. Previously, it had beenactive = 0;
, and that was correct. The problem in #40931: Using a note to change note length disables entering chords with MIDI was fixed in that same commit by not decrementing active if active was already equal to 0. Changing that line back toactive = 0;
fixes this issue and does not break the fix for the other issue.My hat is off to you :-)
See https://github.com/musescore/MuseScore/pull/3769
I hope @mattmcclinch doesn't mind me doing this, but with 2.3 being release real soon now, we're in a bit of a hurry.
See also #233651: MIDI input breaks for rest of session
Fixed in branch 2.3, commit 063152880c
Fix #273660: MIDI Keyboard not responding when pressed before opening a score
Fixed in branch 2.3, commit 7b344ed106
Merge pull request #3769 from Jojo-Schmitz/midi
Fix #273660: MIDI Keyboard not responding when pressed before opening a score
Please check whether this issue here got fixed with the most recent 2.3 development build
reopening for master, which seems to be affected by the same issue, and should need the same fix
Fixed in branch master, commit 2b0dd1e6cc
Fix #273660: MIDI Keyboard not responding when pressed before opening a score
In reply to Git webhook message by Git Message
Thank you very much for the quick action! Such fix has saved one key from the keyboard for many users~~~
Automatically closed -- issue fixed for 2 weeks with no activity.