ardour
|
#include <lv2_plugin.h>
Classes | |
struct | Impl |
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, ParameterDescriptor > | PropertyDescriptors |
Public Member Functions | |
LV2Plugin (ARDOUR::AudioEngine &engine, ARDOUR::Session &session, const void *c_plugin, framecnt_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) |
framecnt_t | signal_latency () const |
void | set_parameter (uint32_t port, float val) |
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 |
const void * | extension_data (const char *uri) 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::Parameter > | automatable () const |
void | activate () |
void | deactivate () |
void | cleanup () |
int | set_block_size (pframes_t) |
int | connect_and_run (BufferSet &bufs, ChanMapping in, ChanMapping out, pframes_t nframes, framecnt_t offset) |
std::string | describe_parameter (Evoral::Parameter) |
std::string | state_node_name () const |
void | print_parameter (uint32_t param, char *buf, uint32_t len) const |
bool | parameter_is_audio (uint32_t) const |
bool | parameter_is_control (uint32_t) const |
bool | parameter_is_event (uint32_t) const |
bool | parameter_is_input (uint32_t) const |
bool | parameter_is_output (uint32_t) const |
bool | parameter_is_toggled (uint32_t) const |
boost::shared_ptr< ScalePoints > | get_scale_points (uint32_t port_index) const |
void | set_insert_id (PBD::ID id) |
int | set_state (const XMLNode &node, int version) |
bool | save_preset (std::string uri) |
void | remove_preset (std::string uri) |
bool | load_preset (PresetRecord) |
std::string | current_preset () const |
bool | has_editor () const |
bool | has_message_output () const |
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) |
Worker * | worker () |
URIMap & | uri_map () |
const URIMap & | uri_map () const |
int | work (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 PropertyDescriptors & | get_supported_properties () const |
const ParameterDescriptor & | get_property_descriptor (uint32_t id) const |
void | announce_property_values () |
Public Member Functions inherited from ARDOUR::Plugin | |
Plugin (ARDOUR::AudioEngine &, ARDOUR::Session &) | |
Plugin (const Plugin &) | |
virtual | ~Plugin () |
XMLNode & | get_state () |
virtual void | flush () |
void | realtime_handle_transport_stopped () |
void | realtime_locate () |
void | monitoring_changed () |
PresetRecord | save_preset (std::string) |
void | remove_preset (std::string) |
void | clear_preset () |
const PresetRecord * | preset_by_label (const std::string &) |
const PresetRecord * | preset_by_uri (const std::string &) |
std::vector< PresetRecord > | get_presets () |
virtual bool | presets_are_MIDI_programs () const |
virtual bool | current_preset_uses_general_midi () const |
PresetRecord | last_preset () const |
bool | parameter_changed_since_last_preset () const |
virtual int | first_user_preset_index () const |
virtual bool | configure_io (ChanCount, ChanCount) |
virtual bool | can_support_io_configuration (const ChanCount &, ChanCount &) |
virtual ChanCount | output_streams () const |
virtual ChanCount | input_streams () const |
PluginInfoPtr | get_info () const |
virtual void | set_info (const PluginInfoPtr inf) |
ARDOUR::AudioEngine & | engine () const |
ARDOUR::Session & | session () const |
void | set_cycles (uint32_t c) |
cycles_t | cycles () const |
Public Member Functions inherited from PBD::Stateful | |
Stateful () | |
virtual | ~Stateful () |
virtual bool | apply_changes (PropertyBase const &) |
PropertyChange | apply_changes (PropertyList const &) |
const OwnedPropertyList & | properties () const |
void | add_property (PropertyBase &s) |
void | add_extra_xml (XMLNode &) |
XMLNode * | extra_xml (const std::string &str, bool add_if_missing=false) |
void | save_extra_xml (const XMLNode &) |
const PBD::ID & | id () const |
bool | set_id (const XMLNode &) |
void | set_id (const std::string &) |
void | reset_id () |
void | clear_changes () |
virtual void | clear_owned_changes () |
PropertyList * | get_changes_as_properties (Command *) const |
virtual void | rdiff (std::vector< Command * > &) const |
bool | changed () const |
virtual PropertyList * | property_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 | |
Destructible () | |
virtual | ~Destructible () |
void | drop_references () |
Public Member Functions inherited from ARDOUR::Latent | |
Latent () | |
virtual | ~Latent () |
framecnt_t | user_latency () const |
framecnt_t | effective_latency () const |
virtual void | set_user_latency (framecnt_t val) |
Public Member Functions inherited from ARDOUR::Workee | |
virtual | ~Workee () |
Private Types | |
enum | PortFlag { PORT_INPUT = 1, PORT_OUTPUT = 1 << 1, PORT_AUDIO = 1 << 2, PORT_CONTROL = 1 << 3, PORT_EVENT = 1 << 4, PORT_SEQUENCE = 1 << 5, PORT_MIDI = 1 << 6, PORT_POSITION = 1 << 7, PORT_PATCHMSG = 1 << 8 } |
typedef unsigned | PortFlags |
Private Member Functions | |
bool | write_to_ui (uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body) |
bool | write_to (RingBuffer< uint8_t > *dest, uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body) |
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, framecnt_t rate) |
void | allocate_atom_event_buffers () |
void | run (pframes_t nsamples) |
void | load_supported_properties (PropertyDescriptors &descs) |
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 char * | lv2_state_make_path (void *host_data, const char *path) |
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::Signal0< void > | PresetAdded |
PBD::Signal0< void > | PresetRemoved |
PBD::Signal0< void > | PresetLoaded |
PBD::Signal2< void, uint32_t, float > | ParameterChanged |
PBD::Signal2< void, uint32_t, Variant > | PropertyChanged |
PBD::Signal1< void, uint32_t > | StartTouch |
PBD::Signal1< void, uint32_t > | EndTouch |
Public Attributes inherited from PBD::Stateful | |
PBD::Signal1< void, const PropertyChange & > | PropertyChanged |
Public Attributes inherited from PBD::Destructible | |
PBD::Signal0< void > | Destroyed |
PBD::Signal0< void > | DropReferences |
Static Public Attributes inherited from PBD::Stateful | |
static int | current_state_version = 0 |
static int | loading_state_version = 0 |
Protected Member Functions inherited from PBD::Stateful | |
void | add_instant_xml (XMLNode &, const std::string &directory_path) |
XMLNode * | instant_xml (const std::string &str, const std::string &directory_path) |
void | add_properties (XMLNode &) |
PropertyChange | set_values (XMLNode const &) |
virtual void | post_set (const PropertyChange &) |
virtual void | send_change (const PropertyChange &) |
virtual void | mid_thaw (const PropertyChange &) |
Protected Attributes inherited from ARDOUR::Plugin | |
ARDOUR::AudioEngine & | _engine |
ARDOUR::Session & | _session |
PluginInfoPtr | _info |
uint32_t | _cycles |
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 |
Protected Attributes inherited from ARDOUR::Latent | |
framecnt_t | _user_latency |
Definition at line 51 of file lv2_plugin.h.
|
private |
Definition at line 199 of file lv2_plugin.h.
typedef void ARDOUR::LV2Plugin::UIMessageSink(void *controller, uint32_t index, uint32_t size, uint32_t format, const void *buffer) |
Definition at line 138 of file lv2_plugin.h.
|
private |
Enumerator | |
---|---|
PORT_INPUT |
Input port. |
PORT_OUTPUT |
Output port. |
PORT_AUDIO |
Audio (buffer of float) |
PORT_CONTROL |
Control (single float) |
PORT_EVENT |
Old event API event port. |
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. |
Definition at line 187 of file lv2_plugin.h.
LV2Plugin::LV2Plugin | ( | ARDOUR::AudioEngine & | engine, |
ARDOUR::Session & | session, | ||
const void * | c_plugin, | ||
framecnt_t | sample_rate | ||
) |
Definition at line 257 of file lv2_plugin.cc.
LV2Plugin::LV2Plugin | ( | const LV2Plugin & | other | ) |
Definition at line 274 of file lv2_plugin.cc.
LV2Plugin::~LV2Plugin | ( | ) |
Definition at line 611 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1732 of file lv2_plugin.cc.
|
privatevirtual |
Add state to an existing XMLNode
Implements ARDOUR::Plugin.
Definition at line 911 of file lv2_plugin.cc.
|
private |
Definition at line 1765 of file lv2_plugin.cc.
|
virtual |
Emit PropertyChanged for all current property values.
Reimplemented from ARDOUR::Plugin.
Definition at line 1456 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1713 of file lv2_plugin.cc.
const void * LV2Plugin::c_plugin | ( | ) |
Definition at line 840 of file lv2_plugin.cc.
const void * LV2Plugin::c_ui | ( | ) |
Definition at line 846 of file lv2_plugin.cc.
const void * LV2Plugin::c_ui_type | ( | ) |
Definition at line 852 of file lv2_plugin.cc.
void LV2Plugin::cleanup | ( | ) |
Definition at line 1754 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 1882 of file lv2_plugin.cc.
std::string ARDOUR::LV2Plugin::current_preset | ( | ) | const |
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1743 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 725 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1673 of file lv2_plugin.cc.
|
privatevirtual |
Do the actual removal of a preset of the provided name
Implements ARDOUR::Plugin.
Definition at line 1128 of file lv2_plugin.cc.
|
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.
Definition at line 1075 of file lv2_plugin.cc.
void LV2Plugin::emit_to_ui | ( | void * | controller, |
UIMessageSink | sink | ||
) |
Definition at line 1500 of file lv2_plugin.cc.
void LV2Plugin::enable_ui_emission | ( | ) |
Definition at line 1485 of file lv2_plugin.cc.
const void * LV2Plugin::extension_data | ( | const char * | uri | ) | const |
Definition at line 834 of file lv2_plugin.cc.
|
inline |
Definition at line 91 of file lv2_plugin.h.
|
private |
Directory for snapshots of files in the scratch directory.
Definition at line 873 of file lv2_plugin.cc.
|
privatevirtual |
Fill _presets with our presets
Implements ARDOUR::Plugin.
Definition at line 983 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 788 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 777 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1625 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 801 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 1352 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 2194 of file lv2_plugin.cc.
|
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 156 of file lv2_plugin.h.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 1161 of file lv2_plugin.cc.
bool LV2Plugin::has_message_output | ( | ) | const |
Definition at line 1167 of file lv2_plugin.cc.
|
private |
Definition at line 294 of file lv2_plugin.cc.
bool LV2Plugin::is_external_kx | ( | ) | const |
Definition at line 654 of file lv2_plugin.cc.
bool LV2Plugin::is_external_ui | ( | ) | const |
Definition at line 645 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 695 of file lv2_plugin.cc.
|
private |
Definition at line 2241 of file lv2_plugin.cc.
|
virtual |
Set parameters using a preset
Reimplemented from ARDOUR::Plugin.
Definition at line 1033 of file lv2_plugin.cc.
|
private |
Definition at line 1419 of file lv2_plugin.cc.
|
staticprivate |
Implementation of state:makePath for files created at instantiation time. Note this is not used for files created at save time (Lilv deals with that).
Definition at line 889 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 707 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 701 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 818 of file lv2_plugin.cc.
uint32_t LV2Plugin::num_ports | ( | ) | const |
Definition at line 713 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 719 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 2154 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 2147 of file lv2_plugin.cc.
bool LV2Plugin::parameter_is_event | ( | uint32_t | param | ) | const |
Definition at line 2161 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 2175 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 2168 of file lv2_plugin.cc.
bool ARDOUR::LV2Plugin::parameter_is_toggled | ( | uint32_t | ) | const |
|
private |
Directory for all plugin state.
Definition at line 859 of file lv2_plugin.cc.
uint32_t LV2Plugin::port_index | ( | const char * | symbol | ) | const |
Definition at line 743 of file lv2_plugin.cc.
const char * LV2Plugin::port_symbol | ( | uint32_t | port | ) | const |
Definition at line 731 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 2182 of file lv2_plugin.cc.
void ARDOUR::LV2Plugin::remove_preset | ( | std::string | uri | ) |
|
private |
Definition at line 2221 of file lv2_plugin.cc.
bool ARDOUR::LV2Plugin::save_preset | ( | std::string | uri | ) |
|
private |
Directory for files created by the plugin (except during save).
Definition at line 866 of file lv2_plugin.cc.
|
inlinevirtual |
Implements ARDOUR::Plugin.
Definition at line 99 of file lv2_plugin.h.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 1540 of file lv2_plugin.cc.
|
virtual |
val | `plugin' value |
Reimplemented from ARDOUR::Plugin.
Definition at line 755 of file lv2_plugin.cc.
|
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.
Definition at line 1311 of file lv2_plugin.cc.
|
virtual |
Reimplemented from ARDOUR::Plugin.
Definition at line 1546 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Latent.
Definition at line 1703 of file lv2_plugin.cc.
|
private |
Directory to save state snapshot version num
into.
Definition at line 880 of file lv2_plugin.cc.
|
inlinevirtual |
Implements ARDOUR::Plugin.
Definition at line 106 of file lv2_plugin.h.
bool LV2Plugin::ui_is_resizable | ( | ) | const |
Definition at line 663 of file lv2_plugin.cc.
|
virtual |
Implements ARDOUR::Plugin.
Definition at line 683 of file lv2_plugin.cc.
const char * LV2Plugin::uri | ( | ) | const |
Definition at line 689 of file lv2_plugin.cc.
|
inline |
Definition at line 149 of file lv2_plugin.h.
|
inline |
Definition at line 150 of file lv2_plugin.h.
|
virtual |
Do some work in the worker thread.
Implements ARDOUR::Workee.
Definition at line 1526 of file lv2_plugin.cc.
|
virtual |
Handle a response from the worker thread in the audio thread.
Implements ARDOUR::Workee.
Definition at line 1533 of file lv2_plugin.cc.
|
inline |
Definition at line 147 of file lv2_plugin.h.
bool LV2Plugin::write_from_ui | ( | uint32_t | index, |
uint32_t | protocol, | ||
uint32_t | size, | ||
const uint8_t * | body | ||
) |
Definition at line 1198 of file lv2_plugin.cc.
|
private |
Definition at line 1179 of file lv2_plugin.cc.
|
private |
Definition at line 1232 of file lv2_plugin.cc.
|
friend |
|
private |
Definition at line 171 of file lv2_plugin.h.
|
private |
Definition at line 243 of file lv2_plugin.h.
|
private |
Special input set by ardour.
Definition at line 172 of file lv2_plugin.h.
|
private |
Definition at line 167 of file lv2_plugin.h.
|
private |
Definition at line 233 of file lv2_plugin.h.
|
private |
Definition at line 234 of file lv2_plugin.h.
|
private |
Definition at line 240 of file lv2_plugin.h.
|
private |
Definition at line 169 of file lv2_plugin.h.
|
private |
Definition at line 170 of file lv2_plugin.h.
|
private |
Definition at line 164 of file lv2_plugin.h.
|
private |
Special input set by ardour.
Definition at line 173 of file lv2_plugin.h.
|
private |
Definition at line 227 of file lv2_plugin.h.
|
private |
Definition at line 249 of file lv2_plugin.h.
|
private |
Definition at line 161 of file lv2_plugin.h.
|
private |
Definition at line 177 of file lv2_plugin.h.
|
private |
Definition at line 235 of file lv2_plugin.h.
|
private |
Special output set by ardour.
Definition at line 174 of file lv2_plugin.h.
|
private |
Definition at line 237 of file lv2_plugin.h.
|
private |
Definition at line 236 of file lv2_plugin.h.
|
private |
Definition at line 163 of file lv2_plugin.h.
|
private |
Expected start frame of next run cycle.
Definition at line 176 of file lv2_plugin.h.
|
private |
Expected start frame of next run cycle.
Definition at line 175 of file lv2_plugin.h.
|
private |
Definition at line 239 of file lv2_plugin.h.
|
private |
Definition at line 178 of file lv2_plugin.h.
|
private |
Definition at line 179 of file lv2_plugin.h.
|
private |
Definition at line 201 of file lv2_plugin.h.
|
private |
Definition at line 203 of file lv2_plugin.h.
|
private |
Definition at line 202 of file lv2_plugin.h.
|
private |
Definition at line 205 of file lv2_plugin.h.
|
private |
Definition at line 166 of file lv2_plugin.h.
|
private |
Definition at line 244 of file lv2_plugin.h.
|
private |
Definition at line 168 of file lv2_plugin.h.
|
mutableprivate |
Definition at line 246 of file lv2_plugin.h.
|
private |
Definition at line 226 of file lv2_plugin.h.
|
private |
Definition at line 180 of file lv2_plugin.h.
|
private |
Definition at line 248 of file lv2_plugin.h.
|
private |
Definition at line 238 of file lv2_plugin.h.
|
private |
Definition at line 165 of file lv2_plugin.h.