Thread: IPlug - Youlean
View Single Post
Old 06-14-2017, 09:31 AM   #123
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by HoRNet View Post
No sorry it's for receiving MIDI Control change values, VST3 must expose them as plugin parameters.

It's really easy (but my code comes from the v3.5 of the VST3 sdk because 3.6 required c++11 and this breaks osx 10.6 compatibility.

Code:
// if does midi is set creates 128 fake parameters to be used to map control change since
// vst3 doesn't pass any CC to plugin but wants it mapped to a plugin parameter
if(DoesMIDI()) {
    int origParamNum = NParams();
    for (int k = 0; k < 128; k++) {
        Parameter* param = new RangeParameter( STR16("MIDI CC"),																						
            origParamNum + k,																						
            STR16(""),																						
            0,																						
            127,																						
            0,																						
            0, // continuous																						
            ParameterInfo::kCanAutomate,																						
            kRootUnitId);
        param->setPrecision (1.);
        parameters.addParameter(param);				
    }
}
This is in the initialize of the IPlugVST3
Thanks. Is this the whole code? This will be handy having too...
Youlean is offline   Reply With Quote