: hello folks! : I'm using WIN-VC_6; have opened th MidiIn already and closed, but I still need a func to get the MIDI-data: who can tell me that? which header is required? : amando : : You want to get MIDI data from a closed port in other words??
: : hello folks! : : I'm using WIN-VC_6; have opened th MidiIn already and closed, but I still need a func to get the MIDI-data: who can tell me that? which header is required? : : amando : : : : : You want to get MIDI data from a closed port in other words?? No, I think (s)he wants to know what to put between the open and close function calls to get the MIDI data. Can I suggest looking at the MSDN for what the functions are?
: : 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?? : : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic] : :
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?? : : : : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic] : : : : : : : :
Comments
: I'm using WIN-VC_6; have opened th MidiIn already and closed, but I still need a func to get the MIDI-data: who can tell me that? which header is required?
: amando
:
:
You want to get MIDI data from a closed port in other words??
-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
: : I'm using WIN-VC_6; have opened th MidiIn already and closed, but I still need a func to get the MIDI-data: who can tell me that? which header is required?
: : amando
: :
: :
: You want to get MIDI data from a closed port in other words??
No, I think (s)he wants to know what to put between the open and close function calls to get the MIDI data. Can I suggest looking at the MSDN for what the functions are?
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
: : 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??
:
: -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
:
:
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??
: :
: : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
: :
: :
:
:
:
: