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

Arrangement-note scheduler for the engine transport-tick lane. More...

#include <note_renderer.hpp>

Public Member Functions

 ArrangementNoteRenderer (timeline::ItemId track_id) noexcept
bool prepare (std::size_t maximum_events_per_block)
NoteRenderResult process (const PlaybackProgramBlock &block, const TransportSnapshot &transport) noexcept
NoteRenderResult process (const PlaybackProgramBlock &block, const TransportSnapshot &transport, EventCompensationShift requested_shift) noexcept
 Schedules against requested_shift samples ahead of each transport range, so a chain that delays the events themselves still lands them on the authored sample.
EventCompensationShift applied_shift () const noexcept
 The shift currently latched for scheduling.
const midi::MidiBuffer & events () const noexcept
RendererProgramKey active_key () const noexcept
bool has_active_notes () const noexcept
void reset () noexcept

Static Public Attributes

static constexpr std::uint16_t maximum_logical_overlap = 255
 Bounded logical overlap depth per MIDI channel/pitch.
static constexpr audio::RtSafetyClass process_rt_safety_class

Detailed Description

Arrangement-note scheduler for the engine transport-tick lane.

It is not an audio CustomNode: it resolves immutable TrackProgram events against the transport's one or two monotonic ranges and produces block-relative MIDI for the graph/embedded adapter to consume.

prepare() is control-thread work. process() owns all mutable execution state on one audio thread and is allocation-free after prepare. Adoption, seek, loop wrap, and stop reset and release active notes; notes whose onset precedes the new range are deliberately not chased. With a compensating shift the non-chase rule applies to the SHIFTED range, so reading ahead does not turn a seek into a chase, and an enabled loop bounds the read: a window carried past the loop point is folded back to the post-wrap content rather than reading document positions this pass never reaches.

Constructor & Destructor Documentation

◆ ArrangementNoteRenderer()

pulp::playback::ArrangementNoteRenderer::ArrangementNoteRenderer ( timeline::ItemId track_id)
inlineexplicitnoexcept

Member Function Documentation

◆ active_key()

RendererProgramKey pulp::playback::ArrangementNoteRenderer::active_key ( ) const
inlinenoexcept

◆ applied_shift()

EventCompensationShift pulp::playback::ArrangementNoteRenderer::applied_shift ( ) const
inlinenoexcept

The shift currently latched for scheduling.

◆ events()

const midi::MidiBuffer & pulp::playback::ArrangementNoteRenderer::events ( ) const
inlinenoexcept

◆ has_active_notes()

bool pulp::playback::ArrangementNoteRenderer::has_active_notes ( ) const
noexcept

◆ prepare()

bool pulp::playback::ArrangementNoteRenderer::prepare ( std::size_t maximum_events_per_block)

◆ process() [1/2]

NoteRenderResult pulp::playback::ArrangementNoteRenderer::process ( const PlaybackProgramBlock & block,
const TransportSnapshot & transport )
noexcept

◆ process() [2/2]

NoteRenderResult pulp::playback::ArrangementNoteRenderer::process ( const PlaybackProgramBlock & block,
const TransportSnapshot & transport,
EventCompensationShift requested_shift )
noexcept

Schedules against requested_shift samples ahead of each transport range, so a chain that delays the events themselves still lands them on the authored sample.

The value is prepared by the caller on the control thread and is constant for the block. A CHANGED value is adopted only while the transport is stopped: re-aligning mid-playback would move every subsequent event by the delta, which is audible as a jump in a stream the musician is listening to. Until then the older alignment is held and the result reports the relatch as pending.

◆ reset()

void pulp::playback::ArrangementNoteRenderer::reset ( )
noexcept

Member Data Documentation

◆ maximum_logical_overlap

std::uint16_t pulp::playback::ArrangementNoteRenderer::maximum_logical_overlap = 255
staticconstexpr

Bounded logical overlap depth per MIDI channel/pitch.

Exceeding it is a malformed/pathological stream and fails closed with an immediate flush.

◆ process_rt_safety_class

audio::RtSafetyClass pulp::playback::ArrangementNoteRenderer::process_rt_safety_class
staticconstexpr
Initial value:

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