Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::aax Namespace Reference

Namespaces

namespace  testing

Classes

class  EditorHost
 The editor-facing surface of the AAX data model. More...
struct  EditorSizePlan
 How the editor surface reacts to the size AAX gives it. More...
class  ParameterIdMap
 state::ParamID → the AAX parameter-ID string the model registered under. More...
class  ParameterMirror
 Writes editor-store changes back to the AAX parameter manager without the two mirrors chasing each other. More...
class  GestureRouter
 Maps StateStore gesture callbacks onto AAX automation touch/release. More...
struct  EntryConfig
struct  MidiPacketBytes
 SDK-free mirror of the fields of AAX_CMidiPacket this layer needs. More...
struct  PluginCodes
struct  ParameterBinding
struct  ComponentLayout
struct  PluginDefinition
struct  DefinitionResult
struct  AaxNativeRect
 A native rectangle in the parent's own (logical point) coordinate space. More...
struct  AaxNativeGeometry
 Everything the host-frame receipt needs in one read: the parent the host handed down, the child Pulp attached, and the window both sit in. More...

Enumerations

enum class  StemKind {
  none , mono , stereo , lcr ,
  lcrs , quad , surround_5_0 , surround_5_1 ,
  surround_6_0 , surround_6_1 , surround_7_0 , surround_7_1
}

Functions

bool param_id_for_aax_id (const PluginDefinition &definition, std::string_view aax_id, state::ParamID &out_id)
 Resolve an AAX parameter-ID string back to the state::ParamID it was registered under.
float taper_constrain_real (const state::ParamRange &range, float value)
 AAX_ITaperDelegate::ConstrainRealValue — the nearest value the range can actually represent, found by a normalized round trip (which is also where ParamRange::step quantization applies).
float taper_normalized_to_real (const state::ParamRange &range, double normalized)
 AAX_ITaperDelegate::NormalizedToReal.
double taper_real_to_normalized (const state::ParamRange &range, float value)
 AAX_ITaperDelegate::RealToNormalized.
float aax_value_after_write (const state::ParamRange &range, float value)
 The value an AAX parameter ends up holding once SetValueWithFloat(value) has been through the host and back: the host is handed RealToNormalized(value) and the parameter stores NormalizedToReal of the answer.
constexpr uint32_t aax_host_dimension (uint32_t logical, float display_scale)
 Convert Pulp's logical editor coordinates to AAX host units.
EditorSizePlan plan_editor_size (const ViewSize &hints)
 Derive the sizing plan from a plugin's declared ViewSize hints.
IACFUnknown *AAX_CALLBACK create_effect_gui ()
 Create the AAX custom editor object.
EntryConfig make_entry_config (ProcessorFactory factory, std::string_view manufacturer_code, std::string_view product_code, std::string_view native_code)
IACFUnknown * create_effect_parameters (const EntryConfig &config)
AAX_Result get_effect_descriptions (AAX_ICollection *out_collection, const EntryConfig &config, AAXCreateObjectProc create_proc, AAXCreateObjectProc create_gui_proc=nullptr)
 Describe the plugin to the host.
void decode_midi_node (AAX_IMIDINode *node, midi::MidiBuffer *midi_in)
void encode_midi_node (AAX_IMIDINode *node, const midi::MidiBuffer &midi_out)
void decode_midi_packets (std::span< const MidiPacketBytes > packets, midi::MidiBuffer &out)
 Decode a stream of AAX-style packets into out (short messages plus reassembled SysEx).
std::vector< MidiPacketBytes > fragment_sysex (std::span< const uint8_t > payload, uint32_t timestamp)
 Fragment one full F0..F7 SysEx payload into consecutive 4-byte packets that all share timestamp — the inverse of decode's reassembly.
