Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C/C++ library for reading MIDI signals from a USB MIDI device

I want to write C/C++ programs that take input from a MIDI device.

The MIDI device connects to my PC using a USB connector.

I'm looking for a (C/C++ implemented) library that I can use to read the MIDI signals from the MIDI device through the USB port.

I'm happy manipulating the MIDI data once I get it, I just don't want to have to implement the code for its capture.

I'm planning on writing my code using the Bloodshed Dev-C++ IDE on Windows XP.

like image 704
David Avatar asked Aug 06 '08 09:08

David


People also ask

Can you run MIDI through USB?

If your computer has an available USB port, you can use a MIDI to USB Interface. This is the simplest, fastest way to get your MIDI keyboard working for you, especially if you're using a laptop. Most USB interfaces are Plug & Play. This means you don't have to download software to use it.

How do I read MIDI inputs?

You can also access it via the View > Input Monitor menu. From the Options menu, select MIDI Devices. This will display a new window where you will see the name of your controller in the MIDI Inputs panel. Click on it to select it and then click on OK.


2 Answers

PortMidi is another open source cross-platform MIDI I/O library worth checking out. On the other hand, if you are working on a sysex type of app, then direct Win32 works easily enough.

Just came across another open source cross-platform framework that includes MIDI support: Juce.

Also, I should note that there isn't anything special about a USB connected MIDI device. It will still be presented as a MIDI device in Windows and you will use standard MIDI APIs (mmsystem) to communicate with it.

[July 2014] I just came across RtMidi that looks to be a nice, compact, open source cross-platform C++ library.

like image 67
sean e Avatar answered Oct 03 '22 01:10

sean e


Check out the open source project LMMS. It's a music studio for Linux that includes the ability to use MIDI keyboards with software instruments. If you dig around in source files with 'midi' in the name, you'll probably find what you're looking for.

like image 28
andrewrk Avatar answered Oct 03 '22 01:10

andrewrk