Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not receiving MM_MIM_LONGDATA

Status
Not open for further replies.

Unscruffed

Programmer
Apr 2, 2002
102
AU
Hi guys. I'm trying to receive a MIDI SYSEX message from a Behringer Bass V-Amp. I've tried both the callback and subclass methods, and all messages are received except MM_MIM_LONGDATA for sysex.

The process I'm using is:
Send sysex message F0 00 20 32 7F 7F 01 F7
This is a request for the unit to identify itself.
I have comfirmed (using MidiOx) that a 30 odd byte response is being sent in the correct format.

MM_MIM_LONGDATA is declared as:
Code:
Public Const MM_MIM_LONGDATA = &H3C4

The callback function used for testing is:
Code:
' MidiInProc '
Public Function MidiInProc(ByVal hMidiIn As Long, ByVal wMsg As Long, ByVal dwInstance As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Long) As Long
    Select Case wMsg
        Case MM_MIM_OPEN
            Debug.Print "MidiInProc: MM_MIM_OPEN"
        Case MM_MIM_CLOSE
            Debug.Print "MidiInProc: MM_MIM_CLOSE"
        Case MM_MIM_DATA
            Debug.Print "MidiInProc: MM_MIM_DATA"
        Case MM_MIM_LONGDATA
            Debug.Print "MidiInProc: MM_MIM_LONGDATA"
        Case Else
            Debug.Print "MidiInProc:"; wMsg
    End Select
End Function

All messages are being received except MM_MIM_LONGDATA (sysex). The same thing happens if I use subclassing instead of the callback.

Any idea why this might be happening?

Heaven doesn't want me, and Hell's afraid I'll take over!
 
You using a MIDI to USB converter, by any chance? Some of them don't like sysex messages.
 
I am, but it works fine with every other software, including MidiOx and the Behringer editor, which both catch Sysex no problem.

I just found some code which I'm looking at now which prepares a midiIn buffer before trying to receive, which I didn't know about before. Maybe this is the problem. I've just been trying to catch the message so far, and I'm now thinking that an input buffer has to be prepared first, and that this is what is causing the message to just disappear into thin air.

Unfortunately, the code is difficult to read. What I don't get is that the callback function is totally empty, and the author's comments indicate that there shouldn't be any code in there. Very odd.

Heaven doesn't want me, and Hell's afraid I'll take over!
 
Here's a link to the code I found if you want to take a look.
Link

Heaven doesn't want me, and Hell's afraid I'll take over!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top