uint32_t fourcc (std::string_view text)
std::string fourcc_string (uint32_t value)
std::string parameter_id_string (state::ParamID id)
uint32_t derive_native_plugin_id (uint32_t base_id, std::size_t variant_index)
DefinitionResult build_plugin_definition (ProcessorFactory factory, const PluginCodes &codes)
std::size_t render_mode_packet_slot (const PluginDefinition &definition) noexcept
 Index of the parameter-packet slot that carries the host render mode.
float render_mode_packet_value (bool offline) noexcept
 The render mode the data model publishes for an instance.
ProcessMode process_mode_from_packet (const PluginDefinition &definition, const float *packet) noexcept
 The ProcessMode a block runs under, decoded from the parameter packet.
int stem_channel_count (StemKind stem)
const char * stem_signature (StemKind stem)
StemKind stem_kind_for_channels (int channels)
constexpr float aax_child_top_left_y (float parent_height, float child_height, bool parent_flipped)
 The y origin that puts a child of child_height at the TOP of a parent of parent_height.
float aax_display_scale (void *native_parent) noexcept
 Return the backing scale for the native AAX parent (NSView* on macOS).
AaxNativeGeometry aax_native_geometry (void *native_parent, void *native_child) noexcept
 Read the parent/child/window frames.
void aax_place_child_top_left (void *native_parent, void *native_child) noexcept
 Move the child to the parent's top-left corner, keeping the child's size.
void aax_fill_parent (void *native_parent, void *native_child) noexcept
 Resize the child to the parent's bounds.
void aax_set_child_tracks_parent (void *native_child, bool tracks) noexcept
 Whether the child follows the parent's size changes (its flexible autoresizing mask).
std::string aax_describe_geometry (const AaxNativeGeometry &g)
 One-line rendering of a geometry read for the host receipt.

Enumeration Type Documentation

◆ StemKind

enum class pulp::format::aax::StemKind
strong
Enumerator
none 
mono 
stereo 
lcr 
lcrs 
quad 
surround_5_0 
surround_5_1 
surround_6_0 
surround_6_1 
surround_7_0 
surround_7_1 

Function Documentation

◆ aax_child_top_left_y()

float pulp::format::aax::aax_child_top_left_y ( float parent_height,
float child_height,
bool parent_flipped )
constexpr

The y origin that puts a child of child_height at the TOP of a parent of parent_height.

AppKit's default view space grows upward, so origin (0,0) is the bottom-left corner; a host parent larger than the child then shows the editor in its lower-left corner. A flipped parent already has (0,0) at the top-left.

◆ aax_describe_geometry()

std::string pulp::format::aax::aax_describe_geometry ( const AaxNativeGeometry & g)
inline

One-line rendering of a geometry read for the host receipt.

◆ aax_display_scale()

float pulp::format::aax::aax_display_scale ( void * native_parent)
noexcept

Return the backing scale for the native AAX parent (NSView* on macOS).

A null parent is valid because AAX may query GetViewSize before attaching the view; the platform implementation uses the main display then.

◆ aax_fill_parent()

void pulp::format::aax::aax_fill_parent ( void * native_parent,
void * native_child )
noexcept

Resize the child to the parent's bounds.

The child's flexible autoresizing mask then tracks the parent 1:1, and the design viewport letterboxes the content, so a host that keeps an off-size parent still shows a whole, proportional editor rather than a clipped corner.

◆ aax_host_dimension()

uint32_t pulp::format::aax::aax_host_dimension ( uint32_t logical,
float display_scale )
constexpr

Convert Pulp's logical editor coordinates to AAX host units.

AAX's view-size contract is expressed in the host view's logical coordinate space. macOS applies the Retina backing scale when it composites the native view; multiplying these values here makes Pro Tools create a 2x-sized host frame around a 1x logical editor. Keep the display-scale argument for source compatibility with callers that already have a native scale, but deliberately do not apply it at this adapter boundary.

◆ aax_native_geometry()

AaxNativeGeometry pulp::format::aax::aax_native_geometry ( void * native_parent,
void * native_child )
noexcept

