MIDI (Musical Instrument Digital Interface) drivers are software programs that enable communication between MIDI devices (such as keyboards, synthesizers, and electronic drums) and a computer. MIDI drivers allow the computer to send and receive MIDI data, such as notes played on a keyboard or drum beats triggered by an electronic drum pad. MIDI drivers are essential for recording and playing back MIDI data using digital audio workstations (DAWs) and other music software on a computer.
In case your PC is unable to recognize the MIDI device, you will have to install the correct MIDI driver for it. In this article, we will discuss how you can install a correct MIDI driver in Windows 10.
How to install MIDI Drivers in Windows 10
To install MIDI drivers in Windows 10 and fix the issue of missing MIDI drivers, you can use the following methods:
-
Run Hardware and Device Troubleshooter.
-
Search for MIDI Drivers on the Official Manufacturer’s website.
-
Check for MIDI Driver using Third-party applications.
-
Run in Compatibility Mode.
Let’s elaborate on these methods now!
1] Run Hardware and Device Troubleshooter
Usually, Windows install the correct driver whenever hardware is plugged in. But, in case this doesn’t happen with your MIDI device, you can try Windows troubleshooting to fix it. Before looking for another solution, try the below steps to troubleshoot the MIDI driver issue:
STEP 1: Press the Windows key + X and select «Settings».
STEP 2: Click on «Update & Security» and then select «Troubleshoot» from the left-hand side panel.
STEP 3: Scroll down and click on «Hardware and Devices».
STEP 4: Click on «Run the troubleshooter».
STEP 5: Follow the on-screen instructions to complete the troubleshooting. If any issues are detected, the troubleshooter will try to fix them automatically.
2] Search for MIDI Drivers on the Official Manufacturer’s website
You should try searching for the latest MIDI drivers on the official website of your device manufacturer. Most of the manufacturers provide the latest MIDI drivers on their websites that you can download and install on your Windows 10 PC. Other than that, if you choose to download a MIDI driver from elsewhere, make sure the website is genuine.
STEP 1: Determine the manufacturer and model of your MIDI device.
STEP 2: Visit the official website of the manufacturer.
STEP 3: Navigate to the «Support» or «Downloads» section of the website.
STEP 4: Search for the latest MIDI drivers for your device.
STEP 5: Download and install the driver package.
3] Check for MIDI Driver using Third-party applications
Don’t want to do all the work manually? We understand! There is a solution for that as well. You can use a trusted third-party free driver updater software. A driver update software can automatically find a suitable MIDI driver for you and then you can install it on your system.
STEP 1: Download and install a reputable third-party driver updater application, such as Driver Booster, DriverPack Solution, or SlimDrivers.
STEP 2: Launch the application and scan your system for outdated or missing drivers.
STEP 3: Look for any MIDI driver updates and install them.
4] Run in Compatibility Mode
If your system is unable to play the MIDI program or device, there might be some compatibility issues. Try running the MIDI program in compatibility mode or use the compatibility troubleshooter and see if that fixes up your problem with MIDI drivers.
STEP 1: Right-click on the MIDI driver installation file and select «Properties».
STEP 2: Click on the «Compatibility» tab.
STEP 3: Check the box next to «Run this program in compatibility mode for».
STEP 4: Select the version of Windows the driver was designed for in the drop-down menu.
STEP 5: Click on «Apply» and then «OK».
STEP 6: Run the installation file to install the driver.
Conclusion
It’s important to ensure that you download the correct MIDI driver for your device and that you follow the manufacturer’s instructions carefully to avoid any issues with installation or compatibility.
A Musical Instrument Digital Interface (MIDI) is a protocol that facilitates communication between external musical instruments and your computer. It is used when you connect a device based on this protocol, called a MIDI device, to your PC.
A MIDI driver, like any driver on your computer, is a program that lets your external MIDI device communicate with your operating system. Without such a driver, the MIDI devices will be as good as a random piece of metal. So, how do you set up a MIDI driver on Windows 10?
How to Install MIDI Drivers on Windows 10?
In most modern computers, drivers are installed automatically as soon as you plug in an external device. This should be the case with your MIDI device, too.
If this doesn’t happen for some reason, don’t lose hope yet. Here are few alternatives ways to install the MIDI driver that you can try out.
1. Use the Device Manager
Before jumping straight into installing new drivers, it’s better to check and see if you’ve already had some installed. Device Manager will come in handy here.
Device Manager is a tool in Microsoft Windows that gives you a bird’s eye of all the hardware installed on your system. Moreover, it also lets you check, install, update, or remove any driver from your computer.
To get started, press the Windows key + R to open the Run dialog box. Then, type devmgmt.msc and hit Enter.
This will launch the Windows Device Manager for you. It will show you the hardware devices that are already installed on your PC. Now, you can simply check and see if you have the MIDI driver installed on your PC. If you don’t, head to the next section.
To make sure that you are using the correct, updated driver, you just have to right-click on the driver. You’ll see a bunch of options appear like Properties, Update driver, Uninstall device, Disable device, etc. See if any of these work, and your MIDI driver will start working again.
2. Use Windows Update to Find the MIDI Drivers
How long has it been since you last updated your Windows? Windows Update is a free utility that installs updates automatically, both for Windows and for your own devices.
In your case, it might also install the MIDI driver that your Windows 10 is missing. To launch it, type update in the Windows start menu search bar and select the best match. When the Windows Update window appears, click Check for updates.
3. Install the MIDI Drivers From the Manufacturer’s Website
For most errors that occur on your computer, Windows has got you covered. There are a plethora of tools at your disposal. But at times, you just have to get your hands dirty and get it done yourself.
The third option is to install MIDI drivers from the website of your MIDI device’s manufacturer. It is common for manufacturers to make the device driver available on their websites. So, look up the manufacturer’s website, download, and install the driver.
The downloaded file will most likely either be an EXE file or a ZIP file. If it’s an EXE file, you can just launch it to install the driver. If it’s a ZIP file, though, you’ll first have to extract it and then install it from the EXE install wizard.
4. Use a Third-Party Application
When all else fails, your last resort is to use a professional application. Tons of apps are out there that can help you with this.
For example, Driver Easy is a quick and simple tool that we recommend, and we’ll be demonstrating how to use it in this article. However, there are plenty of apps out there that do a similar job, like DriverPack. You can choose any of these tools to get the job done.
If you decide to install Driver Easy, plug in the MIDI device and follow these steps:
- Click on the Scan button and let the app scan your PC’s connected devices.
- Next, click on Update. This will install all the outdated or missing drivers that your PC needs.
- Once Driver Easy reaches your MIDI device, it will automatically download and install its drivers on your PC.
Installing MIDI Drivers on Windows 10
Hopefully, one of the methods from above helped you install your drivers. But if you are still facing issues with the driver, it might be possible that your MIDI device is at fault. Plugging in a different MIDI device should confirm if that’s the case.
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
MIDI is the technical term for Musical Instrument Digital Interface, and it consists of a device that is able to connect to a multitude of musical devices.
MIDI drivers were originally made to control keyboards from a computer. MIDI drivers have evolved over the years and are now used by millions of Windows 10 users across the planet.
A particular case concerns Windows 10 Bluetooth midi drivers as these seem to be even more delicate and can easily fail to be recognized by Windows.
Does Windows 10 support MIDI over Bluetooth?
It does, yes. Simply open the Settings on your PC and go to Devices, then Bluetooth & other devices. In here, select Bluetooth and pair your device.
However, some users reported that their MIDI device was no longer recognized following a Windows update. If that is also your case, here’s what we suggest:
- Delete all the connected MIDI devices and try to pair them again (as shown above)
- Right-click the volume icon on the taskbar and select Sounds.
If your MIDI device is missing, choose to Show disconnected/disabled devices and see if that helps.
How do I install MIDI drivers on Windows 10?
1. Use the Windows troubleshooter
- Navigate to the Taskbar search box.
- Type Troubleshoot.
- Select Troubleshoot from the list.
- Select Hardware and Devices from the Troubleshooter.
- Once the troubleshooter opens click Next.
- Select the program that is not functioning from the populated list.
- Select the desired troubleshooting option.
Most hardware is plug-and-play. This means that they just plug into the computer and the computer will install the correct drivers.
This doesn’t always work out in the users’ favor and the diver has to be downloaded from a different source. Before taking the time to look for a driver perform the following tasks to troubleshoot the issue:
The troubleshooter will test the program to ensure that it is working. Run the compatibility troubleshooter for any other programs that are not compatible.
Not Compatible? Not a Problem
- Click in the taskbar search box.
- Type Run Programs.
- Select Run Programs Made for Previous Versions of Windows.
- This will open the Compatibility Troubleshooter.
- Follow the on-screen prompts.
So you’ve tried to run the troubleshooter and it didn’t work. That’s okay, get back up and try again. There is a way to make your program compatible with your version of Windows. Here’s how to do it:
Ensure that you run the Compatibility Troubleshooter for each program needing drivers.
Are you having trouble with the Windows Troubleshooter? Here’s a great guide on fixing the Troubleshooter if it stopped working for you.
2. Search for Drivers
Manually installing drivers is your next option. Manual installation of drivers can be dangerous if you are downloading drivers from an unknown or unrecognized source.
Ensure that all drivers are downloaded from trusted sources such as manufacturers’ websites.
Update drivers automatically
If you don’t want to go through the trouble of manually searching the web for the latest available driver, we suggest using a third-party driver updater software that will automatically do it for you.
Not only will the software update your firmware easily, but it will also constantly scan your device for new drivers by itself, so you don’t even have to do that.
⇒ Get Outbyte Driver Updater
3. Run in Compatibility Mode
- Find the program that you’re looking to run in Compatibility mode.
- Right-click on the program and select Properties.
- Click on the Compatibility Tab.
- Click on the box under compatibility mode.
- Select the version of windows that the program is able to work on.
- Click on Apply.
Most programs have the option to run in compatibility mode. To get your program to run in this mode, perform the aforementioned steps.
- Fix DRIVER VIOLATION error in Windows 10
- How to fix the outdated drivers error on Windows 11
- Windows cannot download drivers? Fix it now with these solutions
- Fix ACPI_DRIVER_INTERNAL error in Windows 10
- Seeing the driver error Code 32? Fix it in 4 simple steps
4. When All Else Fails
MIDI drivers are significantly harder to install in Windows 10 due to a number of compatibility issues. Each one of the fixes mentioned in this article could potentially fix the issue for your driver.
If you’ve run out of options call the manufacturer for your device and ask for assistance or for a location of compatible drivers.
That’s about it for this article. If you have anything to add regarding the subject, please feel free to do so in the comment section below.
Ivan Jenic
Windows Hardware Expert
Passionate about all elements related to Windows and combined with his innate curiosity, Ivan has delved deep into understanding this operating system, with a specialization in drivers and driver troubleshooting.
When he’s not tackling diverse driver-related problems, Ivan enjoys watching good movies and spending time hiking with his family and friends.
PLEASE READ THIS SOFTWARE LICENSE AGREEMENT («AGREEMENT») CAREFULLY BEFORE USING THIS SOFTWARE. YOU ARE ONLY PERMITTED TO USE THIS SOFTWARE PURSUANT TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. THIS AGREEMENT IS BETWEEN YOU (AS AN INDIVIDUAL OR LEGAL ENTITY) AND YAMAHA CORPORATION («YAMAHA»).
BY DOWNLOADING, INSTALLING, COPYING, OR OTHERWISE USING THIS SOFTWARE YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS LICENSE. IF YOU DO NOT AGREE WITH THE TERMS, DO NOT DOWNLOAD, INSTALL, COPY, OR OTHERWISE USE THIS SOFTWARE. IF YOU HAVE DOWNLOADED OR INSTALLED THE SOFTWARE AND DO NOT AGREE TO THE TERMS, PROMPTLY ABORT USING THE SOFTWARE.
1. GRANT OF LICENSE AND COPYRIGHT
Subject to the terms and conditions of this Agreement, Yamaha hereby grants you a license to use copy(ies) of the software program(s) and data («SOFTWARE») accompanying this Agreement, only on a computer, musical instrument or equipment item that you yourself own or manage. The term SOFTWARE shall encompass any updates to the accompanying software and data. While ownership of the storage media in which the SOFTWARE is stored rests with you, the SOFTWARE itself is owned by Yamaha and/or Yamaha’s licensor(s), and is protected by relevant copyright laws and all applicable treaty provisions. While you are entitled to claim ownership of the data created with the use of SOFTWARE, the SOFTWARE will continue to be protected under relevant copyrights.
2. RESTRICTIONS
- You may not engage in reverse engineering, disassembly, decompilation or otherwise deriving a source code form of the SOFTWARE by any method whatsoever.
- You may not reproduce, modify, change, rent, lease, or distribute the SOFTWARE in whole or in part, or create derivative works of the SOFTWARE.
- You may not electronically transmit the SOFTWARE from one computer to another or share the SOFTWARE in a network with other computers.
- You may not use the SOFTWARE to distribute illegal data or data that violates public policy.
- You may not initiate services based on the use of the SOFTWARE without permission by Yamaha Corporation.
- You may not use the SOFTWARE in any manner that might infringe third party copyrighted material or material that is subject to other third party proprietary rights, unless you have permission from the rightful owner of the material or you are otherwise legally entitled to use.
Copyrighted data, including but not limited to MIDI data for songs, obtained by means of the SOFTWARE, are subject to the following restrictions which you must observe.
- Data received by means of the SOFTWARE may not be used for any commercial purposes without permission of the copyright owner.
- Data received by means of the SOFTWARE may not be duplicated, transferred, or distributed, or played back or performed for listeners in public without permission of the copyright owner.
- The encryption of data received by means of the SOFTWARE may not be removed nor may the electronic watermark be modified without permission of the copyright owner.
3. TERMINATION
This Agreement becomes effective on the day that you receive the SOFTWARE and remains effective until terminated. If any copyright law or provision of this Agreement is violated, this Agreement shall terminate automatically and immediately without notice from Yamaha. Upon such termination, you must immediately abort using the SOFTWARE and destroy any accompanying written documents and all copies thereof.
4. DISCLAIMER OF WARRANTY ON SOFTWARE
If you believe that the downloading process was faulty, you may contact Yamaha, and Yamaha shall permit you to re-download the SOFTWARE, provided that you first destroy any copies or partial copies of the SOFTWARE that you obtained through your previous download attempt. This permission to re-download shall not limit in any manner the disclaimer of warranty set forth in Section 5 below.
You expressly acknowledge and agree that use of the SOFTWARE is at your sole risk. The SOFTWARE and related documentation are provided «AS IS» and without warranty of any kind. NOTWITHSTANDING ANY OTHER PROVISION OF THIS AGREEMENT, YAMAHA EXPRESSLY DISCLAIMS ALL WARRANTIES AS TO THE SOFTWARE, EXPRESS, AND IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY RIGHTS. SPECIALLY, BUT WITHOUT LIMITING THE FOREGOING, YAMAHA DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE SOFTWARE WILL BE CORRECTED.
5. LIMITATION OF LIABILITY
YAMAHA’S ENTIRE OBLIGATION HEREUNDER SHALL BE TO PERMIT USE OF THE SOFTWARE UNDER THE TERMS HEREOF. IN NO EVENT SHALL YAMAHA BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY DAMAGES, INCLUDING, WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EXPENSES, LOST PROFITS, LOST DATA OR OTHER DAMAGES ARISING OUT OF THE USE, MISUSE OR INABILITY TO USE THE SOFTWARE, EVEN IF YAMAHA OR AN AUTHORIZED DEALER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall Yamaha’s total liability to you for all damages, losses and causes of action (whether in contract, tort or otherwise) exceed the amount paid for the SOFTWARE.
6. OPEN SOURCE SOFTWARE
This SOFTWARE may include the software or its modifications which include any open source licenses, including but not limited to GNU General Public License or Lesser General Public License («OPEN SOURCE SOFTWARE»). Your use of OPEN SOURCE SOFTWARE is subject to the license terms specified by each rights holder. If there is a conflict between the terms and conditions of this Agreement and each open source license, the open source license terms will prevail only where there is a conflict.
7. THIRD PARTY SOFTWARE AND SERVICE
Third party software, service and data («THIRD PARTY SOFTWARE») may be attached to the SOFTWARE. IF, in the written materials or the electronic data accompanying the software, Yamaha identifies any software and data as THIRD PARTY SOFTWARE, you acknowledge and agree that you must abide by the terms of any agreement provided with the THIRD PARTY SOFTWARE and that the party providing the THIRD PARTY SOFTWARE is responsible for any warranty or liability related to or arising from the THIRD PARTY SOFTWARE. Yamaha is not responsible in any way for the THIRD PARTY SOFTWARE or your use thereof.
- Yamaha provides no express warranties as to the THIRD PARTY SOFTWARE. IN ADDITION, YAMAHA EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, as to the THIRD PARTY SOFTWARE.
- Yamaha shall not provide you with any service or maintenance as to the THIRD PARTY SOFTWARE.
Yamaha is not liable to you or any other person for any damages, including, without limitation, any direct, indirect, incidental or consequential damages, expenses, lost profits, lost data or other damages arising out of the use, misuse or inability to use the THIRD PARTY SOFTWARE.
U.S. GOVERNMENT RESTRICTED RIGHTS NOTICE:
The Software is a “commercial item,” as that term is defined at 48 C.F.R. 2.101 (Oct 1995), consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 (Sept 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.72024 (June 1995), all U.S. Government End Users shall acquire the Software with only those rights set forth herein.
8. GENERAL
This Agreement shall be interpreted according to and governed by Japanese law without reference to principles of conflict of laws. Any dispute or procedure shall be heard before the Tokyo District Court in Japan. If for any reason a court of competent jurisdiction finds any portion of this Agreement to be unenforceable, the remainder of this Agreement shall continue in full force and effect. All legal notices, notice of disputes and demands for arbitration, and any other notice which purports to change these provisions or to assert legal entitlements must be sent in writing to:
Yamaha Corporation
10-1, Nakazawa-cho, Chuo-ku, Hamamatsu, Shizuoka, 430-8650, Japan
9. ENTIRE AGREEMENT
This Agreement constitutes the entire agreement between the parties with respect to use of the SOFTWARE and any accompanying written materials and supersedes all prior or contemporaneous understandings or agreements, written or oral, regarding the subject matter of this Agreement.
10. AMENDMENT
Yamaha may amend, revise or update this Agreement at its discretion. Any change or update that Yamaha makes to this Agreement will be effective after you agree with the updated terms of this Agreement or use this SOFTWARE.
Last updated : November 1, 2024
As Windows 10 evolves, we are continuing to build in support for musician-focused technologies.
Let’s take a look at MIDI. Windows has had built-in MIDI support going back to the 16-bit days. Since then, most MIDI interfaces have moved to USB and our in-box support has kept pace, with a class driver and APIs that support those new interfaces.
Those unfamiliar with music technology may think of MIDI as just .mid music files. But that’s only a tiny part of what MIDI really is. Since its standardization in 1983, MIDI has remained the most used and arguably most important communications protocol in music production. It’s used for everything from controlling synthesizers and sequencers and changing patches for set lists, to synchronizing mixers and even switching cameras on podcasts using a MIDI control surface. Even the Arduino Firmata protocol is based on MIDI.
In this post, we’ll talk about several new things we’ve created to make MIDI even more useful in your apps:
- UWP MIDI Basics – using MIDI in Windows Store apps
- New Bluetooth LE MIDI support in Windows 10 Anniversary Update
- The Win32 wrapper for UWP MIDI (making the API accessible to desktop apps)
- MIDI Helper libraries for C# and PowerShell
In addition, we included a number of audio-focused enhancements when Windows 10 was released last summer. These enhancements included: low-latency improvements to WASAPI, additional driver work with partners to opt-in to smaller buffers for lower latency on modern Windows 10 devices like Surface and phones like the 950/950xl; tweaks to enable raw audio processing without any latency-adding DSP; a new low-latency UWP Audio and effects API named AudioGraph; and, of course, a new UWP MIDI API.
We’ve also recently added support for spatial audio for immersive experiences. This past fall, in the 1511 update, we enabled very forward-looking OS support for Thunderbolt 3 Audio devices, to ensure we’re there when manufacturers begin creating these devices and their high performance audio drivers. Cumulatively, this was a lot of great work by Windows engineering, all targeting musicians and music creation apps.
UWP MIDI Basics
In Windows 10 RTM last year we introduced a new MIDI API, accessible to UWP Apps on virtually all Windows 10 devices, which provides a modern way to access these MIDI interfaces. We created this API to provide a high performance and flexible base upon which we can build support for new MIDI interfaces.
We originally put this API out for comment as a NuGet package in Windows 8.1 and received a lot of feedback from app developers. What you see in Windows 10 is a direct result of that feedback and our testing.
The API plugs in nicely with the device enumeration and watcher APIs in UWP, making it easy to detect hot plug/unplug of devices while your app is running.
Here’s a simple way to get a list of MIDI devices and their IDs, using C#:
[code lang=”csharp”]
using Windows.Devices.Midi;
using Windows.Devices.Enumeration;
…
private async void ListMidiDevices()
{
// Enumerate Input devices
var deviceList = await DeviceInformation.FindAllAsync(
MidiInPort.GetDeviceSelector());
foreach (var deviceInfo in deviceList)
{
System.Diagnostics.Debug.WriteLine(deviceInfo.Id);
System.Diagnostics.Debug.WriteLine(deviceInfo.Name);
System.Diagnostics.Debug.WriteLine(«———-«);
}
// Output devices are enumerated the same way, but
// using MidiOutPort.GetDeviceSelector()
}
[/code]
And here’s how to set up a watcher and handle enumeration/watcher events, and also get the list of connected interfaces. This is a bit more code, but it’s a more appropriate approach for most apps:
[code lang=”csharp”]
private void StartWatchingInputDevices()
{
var watcher = DeviceInformation.CreateWatcher(
MidiInPort.GetDeviceSelector());
watcher.Added += OnMidiInputDeviceAdded;
watcher.Removed += OnMidiInputDeviceRemoved;
watcher.EnumerationCompleted += OnMidiInputDeviceEnumerationCompleted;
watcher.Start();
}
private void OnMidiInputDeviceEnumerationCompleted(
DeviceWatcher sender, object args)
{
// Initial enumeration is complete. This is when
// you might present a list of interfaces to the
// user of your application.
}
private void OnMidiInputDeviceRemoved(
DeviceWatcher sender, DeviceInformationUpdate args)
{
// handle the removal of a MIDI input device
}
private void OnMidiInputDeviceAdded(
DeviceWatcher sender, DeviceInformation args)
{
// handle the addition of a new MIDI input device
}
[/code]
Using a watcher for listing devices and handling add/remove is a best practice to follow in your apps. No one wants to restart their app just because they forgot to plug in or turn on their MIDI controller. Using the watcher makes it easy for your app to appropriately handle those additions/removals at runtime.
The API is simple to use, with strongly typed classes for all standard messages, as well as support for SysEx and buffer-based operations. This C# example shows how to open input and output ports, and respond to specific MIDI messages.
[code lang=”csharp”]
using Windows.Devices.Midi;
using Windows.Devices.Enumeration;
…
private async void MidiExample()
{
string outPortId = «id you get through device enumeration»;
string inPortId = «id you get through device enumeration»;
// open output port and send a message
var outPort = await MidiOutPort.FromIdAsync(outPortId);
var noteOnMessage = new MidiNoteOnMessage(0, 110, 127);
outPort.SendMessage(noteOnMessage);
// open an input port and listen for messages
var inPort = await MidiInPort.FromIdAsync(inPortId);
inPort.MessageReceived += OnMidiMessageReceived;
}
private void OnMidiMessageReceived(MidiInPort sender,
MidiMessageReceivedEventArgs args)
{
switch (args.Message.Type)
{
case MidiMessageType.NoteOn:
break;
case MidiMessageType.PolyphonicKeyPressure:
break;
// etc.
}
}
[/code]
In most cases, you would inspect the type of the message, and then cast the IMidiMessage to one of the strongly-typed messages defined in the Windows.Devices.Midi namespace, such as MidiNoteOnMessage or MidiPitchBendChangeMessage. You’re not required to do this, however; you can always work from the raw data bytes if you prefer.
The Windows 10 UWP MIDI API is suitable for creating all kinds of music-focused Windows Store apps. You can create control surfaces, sequencers, synthesizers, utility apps, patch librarians, lighting controllers, High Voltage Tesla Coil Synthesizers and much more.
Just like the older MIDI APIs, the Windows 10 UWP MIDI API works well with third-party add-ons such as Tobias Erichsen’s great rtpMIDI driver, providing support for MIDI over wired and Wi-Fi networking.
One great feature of the new API is that it is multi-client. As long as all apps with the port open are using the Windows 10 UWP MIDI API and not the older Win32 MME or DirectMusic APIs, they can share the same device. This is something the older APIs don’t handle without custom drivers and was a common request from our partners and customers.
Finally, it’s important to note that the Windows 10 UWP MIDI API works with all recognized MIDI devices, whether they use class drivers or their own custom drivers. This includes many software-based MIDI utilities implemented as drivers on Windows 10.
New Bluetooth LE MIDI support in UWP MIDI
In addition to multi-client support and the improvements we’ve made in performance and stability, a good reason to use the Windows 10 UWP MIDI API is because of its support for new standards and transports.
Microsoft actively participates in the MIDI standards process and has representatives in the working groups. There are several of us inside Microsoft who participate directly in the creation, vetting and voting of standards for MIDI, and for audio in general.
One exciting and relatively new MIDI standard which has been quickly gaining popularity is Bluetooth LE MIDI. Microsoft voted to ratify the standard based upon the pioneering work that Apple did in this space; as a result, Apple, Microsoft and others are compatible with a standard that is seeing real traction in the musician community, and already has a number of compatible peripherals.
In Windows 10 Anniversary Edition, we’ve included in-box support for Bluetooth LE MIDI for any app using the Windows 10 UWP MIDI API.
In Windows 10 Anniversary Edition, we’ve included in-box support for Bluetooth LE MIDI for any app using the Windows 10 UWP MIDI API. This is an addition which requires no changes to your code, as the interface itself is simply another transparent transport surfaced by the MIDI API.
This type of MIDI interface uses the Bluetooth radio already in your PC, Phone, IoT device or other Windows 10 device to talk to Bluetooth MIDI peripherals such as keyboards, pedals and controllers. Currently the PC itself can’t be a peripheral, but we’re looking at that for the future. Although there are some great DIN MIDI to Bluetooth LE MIDI and similar adapters out there, no additional hardware is required for Bluetooth LE MIDI in Windows 10 as long as your PC has a Bluetooth LE capable radio available.
We know latency is important to musicians, so we made sure our implementation is competitive with other platforms. Of course, Bluetooth has higher latency than a wired USB connection, but that tradeoff can be worth it to eliminate the cable clutter.
When paired, the Bluetooth LE MIDI peripheral will show up as a MIDI device in the device explorer, and will be automatically included in the UWP MIDI device enumeration. This is completely transparent to your application.
For more information on how to discover and pair devices, including Bluetooth LE MIDI devices, please see the Device Enumeration and Pairing example on GitHub.
We added this capability in Windows 10 Anniversary Edition as a direct result of partner and customer feedback. I’m really excited about Bluetooth LE MIDI in Windows 10 and the devices which can now be used on Windows 10.
Desktop application support for the UWP MIDI API
We know that the majority of musicians use desktop Win32 DAWs and utilities when making music. The UWP MIDI API is accessible to desktop applications, but we know that accessing UWP APIs from different languages and build environments can be challenging.
To help desktop app developers with the new API and to reduce friction, my colleague Dale Stammen on our WDG/PAX Spark team put together a Win32 wrapper for the Windows 10 UWP MIDI API.
The work our team does, including this API wrapper, is mostly partner-driven. That means that as a result of requests and feedback, we create things to enable partners to be successful on Windows. One of the partners we worked with when creating this is Cakewalk, makers of the popular SONAR desktop DAW application.
This is what their developers had to say about the Win32 wrapper for the UWP MIDI API, and our support for Bluetooth LE MIDI:
“We’re happy to see Microsoft supporting the Bluetooth MIDI spec and exposing it to Windows developers through a simplified API. Using the new Win32 wrapper for the UWP MIDI API, we were able to prototype Bluetooth MIDI support very quickly.
At Cakewalk we’re looking ahead to support wireless peripherals, so this is a very welcome addition from Microsoft.”Noel Borthwick, CTO, Cakewalk
We love working with great partners like Cakewalk, knowing that the result will directly benefit our mutual customers.
This Win32 wrapper makes it simple to use the API just like any flat Win32 API. It surfaces all the capabilities of the Windows 10 UWP MIDI API, and removes the requirement for your Win32 application to be UWP-aware. Additionally, there’s no requirement to use C++/CX or otherwise change your build tools and processes. Here’s a C++ Win32 console app example:
[code lang=”csharp”]
// open midi out port 0
result = gMidiOutPortOpenFunc(midiPtr, 0, &gMidiOutPort);
if (result != WINRT_NO_ERROR)
{
cout << «Unable to create Midi Out port» << endl;
goto cleanup;
}
// send a note on message to the midi out port
unsigned char buffer[3] = { 144, 60 , 127 };
cout << «Sending Note On to midi output port 0» << endl;
gMidiOutPortSendFunc(gMidiOutPort, buffer, 3);
Sleep(500);
// send a note off message to the midi out port
cout << «Sending Note Off to midi output port 0» << endl;
buffer[0] = 128;
gMidiOutPortSendFunc(gMidiOutPort, buffer, 3);
[/code]
This API is optimized for working with existing Win32 applications, so we forgo strongly typed MIDI messages and work instead with byte arrays, just like Win32 music app developers are used to.
We’re still getting feedback from partners and developers on the API wrapper, and would love yours. You can find the source code on GitHub. We may change the location later, so the aka.ms link ( http://aka.ms/win10midiwin32 ) is the one you want to keep handy.
For developers using recent versions of Visual Studio, we’ve also made available a handy NuGet package.
We’re already working with desktop app partners to incorporate into their applications this API using this wrapper, as well as other audio and user experience enhancements in Windows 10. If you have a desktop app targeting pro musicians and have questions, please contact me at @pete_brown on Twitter, or pete dot brown at Microsoft dot com.
MIDI Helper libraries for Windows Store apps
In addition to the Win32 API wrapper, we also have some smaller helper libraries for store app developers and PowerShell users.
The first is my Windows 10 UWP MIDI API helper, for C#, VB, and C++ Windows Store apps. This is designed to make it easier to enumerate MIDI devices, bind to the results in XAML and respond to any hot plug/unplug changes. It’s available both as source and as a compiled NuGet package.
It includes a watcher class with XAML-friendly bindable / observable collections for the device information instances.
RPN and NRPN Messages
Additionally, the helper library contains code to assist with RPN (Registered Parameter Number) and NRPN (Non-Registered Parameter Number) messages. These can be more challenging for new developers to work with because they are logical messages comprised of several different messages aggregated together, sent in succession.
Because we exposed the Windows.Devices.Midi.IMidiMessage interface in UWP, and the underlying MIDI output code sends whatever is in the buffer, creating strongly typed aggregate message classes was quite easy. When sending messages, you use these classes just like any other strongly typed MIDI message.
I’m investigating incorporating support for the proposed MPE (Multidimensional Polyphonic Expression), as well as for parsing and aggregating incoming RPN and NRPN messages. If these features would be useful to you in your own apps, please contact me and let me know.
MIDI Clock Generator
One other piece the library includes is a MIDI clock generator. If you need a MIDI clock generator (not for a sequencer control loop, but just to produce outgoing clock messages), the library contains an implementation that you will find useful. Here’s how you use it from C#:
[code lang=”csharp”]
private MidiClockGenerator _clock = new MidiClockGenerator();
…
_clock.SendMidiStartMessage = true;
_clock.SendMidiStopMessage = true;
…
foreach (DeviceInformation info in deviceWatcher.OutputPortDescriptors)
{
var port = (MidiOutPort)await MidiOutPort.FromIdAsync(info.Id);
if (port != null)
_clock.OutputPorts.Add(port);
}
…
public void StartClock()
{
_clock.Start();
}
public void StopClock()
{
_clock.Stop();
}
public double ClockTempo
{
get { return _clock.Tempo; }
set
{
_clock.Tempo = value;
}
}
[/code]
My GitHub repo includes the C++/CX source and a C#/XAML client app. As an aside: This was my first C++/CX project. Although I still find C# easier for most tasks, I found C++ CX here quite approachable. If you’re a C# developer who has thought about using C++ CX, give it a whirl. You may find it more familiar than you expect!
This library will help developers follow best practices for MIDI apps in the Windows Store. Just like with desktop apps, if you’re building a musician-focused app here and have questions, please contact me at @pete_brown on Twitter, or pete dot brown at Microsoft dot com.
The second helper library is a set of PowerShell commands for using the Windows 10 UWP MIDI API. I’ve talked with individuals who are using this to automate scripting of MIDI updates to synchronize various mixers in a large installation and others who are using it as “glue” for translating messages between different devices. There’s a lot you can do with PowerShell in Windows 10, and now MIDI is part of that. The repo includes usage examples, so I won’t repeat that here.
Conclusion
I’m really excited about the work we continue to do in the audio space to help musicians and music app developers on Windows.
Altogether, the UWP MIDI API, the Win32 wrapper for the UWP MIDI API, and the helper libraries for Windows Store apps and for PowerShell scripting make it possible for apps and scripts to take advantage of the latest MIDI tech in Windows 10, including Bluetooth MIDI.
I’m really looking forward to the upcoming desktop and Windows Store apps which will support this API, and technologies like Bluetooth LE MIDI. And, as I mentioned above, please contact me directly if you’re building a pro musician-targeted app and need guidance or otherwise have questions.
Resources
- Get started developing UWP apps
- Devices.Midi namespace documentation
- Official Windows 10 UWP MIDI API Sample
- GitHub Repo for the Win32 MIDI Wrapper
- Pete’s GitHub repos with MIDI and audio projects
- NuGet Package for the Win32 MIDI Wrapper
- Pete Brown Summer NAMM 2015 Keynote about Windows 10
- The MIDI Association
- A Studio in the Palm of your Hand: Developing Audio and Video Creation apps for Windows 10
- Spatial Audio with AudioGraph in UWP
- Spatial Audio in UWP Apps and Games
Download Visual Studio to get started.
The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.