Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
aax_midi_node.hpp
Go to the documentation of this file.
1#pragma once
2
3// Bridge between AAX MIDI nodes and pulp::midi::MidiBuffer.
4//
5// Extracted from aax_runtime.cpp's anonymous namespace so the thin SDK glue —
6// the AAX_CMidiPacket <-> MidiPacketBytes copy on either side of the SDK-free
7// reassembler/fragmenter in aax_midi_packets.hpp — is reachable by an SDK-gated
8// unit test (test/test_aax_midi_node.cpp). The reassembly algorithm itself is
9// already unit-tested SDK-free (test/test_aax_midi.cpp); this seam exists to
10// prove the glue feeds it the right bytes/timestamps from real SDK node types.
11// #239 AAX parity.
12//
13// AAX_IMIDINode is forward-declared so this header stays cheap to include; the
14// .cpp and the SDK-gated test pull in the full <AAX_IMIDINode.h> / <AAX.h>. The
15// definitions live in aax_midi_node.cpp and are only compiled when AAX support
16// is enabled (built per-plugin and into the SDK-gated test).
17
18#include <pulp/midi/buffer.hpp>
19
20class AAX_IMIDINode;
21
22namespace pulp::format::aax {
23
24// Walk an input MIDI node's packet stream into `midi_in`: copy each
25// AAX_CMidiPacket into an SDK-free MidiPacketBytes and hand the sequence to
26// decode_midi_packets(), which runs the F0/continuation/F7 state machine,
27// skips malformed packets, drops a dangling SysEx, and sorts. No-ops on a null
28// node/buffer.
29void decode_midi_node(AAX_IMIDINode* node, midi::MidiBuffer* midi_in);
30
31// Post `midi_out` to an output MIDI node: short messages verbatim, then each
32// SysEx fragmented (via fragment_sysex) into 4-byte AAX_CMidiPacket entries
33// that share one timestamp. No-ops on a null node.
34void encode_midi_node(AAX_IMIDINode* node, const midi::MidiBuffer& midi_out);
35
36} // namespace pulp::format::aax
Collection of timestamped MIDI events within a single audio buffer period.
Definition buffer.hpp:31
Definition aax_editor.hpp:31
void decode_midi_node(AAX_IMIDINode *node, midi::MidiBuffer *midi_in)
void encode_midi_node(AAX_IMIDINode *node, const midi::MidiBuffer &midi_out)