Read the parent/child/window frames.

Never throws; valid is false when a view is missing.

◆ aax_place_child_top_left()

void pulp::format::aax::aax_place_child_top_left ( void * native_parent,
void * native_child )
noexcept

Move the child to the parent's top-left corner, keeping the child's size.

A no-op when the sizes already match (origin stays at 0,0), which is the VST3/CLAP case where the host parent is created at the requested size.

◆ aax_set_child_tracks_parent()

void pulp::format::aax::aax_set_child_tracks_parent ( void * native_child,
bool tracks )
noexcept

Whether the child follows the parent's size changes (its flexible autoresizing mask).

AppKit autoresizing applies the parent's size DELTA to the child: a 990x645 child added to a parent the host has not laid out yet (0x0) becomes 1980x1290 the moment the host grows the parent to 990x645, and the editor then publishes that doubled frame back to the host. Turn tracking off around the host's own sizing transaction and back on once the parent and child agree.

◆ aax_value_after_write()

float pulp::format::aax::aax_value_after_write ( const state::ParamRange & range,
float value )
inline

The value an AAX parameter ends up holding once SetValueWithFloat(value) has been through the host and back: the host is handed RealToNormalized(value) and the parameter stores NormalizedToReal of the answer.

Both legs are lossy, so this is generally not value.

◆ build_plugin_definition()

DefinitionResult pulp::format::aax::build_plugin_definition ( ProcessorFactory factory,
const PluginCodes & codes )

◆ create_effect_gui()

IACFUnknown *AAX_CALLBACK pulp::format::aax::create_effect_gui ( )

Create the AAX custom editor object.

Registered with the host under kAAX_ProcPtrID_Create_EffectGUI; without that registration Pro Tools has no plug-in GUI to instantiate and falls back to its auto-generated parameter strip.

The returned object is owned by the host. The signature matches AAXCreateObjectProc so it can be handed to AAX_IEffectDescriptor::AddProcPtr.

◆ create_effect_parameters()

IACFUnknown * pulp::format::aax::create_effect_parameters ( const EntryConfig & config)

◆ decode_midi_node()

void pulp::format::aax::decode_midi_node ( AAX_IMIDINode * node,
midi::MidiBuffer * midi_in )

◆ decode_midi_packets()

void pulp::format::aax::decode_midi_packets ( std::span< const MidiPacketBytes > packets,
midi::MidiBuffer & out )
inline

Decode a stream of AAX-style packets into out (short messages plus reassembled SysEx).

Mirrors the AAX runtime's input path exactly:

  • zero-length packets are skipped;
  • a packet whose first byte is 0xF0 (when not already mid-SysEx) starts a SysEx run; every byte up to and including 0xF7 is accumulated, and the completed F0..F7 payload is appended at the start packet's timestamp;
  • continuation packets (no status byte) are treated as SysEx payload while a run is in progress;
  • a dangling SysEx (no F7 before the stream ends) is dropped rather than delivered as a corrupt message;
  • any non-SysEx packet longer than 3 bytes is malformed and skipped;
  • short messages become choc::midi::ShortMessage at the packet timestamp. out is sorted by sample offset before returning.

◆ derive_native_plugin_id()

uint32_t pulp::format::aax::derive_native_plugin_id ( uint32_t base_id,
std::size_t variant_index )

◆ encode_midi_node()

void pulp::format::aax::encode_midi_node ( AAX_IMIDINode * node,
const midi::MidiBuffer & midi_out )

◆ fourcc()

uint32_t pulp::format::aax::fourcc ( std::string_view text)

◆ fourcc_string()

std::string pulp::format::aax::fourcc_string ( uint32_t value)

◆ fragment_sysex()

std::vector< MidiPacketBytes > pulp::format::aax::fragment_sysex ( std::span< const uint8_t > payload,
uint32_t timestamp )
inline

Fragment one full F0..F7 SysEx payload into consecutive 4-byte packets that all share timestamp — the inverse of decode's reassembly.

