[Solved] Issue with automation and AAX plug-ins + Pro Tools

Hello !

I have one of the strangest issues I have ever had with process.audio Sugar and Pro Tools on mac OS. It’s related to automation and the key shortcuts in Pro Tools. In Sugar, there are three big sliders on the bottom for controlling some filters cutoff frequencies and a gain. The issue happens only for them.

In Pro Tools, it is possible to enable automation for a given parameter by clicking on it and using the keys CTRL+CMD+OPT at the same time. For that thing to work, we need to write the content of the function PluginEditor::getControlParameterIndex() to tell Pro Tools some controls are associated with some parameter indexes, and that shortcut works.

There is also another shortcut, CTRL+CMD+click on the same control, which shows in the Pro Tools UI track the curve of the associated parameter automation. Then it is possible to draw a curve and to do whatever you want there. It is also possible to select the parameter automation curve you want to see by selecting it in a combo box displayed on the left of the track waveforms in Pro Tools. These two methods are supposed to be equivalent to show the wanted parameter automation curve.

However, for a reason I don’t get, if I use the two previous shortcuts to enable automation + to display the curve, I can draw whatever I want and play the track, the three parameters I have written before won’t move at all ! If I close the UI, or replace the use of the second shortcut with clicking on the combo box and then drawing the curve, automation works as expected. In the case the automation is doing nothing, the setParameters functions in juce_AAX_Wrapper.cpp are not even called during playback. And once I do anything to make that automation curve do something (closing the UI, selecting another automation parameter with a ComboBox), the given parameter automation works.

I have even put a breakpoint during the call of PluginEditor::getControlParameterIndex() to be sure the index given is the right one, and everything seems to work there. I don’t know what to do to solve that issue…

Has someone any idea about why this is happening ? Have you ever seen something like this ?

Thanks in advance !

1 Like

Problem solved ! Apparently, the use of PluginEditor::getControlParameterIndex() is not enough to make everything compatible with Pro Tools, I was using some custom components where I needed to write the content of all the MouseListener functions, to make the whole thing work properly.

2 Likes

I’m working on this very issue right now. Did you find a way to generate the needed Parameter Index int programmatically?

I currently have it working, but my getControlParameterIndex method looks like this:

int AudioProcessorEditor::getControlParameterIndex (Component& c)
{
    if (c.getComponentID() == "frequency") return 0;
    if (c.getComponentID() == "q") return 1;
    // ...etc etc...
    return -1;
}

Which means if I change the order of parameters, or add one later, this method needs to be updated by hand. (Plus I have to bother with setting a ComponentID for each control, which otherwise I wouldn’t have to deal with.)

I’m using APVTS for parameter management, and Attachment classes to associate the various GUI components with parameters. I’m not seeing a way to programmatically query either the Attachment class or the AudioProcessorValueTreeState itself for the needed Parameter Index.

Oh, here’s a thing that might do the trick…