New feature to test: MIDI out

• 7 months ago

MuseScore 2.1 and previous versions can send MIDI messages to external devices or synthesizers using JACK. Jack offers many great professional features, but unfortunately it’s hard to install on Windows and macOS, as it’s primarily a Linux software.

For many years, we didn’t want MuseScore to have an easier way to send MIDI events to the outside world, for two main reasons.

  1. MuseScore is first and foremost a music notation software. Its purpose is to easily create beautiful sheet music. Playback is nice, but the core team wants to focus on the notation.
  2. We were (and still are) worried that if we offer minimal support for MIDI out, we would get many feature requests to improve it, sometimes in ways that are not possible, or that we prefer to not spend our time on, or that would make MuseScore complex to use for users who don’t care about MIDI.

Eric Fontaine was not happy with this state of affairs and really wanted to make MuseScore usable on a low end device where the internal synth takes a lot of CPU cycles and MIDI out would be more performant. So he checked the various available libraries (RtMidi, PortMidi etc…) and decided to use PortMidi, which MuseScore already uses for MIDI in. After > 100 comments and some code, we now have MIDI out in master! You can test with a nightly build.

How to enable MIDI out

MIDI out is not enabled by default. You need to go to Preferences / I/O and choose an option for MIDI output. If you use an external device, it’s probably the name of your device. If you use a software synth, you might need virtual MIDI cables. Note that MuseScore will send MIDI events out to the selected device but it will also send the events to its own built-in synthesizer. If you don’t want to hear the built-in synth, you will need to either lower the volume, or remove the SoundFont in View / Synthesizer.

2017-05-29 10_25_25-MuseScore Preferences.png

Note about output buffer latency: if this is set to 0, then messages are sent as soon as possible after MuseScore sends them to PortMidi, and might sound before the playback cursor. You can set this greater than 0 to try to find a value that will cause the notes to sound at the same time of the playback cursor.

What you can do currently with this feature?

  • Play a simple score through an external MIDI device (keyboard, synthesizer, etc…)
  • Play a simple score through a virtual instrument in standalone mode

What you can’t do with this feature?

  • Play an overly complex score out of the box. MuseScore is not a sequencer and its basic MIDI support is limited to the default 16 channels (also, no automation, no custom sysex etc…)
  • Send a MIDI song position event
  • Send a MIDI clock signal
  • Synchronize different MIDI devices or software together

This feature might evolve depending on your feedback. However, we will make sure that we do not overload the software with dozens of options dedicated to MIDI out specifically.



that's a great news. But... I don't see these parameters in the latest nightly builds (MuseScoreNightly-2017-05-29-1951-2.2-3bfcab8.7z on Windows 10 64 bits).
A friend of mine have it working fine on Mac....
Is there a problème on windows ?

I have a question: does this mean that MuseScore will be able to drive some VST plugin, maybe via some sort of vst host like this one? My idea is NOT to make MuseScore a dedicated sequencer (there are so many and so good around already), rather, provide some higher quality audio feedback while writing sheet music.

In reply to by Aldo

Yes ! I tried it with Addictive Keys and The Galaxy II pianos on a Kontakt Player. Works fine. Just had to install LoopBe1 as a virtual midi cable (on windows).
I also used it to send midi datas from MuseScore to a vsti loaded in REAPER and Cubase 8 Le.
Works fine too !!!!!

Tested some scores out on Windows 10, using loopMIDI virtual cable with the Pianoteq and ARIA plugins loaded in REAPER - it works really well! Just have to make sure that when MuseScore is started, no MIDI-input tracks are armed for recording, or else it will fail to connect to them.

About the output latency - when set to zero, the MIDI is indeed heard before the MuseScore synth, but still in sync with the cursor. Because of this, I think it is the synth that is late, not the MIDI that is early.

Untitled.jpg Darn. I set everything up to send midi out to an editor but I keep getting this error "qt core" cannot be found. Attached screen shot. Tried reloading. There are some longer duration notes (half notes) that sustain and then drop suddenly. I want to attempt to smooth out the release, decay times by adjusting in steps the envelope generator.

In reply to by jeetee

Here is the bin unzipped with nightly.exe double clicked

The error message can't find platform "windows in" is attached. But it is in the platform folder

thanks for all the help. Its time for a new computer. The operating system is not supported and its not even a genuine copy. (whatever that means)

I tried out some software synths with an exported MIDI file. They sounded pretty awful. But the possibility of 16 individual channel assignments is appealing

Attachment Size
Untitled 2.jpg 127.28 KB

In reply to by ramblinJ

Any reason you're using a nightly from May 29th rather than the latest from June 8th? Please give that a try, it does start cleanly here for me (Windows 7).
Are you by chance still on Vista, like Shoichi?
Also your latest screenshot S
shows that there are Windows updates panding and that Microsoft Defender has some alerts.

Just wanted you to know that I tried out the first June 12 master nightly build with a yamaha P-115 connected to a Windows 10 laptop through USB and it all worked beautifully. I'm keeping my fingers crossed that at least this basic MIDI output support stays in as I have been unable to find anything else for Windows that can decently do score editing and supports MIDI output and is freeware. Plus, I just bought the MuseScore book.

I am curious as to why the drumset checked instruments get different ports but the same channel.
(mostly so-called unpitched percussion) All non-drumset instruments get the same port but different channels.

(BTW; if need be, right click on nightly.exe and choose a correct compatibility setting. I had to do this to get Windows 7 to open MS 3.0 on an older machine. I don;t know if it will work with Vista.
In both cases I got the error message "qt 5 core cannot be found" until I did this)

In reply to by ramblinJ

In case you aren't aware, the General MIDI standard reserves channel 10 for drum set, so any standards-compliant synth will be expecting that. I assume that's why it is done this way. But I'm not an expert i this area, maybe you are aware of that standard but also have additional information about alternate ways this could have been implemented and are wondering why one of those alternate solutions wasn't chosen?

In reply to by Marc Sabatella

Thanks. Well I guess my question would then be about the standard itself. Maybe it is related to the availability of 16 channels when the standard was adopted? The drums would use up too many channels. The number of ports creates a practical issue. For a smaller score, you can change the port to the same number as the instruments (usually #1). This will call up a box that asks you to "reassign to next available channel." You might squeeze the drums in. Or, you can switch cables ( in my case from loopbe1 to loopbe30 and keep the drums on separate ports (#2.3.4 etc.) preserving channels on port #1.

In order to test this feature a little bit faster, and maybe release it a bit faster too, I just merged it in the 2.2 branch. Next development version on this branch will then have MIDI out support. Please report any issue !

In reply to by lasconic

Happy new year! I've been testing out this new feature tonight in the nightly 2.2 builds and it seems to be working very well.

With this new addition, the obvious problem is that there's no simple way to disable audio output to Musescore's soundfont engine. Would it be possible to allow us the ability to completely disable the audio output device in Musescore so that only MIDI out is used?

Do you still have an unanswered question? Please log in first to post your question.