Sergio
Sergio

Reputation: 1

What is the best way to program MIDI for Windows?

I am looking to write a small program that receives input from an external device and then sends MIDI signals to any MIDI compatible software. What is the best way, from the MIDI perspective, to go about this? Are there any specific libraries I should look into?

Thanks.

Upvotes: 0

Views: 1233

Answers (2)

Aries
Aries

Reputation: 353

MIDI protocol is quite simple, most MIDI APIs offer manipulation with MIDI events and their parameters. What differs is the way how MIDI devices are enumerated and opened.

Correct answer depends on your requirements.

  • What input from what external device will you use? Will it be another MIDI device, mouse, keyboard or something that will allow input event parsing? Or will you need some low level hardware access? This one may influence programming language selection, if Java, C++ or something different and therefore the library choice.
  • What programming language do you prefer? C++, Java... If you plan to develop in Java, you can do that with API that JDK provides.
  • Should the program be multiplatform? If it should and you plan to develop in C++, you should use multiplatform MIDI library, e.g http://portmedia.sourceforge.net/ mentioned by darasan or https://github.com/jdkoftinoff/jdksmidi Otherwise you could just stick with native platform API (Windows API, ALSA, not sure about Mac stuff).
  • Do you plan to use some specific MIDI device? Maybe there is library that provides easy access to some device functions via MIDI, that you would have to handle by yourself (e.g. some predefined SysEx data)

With more question details more libraries (or less libraries) can be recommended.

Upvotes: 0

darasan
darasan

Reputation: 130

PortMidi! http://portmedia.sourceforge.net/

It's easy to use, examples for Windows are provided.

Upvotes: 1

Related Questions