COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 08-20-2019, 09:48 AM   #1
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 293
Default "Bool" parameter problem in AAX builds

Have a strange one here - not sure if it's a bug in iPlug or in Pro Tools.

Every "bool" parameter in my plugin responds to automation values when jumping around the timeline with transport stopped but does not respond when transport is running. On playback the variable will properly switch from OFF to ON but then never turns off thereafter (it's latching at "1/True").

Happens in Pro Tools on both Mac and PC.

These same controls work perfectly in VST/VST3 and AU apps.

Anyone else come across this?

BTW - I'm trying to run this in MSVS Debugger but I get a continuous stream of: "Exception thrown at 0x000000000F74FBE2 (ProTools.dll) in ProTools.exe: 0x80000004: Single step" and can't debug. Not sure what's wrong there.
Nonlinear is offline   Reply With Quote
Old 08-20-2019, 10:05 AM   #2
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 604
Default

Yep. It's a pain. The only solution I've found that works is to make bool, int or enum parameters doubles with a resolution of 1.0 for AAX plugins.
__________________
http://www.bozdigitallabs.com
bozmillar is offline   Reply With Quote
Old 08-20-2019, 10:24 AM   #3
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 293
Default

Quote:
Originally Posted by bozmillar View Post
Yep. It's a pain. The only solution I've found that works is to make bool, int or enum parameters doubles with a resolution of 1.0 for AAX plugins.
Hmmm - that's strange because InitBool, InitInt and InitEnum functions all ripple through, and convert to, InitDouble in IParam.cpp anyway albeit with different "mTypes". So that must mean the problem is in "mType = kTypeBool"?

What I don't understand is why it works when the transport is stopped. If I click around on the timeline the plugin bool parameters react as they should. Press play and they do not. So transport running has something to do with this - but why/how?

When I check automation points written in PT every point in Bool automation lanes show "Off" even though, clearly, some should say "On" (see attached screenshot). I have checked other plugins and PT does not do this with them - so apparently it is a bug in iPlug AAX implementation somewhere.
Attached Images
File Type: png PT Bool.png (3.0 KB, 49 views)

Last edited by Nonlinear; 08-20-2019 at 06:22 PM.
Nonlinear is offline   Reply With Quote
Old 08-21-2019, 10:24 AM   #4
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 293
Default

I found another post about this years ago (2016) but there was no conclusion to the thread. https://forum.cockos.com/showthread....highlight=bool

Was this ever resolved/fixed in iPlug or iPlug2?
Nonlinear is offline   Reply With Quote
Old 08-21-2019, 10:43 AM   #5
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 327
Default

The basic problem was that IPlug use AAX_CLinearTaperDelegate for enums/bools, I changed it to AAX_CStateTaperDelegate.

But there are other issues (rounding, for instance) with the AAX implementation that affect automation. See https://github.com/earlevel/wdl-ol/tree/earlevel.
earlevel is offline   Reply With Quote
Old 08-21-2019, 11:41 AM   #6
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 293
Default

Quote:
Originally Posted by earlevel View Post
The basic problem was that IPlug use AAX_CLinearTaperDelegate for enums/bools, I changed it to AAX_CStateTaperDelegate.

But there are other issues (rounding, for instance) with the AAX implementation that affect automation. See https://github.com/earlevel/wdl-ol/tree/earlevel.
Just before you posted this I tried changing IPlugAAX "case kTypeBool" to use the BinaryTaperDelegate instead of LinerTaperDelegate and now it works. "On" and "OFF" show properly in the automation lane as well.

In IPlugAAX.cpp under case IParam::kTypeBool:

Replace -> AAX_CLinearTaperDelegate<int>((int)p->GetMin(), (int)p->GetMax()),
With -> AAX_CBinaryTaperDelegate<int>(),
Nonlinear is offline   Reply With Quote
Old 08-21-2019, 12:35 PM   #7
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 604
Default

I remember last time this came up that I tried that fix. I don't remember exactly what the deal was, but some other issues cropped up that made me revert back to the way I was doing it before. Maybe it was just the rounding errors, where the knob and the values didn't match up. If it was that, it seems like it should be a trivial fix, but I just remember every time I'd fix one thing, it would break something somewhere else.

I think in the end, I just came to peace with the idea that I won't use knobs with ints or enums.
__________________
http://www.bozdigitallabs.com
bozmillar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.