musescore / musescore/MuseScore
Enable MIDI input state resets after switching between processes
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
UX/Interaction bug (incorrect behaviour)
Description with steps to reproduce
- Ensure MuseScore is configured for MIDI input, and that multiple instances can read from the MIDI device (on Windows this requires using LoopMIDI and something like MidiTools or MidiOX)
- In one instance of MuseSore with a score open, confirm that playing notes on a MIDI input device causes them to sound
- In the playback toolbar settings menu, turn off "Enable MIDI input" and confirm that notes played on the MIDI keyboard no longer sound
- Start a second instance of MuseScore with a (different) score, ensuring the current staff is for a different instrument than the first one. Note that "Enable MIDI input" is turned off there, so now turn it on.
- Confirm that MIDI keyboard plays back notes for just the instrument for the current staff in the second instance.
- Switch to the first instance and then back to second instance, and play notes via a MIDI device again.
- Expected: notes should continue to play just for the second (active) instance and not the first.
- Actual: MIDI playback now occurs via BOTH instances simultaneously (esp. noticeable if the current staff in one is a transposing instrument).
Supporting files, videos and screenshots
N/A, can record video if really needed a bit involved to demonstrate.
What is the latest version of MuseScore Studio where this issue is present?
4.4
Regression
I was unable to check
Operating system
Windows 11
Additional context
I've noted before that Windows doesn't handle MIDI input devices well with multiple processes - the fact that you need special software for it work at all is obviously not ideal, but in this case it's really MuseScore that's not doing what seems reasonable to expect, which is to maintain a separate "Enable MIDI input" state between instances - it seems to be trying to sync them all to use the same setting, though the menu itself doesn't always reflect that.
Ultimately all I want to do is to have MIDI input only work for the instance with the focus (exactly the same way computer keyboard input works), but if I'm able to at least turn it off for one instance and on for another, that's fine too.
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
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
Start by reproducing the two-instance scenario on Windows 11 with MIDI input enabled in only one MuseScore instance, using the playback toolbar settings menu. Trace how the "Enable MIDI input" state behaves when switching focus between instances; done means MIDI notes play only through the intended active instance and do not remain enabled in the other.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100