tags:

views:

20

answers:

2

This guys says yes: http://web.tiscalinet.it/giordy/midi-tech/lowmidi.htm Same with a really old book from 1998 (Maximum MIDI). MSDN doesn't mention it. I'm not getting any sound.

  • I fill a char buffer with status|note|velocity|status|note|velocity...
  • Set lpData, dwBufferLength, and dwFlags of a MIDIHDR struct
  • call midiOutPrepareHeader (MMSYSERR_NOERROR)
  • call midiOutLongMsg (MMSYSERR_NOERROR)

Still no sound! Spamming midiOutShortMsg is working but will that work for slower machines? Did they change the functionality?

Thanks.

+2  A: 

I'm an idiot! I figured it out: Microsoft GS Wavetable Synth does NOT support sending multiple short messages in midiOutLongMsg. The MIDI Mapper DOES!

Brian
Don't forget to accept your own answer as correct
abatishchev
Yeah, it's making me wait 2 days to be able to accept my own answer. Will do.
Brian
Is there documentation on this somewhere? Where did you find this?
Brad
A: 

midiOutShortMsg should be plenty fast, even on slow machines. MIDI interfaces themselves (hardware that is, but some software will limit themselves) run at 31,250 baud. This of course is ignoring any slow code you may have wrapped around where you call midiOutShortMsg.

Anyway, technically you should also be able to get away with one status byte, if the following notes use the same status byte. So, if you want to do note on/off (using velocity 0 for off) and those notes are on the same channel, you could do this:

status|note|velocity|note|velocity|note|velocity|note|velocity

This is called running status.

Brad