Sound & Music

Moderators: Sephiroth
Number of threads: 611
Number of posts: 1220

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
WIN-midiIn Posted by amando on 13 Dec 2003 at 9:27 AM
This message was edited by amando at 2004-3-7 13:59:23





Report
Re: WIN-midiIn Posted by Sephiroth on 13 Dec 2003 at 10:16 AM
: 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??

-Sephiroth

Report
Re: WIN-midiIn Posted by Jonathan on 13 Dec 2003 at 3:26 PM
: : 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?

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.");

Report
Re: WIN-midiIn Posted by amando on 17 Dec 2003 at 1:45 PM
: : 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
:
:



Report
Re: WIN-midiIn Posted by squezel on 11 Feb 2004 at 9:23 AM
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
: :
: :
:
:
:
:




 

Recent Jobs