Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::LV2Plugin Class Reference

#include <lv2_plugin.h>

Inheritance diagram for ARDOUR::LV2Plugin:
[legend]

Classes

struct  AutomationCtrl
 
struct  LV2_DataAccess
 
struct  UIMessage
 Message send to/from UI via ports. More...
 

Public Types

typedef void UIMessageSink(void *controller, uint32_t index, uint32_t size, uint32_t format, const void *buffer)
 
- Public Types inherited from ARDOUR::Plugin
typedef std::map< uint32_t, ParameterDescriptorPropertyDescriptors
 

Public Member Functions

 LV2Plugin (ARDOUR::AudioEngine &engine, ARDOUR::Session &session, const void *c_plugin, samplecnt_t sample_rate)
 
 LV2Plugin (const LV2Plugin &)
 
 ~LV2Plugin ()
 
std::string unique_id () const
 
const char * uri () const
 
const char * label () const
 
const char * name () const
 
const char * maker () const
 
uint32_t num_ports () const
 
uint32_t parameter_count () const
 
float default_value (uint32_t port)
 
samplecnt_t max_latency () const
 
void set_parameter (uint32_t port, float val, sampleoffset_t)
 
float get_parameter (uint32_t port) const
 
std::string get_docs () const
 
std::string get_parameter_docs (uint32_t which) const
 
int get_parameter_descriptor (uint32_t which, ParameterDescriptor &) const
 
uint32_t nth_parameter (uint32_t port, bool &ok) const
 
IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const
 
const void * extension_data (const char *uri) const
 
int setup_export (const char *, LV2_Options_Option const *options=NULL)
 
int finalize_export ()
 
bool can_export () const
 
const void * c_plugin ()
 
const void * c_ui ()
 
const void * c_ui_type ()
 
bool is_external_ui () const
 
bool is_external_kx () const
 
bool ui_is_resizable () const
 
const char * port_symbol (uint32_t port) const
 
uint32_t port_index (const char *symbol) const
 
const LV2_Feature *const * features ()
 
std::set< Evoral::Parameterautomatable () const
 
virtual void set_automation_control (uint32_t, std::shared_ptr< AutomationControl >)
 
void activate ()
 
void deactivate ()
 
void cleanup ()
 
int set_block_size (pframes_t)
 
bool requires_fixed_sized_buffers () const
 
bool connect_all_audio_outputs () const
 
int connect_and_run (BufferSet &bufs, samplepos_t start, samplepos_t end, double speed, ChanMapping const &in, ChanMapping const &out, pframes_t nframes, samplecnt_t offset)
 
std::string describe_parameter (Evoral::Parameter)
 
std::string state_node_name () const
 
bool parameter_is_audio (uint32_t) const
 
bool parameter_is_control (uint32_t) const
 
bool parameter_is_input (uint32_t) const
 
bool parameter_is_output (uint32_t) const
 
bool parameter_is_toggled (uint32_t) const
 
uint32_t designated_bypass_port ()
 
std::shared_ptr< ScalePointsget_scale_points (uint32_t port_index) const
 
void set_insert_id (PBD::ID id)
 
void set_state_dir (const std::string &d="")
 
int set_state (const XMLNode &node, int version)
 
bool load_preset (PresetRecord)
 
std::string current_preset () const
 
bool has_editor () const
 
bool has_message_output () const
 
void add_slave (std::shared_ptr< Plugin >, bool)
 
void remove_slave (std::shared_ptr< Plugin >)
 
void set_non_realtime (bool)
 
