Generic AAX adapter (0.1.0)¶
Status: prototype. One adapter, crates/ravet-plugin/aax, turns any product
exported with ravet_plugin::export_plugin! into an .aaxplugin without
product-specific C++. It is written once against the plug-in table
(RavetPlugin.h) and reads
counts, IDs and layouts at run time, as decision 0281
requires (RAVET's native profile, not the stock aax_wrapper). The AAX SDK is
external and never vendored; the VST3 SDK is not needed.
# macOS (arm64 or x86_64, the host architecture)
python3 scripts/bundle-aax.py --plugin delay --aax-sdk /path/to/AAX_SDK
python3 scripts/bundle-aax.py --package my-product-crate --name "My Product" --aax-sdk /path/to/AAX_SDK
python3 scripts/bundle-aax.py --plugin mock --aax-sdk /path/to/AAX_SDK # adapter's own mock table
The script builds the product crate as a static library
(cargo rustc -p <crate> --lib --release --crate-type staticlib, passing on
rustc's native-static-libs), configures the adapter with CMake, builds it into
target/aax-plugin/<product>/<Name>.aaxplugin and runs the checks below. On
Windows the script runs the same way (py scripts\bundle-aax.py --plugin delay
--aax-sdk C:\path\to\AAX_SDK). The steps by hand on Windows, with Visual
Studio 2022 for x64 and CMake 3.22 or later, from a Developer Command Prompt:
cargo rustc -p ravet-delay-plugin --lib --release --locked --crate-type staticlib -- --print native-static-libs
cmake -S crates\ravet-plugin\aax -B target\aax-plugin\delay -A x64 ^
-DRAVET_AAX_SDK=C:\path\to\AAX_SDK -DRAVET_AAX_NAME="RAVET Delay" ^
-DRAVET_PLUGIN_LIBRARY=%CD%\target\release\ravet_delay_plugin.lib ^
-DRAVET_PLUGIN_LINK_LIBRARIES="<the libraries from the native-static-libs note>"
cmake --build target\aax-plugin\delay --config Release
ctest --test-dir target\aax-plugin\delay -C Release --output-on-failure
On macOS use -DCMAKE_BUILD_TYPE=Release instead of -A x64, and
target/release/libravet_delay_plugin.a. Windows builds use the DLL C runtime
(/MD), as Rust static libraries do by default; -DRAVET_AAX_STATIC_CRT=ON
selects /MT when the product is built with -C target-feature=+crt-static.
The Windows bundle is <Name>.aaxplugin/Contents/x64/<Name>.aaxplugin.
Without RAVET_PLUGIN_LIBRARY the adapter links its C++ mock table
(mock/RavetPluginMock.cpp), which stands in for any product.
The Windows bundle can also be cross-compiled from Linux (see Windows cross-builds):
python3 scripts/bundle-aax.py --plugin delay --aax-sdk /path/to/AAX_SDK --target windows
# Bundle: target/aax-plugin/windows-delay/RAVET Delay.aaxplugin
# Check: target/aax-plugin/windows-delay/ravet_aax_check.exe
It uses cargo xwin rustc for the static library, links the C runtime
statically (RAVET_AAX_STATIC_CRT=ON) and runs the CTest checks under Wine when
it is installed. Copy the bundle and ravet_aax_check.exe to Windows and run
ravet_aax_check.exe "RAVET Delay.aaxplugin" there; --plugin mock also builds
ravet_aax_adapter_tests.exe. The native Windows path above has not been run;
the cross-build has.
What comes from the table¶
| AAX | Table |
|---|---|
| Package and effect name, manufacturer name, package version | product->name, vendor, version |
ManufacturerID, ProductID |
aax_manufacturer, aax_product |
One effect per layout, PlugInID_Native, stems |
layouts[i] (aax_type_id, inputs/outputs); effect ID <plugin_id>.aax.<in>x<out> |
| Category | effect → Effect, instrument → SWGenerators, MIDI effect → MIDIEffect |
| Parameters | every non-hidden parameter: ID p + host ID in uppercase hexadecimal, name, default, range, steps (discrete when stepped), automatable unless read-only; taper via normalize/denormalize, text via value_to_text/text_to_value |
| Master bypass | the bypass_index parameter, registered under the SDK's cDefaultMasterBypassID ("MasterBypassID"); CanBypass is set only when there is one |
| State | one chunk, RvSt, carrying the save_state envelope byte for byte; SetChunk calls load_state; chunk calls are requested on the main thread |
| Latency | timing() after prepare → SetSignalLatency; later changes follow latency_changed |
| MIDI | a local MIDI input node when note_input, a local MIDI output node when note_output |
| Editor | an AAX_CEffectGUI when the product has an editor size |
Behaviour:
- Prepare.
EffectInitreads the host's sample rate and stems, picks the matching layout and callspreparewith 1,024 frames (the AAX native maximum) and 1,024 input/output events. A stem pair the product did not declare is refused.Uninitializedeactivates; the instance is destroyed with the model. - Host parameter changes.
UpdateParameterNormalizedValuedenormalizes and callsset_value, so state saved afterwards includes the change; the processor receives it at the start of the next block (one value per block). - Editor edits. On every data-model and GUI timer tick the adapter drains
take_edits: begin →TouchParameter, value →SetParameterNormalizedValue, end →ReleaseParameter. Edits to hidden parameters are not reported. - Read-only parameters follow the table's cache on the timer.
- Processing. The algorithm callback reads the host transport through
RavetAaxTransport, converts MIDI input withRavetAaxShortMidiInput(raw short messages; when the strict preflight rejects a stream, for example one containing SysEx, the complete short messages are kept and the rest skipped), callsprocessand posts generated short MIDI messages to the output node. Frame counts above 1,024 and failed blocks are silenced. Denormal flushing and the product's automation and bypass policies stay inside the table. - Latency.
latency_changedis read on the main thread; the audio thread then callstiming()between blocks (the table forbids it duringprocess), and the next timer tick reports the value withSetSignalLatency. - Editor.
CreateViewContainercallseditor_openwithRAVET_PLUGIN_VIEW_COCOAfor anNSVieworRAVET_PLUGIN_VIEW_WIN32for anHWND; the GUI timer callseditor_idle; removing the view callseditor_close. Text fields in the editor ask for keyboard focus through the web view, not the AAX view container, which has no such call.
Signing¶
Builds are unsigned. Avid requires shipping AAX plug-ins to be wrapped and
signed with PACE tools under the vendor's own Avid agreement and NDA; that step
belongs to the plug-in vendor and is outside RAVET. Unsigned builds load only in
Pro Tools Developer (Avid's development build). On macOS arm64 the linker's ad
hoc signature is the only signature. The bundle script writes a notice saying so
into Contents/Resources/notices, and installs nothing into host folders.
Checks¶
ctest in the build directory runs:
ravet_aax_check <bundle> [--editor], which loads any built bundle, checks the ACF exports and SDK version, registers its descriptors with a synthetic collection and, for every effect, runsInitializewith a synthetic controller and transport host, reads every parameter and its text round trip, renders blocks (including MIDI through any MIDI nodes and an empty block), saves, compares and reloads the state chunk, rejects a corrupted one and uninitializes. On macOS--editoralso opens each editor through itsAAX_IEffectGUIin a real off-screenNSView.ravet_aax_adapter_tests(mock table only), which checks descriptors, field layout, parameter registration and text, host changes reaching the cache, bypass, oversized blocks, MIDI in/out and the SysEx fallback, the latency handshake, editor gestures, state bytes and recall, read-only reflection,editor_open/editor_idle/editor_close, stereo and layout refusal.
Neither is Avid's validator (DSH/aaxval, distributed to AAX developers under
NDA) and neither is a Pro Tools run. A vendor-signed delay build has been run in
Pro Tools 26.4 on macOS arm64; see work status. That run
found that Pro Tools keeps keyboard input for its own shortcuts, so text fields
in the web editor (such as the delay's typed values) could not be typed into;
mouse editing worked. AAX SDK 2.8 has no keyboard-focus call, so the macOS web
view now takes key status itself while a text field has focus and returns it
afterwards (see keyboard focus). This is
checked with AppKit fixtures. In the owner's Pro Tools 26.4 check, characters
then reached the field, but Pro Tools still took Return, Enter and Escape, and
clicking away did not commit. The web view therefore now forwards every plain
key to the focused field while editing, whatever window is key, and ends
editing (committing on blur) when the editor window stops being key. Re-checked
in Pro Tools 26.4: typing works, clicking away commits the typed value, and
Command-S and Space still reach Pro Tools; Return and Escape do not reach the
plug-in at all (Pro Tools returns to zero and closes the plug-in window), because
Pro Tools handles them in its own application event handling before any
plug-in code sees them, and AAX has no keyboard-focus call. In Pro Tools,
typed values apply when you click away; Return and Escape are Pro Tools
shortcuts. Editor pages should therefore commit on blur rather than rely on
Return.
Where the validator is installed, run its
standard test suite on the built bundle as its own documentation describes, and
record the validator version and results with the build.
Limits¶
- Main stems are mapped for 0, 1 and 2 channels. Layouts with other channel counts are skipped, because the table carries no channel roles.
- Auxiliary buses: the first
sidechain becomes the single AAX side-chain input (mono in Pro Tools; the key
feeds every channel of the bus); further sidechains are silent. On products
with a sidechain, layouts without a main input (instruments) declare a main
input stem matching their output stem, as hosts need it to address the key;
its samples are ignored and the product still gets no main input. Type IDs
and effect IDs (
<plugin_id>.aax.<in>x<out>, from the RAVET layout) do not change, but adding a sidechain to a shipped instrument changes the input stem behind an existing type ID; whether Pro Tools reloads such sessions is untested. An instance picks its layout by effect ID, falling back to the first layout with matching stems. - Mono and stereo output-only buses become aux output stems named
"
Mono" or " Stereo" (unless the name already says mono/stereo; at most 64 bytes). They disable multi-mono. Wider output buses and buses with both inputs and outputs have no AAX route (silent inputs, discarded outputs). Accepted stems are recorded per effect when the host describes the plug-in; stems the host refused, and every stem of an instance whose effect was never described, are discarded. - Automation is applied once per block; AAX packets and sample-accurate automation are not used.
get_valueandset_valuemay be called from any thread; they touch only lock-free shared parameter state.- Generated MIDI is posted as short messages only; SysEx is neither delivered nor generated.
- No tail is reported: the AAX SDK 2.8 native interface has no tail property.
- Editors keep the product's size (no host-driven resizing). On Windows the
editor opens in the host's
HWND(WebView2; the WebView2 Runtime must be installed).ravet_aax_check <bundle> --editoropens each effect's editor through itsAAX_IEffectGUIin a real parent (anNSViewon macOS, a top-levelHWNDon Windows) with a synthetic host;RAVET_AAX_EDITOR_HOLD=<seconds>keeps it open for a screenshot. This is not Pro Tools: Windows AAX remains provisional. - No AudioSuite, meters or page tables.
- The AAX category is coarse: the table has no finer AAX category (EQ, Delay…).
- Evidence is local: macOS arm64 builds and the checks above, and a Windows x64 cross-build whose bundle check and adapter tests pass natively on Windows 11 (see work status). Avid's validator is not available locally. The unsigned build checks are separate from the owner-signed macOS Delay run in Pro Tools 26.4. Windows AAX remains provisional without a Pro Tools for Windows run; see the support matrix.
The rest of this page describes the 0.0.1 references.