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

A time-ordered list of per-note expression events for one block. More...

#include <mpe_buffer.hpp>

Public Member Functions

 MpeBuffer (bool reserve_storage=true)
bool add (const MpeExpressionEvent &e)
bool add (MpeExpressionEvent &&e)
bool add_batch (std::span< const MpeExpressionEvent > events)
 Append a group atomically.
void clear ()
bool empty () const
std::size_t size () const
std::size_t capacity () const
std::uint32_t dropped_event_count () const
void reserve (std::size_t capacity)
void set_realtime_capacity_limit (bool enabled=true)
void sort ()
auto begin ()
auto end ()
auto begin () const
auto end () const
const MpeExpressionEvent & operator[] (std::size_t i) const

Detailed Description

A time-ordered list of per-note expression events for one block.

Ownership and lifetime mirror MidiBuffer: the format adapter owns the buffer, fills it before process(), passes a pointer to the processor, and clears it afterwards. Not thread-safe; all access is assumed to happen on the audio thread in one producer/consumer pair.

Constructor & Destructor Documentation

◆ MpeBuffer()

pulp::midi::MpeBuffer::MpeBuffer ( bool reserve_storage = true)
inlineexplicit

Member Function Documentation

◆ add() [1/2]

bool pulp::midi::MpeBuffer::add ( const MpeExpressionEvent & e)
inline

◆ add() [2/2]

bool pulp::midi::MpeBuffer::add ( MpeExpressionEvent && e)
inline

◆ add_batch()

bool pulp::midi::MpeBuffer::add_batch ( std::span< const MpeExpressionEvent > events)
inline

Append a group atomically.

Under the realtime capacity limit, either every event is appended in source order or none are. Rejected events are all reflected in the saturating drop counter.

◆ begin() [1/2]

auto pulp::midi::MpeBuffer::begin ( )
inline

◆ begin() [2/2]

auto pulp::midi::MpeBuffer::begin ( ) const
inline

◆ capacity()

std::size_t pulp::midi::MpeBuffer::capacity ( ) const
inline

◆ clear()

void pulp::midi::MpeBuffer::clear ( )
inline

◆ dropped_event_count()

std::uint32_t pulp::midi::MpeBuffer::dropped_event_count ( ) const
inline

◆ empty()

bool pulp::midi::MpeBuffer::empty ( ) const
inline

◆ end() [1/2]

auto pulp::midi::MpeBuffer::end ( )
inline

◆ end() [2/2]

auto pulp::midi::MpeBuffer::end ( ) const
inline

◆ operator[]()

const MpeExpressionEvent & pulp::midi::MpeBuffer::operator[] ( std::size_t i) const
inline

◆ reserve()

void pulp::midi::MpeBuffer::reserve ( std::size_t capacity)
inline

◆ set_realtime_capacity_limit()

void pulp::midi::MpeBuffer::set_realtime_capacity_limit ( bool enabled = true)
inline

◆ size()

std::size_t pulp::midi::MpeBuffer::size ( ) const
inline

◆ sort()

void pulp::midi::MpeBuffer::sort ( )
inline

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/midi/include/pulp/midi/mpe_buffer.hpp