|
04-06-2015, 05:43 PM
|
#1
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
Crazy buttons
I am having an issue with certain buttons on RTAS and AAX. What is happening is that the buttons will no longer switch to the next selection when pressed. I am not sure what is happening, since it is only affecting certain buttons.
Right now, I am trying to debug a button (7 positions). It will cycle through about 2 or 3 positions, and then it won't switch anymore. I am trying to step through everything, but I still can't figure it out.
Any ideas?
|
|
|
04-07-2015, 06:28 AM
|
#2
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
OK, I might have found a solution to my problem, but I don't know what ramifications it may have.
In IPlugAAX.cpp (WDL-OL), there is an UpdateParameterNormalizedValue() function. If I comment out the following it appears to work.
Code:
// if (GetGUI())
// {
// GetGUI()->SetParameterFromPlug(paramIdx, iValue, true);
// }
// OnParamChange(paramIdx);
I think OnParamChange() is being called from multiple locations before the normalized value of the control (mValue) is being set.
Is anyone able to check this. I think you could figure it out by running AAX in debug mode and checking how many times OnParamChange() is being called when you click an ISwitchControl() (regardless of the number of switch positions).
I will do more testing. If I leave it commented out, I am not sure if that will impact preset recalls or automation. I also need to check RTAS to see if the issue occurs there.
|
|
|
04-08-2015, 09:54 AM
|
#3
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
I'm not sure if this is related to your issue or not, but I've found that if i call anything other than InitDouble on a parameter in PT, it doesn't work correctly. It's been a long time since I've looked in to the issue so I don't remember exactly what happens, but I know if I call initInt or InitEnum or initBool, the controls don't work in PT the way they should.
I get around this by just calling initDouble with every param in PT.
|
|
|
04-14-2015, 10:52 AM
|
#4
|
Human being with feelings
Join Date: Apr 2009
Posts: 191
|
|
|
|
05-25-2015, 10:05 AM
|
#5
|
Human being with feelings
Join Date: Feb 2014
Posts: 63
|
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 counts 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.
Last edited by gstuff; 05-25-2015 at 10:13 AM.
|
|
|
06-30-2015, 12:59 PM
|
#6
|
Human being with feelings
Join Date: Apr 2009
Posts: 191
|
Quote:
Originally Posted by random_id
OK, I might have found a solution to my problem, but I don't know what ramifications it may have.
In IPlugAAX.cpp (WDL-OL), there is an UpdateParameterNormalizedValue() function. If I comment out the following it appears to work.
Code:
// if (GetGUI())
// {
// GetGUI()->SetParameterFromPlug(paramIdx, iValue, true);
// }
// OnParamChange(paramIdx);
|
If you comment these lines of code, you can't use automations from pt.
About the bug,
for example, on int parameters (can be bool, enum, integer), 3 positions (0,1,2)
Normalized --- position
for aax internals:
0.0 to 0.49 --- 0
0.5 to 0.99 --- 1
1.0 --- 2
for Iplug:
0.0 to 0.24 --- 0
0.25 to 0.75 --- 1
0.76 to 1 --- 2
|
|
|
06-30-2015, 01:47 PM
|
#7
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by pylorca
Normalized --- position
for aax internals:
0.0 to 0.49 --- 0
0.5 to 0.99 --- 1
1.0 --- 2
for Iplug:
0.0 to 0.24 --- 0
0.25 to 0.75 --- 1
0.76 to 1 --- 2
|
Hmm, both are mathematically wrong, but AAX is just plain stupid. For 3 values I would expect this:
>=0 && <1/3 --- 0
>=1/3 && <2/3 --- 1
>=2/3 && <=1 -- 2
|
|
|
06-30-2015, 03:36 PM
|
#8
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
need to look at this at some point. Don't have PT10 any more for RTAS which makes it more tricky. The issue may be something to do with PT params being 32bit values when IPlug's are 64bits
|
|
|
07-03-2015, 12:49 PM
|
#9
|
Human being with feelings
Join Date: Apr 2009
Posts: 191
|
I've found the problem, But I don't know how to fix it...
On IPlugAAX::InformHostOfParamChange(int idx, double normalizedValue)
PT and Iplug normalized values does not match:
Code:
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.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:16 AM.
|