I'm getting crazy because I would like to "link" a MIDI message to a GUI Parameter, but I can't figure out how to do it.
I think the method SetDirty() is somewhere involved, but I do not understand where exactly...
I have a GUI parameter in the constructor :
Code: Select all
IControl_knobMainVolume = new IKnobMultiControl(this, kMainVolumeX, kMainVolumeY, kMainVolume, &knob_0001);
pGraphics->AttachControl(IControl_knobMainVolume);
AttachGraphics(pGraphics);
//the knob appear and works correctly
Code: Select all
//... if a midi "control change 7" message occurs -> :
GetParam(kMainVolume)->Set(pMsg->mData2); //this work fine, the parameter is linked to CC#7
If I send a MIDI cc#7 message, the volume changes properly.
But, when I send a MIDI cc#7 message (also if the volume changes properly), the knob image remains unchanged (mid position), it doesn't follow the value set with MIDI slider.
I know I have to do something with SetDirty() , Draw() , and or other methods, do anyone knows how to do it? Or if there's some resource on the internet that explains this thing...
Thank you in advance,