Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
System Exclusive MIDI commands.
#9
Does not work. QM doesn't seem to be running most of the code.

Played around:
Function MIDI_SysEx
Code:
Copy      Help
function str'SysEx;;Sends MIDI SysEx command over Windows default MIDI device.
int handle e
MIDIHDR midiHdr
SysEx.decrypt(8 SysEx)
if !midiOutOpen(&handle 0 0 0 CALLBACK_NULL)
,midiHdr.lpData=SysEx
,midiHdr.dwBufferLength=SysEx.len
,e = midiOutPrepareHeader(handle &midiHdr sizeof(MIDIHDR))
,if !e
,,e = midiOutLongMsg(handle &midiHdr sizeof(MIDIHDR))
,if e
,,,str errMsg.all(120)
,,,midiOutGetErrorText(e errMsg 120)
,,,out "Error: %s" errMsg
,,rep
,,,if(MIDIERR_STILLPLAYING != midiOutUnprepareHeader(handle &midiHdr sizeof(MIDIHDR))) break
,,,1
,midiOutClose(handle)
,ret 1
That ERRORS: The specified device handle is invalid. (NOTE: EXAMPLE above fixed. Now works!!!)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)