02-25-2010, 06:05 AM
Gintaras,
I found this http://web.tiscalinet.it/giordy/midi-tech/lowmidi.htm:
Could you put it into QM and then I'll test.
Thanks,
jimmy Vig
I found this http://web.tiscalinet.it/giordy/midi-tech/lowmidi.htm:
HMIDIOUT handle;
MIDIHDR midiHdr;
UINT err;
char sysEx[] = {0xF0, 0x7F, 0x7F, 0x04, 0x01, 0x7F, 0x7F, 0xF7};
/* Open default MIDI Out device */
if (!midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL))
{
/* Store pointer in MIDIHDR */
midiHdr.lpData = (LPBYTE)&sysEx[0];
/* Store its size in the MIDIHDR */
midiHdr.dwBufferLength = sizeof(sysEx);
/* Flags must be set to 0 */
midiHdr.dwFlags = 0;
/* Prepare the buffer and MIDIHDR */
err = midiOutPrepareHeader(handle, &midiHdr, sizeof(MIDIHDR));
if (!err)
{
/* Output the SysEx message */
err = midiOutLongMsg(handle, &midiHdr, sizeof(MIDIHDR));
if (err)
{
char errMsg[120];
midiOutGetErrorText(err, &errMsg[0], 120);
printf("Error: %s\r\n", &errMsg[0]);
}
/* Unprepare the buffer and MIDIHDR */
while (MIDIERR_STILLPLAYING == midiOutUnprepareHeader(handle, &midiHdr, sizeof(MIDIHDR)))
{
/* Should put a delay in here rather than a busy-wait */
}
}
/* Close the MIDI device */
midiOutClose(handle);
Could you put it into QM and then I'll test.
Thanks,
jimmy Vig