1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
void CALLBACK midiInProc( HMIDIIN hMidiIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
{
int toto;
if( MIM_DATA == uMsg )
{
NoMidiProject* myNoProj = (NoMidiProject*)dwInstance;
if( 0 != myNoProj )
{
MidiProject* myProj = myNoProj->GetMidiProject();
if( 0 != myProj )
{
if( 0 != myProj->_Itf )
{
int channel = (dwParam1 & 0x0000000F) + 1;
int control = (dwParam1>>8) & 0x000000FF;
int valeur = dwParam1 >> 16;
int status = (dwParam1 & 0x000000F0) >> 4;
//affichage de la valeur recu
myProj->_Itf->AfficherMessage(channel, control, valeur, status);
//recherche du ControlNoteMidi concernant le message
ControlNoteMidi* myControlNoteMidi = myProj->GetControlNoteMidi(channel, control);
if( 0 != myControlNoteMidi )
{
myProj->_Itf->AfficherControlMidi(myControlNoteMidi);
}
}
}
}
}
} |
Partager