void IPlugInstrument::ProcessMidiMsg(IMidiMsg* pMsg) { // List all MIDI messages this plugin will handle. switch (pMsg->StatusMsg()) { case IMidiMsg::kNoteOn: case IMidiMsg::kNoteOff: break; case IMidiMsg::kControlChange: switch (pMsg->ControlChangeIdx()) { case IMidiMsg::kChannelVolume: { // Update the volume parameter in the UI only. double volume = pMsg->ControlChange(IMidiMsg::kChannelVolume); if (GetGUI()) GetGUI()->SetParameterFromPlug(kVolume, volume, false); else GetParam(kVolume)->Set(volume); InformHostOfParamChange(kVolume, volume); } break; case IMidiMsg::kAllNotesOff: break; // Discard all other Control Change messages. default: SendMidiMsg(pMsg); return; } break; // Discard all other MIDI messages. default: SendMidiMsg(pMsg); return; } // Don't handle the MIDI message just yet (we'll do that in // ProcessDoubleReplacing), but instead add it to the queue. mMidiQueue.Add(pMsg); }
void IPlugAAX::SetParameterFromGUI(int idx, double normalizedValue) { Trace(TRACELOC, "%d:%f", idx, normalizedValue); InformHostOfParamChange(idx, normalizedValue); }