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 |
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.
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
The shift currently latched for scheduling.
|
inlinenoexcept |
|
noexcept |
| bool pulp::playback::ArrangementNoteRenderer::prepare | ( | std::size_t | maximum_events_per_block | ) |
|
noexcept |
|
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.
|
noexcept |
|
staticconstexpr |
Bounded logical overlap depth per MIDI channel/pitch.
Exceeding it is a malformed/pathological stream and fails closed with an immediate flush.
|
staticconstexpr |