Resort MIDI Channels in Midifiles generated from Parts

• Jul 5, 2019 - 12:56
Reported version
S5 - Suggestion

Oops, you ticked the "Regression" checkbox although it's a Suggestion. Why?
Because the requested behavior was present in Muscescore 2.

In current Musescore design, midi channels and ports are assigned automatically and kept konsistent between main score and parts. That's good and I dont want to change it! But a drawback is, that midi channels in midi files generated from part now depend not only on the position of the instrument in the main score, but also on the type of instruments before. If I have a flute, a guitar and a trombone in the first 3 staves, the trombone will have different midi channels than if I replace the flute by a trumpet. Why? Because a flute uses only one midi channel versus a trumpet using 2 (normal & mute) .... or a violin using 3 (arco, pizz, tremolo).

So what. Why is this important?
I (and maybe others as well) generate midi files from parts to be imported in a DAW. In the DAW, I assign VST instruments to the tracks and assign different sounds to different midi channels on the same track. In the trombone example, I would use one track but assign a "sustained" sound to it's first midi channel and a "muted" sound to it's second. In Musescore 2, I used templates with fix midi channels assignments. In MS3, I have to inspect the midi file and adjust the midi channels according to the channels used. In case I decide to insert another instrument in the score and re-import the midi I have to redo midi channel assignment of all instruments following the inserted staff.

Well, that's additional work, but you'll have to do it only once after importing your finished and final score!
Negative. I do the midi export->import stuff quite frequently during development of the score so adding staves or changing ther position happens quite frequently.

OK got it. So what's now the request?
I would like to achive the MS 2 behavior in the midi file output only. The channels should be resorted so that they start at port 1 / channel 1. This doesn't have to be visible in the mixer, but could happen for example during the final step of midi rendering to file.