Projucer settings for AAX instruments

Hi,
I’m working on the AAX version of a virtual instrument plugins. It’s working great as VST3 and AU but fails as AAX.

The AAX plugin is properly built with xCode.

In Pro Tools Dev version (to bypass the validation check), my plugin is visible and working in “AudioSuite” but it’s not available as instrument on an “instrument track” insert.

I tried several Projucer settings, my best results are with :
Plugin characteristics

Plugin is a synth
Plugin midi In
Plugin midi Out
Midi Effect Plugin

Plugin AAX Category

AAX_EPlugInCategory_SWGenerators

To me, it looks like a problem with Plugin Channel Configurations
If I let the field empty the plugin is available in all configuration (mono, stereo, multichannels…) but it crashes while inserting the plugin. With {2, 2} I get AAE error 14018.

What would be the appropriate setting to have the plugin loading properly as an instument for stereo config since as VST3 and AU it works like a charm as default stereo ?

Thanks for your help

Damien

The “Midi Effect Plugin” property is supposed to be for plugins that only interact with MIDI events, and which don’t have audio inputs or outputs. I recommend disabling that property and testing again.

1 Like

Hi @reuk , thanks for the reply.
I tried disabling “midi effect plugins” and also cleaned up all declaration about AudioProcessor (BusesProperties) but it still crashes unfortunately. So it’s probably coming from something else.

I removed the projucer field Plugin Channel Configurations {2, 2} it’s only for older juce versions.

I also updated my processor file and used the filter to assign stereo outs to stereo Instrument tracks and mono out to a mono track, as mentionned in the JUCE_to_AAX demo from Avid. That cleared up the i/o problem. Audio Inputs are now disabled as it should be.

My AAX plugin now appears where it should, in Instuments only for Mono & Stereo tracks.

Plugin characteristics
Plugin is a synth
Plugin midi In
Plugin midi Out

Plugin AAX Category
AAX_EPlugInCategory_SWGenerators

I built every version possible I could, Mac, Windows, VST2, VST3, AU etc without any issue, they all run well, but on the AAX I have this problem.

I don’t know where to start to find what causes the crash, the console report for Pro Tools gives no info about the issue.

Having the plugin working as AudioSuite BUT not when inserting on a track could give information about the problem but I have no idea where to look for.

Thanks

Hi,
I investigated with the debugger in Xcode going step by step through the threads and set some breakpoints almost everywhere…
It seems that my crash is coming when the Editor is created and not from the AudioProcessor itself.
I found very strange that a simple statement can crash protools while it goes through perfectly in Cubase or even in PT as AudioSuite.

I will go further but I’m at a point where someone with good experience with AAX would be required.

Does anybody know how to resolve this in 2023?
I’m getting error 14018, for my midi processor in Protools

image



As stated above, MIDI Effect plug-ins don’t have any audio in or out.
According to your description you’re not making a synth, but your screenshot appears to have Plugin is a Synth selected.
I don’t know if it would crash though.

Well the vst, version needs to be a synth because Ableton doesn’t do midi effects. I’ll try turning off synth and see if it opens in Protools

could the problem have to do with this warning?

Resolved by checking out the developer branch of JUCE that works with Avid SKD 2.5.0

But other aspects of the AAX aren’t working. And Protools won’t let me debug,
How do I get a debuggable version of PT?

Not everything is resolved.
Because my plugin is a midi processor PT only lets it launch, without an, if I include {0,0} in the list of input/output possibilities in Projucer.

But then my processBlock() never gets called. because of this code in the AAX wrapper:
file : juce_audio_plugin_client

   if (numOuts >= numIns)
                {
                    for (int i = 0; i < numOuts; ++i)
                        channels[i] = outputs[outputLayoutMap[i]];

                    for (int i = 0; i < numIns; ++i)
                        memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));

                    for (int i = numIns; i < numOuts; ++i)
                        zeromem (channels[i], (size_t) bufferSize * sizeof (float));

                    process (channels, numOuts, bufferSize, bypass, midiNodeIn, midiNodesOut);
                }
                else
                {
                    for (int i = 0; i < numOuts; ++i)
                        channels[i] = outputs[outputLayoutMap[i]];

                    for (int i = 0; i < numOuts; ++i)
                        memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));

                    for (int i = numOuts; i < numIns; ++i)
                        channels[i] = const_cast<float*> (getAudioBufferForInput (inputs, sidechain, mainNumIns, i));

                    process (channels, numIns, bufferSize, bypass, midiNodeIn, midiNodesOut);
                }

when numIns and numOuts both equal zero then process never gets called.

If I don’t include {0,0} in the input/output scheme in PROJUCER, then protools give an “insufficient resources error” when I try instantiate, and disables my plug.

actually my problem is earlier in that code

     void process (const float* const* inputs, float* const* outputs, const int sideChainBufferIdx,
                      const int bufferSize, const bool bypass,
                      AAX_IMIDINode* midiNodeIn, AAX_IMIDINode* midiNodesOut,
                      float* const meterBuffers)
        {
            auto numIns    = pluginInstance->getTotalNumInputChannels();
            auto numOuts   = pluginInstance->getTotalNumOutputChannels();
            auto numMeters = aaxMeters.size();

            const ScopedLock sl (pluginInstance->getCallbackLock());

            bool isSuspended = [this, sideChainBufferIdx]
            {
                if (processingSidechainChange)
                    return true;

                bool processWantsSidechain = (sideChainBufferIdx != -1);

                if (hasSidechain && canDisableSidechain && (sidechainDesired != processWantsSidechain))
                {
                    sidechainDesired = processWantsSidechain;
                    processingSidechainChange = true;
                    triggerAsyncUpdate();
                    return true;
                }

                return pluginInstance->isSuspended();
            }();

            if (isSuspended)
            {
                for (int i = 0; i < numOuts; ++i)
                    FloatVectorOperations::clear (outputs[i], bufferSize);

                if (meterBuffers != nullptr)
                    FloatVectorOperations::clear (meterBuffers, numMeters);
            }
            else
            {
                auto mainNumIns = pluginInstance->getMainBusNumInputChannels();
                auto sidechain = (pluginInstance->getChannelCountOfBus (true, 1) > 0 ? sideChainBufferIdx : -1);
                auto numChans = jmax (numIns, numOuts);

                if (numChans == 0)
                    return;

if I comment out

  if (numChans == 0)
                    return;

Then my plugin works, but that’s probably not the right way to go about this?

The Avid Toolkit/Downloads page has developer versions of PT.

1 Like

Got that, definitely help.

Still with the problem, that I have to include {0,0} in the channel config for my midi processor plugin to load in PT
But then processBlock() never gets called.

Not sure what PT wants to see for a midi processing plugin.

If we are on the subject of AAX settings, if I check AAX_ePluginCategory_Reverb in Plugin AAX Category it doesn’t seen to list as a reverb plugin in PT as I want. Is there anything else I should do?

Also, if I put anything inside Plugin Channel Configurations it causes a build error (something to do with #ifndef JucePlugin_PreferredChannelConfigurations line in PluginProcessor.cpp I assume. I want to make it a mono to stereo plugin so I am adding {1,2}, {2,2} but any input at all will prevent the project from building. Any tips?