20 #ifndef __ardour_lv2_plugin_h__
21 #define __ardour_lv2_plugin_h__
26 #include <boost/enable_shared_from_this.hpp>
61 std::string unique_id ()
const;
62 const char* uri ()
const;
63 const char* label ()
const;
64 const char*
name ()
const;
65 const char* maker ()
const;
67 uint32_t num_ports ()
const;
68 uint32_t parameter_count ()
const;
69 float default_value (uint32_t port);
71 void set_parameter (uint32_t port,
float val);
72 float get_parameter (uint32_t port)
const;
73 std::string get_docs()
const;
74 std::string get_parameter_docs(uint32_t which)
const;
76 uint32_t nth_parameter (uint32_t port,
bool& ok)
const;
78 const void* extension_data (
const char* uri)
const;
80 const void* c_plugin();
82 const void* c_ui_type();
84 bool is_external_ui ()
const;
85 bool is_external_kx ()
const;
86 bool ui_is_resizable ()
const;
88 const char* port_symbol (uint32_t port)
const;
89 uint32_t port_index (
const char* symbol)
const;
91 const LV2_Feature*
const*
features () {
return _features; }
93 std::set<Evoral::Parameter> automatable ()
const;
108 void print_parameter (uint32_t param,
112 bool parameter_is_audio (uint32_t)
const;
113 bool parameter_is_control (uint32_t)
const;
114 bool parameter_is_event (uint32_t)
const;
115 bool parameter_is_input (uint32_t)
const;
116 bool parameter_is_output (uint32_t)
const;
117 bool parameter_is_toggled (uint32_t)
const;
120 get_scale_points(uint32_t port_index)
const;
122 void set_insert_id(
PBD::ID id);
124 int set_state (
const XMLNode& node,
int version);
125 bool save_preset (std::string uri);
126 void remove_preset (std::string uri);
127 bool load_preset (PresetRecord);
128 std::string current_preset ()
const;
130 bool has_editor ()
const;
131 bool has_message_output ()
const;
133 bool write_from_ui(uint32_t index,
136 const uint8_t* body);
144 void enable_ui_emission();
145 void emit_to_ui(
void* controller, UIMessageSink sink);
152 int work(uint32_t size,
const void* data);
153 int work_response(uint32_t size,
const void* data);
155 void set_property(uint32_t key,
const Variant& value);
158 void announce_property_values();
189 PORT_OUTPUT = 1 << 1,
191 PORT_CONTROL = 1 << 3,
193 PORT_SEQUENCE = 1 << 5,
195 PORT_POSITION = 1 << 7,
196 PORT_PATCHMSG = 1 << 8
214 bool write_to_ui(uint32_t index,
217 const uint8_t* body);
223 const uint8_t* body);
230 const void* (*extension_data) (
const char* uri);
251 const std::string plugin_dir ()
const;
252 const std::string scratch_dir ()
const;
253 const std::string file_dir ()
const;
254 const std::string state_dir (
unsigned num)
const;
256 static char* lv2_state_make_path (
void* host_data,
260 void allocate_atom_event_buffers ();
265 void latency_compute_run ();
266 std::string do_save_preset (std::string);
267 void do_remove_preset (std::string);
268 void find_presets ();
269 void add_state (
XMLNode *)
const;
int set_block_size(pframes_t)
uint32_t _patch_port_out_index
framepos_t _next_cycle_start
Expected start frame of next run cycle.
LV2_Feature _options_feature
const PropertyDescriptors & get_supported_properties() const
LV2_Feature _make_path_feature
float * _bpm_control_port
Special input set by ardour.
LV2_DataAccess _data_access_extension_data
std::vector< PortFlags > _port_flags
LV2_Feature _def_state_feature
std::map< uint32_t, ParameterDescriptor > PropertyDescriptors
LV2_Feature _work_schedule_feature
const LV2_Feature *const * features()
std::string state_node_name() const
Message send to/from UI via ports.
RingBuffer< uint8_t > * _to_ui
LV2_Feature _data_access_feature
RingBuffer< uint8_t > * _from_ui
LIBARDOUR_API void cleanup()
const void * lv2plugin_get_port_value(const char *port_symbol, void *user_data, uint32_t *size, uint32_t *type)
float * _latency_control_port
Special output set by ardour.
std::map< std::string, uint32_t > _port_indices
LV2_Feature _instance_access_feature
LIBARDOUR_API uint64_t AudioEngine
uint32_t _patch_port_in_index
std::list< PluginInfoPtr > PluginInfoList
boost::shared_ptr< LV2PluginInfo > LV2PluginInfoPtr
PropertyDescriptors _property_descriptors
const URIMap & uri_map() const
double _next_cycle_speed
Expected start frame of next run cycle.
bool _has_state_interface
std::vector< size_t > _port_minimumSize
LIBARDOUR_API bool init(bool with_vst, bool try_optimization, const char *localedir)
float * _freewheel_control_port
Special input set by ardour.
LV2_Evbuf ** _atom_ev_buffers
void UIMessageSink(void *controller, uint32_t index, uint32_t size, uint32_t format, const void *buffer)