Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love this site! It's so nice to know that there are so many people out there who are willing to share their knowledge..."

Geography

Where in the world do Tek-Tips members come from?
Unscruffed (Programmer)
21 Jul 12 16:44
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 --> vb6

Public Const MM_MIM_LONGDATA = &H3C4 

The callback function used for testing is:

CODE --> vb6

' 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!

strongm (MIS)
21 Jul 12 18:23
You using a MIDI to USB converter, by any chance? Some of them don't like sysex messages.
Unscruffed (Programmer)
21 Jul 12 19:05
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!

Unscruffed (Programmer)
21 Jul 12 19:08
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!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close