MIDI I/O in DirectX

Started by
2 comments, last by Chadivision 15 years, 7 months ago
I've got the March 2008 DirectX SDK, and I didn't see anything in the documentation about using MIDI input and output ports. Is there currently a way in DirectX to receive MIDI input and send signals to a MIDI output port (for playback on hardware synths), or am I going to need to use an older version or DirectX to do this? (Direct Music, maybe?) If DirectX isn't the way to go, I'm open to using other API's. Does anyone have any suggestions? Basically all I'm looking for is an API that lets me enumerate MIDI I/O devices and send and receive MIDI signals using those device's ports. Thanks.
Atari 2600 Homebrew Author - Someone who is smart enough to learn 6502 assembly language but dumb enough to actually want to use it.
Advertisement
Quote:Original post by Chadivision
am I going to need to use an older version or DirectX to do this? (Direct Music, maybe?)
Yup, you're going to need an older version that includes DirectMusic for this sort of thing to work. You should also look into the winmm.dll library - it's a bit old so finding good quality information can be tricky, but it should do what you want.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Using winmm.dll (Windows MultiMedia APIs) is definitly worth having a look at. As far as I know, it is available on all computers with windows installed (I think it's been there prior to windows 95). The API is not too hard to work with but the documentation can be a little misleading. A good resource I found to get started is this (althought that website can also be misleading...). There's not a lot of info on the web but you don't have to work with a huge amount of functions so if it doesn't work at first, a little bit of parameter tweaking should do the job.

Chances are you're thinking of a C++ implementation but if you're aiming for C# I have a basic working implementation (this was helpful). PM me for more details and I could send it to you.
It sounds like the Windows multi-media dll is going to be a better way to go. I've already written some audio code using XAudio2, so using Direct Music along with it would be a pain. (As far as I understand it, you can't have two different DirectX SDK's installed at the same time. Am I correct about this?)

I am coding in C++. I've been meaning to learn some C#, so whenever I get around to it, I'll check out the link that you gave me.

Thanks.
Atari 2600 Homebrew Author - Someone who is smart enough to learn 6502 assembly language but dumb enough to actually want to use it.

This topic is closed to new replies.

Advertisement