24 #ifndef __ardour_lv2_plugin_h__
25 #define __ardour_lv2_plugin_h__
27 #include <glibmm/threads.h>
75 const char*
uri ()
const;
96 int setup_export (
const char*, LV2_Options_Option
const* options = NULL);
112 const LV2_Feature*
const*
features () {
return _features; }
141 std::shared_ptr<ScalePoints>
161 const uint8_t* body);
188 _ui_background_color = c;
191 _ui_foreground_color = c;
194 _ui_contrasting_color = c;
197 _ui_style_boxy = yn ? 1 : 0;
200 _ui_style_flat = yn ? 1 : 0;
203 _ui_transient_win_id = id;
248 PORT_OUTPUT = 1 << 1,
250 PORT_CONTROL = 1 << 3,
251 PORT_SEQUENCE = 1 << 5,
253 PORT_POSITION = 1 << 7,
254 PORT_PATCHMSG = 1 << 8,
255 PORT_AUTOCTRL = 1 << 9,
256 PORT_CTRLED = 1 << 10,
257 PORT_CTRLER = 1 << 11,
258 PORT_NOAUTO = 1 << 12,
259 PORT_OTHOPT = 1 << 13
275 , guard (other.guard)
282 std::shared_ptr<ARDOUR::AutomationControl>
ac;
301 const uint8_t* body);
307 const uint8_t* body);
328 uint32_t _bankpatch[16];
333 if (chn > 15)
return UINT32_MAX;
334 return _bankpatch[chn];
339 const void* (*extension_data) (
const char* uri);
416 std::vector<Plugin::PresetRecord>
get_presets (
bool user_only)
const;
bool is_instrument() const
std::vector< Plugin::PresetRecord > get_presets(bool user_only) const
static PluginInfoList * discover(std::function< void(std::string const &, PluginScanLogEntry::PluginScanResult, std::string const &, bool)> cb)
PluginPtr load(Session &session)
LV2PluginInfo(const char *plugin_uri)
bool ui_is_resizable() const
bool parameter_is_control(uint32_t) const
bool parameter_is_audio(uint32_t) const
void set_state_dir(const std::string &d="")
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)
LV2Plugin(const LV2Plugin &)
std::string midnam_model()
std::vector< size_t > _port_minimumSize
float * _bpm_control_port
Special input set by ardour.
const LV2_Feature *const * features()
const void * extension_data(const char *uri) const
const std::string scratch_dir() const
void load_supported_properties(PropertyDescriptors &descs)
void UIMessageSink(void *controller, uint32_t index, uint32_t size, uint32_t format, const void *buffer)
uint32_t designated_bypass_port()
const char * label() const
int set_block_size(pframes_t)
Plugin::Display_Image_Surface * render_inline_display(uint32_t, uint32_t)
static int32_t _ui_style_boxy
LV2_Feature _options_feature
uint32_t port_index(const char *symbol) const
static uint32_t _ui_background_color
bool _has_state_interface
double _next_cycle_speed
Expected start sample of next run cycle.
std::map< uint32_t, AutomationCtrlPtr > AutomationCtrlMap
uint32_t _patch_port_in_index
int work(Worker &worker, uint32_t size, const void *data)
bool is_external_kx() const
void enable_ui_emission()
bool _no_sample_accurate_ctrl
const std::string state_dir(unsigned num) const
int work_response(uint32_t size, const void *data)
const std::string file_dir() const
float default_value(uint32_t port)
void add_slave(std::shared_ptr< Plugin >, bool)
static unsigned long _ui_transient_win_id
PBD::RingBuffer< uint8_t > * _from_ui
LV2_Feature _data_access_feature
LV2_Feature _queue_draw_feature
bool load_preset(PresetRecord)
static void set_global_ui_contrasting_color(uint32_t c)
bool _connect_all_audio_outputs
AutomationCtrlMap _ctrl_map
double _next_cycle_beat
Expected bar_beat of next run cycle.
void set_property(uint32_t key, const Variant &value)
bool parameter_is_output(uint32_t) const
int get_parameter_descriptor(uint32_t which, ParameterDescriptor &) const
std::string current_preset() const
const LV2_Inline_Display_Interface * _display_interface
std::map< uint32_t, Variant > _property_values
bool parameter_is_toggled(uint32_t) const
void init(const void *c_plugin, samplecnt_t rate)
bool parameter_is_input(uint32_t) const
std::string state_node_name() const
samplepos_t _next_cycle_start
Expected start sample of next run cycle.
bool write_from_ui(uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
uint32_t _patch_port_out_index
std::string get_parameter_docs(uint32_t which) const
std::shared_ptr< AutomationCtrl > AutomationCtrlPtr
const char * name() const
PBD::RingBuffer< uint8_t > * _to_ui
std::string get_docs() const
static void bankpatch_notify(LV2_BankPatch_Handle, uint8_t, uint32_t, uint8_t)
const LV2_Export_Interface * _export_interface
const LV2_Midnam_Interface * _midname_interface
void announce_property_values()
static void midnam_update(LV2_Midnam_Handle)
LV2_Feature _def_state_feature
bool has_message_output() const
const char * port_symbol(uint32_t port) const
LV2_Feature _instance_access_feature
static uint32_t _ui_foreground_color
LV2Plugin(ARDOUR::AudioEngine &engine, ARDOUR::Session &session, const void *c_plugin, samplecnt_t sample_rate)
void run(pframes_t nsamples, bool sync_work=false)
std::string describe_parameter(Evoral::Parameter)
Variant get_property_value(uint32_t) const
static void set_global_ui_style_flat(bool yn)
samplecnt_t _current_latency
const ParameterDescriptor & get_property_descriptor(uint32_t id) const
float * _freewheel_control_port
Special input set by ardour.
LV2_Feature _make_path_feature
std::string _plugin_state_dir
static void set_global_ui_foreground_color(uint32_t c)
const std::string plugin_dir() const
const PropertyDescriptors & get_supported_properties() const
uint32_t parameter_count() const
static void set_global_ui_style_boxy(bool yn)
std::set< Evoral::Parameter > automatable() const
static int32_t _ui_style_flat
void emit_to_ui(void *controller, UIMessageSink sink)
void remove_slave(std::shared_ptr< Plugin >)
static bool force_state_save
int set_state(const XMLNode &node, int version)
std::string unique_id() const
bool inline_display_in_gui()
float get_parameter(uint32_t port) const
void allocate_atom_event_buffers()
bool requires_fixed_sized_buffers() const
bool is_external_ui() const
void do_remove_preset(std::string)
std::vector< PortFlags > _port_flags
const char * maker() const
samplecnt_t max_latency() const
void set_insert_id(PBD::ID id)
static char * lv2_state_make_path(void *host_data, const char *path)
bool write_to(PBD::RingBuffer< uint8_t > *dest, uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
Glib::Threads::Mutex _slave_lock
std::set< std::shared_ptr< LV2Plugin > > _slaves
int setup_export(const char *, LV2_Options_Option const *options=NULL)
float * _latency_control_port
Special output set by ardour.
Glib::Threads::Mutex _work_mutex
LV2_Feature _bankpatch_feature
double _prev_time_scale
previous Port::speed_ratio
bool write_to_ui(uint32_t index, uint32_t protocol, uint32_t size, const uint8_t *body)
std::map< std::string, uint32_t > _port_indices
void set_parameter(uint32_t port, float val, sampleoffset_t)
uint32_t _bpm_control_port_index
static uint32_t _ui_contrasting_color
LV2_Feature _block_length_feature
virtual void set_automation_control(uint32_t, std::shared_ptr< AutomationControl >)
Temporal::GridIterator grid_iterator
IOPortDescription describe_io_port(DataType dt, bool input, uint32_t id) const
uint32_t nth_parameter(uint32_t port, bool &ok) const
std::string do_save_preset(std::string)
static void set_main_window_id(unsigned long id)
LV2_Feature _work_schedule_feature
bool connect_all_audio_outputs() const
LV2_Evbuf ** _atom_ev_buffers
uint32_t bank_patch(uint8_t chn)
samplecnt_t plugin_latency() const
LV2_Feature _midnam_feature
void latency_compute_run()
bool has_inline_display()
AutomationCtrlPtr get_automation_control(uint32_t)
LV2_DataAccess _data_access_extension_data
friend const void * lv2plugin_get_port_value(const char *port_symbol, void *user_data, uint32_t *size, uint32_t *type)
void add_state(XMLNode *) const
static void queue_draw(LV2_Inline_Display_Handle)
const URIMap & uri_map() const
PropertyDescriptors _property_descriptors
bool _can_write_automation
void set_non_realtime(bool)
static void set_global_ui_background_color(uint32_t c)
uint32_t num_ports() const
bool _inline_display_in_gui
std::shared_ptr< ScalePoints > get_scale_points(uint32_t port_index) const
std::map< uint32_t, ParameterDescriptor > PropertyDescriptors
void * LV2_BankPatch_Handle
void * LV2_Inline_Display_Handle
void session(lua_State *L)
PBD::PropertyDescriptor< timepos_t > start
std::list< PluginInfoPtr > PluginInfoList
std::shared_ptr< LV2PluginInfo > LV2PluginInfoPtr
std::shared_ptr< Plugin > PluginPtr
Temporal::samplecnt_t samplecnt_t
const void * lv2plugin_get_port_value(const char *port_symbol, void *user_data, uint32_t *size, uint32_t *type)
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
std::shared_ptr< ARDOUR::AutomationControl > ac
AutomationCtrl(const AutomationCtrl &other)
AutomationCtrl(std::shared_ptr< ARDOUR::AutomationControl > c)
Message send to/from UI via ports.