An empty payload yields no packets. Callers set any SDK-specific flags (e.g. mIsImmediate) on the returned packets.

◆ get_effect_descriptions()

AAX_Result pulp::format::aax::get_effect_descriptions ( AAX_ICollection * out_collection,
const EntryConfig & config,
AAXCreateObjectProc create_proc,
AAXCreateObjectProc create_gui_proc = nullptr )

Describe the plugin to the host.

create_proc builds the data model; create_gui_proc builds the custom editor and is registered under kAAX_ProcPtrID_Create_EffectGUI. Passing null for create_gui_proc registers no editor, leaving the host on its auto-generated parameter strip.

◆ make_entry_config()

EntryConfig pulp::format::aax::make_entry_config ( ProcessorFactory factory,
std::string_view manufacturer_code,
std::string_view product_code,
std::string_view native_code )
inline

◆ param_id_for_aax_id()

bool pulp::format::aax::param_id_for_aax_id ( const PluginDefinition & definition,
std::string_view aax_id,
state::ParamID & out_id )
inline

Resolve an AAX parameter-ID string back to the state::ParamID it was registered under.

Returns false when the ID is not one of this plugin's parameters — which is the normal case for AAX's own master-bypass control, registered by the adapter but absent from the Pulp store.

◆ parameter_id_string()

std::string pulp::format::aax::parameter_id_string ( state::ParamID id)

◆ plan_editor_size()

EditorSizePlan pulp::format::aax::plan_editor_size ( const ViewSize & hints)
inline

Derive the sizing plan from a plugin's declared ViewSize hints.

Every viewport decision defers to the predicates in plugin_descriptor.hpp that VST3, AU v2, and CLAP already share, so the AAX editor cannot drift from them: should_pin_design_viewport decides the pin, design_viewport_width/height choose the authored box, and native_view_aspect_ratio the host lock. Only the host-facing numbers (width/height, min_*) are AAX's own.

◆ process_mode_from_packet()

ProcessMode pulp::format::aax::process_mode_from_packet ( const PluginDefinition & definition,
const float * packet )
noexcept

The ProcessMode a block runs under, decoded from the parameter packet.

A null or short packet reads as realtime.

◆ render_mode_packet_slot()

std::size_t pulp::format::aax::render_mode_packet_slot ( const PluginDefinition & definition)
noexcept

Index of the parameter-packet slot that carries the host render mode.

The data model writes 1.0 there for an AudioSuite (offline, file-based) instance and 0.0 for a realtime Insert; the algorithm reads it back each block.

◆ render_mode_packet_value()

float pulp::format::aax::render_mode_packet_value ( bool offline)
noexcept

The render mode the data model publishes for an instance.

◆ stem_channel_count()

int pulp::format::aax::stem_channel_count ( StemKind stem)

◆ stem_kind_for_channels()

StemKind pulp::format::aax::stem_kind_for_channels ( int channels)

◆ stem_signature()

const char * pulp::format::aax::stem_signature ( StemKind stem)

◆ taper_constrain_real()

float pulp::format::aax::taper_constrain_real ( const state::ParamRange & range,
float value )
inline

AAX_ITaperDelegate::ConstrainRealValue — the nearest value the range can actually represent, found by a normalized round trip (which is also where ParamRange::step quantization applies).

◆ taper_normalized_to_real()

float pulp::format::aax::taper_normalized_to_real ( const state::ParamRange & range,
double normalized )
inline

AAX_ITaperDelegate::NormalizedToReal.

◆ taper_real_to_normalized()

double pulp::format::aax::taper_real_to_normalized ( const state::ParamRange & range,
float value )
inline

AAX_ITaperDelegate::RealToNormalized.

This is the value that actually travels: AAX_CParameter<float>::SetValue stores nothing and posts RealToNormalized(value) to the automation delegate, and the host's answer comes back normalized too.