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

Bounded control-thread to audio-thread bridge for standalone inspector test input. More...

#include <standalone.hpp>

Public Member Functions

StandaloneTestInputResult inject_note (StandaloneTestMidiNote note)
StandaloneTestInputResult update_transport (const StandaloneTestTransportUpdate &update)
void release_test_input () noexcept
 Invalidate all queued input from the current controller and restore the transport snapshot from before its first update.
StandaloneTestTransportState transport_snapshot () const noexcept
std::uint64_t midi_overflow_count () const noexcept
void set_playing (bool playing) noexcept
 The standalone's own play/stop (Space in its window): the playing state the next audio block takes.
bool commanded_playing () const noexcept
 The playing state last commanded, whether or not audio has run since.
void prepare (bool playing, double tempo_bpm) noexcept
std::size_t drain_midi_into (midi::MidiBuffer &out, int block_size_samples) noexcept
StandaloneTestTransportState begin_audio_block () noexcept
void end_audio_block (int block_size_samples) noexcept

Static Public Attributes

static constexpr double kMinimumTempoBpm = 20.0
static constexpr double kMaximumTempoBpm = 400.0

Detailed Description

Bounded control-thread to audio-thread bridge for standalone inspector test input.

MIDI delivery is generation-scoped so releasing a controller drops stale note-offs, turns accepted queued note-ons into bounded one-block pulses, and schedules note-offs for every note that already reached DSP. Transport commands use a main-to-audio triple buffer; audio observations use an audio-writer sequence lock. Both directions stay coherent without making the audio callback wait for a preempted control-thread writer.

Member Function Documentation

◆ begin_audio_block()

StandaloneTestTransportState pulp::format::detail::StandaloneTestInputHost::begin_audio_block ( )
noexcept

◆ commanded_playing()

bool pulp::format::detail::StandaloneTestInputHost::commanded_playing ( ) const
noexcept

The playing state last commanded, whether or not audio has run since.

◆ drain_midi_into()

std::size_t pulp::format::detail::StandaloneTestInputHost::drain_midi_into ( midi::MidiBuffer & out,
int block_size_samples )
noexcept

◆ end_audio_block()

void pulp::format::detail::StandaloneTestInputHost::end_audio_block ( int block_size_samples)
noexcept

◆ inject_note()

StandaloneTestInputResult pulp::format::detail::StandaloneTestInputHost::inject_note ( StandaloneTestMidiNote note)

◆ midi_overflow_count()

std::uint64_t pulp::format::detail::StandaloneTestInputHost::midi_overflow_count ( ) const
noexcept

◆ prepare()

void pulp::format::detail::StandaloneTestInputHost::prepare ( bool playing,
double tempo_bpm )
noexcept

◆ release_test_input()

void pulp::format::detail::StandaloneTestInputHost::release_test_input ( )
noexcept

Invalidate all queued input from the current controller and restore the transport snapshot from before its first update.

Safe from any non-audio thread; the next audio block emits tracked note-offs first.

◆ set_playing()

void pulp::format::detail::StandaloneTestInputHost::set_playing ( bool playing)
noexcept

The standalone's own play/stop (Space in its window): the playing state the next audio block takes.

Kept through a test controller's release, which restores everything else it changed. Any non-audio thread.

◆ transport_snapshot()

StandaloneTestTransportState pulp::format::detail::StandaloneTestInputHost::transport_snapshot ( ) const
noexcept

◆ update_transport()

StandaloneTestInputResult pulp::format::detail::StandaloneTestInputHost::update_transport ( const StandaloneTestTransportUpdate & update)

Member Data Documentation

◆ kMaximumTempoBpm

double pulp::format::detail::StandaloneTestInputHost::kMaximumTempoBpm = 400.0
staticconstexpr

◆ kMinimumTempoBpm

double pulp::format::detail::StandaloneTestInputHost::kMinimumTempoBpm = 20.0
staticconstexpr

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