bool write_from_ui (uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
 
void enable_ui_emission ()
 
void emit_to_ui (void *controller, UIMessageSink sink)
 
Workerworker ()
 
URIMapuri_map ()
 
const URIMapuri_map () const
 
int work (Worker &worker, uint32_t size, const void *data)
 
int work_response (uint32_t size, const void *data)
 
void set_property (uint32_t key, const Variant &value)
 
const PropertyDescriptorsget_supported_properties () const
 
const ParameterDescriptorget_property_descriptor (uint32_t id) const
 
Variant get_property_value (uint32_t) const
 
void announce_property_values ()
 
- Public Member Functions inherited from ARDOUR::Plugin
 Plugin (ARDOUR::AudioEngine &, ARDOUR::Session &)
 
 Plugin (const Plugin &)
 
virtual ~Plugin ()
 
XMLNodeget_state () const
 
void set_insert (PlugInsertBase *pib, uint32_t num)
 
PlugInsertBaseplugin_insert () const
 
uint32_t plugin_number () const
 
virtual std::string parameter_label (uint32_t which) const
 
virtual void flush ()
 
virtual bool print_parameter (uint32_t, std::string &) const
 
virtual PluginOutputConfiguration possible_output () const
 
samplecnt_t signal_latency () const
 
samplecnt_t signal_tailtime () const
 
virtual bool inplace_broken () const
 
bool write_immediate_event (Evoral::EventType event_type, size_t size, const uint8_t *buf)
 
void realtime_handle_transport_stopped ()
 
void realtime_locate (bool)
 
void monitoring_changed ()
 
PresetRecord save_preset (std::string name)
 
void remove_preset (std::string)
 
void clear_preset ()
 
const PresetRecordpreset_by_label (const std::string &)
 
const PresetRecordpreset_by_uri (const std::string &)
 
virtual std::vector< PresetRecordget_presets ()
 
PresetRecord last_preset () const
 
bool parameter_changed_since_last_preset () const
 
virtual int first_user_preset_index () const
 
virtual bool reconfigure_io (ChanCount, ChanCount, ChanCount)
 
virtual bool match_variable_io (ChanCount &, ChanCount &, ChanCount &)
 
virtual ChanCount output_streams () const
 
virtual ChanCount input_streams () const
 
virtual void set_info (const PluginInfoPtr info)
 
PluginInfoPtr get_info () const
 
virtual void set_owner (SessionObject *o)
 
SessionObjectowner () const
 
void set_cycles (uint32_t c)
 
cycles_t cycles () const
 
void use_for_impulse_analysis ()
 
ARDOUR::AudioEngineengine () const
 
ARDOUR::Sessionsession () const
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
virtual ~Destructible ()
 
virtual void drop_references ()
 
- Public Member Functions inherited from ARDOUR::HasLatency
virtual ~HasLatency ()
 
- Public Member Functions inherited from ARDOUR::HasTailTime
virtual ~HasTailTime ()
 
- Public Member Functions inherited from ARDOUR::Workee
virtual ~Workee ()
 

Static Public Member Functions

static void set_global_ui_background_color (uint32_t c)
 
static void set_global_ui_foreground_color (uint32_t c)
 
static void set_global_ui_contrasting_color (uint32_t c)
 
static void set_global_ui_style_boxy (bool yn)
 
static void set_global_ui_style_flat (bool yn)
 
static void set_main_window_id (unsigned long id)
 

Static Public Attributes

static bool force_state_save
 
- Static Public Attributes inherited from ARDOUR::Plugin
static PBD::Signal< void(std::string, Plugin *, bool)> PresetsChanged
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 

Private Types

enum  PortFlag {
  PORT_INPUT = 1 , PORT_OUTPUT = 1 << 1 , PORT_AUDIO = 1 << 2 , PORT_CONTROL = 1 << 3 ,
  PORT_SEQUENCE = 1 << 5 , PORT_MIDI = 1 << 6 , PORT_POSITION = 1 << 7 , PORT_PATCHMSG = 1 << 8 ,
  PORT_AUTOCTRL = 1 << 9 , PORT_CTRLED = 1 << 10 , PORT_CTRLER = 1 << 11 , PORT_NOAUTO = 1 << 12 ,
  PORT_OTHOPT = 1 << 13
}
 
typedef unsigned PortFlags
 
typedef std::shared_ptr< AutomationCtrlAutomationCtrlPtr
 
typedef std::map< uint32_t, AutomationCtrlPtrAutomationCtrlMap
 

Private Member Functions

AutomationCtrlPtr get_automation_control (uint32_t)
 
bool write_to_ui (uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
 
bool write_to (PBD::RingBuffer< uint8_t > *dest, uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
 
bool knows_bank_patch ()
 
uint32_t bank_patch (uint8_t chn)
 
const std::string plugin_dir () const
 
const std::string scratch_dir () const
 
const std::string file_dir () const
 
const std::string state_dir (unsigned num) const
 
void init (const void *c_plugin, samplecnt_t rate)
 
void allocate_atom_event_buffers ()
 
void run (pframes_t nsamples, bool sync_work=false)
 
void load_supported_properties (PropertyDescriptors &descs)
 
bool has_inline_display ()
 
bool inline_display_in_gui ()
 
Plugin::Display_Image_Surfacerender_inline_display (uint32_t, uint32_t)
 
bool has_midnam ()
 
bool read_midnam ()
 
std::string midnam_model ()
 
samplecnt_t plugin_latency () const
 
void latency_compute_run ()
 
std::string do_save_preset (std::string)
 
void do_remove_preset (std::string)
 
void find_presets ()
 
void add_state (XMLNode *) const
 

Static Private Member Functions

static void queue_draw (LV2_Inline_Display_Handle)
 
static void midnam_update (LV2_Midnam_Handle)
 
static void bankpatch_notify (LV2_BankPatch_Handle, uint8_t, uint32_t, uint8_t)
 
static char * lv2_state_make_path (void *host_data, const char *path)
 

Private Attributes

Impl * _impl
 
void * _module
 
LV2_Feature ** _features
 
Worker_worker
 
Worker_state_worker
 
samplecnt_t _sample_rate
 
float _fsample_rate
 
float * _control_data
 
float * _shadow_data
 
float * _defaults
 
LV2_Evbuf ** _ev_buffers
 
LV2_Evbuf ** _atom_ev_buffers
 
float * _bpm_control_port
 Special input set by ardour. More...
 
float * _freewheel_control_port
 Special input set by ardour. More...
 
float * _latency_control_port
 Special output set by ardour. More...
 
samplepos_t _next_cycle_start
 Expected start sample of next run cycle. More...
 
double _next_cycle_speed
 Expected start sample of next run cycle. More...
 
double _next_cycle_beat
 Expected bar_beat of next run cycle. More...
 
double _current_bpm
 
double _prev_time_scale
 previous Port::speed_ratio More...
 
PBD::ID _insert_id
 
bool _non_realtime
 
std::string _plugin_state_dir
 
uint32_t _bpm_control_port_index
 
uint32_t _patch_port_in_index
 
uint32_t _patch_port_out_index
 
URIMap_uri_map
 
bool _no_sample_accurate_ctrl
 
bool _connect_all_audio_outputs
 
bool _can_write_automation
 
samplecnt_t _max_latency
 
samplecnt_t _current_latency
 
std::vector< PortFlags_port_flags
 
std::vector< size_t > _port_minimumSize
 
std::map< std::string, uint32_t > _port_indices
 
std::map< uint32_t, Variant_property_values
 
PropertyDescriptors _property_descriptors
 
AutomationCtrlMap _ctrl_map
 
PBD::RingBuffer< uint8_t > * _to_ui
 
PBD::RingBuffer< uint8_t > * _from_ui
 
Glib::Threads::Mutex _work_mutex
 
Glib::Threads::Mutex _slave_lock
 
std::set< std::shared_ptr< LV2Plugin > > _slaves
 
bool _inline_display_in_gui
 
const LV2_Inline_Display_Interface_display_interface
 
const LV2_Midnam_Interface_midname_interface
 
const LV2_Export_Interface_export_interface
 
uint32_t _bankpatch [16]
 
bool seen_bankpatch
 
LV2_DataAccess _data_access_extension_data
 
LV2_Feature _data_access_feature
 
LV2_Feature _instance_access_feature
 
LV2_Feature _make_path_feature
 
LV2_Feature _log_feature
 
LV2_Feature _work_schedule_feature
 
LV2_Feature _options_feature
 
LV2_Feature _def_state_feature
 
LV2_Feature _block_length_feature
 
LV2_Feature _queue_draw_feature
 
LV2_Feature _midnam_feature
 
LV2_Feature _bankpatch_feature
 
int32_t _seq_size
 
unsigned _state_version
 
bool _was_activated
 
bool _has_state_interface
 
bool _midnam_dirty
 
Temporal::GridIterator grid_iterator
 

Static Private Attributes

static int32_t _ui_style_flat
 
static int32_t _ui_style_boxy
 
static uint32_t _ui_background_color
 
static uint32_t _ui_foreground_color
 
static uint32_t _ui_contrasting_color
 
static unsigned long _ui_transient_win_id
 

Friends

const void * lv2plugin_get_port_value (const char *port_symbol, void *user_data, uint32_t *size, uint32_t *type)
 

Additional Inherited Members

- Public Attributes inherited from ARDOUR::Plugin
PBD::Signal< void()> QueueDraw
 
PBD::Signal< void()> UpdateMidnam
 
PBD::Signal< void()> UpdatedMidnam
 
PBD::Signal< void(uint8_t)> BankPatchChange
 
PBD::Signal< void()> PresetAdded
 
PBD::Signal< void()> PresetRemoved
 
PBD::Signal< void()> PresetLoaded
 
PBD::Signal< void()> PresetDirty
 
PBD::Signal< void(uint32_t, float)> PresetPortSetValue
 
PBD::Signal< void(uint32_t, float)> ParameterChangedExternally
 
PBD::Signal< void(uint32_t, Variant)> PropertyChanged
 
PBD::Signal< void(uint32_t)> StartTouch
 
PBD::Signal< void(uint32_t)> EndTouch
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal< void()> Destroyed
 
PBD::Signal< void()> DropReferences
 
- Protected Member Functions inherited from ARDOUR::Plugin
virtual void parameter_changed_externally (uint32_t which, float val)
 
void state_changed ()
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 
- Protected Attributes inherited from ARDOUR::Plugin
ARDOUR::AudioEngine_engine
 
ARDOUR::Session_session
 
PluginInfoPtr _info
 
uint32_t _cycles
 
SessionObject_owner
 
bool _for_impulse_analysis
 
std::map< std::string, PresetRecord_presets
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Detailed Description

Definition at line 62 of file lv2_plugin.h.

Member Typedef Documentation

◆ AutomationCtrlMap

typedef std::map<uint32_t, AutomationCtrlPtr> ARDOUR::LV2Plugin::AutomationCtrlMap
private

Definition at line 287 of file lv2_plugin.h.

◆ AutomationCtrlPtr

typedef std::shared_ptr<AutomationCtrl> ARDOUR::LV2Plugin::AutomationCtrlPtr
private

Definition at line 286 of file lv2_plugin.h.

◆ PortFlags

typedef unsigned ARDOUR::LV2Plugin::PortFlags
private

Definition at line 262 of file lv2_plugin.h.

◆ UIMessageSink

typedef void ARDOUR::LV2Plugin::UIMessageSink(void *controller, uint32_t index, uint32_t size, uint32_t format, const void *buffer)

Definition at line 163 of file lv2_plugin.h.

Member Enumeration Documentation

◆ PortFlag

Enumerator
PORT_INPUT 

Input port.

PORT_OUTPUT 

Output port.

PORT_AUDIO 

Audio (buffer of float)

PORT_CONTROL 

Control (single float)

PORT_SEQUENCE 

New atom API event port.

PORT_MIDI 

Event port understands MIDI.

PORT_POSITION 

Event port understands position.

PORT_PATCHMSG 

Event port supports patch:Message.

PORT_AUTOCTRL 

Event port supports auto:AutomationControl.

PORT_CTRLED 

Port prop auto:AutomationControlled (can be self controlled)

PORT_CTRLER 

Port prop auto:AutomationController (can be self set)

PORT_NOAUTO 

Port don't allow to automate.

PORT_OTHOPT 

Port of unknown data type with prop connectionOptional.

Definition at line 246 of file lv2_plugin.h.

Constructor & Destructor Documentation

◆ LV2Plugin() [1/2]

ARDOUR::LV2Plugin::LV2Plugin ( ARDOUR::AudioEngine engine,
ARDOUR::Session session,
const void *  c_plugin,
samplecnt_t  sample_rate 
)

◆ LV2Plugin() [2/2]

ARDOUR::LV2Plugin::LV2Plugin ( const LV2Plugin )

◆ ~LV2Plugin()

ARDOUR::LV2Plugin::~LV2Plugin ( )

Member Function Documentation

◆ activate()

void ARDOUR::LV2Plugin::activate ( )
virtual

Implements ARDOUR::Plugin.

◆ add_slave()

void ARDOUR::LV2Plugin::add_slave ( std::shared_ptr< Plugin ,
bool   
)
virtual

Reimplemented from ARDOUR::Plugin.

◆ add_state()

void ARDOUR::LV2Plugin::add_state ( XMLNode ) const
privatevirtual

Add state to an existing XMLNode

Implements ARDOUR::Plugin.

◆ allocate_atom_event_buffers()

void ARDOUR::LV2Plugin::allocate_atom_event_buffers ( )
private

◆ announce_property_values()

void ARDOUR::LV2Plugin::announce_property_values ( )
virtual

Emit PropertyChanged for all current property values.

Reimplemented from ARDOUR::Plugin.

◆ automatable()

std::set<Evoral::Parameter> ARDOUR::LV2Plugin::automatable ( ) const
virtual

Implements ARDOUR::Plugin.

◆ bank_patch()

uint32_t ARDOUR::LV2Plugin::bank_patch ( uint8_t  chn)
inlineprivatevirtual

Reimplemented from ARDOUR::Plugin.

Definition at line 331 of file lv2_plugin.h.

◆ bankpatch_notify()

static void ARDOUR::LV2Plugin::bankpatch_notify ( LV2_BankPatch_Handle  ,
uint8_t  ,
uint32_t  ,
uint8_t   
)
staticprivate

◆ c_plugin()

const void* ARDOUR::LV2Plugin::c_plugin ( )

◆ c_ui()

const void* ARDOUR::LV2Plugin::c_ui ( )

◆ c_ui_type()

const void* ARDOUR::LV2Plugin::c_ui_type ( )

◆ can_export()

bool ARDOUR::LV2Plugin::can_export ( ) const
inline

Definition at line 98 of file lv2_plugin.h.

◆ cleanup()

void ARDOUR::LV2Plugin::cleanup ( )

◆ connect_all_audio_outputs()

bool ARDOUR::LV2Plugin::connect_all_audio_outputs ( ) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ connect_and_run()

int ARDOUR::LV2Plugin::connect_and_run ( BufferSet bufs,
samplepos_t  start,
samplepos_t  end,
double  speed,
ChanMapping const &  in,
ChanMapping const &  out,
pframes_t  nframes,
samplecnt_t  offset 
)
virtual

Reimplemented from ARDOUR::Plugin.

◆ current_preset()

std::string ARDOUR::LV2Plugin::current_preset ( ) const

◆ deactivate()

void ARDOUR::LV2Plugin::deactivate ( )
virtual

Implements ARDOUR::Plugin.

◆ default_value()

float ARDOUR::LV2Plugin::default_value ( uint32_t  port)
virtual

Implements ARDOUR::Plugin.

◆ describe_io_port()

IOPortDescription ARDOUR::LV2Plugin::describe_io_port ( DataType  dt,
bool  input,
uint32_t  id 
) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ describe_parameter()

std::string ARDOUR::LV2Plugin::describe_parameter ( Evoral::Parameter  )
virtual

Implements ARDOUR::Plugin.

◆ designated_bypass_port()

uint32_t ARDOUR::LV2Plugin::designated_bypass_port ( )
virtual

Reimplemented from ARDOUR::Plugin.

◆ do_remove_preset()

void ARDOUR::LV2Plugin::do_remove_preset ( std::string  )
privatevirtual

Do the actual removal of a preset of the provided name

Implements ARDOUR::Plugin.

◆ do_save_preset()

std::string ARDOUR::LV2Plugin::do_save_preset ( std::string  )
privatevirtual

Do the actual saving of the current plugin settings to a preset of the provided name. Should return a URI on success, or an empty string on failure.

Implements ARDOUR::Plugin.

◆ emit_to_ui()

void ARDOUR::LV2Plugin::emit_to_ui ( void *  controller,
UIMessageSink  sink 
)

◆ enable_ui_emission()

void ARDOUR::LV2Plugin::enable_ui_emission ( )

◆ extension_data()

const void* ARDOUR::LV2Plugin::extension_data ( const char *  uri) const

◆ features()

const LV2_Feature* const* ARDOUR::LV2Plugin::features ( )
inline

Definition at line 112 of file lv2_plugin.h.

◆ file_dir()

const std::string ARDOUR::LV2Plugin::file_dir ( ) const
private

◆ finalize_export()

int ARDOUR::LV2Plugin::finalize_export ( )

◆ find_presets()

void ARDOUR::LV2Plugin::find_presets ( )
privatevirtual

Fill _presets with our presets

Implements ARDOUR::Plugin.

◆ get_automation_control()

AutomationCtrlPtr ARDOUR::LV2Plugin::get_automation_control ( uint32_t  )
private

◆ get_docs()

std::string ARDOUR::LV2Plugin::get_docs ( ) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ get_parameter()

float ARDOUR::LV2Plugin::get_parameter ( uint32_t  port) const
virtual

Implements ARDOUR::Plugin.

◆ get_parameter_descriptor()

int ARDOUR::LV2Plugin::get_parameter_descriptor ( uint32_t  which,
ParameterDescriptor  
) const
virtual

Implements ARDOUR::Plugin.

◆ get_parameter_docs()

std::string ARDOUR::LV2Plugin::get_parameter_docs ( uint32_t  which) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ get_property_descriptor()

const ParameterDescriptor& ARDOUR::LV2Plugin::get_property_descriptor ( uint32_t  id) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ get_property_value()

Variant ARDOUR::LV2Plugin::get_property_value ( uint32_t  ) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ get_scale_points()

std::shared_ptr<ScalePoints> ARDOUR::LV2Plugin::get_scale_points ( uint32_t  port_index) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ get_supported_properties()

const PropertyDescriptors& ARDOUR::LV2Plugin::get_supported_properties ( ) const
inlinevirtual

Get a descrption of all properties supported by this plugin.

Properties are distinct from parameters in that they are potentially dynamic, referred to by key, and do not correspond 1:1 with ports.

For LV2 plugins, properties are implemented by sending/receiving set/get messages to/from the plugin via event ports.

Reimplemented from ARDOUR::Plugin.

Definition at line 181 of file lv2_plugin.h.

◆ has_editor()

bool ARDOUR::LV2Plugin::has_editor ( ) const
virtual
Returns
true if plugin has a custom plugin GUI

Implements ARDOUR::Plugin.

◆ has_inline_display()

bool ARDOUR::LV2Plugin::has_inline_display ( )
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ has_message_output()

bool ARDOUR::LV2Plugin::has_message_output ( ) const

◆ has_midnam()

bool ARDOUR::LV2Plugin::has_midnam ( )
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ init()

void ARDOUR::LV2Plugin::init ( const void *  c_plugin,
samplecnt_t  rate 
)
private

◆ inline_display_in_gui()

bool ARDOUR::LV2Plugin::inline_display_in_gui ( )
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ is_external_kx()

bool ARDOUR::LV2Plugin::is_external_kx ( ) const

◆ is_external_ui()

bool ARDOUR::LV2Plugin::is_external_ui ( ) const

◆ knows_bank_patch()

bool ARDOUR::LV2Plugin::knows_bank_patch ( )
inlineprivatevirtual

Reimplemented from ARDOUR::Plugin.

Definition at line 330 of file lv2_plugin.h.

◆ label()

const char* ARDOUR::LV2Plugin::label ( ) const
virtual

Implements ARDOUR::Plugin.

◆ latency_compute_run()

void ARDOUR::LV2Plugin::latency_compute_run ( )
private

◆ load_preset()

bool ARDOUR::LV2Plugin::load_preset ( PresetRecord  )
virtual

Set parameters using a preset

Reimplemented from ARDOUR::Plugin.

◆ load_supported_properties()

void ARDOUR::LV2Plugin::load_supported_properties ( PropertyDescriptors descs)
private

◆ lv2_state_make_path()

static char* ARDOUR::LV2Plugin::lv2_state_make_path ( void *  host_data,
const char *  path 
)
staticprivate

◆ maker()

const char* ARDOUR::LV2Plugin::maker ( ) const
virtual

Implements ARDOUR::Plugin.

◆ max_latency()

samplecnt_t ARDOUR::LV2Plugin::max_latency ( ) const
virtual

the max possible latency a plugin will have

Reimplemented from ARDOUR::Plugin.

◆ midnam_model()

std::string ARDOUR::LV2Plugin::midnam_model ( )
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ midnam_update()

static void ARDOUR::LV2Plugin::midnam_update ( LV2_Midnam_Handle  )
staticprivate

◆ name()

const char* ARDOUR::LV2Plugin::name ( ) const
virtual

Implements ARDOUR::Plugin.

◆ nth_parameter()

uint32_t ARDOUR::LV2Plugin::nth_parameter ( uint32_t  port,
bool &  ok 
) const
virtual

Implements ARDOUR::Plugin.

◆ num_ports()

uint32_t ARDOUR::LV2Plugin::num_ports ( ) const

◆ parameter_count()

uint32_t ARDOUR::LV2Plugin::parameter_count ( ) const
virtual

Implements ARDOUR::Plugin.

◆ parameter_is_audio()

bool ARDOUR::LV2Plugin::parameter_is_audio ( uint32_t  ) const
virtual

Implements ARDOUR::Plugin.

◆ parameter_is_control()

bool ARDOUR::LV2Plugin::parameter_is_control ( uint32_t  ) const
virtual

Implements ARDOUR::Plugin.

◆ parameter_is_input()

bool ARDOUR::LV2Plugin::parameter_is_input ( uint32_t  ) const
virtual

Implements ARDOUR::Plugin.

◆ parameter_is_output()

bool ARDOUR::LV2Plugin::parameter_is_output ( uint32_t  ) const
virtual

Implements ARDOUR::Plugin.

◆ parameter_is_toggled()

bool ARDOUR::LV2Plugin::parameter_is_toggled ( uint32_t  ) const

◆ plugin_dir()

const std::string ARDOUR::LV2Plugin::plugin_dir ( ) const
private

◆ plugin_latency()

samplecnt_t ARDOUR::LV2Plugin::plugin_latency ( ) const
privatevirtual

Implements ARDOUR::Plugin.

◆ port_index()

uint32_t ARDOUR::LV2Plugin::port_index ( const char *  symbol) const

◆ port_symbol()

const char* ARDOUR::LV2Plugin::port_symbol ( uint32_t  port) const

◆ queue_draw()

static void ARDOUR::LV2Plugin::queue_draw ( LV2_Inline_Display_Handle  )
staticprivate

◆ read_midnam()

bool ARDOUR::LV2Plugin::read_midnam ( )
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ remove_slave()

void ARDOUR::LV2Plugin::remove_slave ( std::shared_ptr< Plugin )
virtual

Reimplemented from ARDOUR::Plugin.

◆ render_inline_display()

Plugin::Display_Image_Surface* ARDOUR::LV2Plugin::render_inline_display ( uint32_t  ,
uint32_t   
)
privatevirtual

Reimplemented from ARDOUR::Plugin.

◆ requires_fixed_sized_buffers()

bool ARDOUR::LV2Plugin::requires_fixed_sized_buffers ( ) const
virtual

Reimplemented from ARDOUR::Plugin.

◆ run()

void ARDOUR::LV2Plugin::run ( pframes_t  nsamples,
bool  sync_work = false 
)
private

◆ scratch_dir()

const std::string ARDOUR::LV2Plugin::scratch_dir ( ) const
private

◆ set_automation_control()

virtual void ARDOUR::LV2Plugin::set_automation_control ( uint32_t  ,
std::shared_ptr< AutomationControl  
)
virtual

Reimplemented from ARDOUR::Plugin.

◆ set_block_size()

int ARDOUR::LV2Plugin::set_block_size ( pframes_t  )
virtual

Implements ARDOUR::Plugin.

◆ set_global_ui_background_color()

static void ARDOUR::LV2Plugin::set_global_ui_background_color ( uint32_t  c)
inlinestatic

Definition at line 187 of file lv2_plugin.h.

◆ set_global_ui_contrasting_color()

static void ARDOUR::LV2Plugin::set_global_ui_contrasting_color ( uint32_t  c)
inlinestatic

Definition at line 193 of file lv2_plugin.h.

◆ set_global_ui_foreground_color()

static void ARDOUR::LV2Plugin::set_global_ui_foreground_color ( uint32_t  c)
inlinestatic

Definition at line 190 of file lv2_plugin.h.

◆ set_global_ui_style_boxy()

static void ARDOUR::LV2Plugin::set_global_ui_style_boxy ( bool  yn)
inlinestatic

Definition at line 196 of file lv2_plugin.h.

◆ set_global_ui_style_flat()

static void ARDOUR::LV2Plugin::set_global_ui_style_flat ( bool  yn)
inlinestatic

Definition at line 199 of file lv2_plugin.h.

◆ set_insert_id()

void ARDOUR::LV2Plugin::set_insert_id ( PBD::ID  id)
virtual

Reimplemented from ARDOUR::Plugin.

◆ set_main_window_id()

static void ARDOUR::LV2Plugin::set_main_window_id ( unsigned long  id)
inlinestatic

Definition at line 202 of file lv2_plugin.h.

◆ set_non_realtime()

void ARDOUR::LV2Plugin::set_non_realtime ( bool  )
virtual

Reimplemented from ARDOUR::Plugin.

◆ set_parameter()

void ARDOUR::LV2Plugin::set_parameter ( uint32_t  port,
float  val,
sampleoffset_t   
)
virtual

Reimplemented from ARDOUR::Plugin.

◆ set_property()

void ARDOUR::LV2Plugin::set_property ( uint32_t  key,
const Variant value 
)
virtual

Set a property from the UI.

This is not UI-specific, but may only be used by one thread. If the Ardour UI is present, that is the UI thread, but otherwise, any thread except the audio thread may call this function as long as it is not called concurrently.

Reimplemented from ARDOUR::Plugin.

◆ set_state()

int ARDOUR::LV2Plugin::set_state ( const XMLNode node,
int  version 
)
virtual

Reimplemented from ARDOUR::Plugin.

◆ set_state_dir()

void ARDOUR::LV2Plugin::set_state_dir ( const std::string &  d = "")
virtual

Reimplemented from ARDOUR::Plugin.

◆ setup_export()

int ARDOUR::LV2Plugin::setup_export ( const char *  ,
LV2_Options_Option const *  options = NULL 
)

◆ state_dir()

const std::string ARDOUR::LV2Plugin::state_dir ( unsigned  num) const
private

◆ state_node_name()

std::string ARDOUR::LV2Plugin::state_node_name ( ) const
inlinevirtual

Implements ARDOUR::Plugin.

Definition at line 131 of file lv2_plugin.h.

◆ ui_is_resizable()

bool ARDOUR::LV2Plugin::ui_is_resizable ( ) const

◆ unique_id()

std::string ARDOUR::LV2Plugin::unique_id ( ) const
virtual

Implements ARDOUR::Plugin.

◆ uri()

const char* ARDOUR::LV2Plugin::uri ( ) const

◆ uri_map() [1/2]

URIMap& ARDOUR::LV2Plugin::uri_map ( )
inline

Definition at line 174 of file lv2_plugin.h.

◆ uri_map() [2/2]

const URIMap& ARDOUR::LV2Plugin::uri_map ( ) const
inline

Definition at line 175 of file lv2_plugin.h.

◆ work()

int ARDOUR::LV2Plugin::work ( Worker worker,
uint32_t  size,
const void *  data 
)
virtual

Do some work in the worker thread.

Implements ARDOUR::Workee.

◆ work_response()

int ARDOUR::LV2Plugin::work_response ( uint32_t  size,
const void *  data 
)
virtual

Handle a response from the worker thread in the audio thread.

Implements ARDOUR::Workee.

◆ worker()

Worker* ARDOUR::LV2Plugin::worker ( )
inline

Definition at line 172 of file lv2_plugin.h.

◆ write_from_ui()

bool ARDOUR::LV2Plugin::write_from_ui ( uint32_t  index,
uint32_t  protocol,
uint32_t  size,
const uint8_t *  body 
)

◆ write_to()

bool ARDOUR::LV2Plugin::write_to ( PBD::RingBuffer< uint8_t > *  dest,
uint32_t  index,
uint32_t  protocol,
uint32_t  size,
const uint8_t *  body 
)
private

◆ write_to_ui()

bool ARDOUR::LV2Plugin::write_to_ui ( uint32_t  index,
uint32_t  protocol,
uint32_t  size,
const uint8_t *  body 
)
private

Friends And Related Function Documentation

◆ lv2plugin_get_port_value

const void* lv2plugin_get_port_value ( const char *  port_symbol,
void *  user_data,
uint32_t *  size,
uint32_t *  type 
)
friend

Member Data Documentation

◆ _atom_ev_buffers

LV2_Evbuf** ARDOUR::LV2Plugin::_atom_ev_buffers
private

Definition at line 219 of file lv2_plugin.h.

◆ _bankpatch

uint32_t ARDOUR::LV2Plugin::_bankpatch[16]
private

Definition at line 328 of file lv2_plugin.h.

◆ _bankpatch_feature

LV2_Feature ARDOUR::LV2Plugin::_bankpatch_feature
private

Definition at line 354 of file lv2_plugin.h.

◆ _block_length_feature

LV2_Feature ARDOUR::LV2Plugin::_block_length_feature
private

Definition at line 350 of file lv2_plugin.h.

◆ _bpm_control_port

float* ARDOUR::LV2Plugin::_bpm_control_port
private

Special input set by ardour.

Definition at line 220 of file lv2_plugin.h.

◆ _bpm_control_port_index

uint32_t ARDOUR::LV2Plugin::_bpm_control_port_index
private

Definition at line 231 of file lv2_plugin.h.

◆ _can_write_automation

bool ARDOUR::LV2Plugin::_can_write_automation
private

Definition at line 237 of file lv2_plugin.h.

◆ _connect_all_audio_outputs

bool ARDOUR::LV2Plugin::_connect_all_audio_outputs
private

Definition at line 236 of file lv2_plugin.h.

◆ _control_data

float* ARDOUR::LV2Plugin::_control_data
private

Definition at line 215 of file lv2_plugin.h.

◆ _ctrl_map

AutomationCtrlMap ARDOUR::LV2Plugin::_ctrl_map
private

Definition at line 288 of file lv2_plugin.h.

◆ _current_bpm

double ARDOUR::LV2Plugin::_current_bpm
private

Definition at line 226 of file lv2_plugin.h.

◆ _current_latency

samplecnt_t ARDOUR::LV2Plugin::_current_latency
private

Definition at line 239 of file lv2_plugin.h.

◆ _data_access_extension_data

LV2_DataAccess ARDOUR::LV2Plugin::_data_access_extension_data
private

Definition at line 342 of file lv2_plugin.h.

◆ _data_access_feature

LV2_Feature ARDOUR::LV2Plugin::_data_access_feature
private

Definition at line 343 of file lv2_plugin.h.

◆ _def_state_feature

LV2_Feature ARDOUR::LV2Plugin::_def_state_feature
private

Definition at line 349 of file lv2_plugin.h.

◆ _defaults

float* ARDOUR::LV2Plugin::_defaults
private

Definition at line 217 of file lv2_plugin.h.

◆ _display_interface

const LV2_Inline_Display_Interface* ARDOUR::LV2Plugin::_display_interface
private

Definition at line 324 of file lv2_plugin.h.

◆ _ev_buffers

LV2_Evbuf** ARDOUR::LV2Plugin::_ev_buffers
private

Definition at line 218 of file lv2_plugin.h.

◆ _export_interface

const LV2_Export_Interface* ARDOUR::LV2Plugin::_export_interface
private

Definition at line 326 of file lv2_plugin.h.

◆ _features

LV2_Feature** ARDOUR::LV2Plugin::_features
private

Definition at line 210 of file lv2_plugin.h.

◆ _freewheel_control_port

float* ARDOUR::LV2Plugin::_freewheel_control_port
private

Special input set by ardour.

Definition at line 221 of file lv2_plugin.h.

◆ _from_ui

PBD::RingBuffer<uint8_t>* ARDOUR::LV2Plugin::_from_ui
private

Definition at line 311 of file lv2_plugin.h.

◆ _fsample_rate

float ARDOUR::LV2Plugin::_fsample_rate
private

Definition at line 214 of file lv2_plugin.h.

◆ _has_state_interface

bool ARDOUR::LV2Plugin::_has_state_interface
private

Definition at line 369 of file lv2_plugin.h.

◆ _impl

Impl* ARDOUR::LV2Plugin::_impl
private

Definition at line 208 of file lv2_plugin.h.

◆ _inline_display_in_gui

bool ARDOUR::LV2Plugin::_inline_display_in_gui
private

Definition at line 323 of file lv2_plugin.h.

◆ _insert_id

PBD::ID ARDOUR::LV2Plugin::_insert_id
private

Definition at line 228 of file lv2_plugin.h.

◆ _instance_access_feature

LV2_Feature ARDOUR::LV2Plugin::_instance_access_feature
private

Definition at line 344 of file lv2_plugin.h.

◆ _latency_control_port

float* ARDOUR::LV2Plugin::_latency_control_port
private

Special output set by ardour.

Definition at line 222 of file lv2_plugin.h.

◆ _log_feature

LV2_Feature ARDOUR::LV2Plugin::_log_feature
private

Definition at line 346 of file lv2_plugin.h.

◆ _make_path_feature

LV2_Feature ARDOUR::LV2Plugin::_make_path_feature
private

Definition at line 345 of file lv2_plugin.h.

◆ _max_latency

samplecnt_t ARDOUR::LV2Plugin::_max_latency
private

Definition at line 238 of file lv2_plugin.h.

◆ _midnam_dirty

bool ARDOUR::LV2Plugin::_midnam_dirty
private

Definition at line 393 of file lv2_plugin.h.

◆ _midnam_feature

LV2_Feature ARDOUR::LV2Plugin::_midnam_feature
private

Definition at line 353 of file lv2_plugin.h.

◆ _midname_interface

const LV2_Midnam_Interface* ARDOUR::LV2Plugin::_midname_interface
private

Definition at line 325 of file lv2_plugin.h.

◆ _module

void* ARDOUR::LV2Plugin::_module
private

Definition at line 209 of file lv2_plugin.h.

◆ _next_cycle_beat

double ARDOUR::LV2Plugin::_next_cycle_beat
private

Expected bar_beat of next run cycle.

Definition at line 225 of file lv2_plugin.h.

◆ _next_cycle_speed

double ARDOUR::LV2Plugin::_next_cycle_speed
private

Expected start sample of next run cycle.

Definition at line 224 of file lv2_plugin.h.

◆ _next_cycle_start

samplepos_t ARDOUR::LV2Plugin::_next_cycle_start
private

Expected start sample of next run cycle.

Definition at line 223 of file lv2_plugin.h.

◆ _no_sample_accurate_ctrl

bool ARDOUR::LV2Plugin::_no_sample_accurate_ctrl
private

Definition at line 235 of file lv2_plugin.h.

◆ _non_realtime

bool ARDOUR::LV2Plugin::_non_realtime
private

Definition at line 229 of file lv2_plugin.h.

◆ _options_feature

LV2_Feature ARDOUR::LV2Plugin::_options_feature
private

Definition at line 348 of file lv2_plugin.h.

◆ _patch_port_in_index

uint32_t ARDOUR::LV2Plugin::_patch_port_in_index
private

Definition at line 232 of file lv2_plugin.h.

◆ _patch_port_out_index

uint32_t ARDOUR::LV2Plugin::_patch_port_out_index
private

Definition at line 233 of file lv2_plugin.h.

◆ _plugin_state_dir

std::string ARDOUR::LV2Plugin::_plugin_state_dir
private

Definition at line 230 of file lv2_plugin.h.

◆ _port_flags

std::vector<PortFlags> ARDOUR::LV2Plugin::_port_flags
private

Definition at line 264 of file lv2_plugin.h.

◆ _port_indices

std::map<std::string,uint32_t> ARDOUR::LV2Plugin::_port_indices
private

Definition at line 266 of file lv2_plugin.h.

◆ _port_minimumSize

std::vector<size_t> ARDOUR::LV2Plugin::_port_minimumSize
private

Definition at line 265 of file lv2_plugin.h.

◆ _prev_time_scale

double ARDOUR::LV2Plugin::_prev_time_scale
private

previous Port::speed_ratio

Definition at line 227 of file lv2_plugin.h.

◆ _property_descriptors

PropertyDescriptors ARDOUR::LV2Plugin::_property_descriptors
private

Definition at line 270 of file lv2_plugin.h.

◆ _property_values

std::map<uint32_t, Variant> ARDOUR::LV2Plugin::_property_values
private

Definition at line 268 of file lv2_plugin.h.

◆ _queue_draw_feature

LV2_Feature ARDOUR::LV2Plugin::_queue_draw_feature
private

Definition at line 352 of file lv2_plugin.h.

◆ _sample_rate

samplecnt_t ARDOUR::LV2Plugin::_sample_rate
private

Definition at line 213 of file lv2_plugin.h.

◆ _seq_size

int32_t ARDOUR::LV2Plugin::_seq_size
private

Definition at line 358 of file lv2_plugin.h.

◆ _shadow_data

float* ARDOUR::LV2Plugin::_shadow_data
private

Definition at line 216 of file lv2_plugin.h.

◆ _slave_lock

Glib::Threads::Mutex ARDOUR::LV2Plugin::_slave_lock
private

Definition at line 315 of file lv2_plugin.h.

◆ _slaves

std::set<std::shared_ptr<LV2Plugin> > ARDOUR::LV2Plugin::_slaves
private

Definition at line 316 of file lv2_plugin.h.

◆ _state_version

unsigned ARDOUR::LV2Plugin::_state_version
mutableprivate

Definition at line 366 of file lv2_plugin.h.

◆ _state_worker

Worker* ARDOUR::LV2Plugin::_state_worker
private

Definition at line 212 of file lv2_plugin.h.

◆ _to_ui

PBD::RingBuffer<uint8_t>* ARDOUR::LV2Plugin::_to_ui
private

Definition at line 310 of file lv2_plugin.h.

◆ _ui_background_color

uint32_t ARDOUR::LV2Plugin::_ui_background_color
staticprivate

Definition at line 361 of file lv2_plugin.h.

◆ _ui_contrasting_color

uint32_t ARDOUR::LV2Plugin::_ui_contrasting_color
staticprivate

Definition at line 363 of file lv2_plugin.h.

◆ _ui_foreground_color

uint32_t ARDOUR::LV2Plugin::_ui_foreground_color
staticprivate

Definition at line 362 of file lv2_plugin.h.

◆ _ui_style_boxy

int32_t ARDOUR::LV2Plugin::_ui_style_boxy
staticprivate

Definition at line 360 of file lv2_plugin.h.

◆ _ui_style_flat

int32_t ARDOUR::LV2Plugin::_ui_style_flat
staticprivate

Definition at line 359 of file lv2_plugin.h.

◆ _ui_transient_win_id

unsigned long ARDOUR::LV2Plugin::_ui_transient_win_id
staticprivate

Definition at line 364 of file lv2_plugin.h.

◆ _uri_map

URIMap& ARDOUR::LV2Plugin::_uri_map
private

Definition at line 234 of file lv2_plugin.h.

◆ _was_activated

bool ARDOUR::LV2Plugin::_was_activated
private

Definition at line 368 of file lv2_plugin.h.

◆ _work_mutex

Glib::Threads::Mutex ARDOUR::LV2Plugin::_work_mutex
private

Definition at line 313 of file lv2_plugin.h.

◆ _work_schedule_feature

LV2_Feature ARDOUR::LV2Plugin::_work_schedule_feature
private

Definition at line 347 of file lv2_plugin.h.

◆ _worker

Worker* ARDOUR::LV2Plugin::_worker
private

Definition at line 211 of file lv2_plugin.h.

◆ force_state_save

bool ARDOUR::LV2Plugin::force_state_save
static

Definition at line 72 of file lv2_plugin.h.

◆ grid_iterator

Temporal::GridIterator ARDOUR::LV2Plugin::grid_iterator
private

Definition at line 404 of file lv2_plugin.h.

◆ seen_bankpatch

bool ARDOUR::LV2Plugin::seen_bankpatch
private

Definition at line 329 of file lv2_plugin.h.


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