Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Automatic control of JACK/ALSA MIDI Out ports #1171
With this feature MuseScore users can deal with MIDI faster and more comfortable. Now they don't need to think about MIDI Out ports number ("-Why it doesn't sound? <...> Ah, I have to increase midi ports number...").
I used "lazy" approach to prevent flooding to JACK/ALSA with a lot of API calls: we add new ports only if we really need to do it (e.g. when opening a score with a lot of staves OR when adding a new instrument).
Example: If we have several scores opened with 1, 3 and 2 midi ports, we'll have 3 midi out ports even if we switch between scores (would not change from 1 to 3 and 2).
Recomputing number of midi ports is also optimized: we don't need to do an extra loop every second/tick/etc.