• Advertisement

Archived

This topic is now archived and is closed to further replies.

Send MIDI dump request

This topic is 5374 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m working on a MIDI dump program, to send and recive programs by system exclusive messages to one of my synthesizers. The transfer to the synth from the computer is easy, but how to recive programs from the synth? I know I must send a request message, but I get no answer from the synth I use windows multimedia services. If anyone have succeeded to send a program dump from a computer to a synthesizer, please tell me how to do it, I have spent days on this problem already! How I think it should work (doesn''t work):
  

midiInOpen(&m_kMidiInHandle, iDeviceInNr, callback, 0, CALLBACK_FUNCTION  )) == MMSYSERR_NOERROR)

midiInStart(m_kMidiInHandle);

// dump request

unsigned char msg[] = {0xF0, 0x25, 0x20, 0x09, 0x20, 0x00, 0xF7};

MIDIHDR     midiHdr;
UINT        ret;
midiHdr.lpData = (char*)(&msg[0]);
midiHdr.dwBufferLength = iSize;
midiHdr.dwBytesRecorded = 0;
midiHdr.dwFlags = 0;
midiHdr.dwOffset = 0;

ret = midiInPrepareHeader(m_kMidiInHandle,  &midiHdr, sizeof(MIDIHDR));

if(ret == MMSYSERR_NOERROR)
{
ret = midiInAddBuffer(m_kMidiInHandle, &midiHdr, sizeof(MIDIHDR));

while(MIDIERR_STILLPLAYING == midiInUnprepareHeader(m_kMidiInHandle, &midiHdr, sizeof(MIDIHDR)))
{
    break;
}

}

  
I get no responce from the callback function when I send the sysex message! But I get responce from other messages like, control change messages and note on/off. Please help me, Gandalf.

Share this post


Link to post
Share on other sites
Advertisement
Found the problem! The buffer was to small. Thanks anyway!

Share this post


Link to post
Share on other sites

  • Advertisement