Can anyone help me with reading MIDI input (from a controller keyboard or similar)? I want to write a software synthesiser, I'm having trouble with getting the audio part working (it seems the library I'm using, Port Audio, is basically dead in the water and I don't know what I'm going to do about that).

So I thought I'd carry on and write everything but the actual audio out part for now (until I come across another method for accessing the sound card for raw sample output).

So I'll want some way of detecting a MIDI device and events. I've done this with Arduino so I know a bit about the structure of MIDI messages, etc, but no idea how I'd incorporate this into a Windows program.

Does anyone have any suggestions?