wdl-ol icon indicating copy to clipboard operation
wdl-ol copied to clipboard

RTAS & AAX: IParam int + IKnobMultiControl = bad mValue

Open pylorca opened this issue 11 years ago • 5 comments

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 avatar May 06 '13 19:05 pylorca

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 avatar Jun 28 '13 19:06 pylorca

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

pylorca avatar Jun 28 '13 22:06 pylorca

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.

ghost avatar May 25 '15 17:05 ghost

@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 avatar Jun 30 '15 19:06 pylorca

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.

pylorca avatar Jul 03 '15 19:07 pylorca