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

Pre-allocated per-node MIDI buffers backing the routing path's event edges. More...

#include <graph_runtime_executor.hpp>

Public Member Functions

bool reset (std::uint32_t node_count, std::size_t event_capacity=kDefaultEventCapacity, std::size_t sysex_capacity=kDefaultSysexCapacity, std::size_t sysex_payload_capacity=kDefaultSysexPayloadCapacity)
bool reset (std::span< const std::size_t > event_capacities, std::size_t sysex_capacity=kDefaultSysexCapacity, std::size_t sysex_payload_capacity=kDefaultSysexPayloadCapacity)
void clear () noexcept
std::uint32_t node_count () const noexcept
midi::MidiBuffer * in (std::uint32_t node_index) noexcept
midi::MidiBuffer * out (std::uint32_t node_index) noexcept
midi::MpeBuffer * mpe_in (std::uint32_t node_index) noexcept
midi::MpeBuffer * mpe_out (std::uint32_t node_index) noexcept
bool in_incomplete (std::uint32_t node_index) const noexcept
void set_in_incomplete (std::uint32_t node_index, bool v) noexcept
bool out_incomplete (std::uint32_t node_index) const noexcept
void set_out_incomplete (std::uint32_t node_index, bool v) noexcept
bool fits (std::uint32_t node_count) const noexcept

Static Public Attributes

static constexpr std::size_t kDefaultEventCapacity = 1024
static constexpr std::size_t kDefaultSysexCapacity = 128
static constexpr std::size_t kDefaultSysexPayloadCapacity = 4096

Detailed Description

Pre-allocated per-node MIDI buffers backing the routing path's event edges.

One in/out MidiBuffer pair per plan node (indexed by dense node index), each with an attached UmpBuffer and reserved to a fixed realtime capacity so add()/sysex append never allocate on the audio thread. The executor clears a node's in and gathers its inbound event connections into it before the node runs; a MIDI-emitting binding writes the node's out. A node's out also serves as the source other nodes gather from, so it persists for the block. The caller (host) bridges MidiInput/MidiOutput system nodes to its own mailboxes around process_routed by writing/reading these buffers directly.

Slots are heap-stable (each pair is a unique_ptr) because a MidiBuffer holds a pointer to its attached UmpBuffer; a reallocating vector would dangle it.

Member Function Documentation

◆ clear()

void pulp::format::GraphRuntimeMidiScratch::clear ( )
noexcept

◆ fits()

bool pulp::format::GraphRuntimeMidiScratch::fits ( std::uint32_t node_count) const
inlinenoexcept

◆ in()

midi::MidiBuffer * pulp::format::GraphRuntimeMidiScratch::in ( std::uint32_t node_index)
inlinenoexcept

◆ in_incomplete()

bool pulp::format::GraphRuntimeMidiScratch::in_incomplete ( std::uint32_t node_index) const
inlinenoexcept

◆ mpe_in()

midi::MpeBuffer * pulp::format::GraphRuntimeMidiScratch::mpe_in ( std::uint32_t node_index)
inlinenoexcept

◆ mpe_out()

midi::MpeBuffer * pulp::format::GraphRuntimeMidiScratch::mpe_out ( std::uint32_t node_index)
inlinenoexcept

◆ node_count()

std::uint32_t pulp::format::GraphRuntimeMidiScratch::node_count ( ) const
inlinenoexcept

◆ out()

midi::MidiBuffer * pulp::format::GraphRuntimeMidiScratch::out ( std::uint32_t node_index)
inlinenoexcept

◆ out_incomplete()

bool pulp::format::GraphRuntimeMidiScratch::out_incomplete ( std::uint32_t node_index) const
inlinenoexcept

◆ reset() [1/2]

bool pulp::format::GraphRuntimeMidiScratch::reset ( std::span< const std::size_t > event_capacities,
std::size_t sysex_capacity = kDefaultSysexCapacity,
std::size_t sysex_payload_capacity = kDefaultSysexPayloadCapacity )

◆ reset() [2/2]

bool pulp::format::GraphRuntimeMidiScratch::reset ( std::uint32_t node_count,
std::size_t event_capacity = kDefaultEventCapacity,
std::size_t sysex_capacity = kDefaultSysexCapacity,
std::size_t sysex_payload_capacity = kDefaultSysexPayloadCapacity )

◆ set_in_incomplete()

void pulp::format::GraphRuntimeMidiScratch::set_in_incomplete ( std::uint32_t node_index,
bool v )
inlinenoexcept

◆ set_out_incomplete()

void pulp::format::GraphRuntimeMidiScratch::set_out_incomplete ( std::uint32_t node_index,
bool v )
inlinenoexcept

Member Data Documentation

◆ kDefaultEventCapacity

std::size_t pulp::format::GraphRuntimeMidiScratch::kDefaultEventCapacity = 1024
staticconstexpr

◆ kDefaultSysexCapacity

std::size_t pulp::format::GraphRuntimeMidiScratch::kDefaultSysexCapacity = 128
staticconstexpr

◆ kDefaultSysexPayloadCapacity

std::size_t pulp::format::GraphRuntimeMidiScratch::kDefaultSysexPayloadCapacity = 4096
staticconstexpr

The documentation for this class was generated from the following file: