AAX MIDI FX plugin via CMake detected as Instrument in Pro Tools

Hello everybody! :slight_smile:

Because of the recent Avid addition of MIDI FX AAX compatibility, I’m building an AAX MIDI FX plugin using JUCE via CMake. I’m able to get through the whole AAX procedure (including the PACE code signing, which at this point I’m pretty familiar with), with the plugin working properly in the latest Pro Tools. However, I’m having troubles properly setting its category. The plugin is supposed to show up in the MIDI Plugin menu, but it keeps being detected as an Instrument, hence being listed in the wrong sub-menu. I also noticed a discrepancy in the behaviour of other developers’ MIDI Plugins (some of them fall under the correct category, others don’t). I got in touch directly with Avid with no luck, as they also couldn’t figure out a way of doing this via JUCE and suggested me to ask the JUCE team directly.

My setup consists of JUCE and CMake. I’m currently using the latest AAX SDK 2.8.0. along with JUCE 7.0.12.

Following the SDK documentation, in CMake I set the AAX_CATEGORY (defined in the JUCE CMake API documentation) to AAX_EPlugInCategory_MIDIEffect (which doesn’t currently seem to be included in the CMake API, so maybe that’s where the issue resides) - this however makes no change in the resulting plugin, which gets detected as an instrument regardless of this attribute.

I realize this is a pretty new format so I was wondering if this is at all possible with my current version of JUCE, or if I’m missing any CMake instruction for this particular case.

Thank you in advance for your time :slight_smile:

I’m currently deploying a released AAX MIDI FX with the following settings in CMake.

We had this released with JUCE 7 and JUCE 8:

NEEDS_MIDI_INPUT TRUE
NEEDS_MIDI_OUTPUT TRUE
IS_SYNTH TRUE
AAX_CATEGORY AAX_EPlugInCategory_MIDIEffect
DISABLE_AAX_MULTI_MONO TRUE

From what I can see I’m not setting IS_MIDI_EFFECT at all.

2 Likes

Ah, I see! Is your plugin showing up in the correct sub-menu?

I indeed have the IS_SYNTH attribute set to FALSE for the AAX, I’ll try change that. I have a function to set the IS_MIDI_EFFECT to TRUE only for the AU target, but I guess that’s not affecting the AAX.

It does. If you have a PT subscription you can install Modalics EON-Arp from Avid Link and see.

It took a little debugging to test the right flags until we got it to work. We’re also using IS_MIDI_EFFECT TRUE for the AU version.

1 Like

Thanks a lot, I’m definitely gonna give this a try asap :slight_smile:

@eyalamir I can confirm this combination of flags works as expected. Thanks a lot for your help :slight_smile:

2 Likes

Thanks for the tips in this thread. I’ve got AAX showing and working correctly in the latest Pro Tools.

You mentioned setting IS_MIDI_EFFECT to true only for AU. How can we define these for each format?

When I run:

juce_add_plugin(MYPLUGIN
    ...
    IS_SYNTH 1
    NEEDS_MIDI_INPUT 1
    NEEDS_MIDI_OUTPUT 1
    IS_MIDI_EFFECT 0
)

it sets the type for all targets / formats.

I tried a
target_compile_definitions(MYPLUGIN_AU PRIVATE -DJucePlugin_IsMidiEffect=1)
but I end up with both 1 and 0 in the XCode preprocessor Macros.

Cheers!

Sadly, you can’t.

We create a separate target (a separate call to juce_add_plugin) for the AU MIDI FX target.

I tried that but it’s throwing loads of errors (I have quite a convoluted CMake project). I’ll do some more digging and see if I can flip that macro.

Thanks again!

Curiously, I have AU and AAX all working from a single juce_add_plugin call. If you disable IS_MIDI_EFFECT and set the AAX/AU categories, they both seem to load up as native MIDI plugins. This was tested in JUCE 7.0.12 and 8.0.1 with the latest AAX SDK 2.8.0.

I know that AU required IS_MIDI_EFFECT to work in the past, but it doesn’t seem to now. Admittedly the last time I developed a MIDI plugin was with JUCE 6 and on MacOSX 10.7 so things might have changed since then in the MacOS SDK.

The only pure #if JucePlugin_IsMidiEffect conditionals appear to be related to audio busses. As my VST version works as a synth and returns isBusesLayoutSupported it seems to be covered.

Here’s what I have set for a working config in case anyone else gets stuck here:

CMake:

juce_add_plugin(MYPLUGIN
    ...
    IS_SYNTH 1
    NEEDS_MIDI_INPUT 1
    NEEDS_MIDI_OUTPUT 1
    IS_MIDI_EFFECT 0

    AAX_CATEGORY "AAX_EPlugInCategory_MIDIEffect"
    AU_MAIN_TYPE "kAudioUnitType_MIDIProcessor"
    VST2_CATEGORY "kPlugCategSynth"
    VST3_CATEGORIES "Instrument"
)

Plugin

bool MYPLUGIN::isBusesLayoutSupported (const BusesLayout& layouts) const
{
    if (layouts.getMainInputChannels() > 2)
        return false;

    if (layouts.getMainOutputChannels() > 2)
        return false;

    return (layouts.getMainInputChannelSet() == layouts.getMainOutputChannelSet() &&
            (! layouts.getMainInputChannelSet().isDisabled()));
}
3 Likes

Nice, that’s a great find!
In our case, we deliver (in the same installer) both a MIDI FX and an Instrument for AU in the same plugin, but I’m certainly glad to know you can do that without duplicating targets.

1 Like

We’ve now added direct support for the MIDIEffect category in AAX plugins:

This change means that MIDI plugins will work as expected without any audio ins/outs present.

2 Likes