Search guides and the APICtrl K
  1. API reference
  2. Formats and wrappers

aax_wrapper.h

The AAX format wrapper (AAX Native), for Pro Tools.

#include <sonore/aax_wrapper.h>
On this page

Design notes

Written against Avid's AAX SDK, which this repository does NOT carry. The SDK is Avid's, under their AAX SDK licence or the GPLv3; every developer who builds AAX downloads it under that licence themselves and points SONORE_AAX_SDK_ROOT at it. What is here is our code, under Apache-2.0, and it is only ever compiled against a copy of the SDK the builder obtained. Shipping the result is the same deal it is for every other framework: the AAX agreement with Avid, and a PACE signature on every binary. A developer build of Pro Tools loads unsigned plugins, which is how this file is tested.

Include it AFTER clap_wrapper.h, as formats.h does: the CLAP wrapper owns the machinery every format shares (the DSP instance, parameters, state, both editors), and this file adapts it to AAX's shape, so a .aaxplugin cannot behave differently from the .clap and .vst3 built from the same source.

AAX splits a plugin in two, and the split drives everything below:

  1. The DATA MODEL (AAX_CEffectParameters): parameters, state, latency, on the host's main thread. Ours holds the shared Instance.
  2. The ALGORITHM: a plain C callback over a "context" struct whose fields the description subscribes to host services -- audio, the buffer length, MIDI nodes. It is normally kept apart from the data model so it can run on a DSP card. AAX Native runs it in the same process, and the description says it MUST stay with the data model (Constraint_Location), so one private-data field carries a pointer to the data model and the callback renders through the shared Instance exactly as every other format's process call does.

What this does not do: AAX DSP (HDX) and AudioSuite, which need a different algorithm build and an offline processing model; host-drawn page tables for control surfaces; and main buses wider than stereo, where Pro Tools' channel order differs from the conventional one and a wrong order is silent.

Types 6

class Taper : public AAX_ITaperDelegate<float>

The plugin's own curve between AAX's normalised value and the plain one. Through plugin.h's functions, not a copy: the host's automation lane and the plugin's own knob have to agree about where a value sits, and that is only certain when one function answers both.

class Display : public AAX_IDisplayDelegate<float>

The text a host shows and parses: the same functions every format's readout uses, so "-6.0 dB" reads the same in Pro Tools as in the plugin.

What the private-data field holds: the data model the callback renders through. Written by Effect::ResetFieldData when the host sets up the instance's context.

The context the algorithm is called with. Each field is one host service the description subscribes, by its index (AAX_FIELD_INDEX). A field this plugin has no use for -- a MIDI node an effect never reads, a sidechain it does not take -- is still described, as a few bytes of private data nothing reads, because the host fills fields by index and an index left undescribed is a field it never fills.

class Effect : public AAX_CEffectParameters

One instance: the shared Instance every format drives, inside AAX's data model. Pro Tools creates it through create(), calls the parameter and chunk methods on its main thread, and the algorithm callback renders through it on the audio thread (render()).

class Gui : public AAX_CEffectGUI

The plugin's window inside Pro Tools'. The same choice of editor the other formats make -- native, or the page in the OS webview -- embedded in the view container the host gives (an HWND on Windows, an NSView on macOS).

Functions 19

Constants 10

Macros 2

↑↓ to move↵ to openEvery public name in the headers, and every guide