musescore / musescore/MuseScore
MIDI export mangles large scores' instruments and channels
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Describe the bug
When trying to export MIDI from a score with lots of instruments, I usually find that the output file somehow has the wrong instruments playing the wrong notes, and frequently that two unrelated staves have been smashed into one channel.
In my current test score, I have an orchestra of:
- Bassoon
- Horn in F
- Timpani
- Glockenspiel
- Vibraphone
- Solo violin
- Solo contrabass
- Section violins I and II
- Section violas, celli, and contrabasses
In the exported MIDI, the bassoon, vibraphone, glockenspiel, and timpani are all set to play with the String Ensemble patch, except for the very first beat (where only the vibraphone plays). This was tested in VLC Media Player and OpenMPT.
In addition, when imported into OpenMPT, I find that Vibraphone and Violins I are in the same MIDI channel. When they happen to play the same notes at the same time, only one note appears, meaning information is lost.
To Reproduce
Steps to reproduce the behavior:
- Open a large orchestral score.
- Play back in Musescore for reference.
- Export as MIDI.
- Play back the MIDI in VLC
Expected behavior
Every staff retains its instrument when exported. Staves do not share channels.
Screenshots
The part in MuseScore:

The part in OpenMPT (channels run top to bottom):

If nothing else, note that the instrument (numbered 3) is the same for all notes, despite showing the rhythms of two separate staves.
Platform information
- OS: Windows 10
Additional context
In MuseScore 3, every variant of the strings sound patch (arco, pizzicato, etc.) had a separate channel by default, meaning each strings section would waste several full channels. Often, manually reassigning all channels and ports so that one part = one channel would fix MIDI export.
I assume the same applies to MuseScore 4, but unfortunately, I don't seem to be able to check MIDI channels anymore....
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 export with a large orchestral score, then inspect the exported MIDI in VLC or OpenMPT and compare instrument assignments and channel usage with MuseScore playback. Done means each staff retains its instrument and unrelated staves no longer share a MIDI channel without losing notes.
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
- 38/100