Hey dude!
Cool that you're messing with midi!
check these things out :
- Please make sure that your callback-type is correct.
CALLBACK_FUNCTION is often used (if u program in C, and the
callbackfunction is implemented in the same .obj). Otherwise
use CALLBACK_THREAD or CALLBACK_WINDOW (if u want to pass the
midimsg's to another dialog/window or thread), but forget these.
- Make sure u call midiInStart(..) (else nothing will happen)
- Your callback function must be declared in the following format :
void CALLBACK myMidiInCallback(HMIDIIN _hMidiIn,
UINT wMsg,
DWORD dwInstance,
DWORD dwParam1,
DWORD dwParam2){
/* ...do stuff with incoming midi msg's... */
/* place a 'MessageBox(NULL,"YEAH!! I receive midi in!",MB_OK);*/
}
- make sure you extract the midi-bytes from the 'wMsg' parameter with
functions like LOWORD(wMsg) or HIWORD(wMsg). Try to search for a
win32 C example sourcecode to see how its done.
good luck and keep the funky coding going!
funky greetz
squezel
[www.boompje.com]
[www.mannetje.org]
: : : hello folks!
: : : I'm using WIN-VC_6; have opened th MidiIn already, but I still need a func to get the MIDI-data: who can tell me that? which header is required? in the MSDN I only found the function "MidiInMessage", which returns a DWORD, but it seems it won't make it (BTW: if the MSDN would give an advice, there would be no need to post... of course, any interface has to be opened to get anything).
:
: : :
:
: amando
: : :
: : :
: : You want to get MIDI data from a closed port in other words??
: :
: : -Sephiroth
: :
: :
:
:
:
: