olilarkin / wdl-ol

Enhanced version of Cockos' iPlug - A simple-to-use C++ framework for developing cross platform audio plugins and targeting multiple plugin APIs with the same code. VST / VST3 / Audiounit / RTAS / AAX (Native) formats supported. NOTE: THIS IS OBSOLETE, PLEASE SEE IPLUG2:
https://github.com/iplug2
936 stars 189 forks source link

RTAS & AAX: IParam int + IKnobMultiControl = bad mValue #18

Open pylorca opened 11 years ago

pylorca commented 11 years ago

When using a parameter initialized as integer and IKnobMultiControl, this does not work properly on RTAS (and AAX). Only tested on Protools 7 for windows. VST seems to work correctly.

GetParam(kLowFreq)->InitInt("Low Freq", 1, 0, 3, "");

pLowFreqControl = new IKnobMultiControl(this, kLowFreq_X, kLowFreq_Y, kLowFreq, &bitmap, kVertical, DEFAULT_GEARING);
pGraphics->AttachControl(pLowFreqControl);

pay attention to the caption "%.2f %i", mValue, dY (dY is the mouse direction)

RTAS not working properly: rtas_mvalue_on_int_knobmulti

VST2 works fine: vst2_mvalue_on_int_knobmulti

pylorca commented 11 years ago

Now tested on PT 7, PT 8, P10, the same issue. I have not been able to find what causes this...

Control.mValue stops at certain value and does not adds until dY (mouse direction) has a high value (I must apply a lot of acceleration to the mouse, and the control becomes uncontrollable)

The above gifs shows a label with Control mValue and dY,

EDIT: I just try the example IPlugControls, and the same bug occurs.

pylorca commented 11 years ago

On IPlugRTAS.cpp void IPlugRTAS::SetParameter(int idx)

Seems to be a conflict with Control-> GetDiscrete (), if I change to "Continuous" (as with kTypeDouble) seems to work properly.

EDIT: I noticed that the plugin not remember the parameters values when you save the project

ghost commented 9 years ago

I found that to get InitBool parameters to work in RTAS I needed to populate the display text values eg: GetParam(kLFBypass)->SetDisplayText(0, "Off"); GetParam(kLFBypass)->SetDisplayText(1, "On");

In IPlugProcess.cpp::EffectInit - CPluginControl_List controls are created for kTypeEnum and kTypeBool types, which I assume count the number of display strings passed in to set the number of control states. If there aren't any strings, it just defaults to one state so you can't select it.

pylorca commented 9 years ago

@garynewby the problem persist on AAX, check an update about it in cockos forum: http://forum.cockos.com/showpost.php?p=1540323&postcount=6

pylorca commented 9 years ago

On IPlugAAX::InformHostOfParamChange(int idx, double normalizedValue) PT and Iplug normalized values does not match:

idbg: InformHostOfParamChange GetParam(i)->GetNormalized()=0.000000000000000000
idbg: InformHostOfParamChange normalizedValue=0.000000000000000000

idbg: InformHostOfParamChange GetParam(i)->GetNormalized()=0.250000000000000000
idbg: InformHostOfParamChange normalizedValue=0.250000000000000000

idbg: InformHostOfParamChange GetParam(i)->GetNormalized()=0.500000000000000000
idbg: InformHostOfParamChange normalizedValue=0.500000000058207661

idbg: InformHostOfParamChange GetParam(i)->GetNormalized()=0.750000000000000000
idbg: InformHostOfParamChange normalizedValue=0.750000000116415322

idbg: InformHostOfParamChange GetParam(i)->GetNormalized()=1.000000000000000000
idbg: InformHostOfParamChange normalizedValue=0.999999999941792339

The output dbg was generated by a printf inside the method, the example param: GetParam(kSw4)->InitEnum("ksw4", 0, 4, ""); but it happens with al param types.