Loading...
Searching...
No Matches
LV2::lv2_node< OnExecStart, OnExecFinished > Struct Template Referencefinal
Inheritance diagram for LV2::lv2_node< OnExecStart, OnExecFinished >:

Classes

struct  buffer_span
 
struct  worker_routing_scope
 

Public Member Functions

 lv2_node (const LV2Data &dat, int sampleRate, voice_strategy strat, OnExecStart os, OnExecFinished of)
 
std::unique_ptr< voice > build_voice (SharedInstance handle)
 
SharedInstance instantiate_handle (int sampleRate)
 
void renew_primary_instance (int sampleRate)
 
std::unique_ptr< voice > make_voice_for_pool (int sampleRate, LilvState *state)
 
LilvState * snapshot_state_raw () const noexcept
 
void append_voice (std::unique_ptr< voice > v) noexcept
 
void request_voice_count (std::size_t n) noexcept
 
void allocate_voice_buffers (voice &v)
 
void connect_voice_ports (voice &v) noexcept
 
void activate_voice (voice &v) noexcept
 
void all_notes_off () noexcept override
 
std::string label () const noexcept override
 
void updateTime (const ossia::token_request &tk, ossia::exec_state_facade st)
 
void forgeTime (uint8_t *buffer, const ossia::token_request &tk, ossia::exec_state_facade st, float speed)
 
void preProcessVoice (voice &v, std::size_t voice_idx)
 
void feedCVInputs (voice &v, std::size_t voice_idx) noexcept
 
void writeCVOutputs (voice &v) noexcept
 The CV outputs of voice 0, after the control outlets.
 
void writeTime (Iterator &it) noexcept
 
void postProcessVoice (voice &v) noexcept
 
void surfaceVoiceZeroOutputs (int64_t offset)
 
void stop_voices () noexcept
 
void run (const ossia::token_request &tk, ossia::exec_state_facade st) noexcept override
 
void runSingle (int samples) noexcept
 
void runPerChannel (int samples) noexcept
 

Static Public Member Functions

static std::optional< float > voice_control_value (const ossia::value &val, std::size_t voice_idx) noexcept
 
template<typename Channel >
static void readChannel (const Channel &ch, float *dst, const buffer_span &s) noexcept
 
template<typename Channel >
static void writeChannel (Channel &ch, const float *src, const buffer_span &s)
 

Public Attributes

LV2Data data
 
std::vector< std::unique_ptr< voice > > voices
 
voice_routing routing {voice_routing::single}
 
ossia::float_vector fParamMin
 
ossia::float_vector fParamMax
 
ossia::float_vector fParamInit
 
std::unique_ptr< uint8_t[]> timePositionBuffer {}
 
std::unique_ptr< uint8_t[]> stoppedPositionBuffer {}
 The same position with a speed of 0: the transport is stopped.
 
bool m_sendStopped {true}
 
bool mustStop {}
 
bool m_timeForged {}
 The position buffers hold a position: a run happened.
 
std::size_t max_block_size {4096}
 
std::atomic< std::size_t > requested_voices {0}
 
OnExecStart on_start
 
OnExecFinished on_finished
 
struct LV2::lv2_node::buffer_span m_span
 

Static Public Attributes

static constexpr std::size_t kVoicePoolReserve = 256
 

Member Function Documentation

◆ feedCVInputs()

template<typename OnExecStart , typename OnExecFinished >
void LV2::lv2_node< OnExecStart, OnExecFinished >::feedCVInputs ( voice &  v,
std::size_t  voice_idx 
)
inlinenoexcept

The CV inputs of voice voice_idx: its channel of each CV inlet, or the first one.

◆ stop_voices()

template<typename OnExecStart , typename OnExecFinished >
void LV2::lv2_node< OnExecStart, OnExecFinished >::stop_voices ( )
inlinenoexcept

The transport stopped: the plug-in hears it (a position with a speed of 0, what all_notes_off queued) in a run of one frame.

◆ writeTime()

template<typename OnExecStart , typename OnExecFinished >
void LV2::lv2_node< OnExecStart, OnExecFinished >::writeTime ( Iterator &  it)
inlinenoexcept

The transport position, preceded by a stopped one on the first run of a play or when stopping.

Member Data Documentation

◆ m_sendStopped

template<typename OnExecStart , typename OnExecFinished >
bool LV2::lv2_node< OnExecStart, OnExecFinished >::m_sendStopped {true}

A plug-in only told "speed 1" again after a stop would not know that it stopped: the first run of a play says "stopped" first (the instance lives on from the previous play).

◆ mustStop

template<typename OnExecStart , typename OnExecFinished >
bool LV2::lv2_node< OnExecStart, OnExecFinished >::mustStop {}

Set by the process when the transport stops: the next (empty) tick tells the plug-in, runs it once, and nothing else.


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