tags:

views:

69

answers:

1

So I have a little (musical) keyboard that has USB midi interface. I know you can program to this (many programs accept input from the midi device via USB interface) but where do you begin to program a midi device?

Ideally I'm looking for a platform-independent api, through Python or something.

+2  A: 

If you want to interact with a MIDI device in real time, your best bet is to use an existing library. The task is more complex than it seems at first time involving timing and scheduling of events.

You can look into PortMidi (part of PortMedia project: http://portmedia.sourceforge.net/) or MidiShare (http://midishare.sourceforge.net/).

Of course you should learn about the MIDI protocol itself. There are many short descriptions on the network you can start from the MMA site (the organization that oversees the MIDI standard) http://www.midi.org/aboutmidi/tut_techomidi.php (or just google for "midi protocol").

Consider that those are very high level descriptions, you may want to buy a more detailed book like "Maximum MIDI - Music Applications in C++" ( http://www.amazon.com/Maximum-MIDI-Music-Applications-C/dp/1884777449 ). It's an old book that explains how to create MIDI applications using the standard Windows API but the concepts are all there.

Remo.D
Thanks Mr. Lion!! :D
bobobobo