Ardour  9.0-pre0-582-g084a23a80d
vst3_plugin.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019-2023 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _ardour_vst3_plugin_h_
20 #define _ardour_vst3_plugin_h_
21 
22 #include <map>
23 #include <set>
24 #include <vector>
25 
26 #include <optional>
27 #include <glibmm/threads.h>
28 
29 #include "pbd/search_path.h"
30 #include "pbd/signals.h"
31 
32 #include "ardour/plugin.h"
33 #include "ardour/vst3_host.h"
34 
35 namespace ARDOUR
36 {
37 class VST3PluginModule;
38 class AutomationList;
39 }
40 
41 #if defined(__clang__)
42 # pragma clang diagnostic push
43 # pragma clang diagnostic ignored "-Wnon-virtual-dtor"
44 # pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor"
45 # pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
46 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
47 # pragma GCC diagnostic push
48 # pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
49 # pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
50 #endif
51 
52 namespace Steinberg {
53 /* VST3 hosted Plugin abstraction Implementation
54  *
55  * For convenience this is placed in the Steinberg namespace.
56  * Ardour::VST3Plugin has-a VST3PI (not is-a).
57  */
59  : public Vst::IComponentHandler
60  , public Vst::IComponentHandler2
61  , public Vst::IUnitHandler
62  , public IPlugFrame
63  , public Presonus::IContextInfoProvider3
64 {
65 public:
66  VST3PI (std::shared_ptr<ARDOUR::VST3PluginModule> m, std::string unique_id);
67  virtual ~VST3PI ();
68 
69  /* IComponentHandler */
70  tresult PLUGIN_API beginEdit (Vst::ParamID id) SMTG_OVERRIDE;
71  tresult PLUGIN_API performEdit (Vst::ParamID id, Vst::ParamValue value) SMTG_OVERRIDE;
72  tresult PLUGIN_API endEdit (Vst::ParamID id) SMTG_OVERRIDE;
73  tresult PLUGIN_API restartComponent (int32 flags) SMTG_OVERRIDE;
74 
75  /* IComponentHandler2 */
76  tresult PLUGIN_API setDirty (TBool state) SMTG_OVERRIDE;
77  tresult PLUGIN_API requestOpenEditor (FIDString name) SMTG_OVERRIDE;
78  tresult PLUGIN_API startGroupEdit () SMTG_OVERRIDE;
79  tresult PLUGIN_API finishGroupEdit () SMTG_OVERRIDE;
80 
81  /* IPlugFrame */
82  tresult PLUGIN_API resizeView (IPlugView* view, ViewRect* newSize) SMTG_OVERRIDE;
83 
84  /* IUnitHandler API */
85  tresult PLUGIN_API notifyUnitSelection (Vst::UnitID) SMTG_OVERRIDE;
86  tresult PLUGIN_API notifyProgramListChange (Vst::ProgramListID, int32) SMTG_OVERRIDE;
87 
88  /* IContextInfoProvider3 API */
89  tresult PLUGIN_API getContextInfoValue (int32&, FIDString) SMTG_OVERRIDE;
90  tresult PLUGIN_API getContextInfoString (Vst::TChar*, int32, FIDString) SMTG_OVERRIDE;
91  tresult PLUGIN_API getContextInfoValue (double&, FIDString) SMTG_OVERRIDE;
92  tresult PLUGIN_API setContextInfoValue (FIDString, double) SMTG_OVERRIDE;
93  tresult PLUGIN_API setContextInfoValue (FIDString, int32) SMTG_OVERRIDE;
94  tresult PLUGIN_API setContextInfoString (FIDString, Vst::TChar*) SMTG_OVERRIDE;
95  tresult PLUGIN_API beginEditContextInfoValue (FIDString) SMTG_OVERRIDE;
96  tresult PLUGIN_API endEditContextInfoValue (FIDString) SMTG_OVERRIDE;
97 
98  /* GUI */
99  bool has_editor () const;
100  IPlugView* view ();
101  void close_view ();
102  void update_contoller_param ();
103  PBD::Signal<void(int, int)> OnResizeView;
104 
105  tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE;
106  uint32 PLUGIN_API addRef () SMTG_OVERRIDE { return 1; }
107  uint32 PLUGIN_API release () SMTG_OVERRIDE { return 1; }
108 
109  FUID const& fuid () const { return _fuid; }
110 
111  /* Ardour Preset Helpers */
112  IPtr<Vst::IUnitInfo> unit_info ();
113  Vst::ParameterInfo const& program_change_port () const { return _program_change_port; }
114 
115  void set_n_factory_presets (size_t n) { _n_factory_presets = n; }
116  size_t n_factory_presets () const { return _n_factory_presets; }
117 
118  /* API for Ardour -- Ports */
119  uint32_t designated_bypass_port () const { return _port_id_bypass; }
120  uint32_t parameter_count () const { return _ctrl_params.size (); }
121  bool parameter_is_automatable (uint32_t p) const { return _ctrl_params[p].automatable; }
122  bool parameter_is_readonly (uint32_t p) const { return _ctrl_params[p].read_only; }
123  std::string parameter_label (uint32_t p) const { return _ctrl_params[p].label; }
124 
125  float default_value (uint32_t p) const;
127  std::string print_parameter (uint32_t p) const;
128  std::string print_parameter (Vst::ParamID, Vst::ParamValue) const;
129  bool set_program (int p, int32 sample_off);
130 
132  void automation_state_changed (uint32_t, ARDOUR::AutoState, std::weak_ptr<ARDOUR::AutomationList>);
133 
135 
136  uint32_t n_audio_inputs (bool with_aux = true) const;
137  uint32_t n_audio_outputs (bool with_aux = true) const;
138 
139  uint32_t n_audio_aux_in () const { return _n_aux_inputs; }
140  uint32_t n_audio_aux_out () const { return _n_aux_outputs; }
141 
142  struct AudioBusInfo {
143  AudioBusInfo (Vst::BusType t, int32_t c, bool a) : type (t), n_chn (c), n_used_chn (c), dflt (a) {}
144  AudioBusInfo () : type (Vst::kMain), n_chn (0), n_used_chn (0) {}
145  Vst::BusType type;
146  int32_t n_chn;
147  int32_t n_used_chn;
148  bool dflt; // kDefaultActive
149  };
150 
151  std::map<int, AudioBusInfo> const& bus_info_in () const { return _bus_info_in; }
152  std::map<int, AudioBusInfo> const& bus_info_out () const { return _bus_info_out; }
153 
154  /* MIDI/Event interface */
155  void cycle_start ();
156  void add_event (Evoral::Event<samplepos_t> const&, int32_t bus);
158 
159  uint32_t n_midi_inputs () const;
160  uint32_t n_midi_outputs () const;
161 
162  /* API for Ardour -- Parameters */
163  bool try_set_parameter_by_id (Vst::ParamID id, float value);
164  void set_parameter (uint32_t p, float value, int32 sample_off, bool to_list = true, bool force = false);
165  float get_parameter (uint32_t p) const;
166  std::string format_parameter (uint32_t p) const;
167  Vst::ParamID index_to_id (uint32_t) const;
168 
169  Glib::Threads::Mutex& process_lock () { return _process_lock; }
170  bool& component_is_synced () { return _restart_component_is_synced; }
171 
172 
178  ParamValueChanged
179  };
180 
182 
183  /* API for Ardour -- Setup/Processing */
184  uint32_t plugin_latency ();
185  uint32_t plugin_tailtime ();
186  bool set_block_size (int32_t);
187  bool activate ();
188  bool deactivate ();
189  bool active () const { return _is_processing; }
190  bool is_loading_state () const { return _is_loading_state; }
191 
192  /* State */
193  bool save_state (RAMStream& stream);
194  bool load_state (RAMStream& stream);
195 
196  Vst::ProcessContext& context ()
197  {
198  return _context;
199  }
200 
202  void set_non_realtime (bool);
203 
204  void enable_io (std::vector<bool> const&, std::vector<bool> const&);
205 
206  void process (float** ins, float** outs, uint32_t n_samples);
207 
208  /* PSL Extension */
209  Vst::IEditController* controller () const
210  {
211  return _controller;
212  }
213  bool add_slave (Vst::IEditController*, bool);
214  bool remove_slave (Vst::IEditController*);
215 
217  {
218  public:
220  {
221  _impl->block_notifications ();
222  }
223 
225  {
226  _impl->resume_notifications ();
227  }
228  private:
230  };
231 
232 private:
233  /* prevent copy construction */
234  VST3PI (const VST3PI&);
235 
236  void terminate ();
237 
238  IPlugView* try_create_view () const;
239 
242 
244  int32 count_channels (Vst::MediaType, Vst::BusDirection, Vst::BusType);
245 
246  bool evoral_to_vst3 (Vst::Event&, Evoral::Event<samplepos_t> const&, int32_t);
247 
250 
251  void set_parameter_by_id (Vst::ParamID id, float value, int32 sample_off);
252  void set_parameter_internal (Vst::ParamID id, float value, int32 sample_off);
253 
254  void set_event_bus_state (bool enabled);
255 
256  bool midi_controller (int32_t, int16_t, Vst::CtrlNumber, Vst::ParamID& id);
257  bool live_midi_cc (int32_t, int16_t, Vst::CtrlNumber);
258 
261 
263  void psl_subscribe_to (std::shared_ptr<ARDOUR::AutomationControl>, FIDString);
265 
269 
270  void forward_signal (Presonus::IContextInfoHandler2*, FIDString) const;
271 
272  std::shared_ptr<ARDOUR::VST3PluginModule> _module;
273 
274  std::shared_ptr<ConnectionProxy> _component_cproxy;
275  std::shared_ptr<ConnectionProxy> _controller_cproxy;
276 
277  FUID _fuid;
278  Vst::IComponent* _component;
279  Vst::IEditController* _controller;
280  IPlugView* _view;
281 
282  IPtr<Vst::IAudioProcessor> _processor;
283  Vst::ProcessContext _context;
284  Glib::Threads::Mutex _process_lock;
285 
286  /* Parameters */
287  Vst3ParameterChanges _input_param_changes;
288  Vst3ParameterChanges _output_param_changes;
289 
290  Vst3EventList _input_events;
291  Vst3EventList _output_events;
292 
293  /* state */
296  int32_t _block_size;
298 
299  /* ports */
300  struct Param {
301  uint32_t id;
302  std::string label;
303  std::string unit;
304  int32_t steps; // 1: toggle
305  double normal;
306  bool is_enum;
307  bool read_only;
309  };
310 
311  uint32_t _port_id_bypass;
312  Vst::ParameterInfo _program_change_port;
313  std::vector<Param> _ctrl_params;
314  std::map<Vst::ParamID, uint32_t> _ctrl_id_index;
315  std::map<uint32_t, Vst::ParamID> _ctrl_index_id;
316  std::vector<float> _shadow_data;
317  mutable std::vector<bool> _update_ctrl;
318 
319  std::vector<ARDOUR::Plugin::IOPortDescription> _io_name[Vst::kNumMediaTypes][2];
320 
321  std::vector<bool> _enabled_audio_in;
322  std::vector<bool> _enabled_audio_out;
323 
324  /* PSL extensions, control protocol */
328  std::set<Evoral::Parameter> _ac_subscriptions;
330 
331  std::optional<uint32_t> _plugin_latency;
332  std::optional<uint32_t> _plugin_tail;
333 
336 
337  std::vector<Vst::AudioBusBuffers> _busbuf_in;
338  std::vector<Vst::AudioBusBuffers> _busbuf_out;
339 
340  /* cache channels/bus Vst::AudioBusBuffers::numChannels */
341  std::map<int, int> _n_buschn_in;
342  std::map<int, int> _n_buschn_out;
343 
344  std::map<int, AudioBusInfo> _bus_info_in;
345  std::map<int, AudioBusInfo> _bus_info_out;
346 
354 
355  mutable std::atomic<int> _block_rpc;
357 
358  /* work around UADx plugin crash */
359  bool _no_kMono;
360  /* work around yabridge threading */
362  /* work around PSL calls during set_owner,
363  * while the route holds a processor lock
364  */
365  std::atomic<bool> _in_set_owner;
366 };
367 
368 } // namespace Steinberg
369 
370 namespace ARDOUR {
371 
373 {
374 public:
378 
379  std::string unique_id () const { return get_info ()->unique_id; }
380  const char* name () const { return get_info ()->name.c_str (); }
381  const char* label () const { return get_info ()->name.c_str (); }
382  const char* maker () const { return get_info ()->creator.c_str (); }
383 
384  uint32_t parameter_count () const;
385  float default_value (uint32_t port);
386  void set_parameter (uint32_t port, float val, sampleoffset_t when);
387  float get_parameter (uint32_t port) const;
388  int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
389  uint32_t nth_parameter (uint32_t port, bool& ok) const;
390  bool print_parameter (uint32_t, std::string&) const;
391 
392  bool parameter_is_audio (uint32_t) const { return false; }
393  bool parameter_is_control (uint32_t) const { return true; }
394 
395  bool parameter_is_input (uint32_t) const;
396  bool parameter_is_output (uint32_t) const;
397 
399 
400  std::set<Evoral::Parameter> automatable () const;
402  IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const;
404 
405  void set_automation_control (uint32_t, std::shared_ptr<ARDOUR::AutomationControl>);
406 
407  std::string state_node_name () const
408  {
409  return "vst3";
410  }
411 
412  void add_state (XMLNode*) const;
413  int set_state (const XMLNode&, int version);
414 
416  std::string do_save_preset (std::string);
417  void do_remove_preset (std::string);
418 
419  void activate ()
420  {
421  _plug->activate ();
422  }
423 
424  void deactivate ()
425  {
426  _plug->deactivate ();
427  }
428 
430 
432  void set_non_realtime (bool);
433 
434  void add_slave (std::shared_ptr<Plugin>, bool);
435  void remove_slave (std::shared_ptr<Plugin>);
436 
438  samplepos_t start, samplepos_t end, double speed,
439  ChanMapping const& in, ChanMapping const& out,
440  pframes_t nframes, samplecnt_t offset);
441 
442  bool has_editor () const;
443  Steinberg::IPlugView* view ();
444  void close_view ();
446 
447  PBD::Signal<void(int, int)> OnResizeView;
448 
449 private:
452  void init ();
453  void find_presets ();
454  void forward_resize_view (int w, int h);
456 
458 
460 
461  std::map<std::string, std::string> _preset_uri_map;
462 
463  std::vector<bool> _connected_inputs;
464  std::vector<bool> _connected_outputs;
465 
466  struct PV {
467  PV () : port (0), val (0) {}
468  PV (uint32_t p, float v) : port (p), val (v) {}
469  uint32_t port;
470  float val;
471  };
472 
474 };
475 
476 /* ****************************************************************************/
477 
478 class LIBARDOUR_API VST3PluginInfo : public PluginInfo, public std::enable_shared_from_this<ARDOUR::VST3PluginInfo>
479 {
480 public:
483 
485  std::vector<Plugin::PresetRecord> get_presets (bool user_only) const;
486  bool is_instrument () const;
488 
489  std::optional<bool> has_editor;
490 
491  std::shared_ptr<VST3PluginModule> m;
492 };
493 
494 #if defined(__clang__)
495 # pragma clang diagnostic pop
496 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
497 # pragma GCC diagnostic pop
498 #endif
499 
500 } // namespace ARDOUR
501 #endif
std::optional< bool > has_editor
Definition: vst3_plugin.h:489
PluginPtr load(Session &session)
std::vector< Plugin::PresetRecord > get_presets(bool user_only) const
std::shared_ptr< VST3PluginModule > m
Definition: vst3_plugin.h:491
bool is_instrument() const
PBD::Searchpath preset_search_path() const
IOPortDescription describe_io_port(DataType dt, bool input, uint32_t id) const
samplecnt_t plugin_latency() const
std::map< std::string, std::string > _preset_uri_map
Definition: vst3_plugin.h:461
void set_automation_control(uint32_t, std::shared_ptr< ARDOUR::AutomationControl >)
PBD::Signal< void(int, int)> OnResizeView
Definition: vst3_plugin.h:447
uint32_t parameter_count() const
PBD::RingBufferNPT< PV > _parameter_queue
Definition: vst3_plugin.h:473
bool parameter_is_input(uint32_t) const
std::string unique_id() const
Definition: vst3_plugin.h:379
bool parameter_is_audio(uint32_t) const
Definition: vst3_plugin.h:392
float default_value(uint32_t port)
bool has_editor() const
std::string state_node_name() const
Definition: vst3_plugin.h:407
bool load_preset(PresetRecord)
int set_block_size(pframes_t)
bool parameter_is_output(uint32_t) const
void do_remove_preset(std::string)
void add_state(XMLNode *) const
PluginOutputConfiguration possible_output() const
VST3Plugin(AudioEngine &, Session &, Steinberg::VST3PI *)
bool parameter_is_control(uint32_t) const
Definition: vst3_plugin.h:393
PBD::ScopedConnectionList _connections
Definition: vst3_plugin.h:459
void add_slave(std::shared_ptr< Plugin >, bool)
const char * maker() const
Definition: vst3_plugin.h:382
uint32_t designated_bypass_port()
VST3Plugin(const VST3Plugin &)
Steinberg::VST3PI * _plug
Definition: vst3_plugin.h:457
bool print_parameter(uint32_t, std::string &) 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)
samplecnt_t plugin_tailtime() const
void parameter_change_handler(Steinberg::VST3PI::ParameterChange, uint32_t, float)
std::string do_save_preset(std::string)
void forward_resize_view(int w, int h)
uint32_t nth_parameter(uint32_t port, bool &ok) const
const char * name() const
Definition: vst3_plugin.h:380
void set_parameter(uint32_t port, float val, sampleoffset_t when)
std::string describe_parameter(Evoral::Parameter)
const char * label() const
Definition: vst3_plugin.h:381
float get_parameter(uint32_t port) const
int get_parameter_descriptor(uint32_t which, ParameterDescriptor &) const
std::set< Evoral::Parameter > automatable() const
Steinberg::IPlugView * view()
std::vector< bool > _connected_inputs
Definition: vst3_plugin.h:463
std::vector< bool > _connected_outputs
Definition: vst3_plugin.h:464
int set_state(const XMLNode &, int version)
void set_owner(ARDOUR::SessionObject *o)
void set_non_realtime(bool)
void update_contoller_param()
void remove_slave(std::shared_ptr< Plugin >)
std::string format_parameter(uint32_t p) const
IPlugView * _view
Definition: vst3_plugin.h:280
tresult PLUGIN_API setDirty(TBool state) SMTG_OVERRIDE
Glib::Threads::Mutex _process_lock
Definition: vst3_plugin.h:284
tresult PLUGIN_API endEdit(Vst::ParamID id) SMTG_OVERRIDE
Vst::ProcessContext & context()
Definition: vst3_plugin.h:196
void set_parameter_by_id(Vst::ParamID id, float value, int32 sample_off)
bool live_midi_cc(int32_t, int16_t, Vst::CtrlNumber)
VST3PI(const VST3PI &)
bool setup_info_listener()
std::set< Evoral::Parameter > _ac_subscriptions
Definition: vst3_plugin.h:328
bool setup_psl_info_handler()
bool active() const
Definition: vst3_plugin.h:189
std::string print_parameter(uint32_t p) const
Vst3ParameterChanges _input_param_changes
Definition: vst3_plugin.h:287
ARDOUR::Plugin::IOPortDescription describe_io_port(ARDOUR::DataType dt, bool input, uint32_t id) const
uint32_t n_audio_aux_in() const
Definition: vst3_plugin.h:139
void resume_notifications()
int32 count_channels(Vst::MediaType, Vst::BusDirection, Vst::BusType)
Vst::ParameterInfo _program_change_port
Definition: vst3_plugin.h:312
std::string print_parameter(Vst::ParamID, Vst::ParamValue) const
FUID const & fuid() const
Definition: vst3_plugin.h:109
std::map< int, AudioBusInfo > _bus_info_in
Definition: vst3_plugin.h:344
Vst3EventList _input_events
Definition: vst3_plugin.h:290
std::optional< uint32_t > _plugin_latency
Definition: vst3_plugin.h:331
uint32_t _port_id_bypass
Definition: vst3_plugin.h:311
std::map< Vst::ParamID, uint32_t > _ctrl_id_index
Definition: vst3_plugin.h:314
std::vector< Param > _ctrl_params
Definition: vst3_plugin.h:313
float get_parameter(uint32_t p) const
std::shared_ptr< ARDOUR::VST3PluginModule > _module
Definition: vst3_plugin.h:272
std::vector< bool > _update_ctrl
Definition: vst3_plugin.h:317
bool save_state(RAMStream &stream)
uint32_t n_audio_aux_out() const
Definition: vst3_plugin.h:140
void add_event(Evoral::Event< samplepos_t > const &, int32_t bus)
std::shared_ptr< ConnectionProxy > _component_cproxy
Definition: vst3_plugin.h:274
void set_n_factory_presets(size_t n)
Definition: vst3_plugin.h:115
Glib::Threads::Mutex & process_lock()
Definition: vst3_plugin.h:169
ARDOUR::SessionObject * _owner
Definition: vst3_plugin.h:325
void set_parameter_internal(Vst::ParamID id, float value, int32 sample_off)
bool synchronize_states()
IPlugView * try_create_view() const
uint32_t parameter_count() const
Definition: vst3_plugin.h:120
Vst3EventList _output_events
Definition: vst3_plugin.h:291
bool parameter_is_readonly(uint32_t p) const
Definition: vst3_plugin.h:122
void process(float **ins, float **outs, uint32_t n_samples)
std::atomic< int > _block_rpc
Definition: vst3_plugin.h:355
std::vector< bool > _enabled_audio_out
Definition: vst3_plugin.h:322
void automation_state_changed(uint32_t, ARDOUR::AutoState, std::weak_ptr< ARDOUR::AutomationList >)
size_t n_factory_presets() const
Definition: vst3_plugin.h:116
tresult PLUGIN_API startGroupEdit() SMTG_OVERRIDE
std::map< int, AudioBusInfo > const & bus_info_out() const
Definition: vst3_plugin.h:152
IPtr< Vst::IUnitInfo > unit_info()
void set_owner(ARDOUR::SessionObject *o)
void set_non_realtime(bool)
void send_processors_changed(ARDOUR::RouteProcessorChange const &)
bool evoral_to_vst3(Vst::Event &, Evoral::Event< samplepos_t > const &, int32_t)
bool midi_controller(int32_t, int16_t, Vst::CtrlNumber, Vst::ParamID &id)
bool set_block_size(int32_t)
bool load_state(RAMStream &stream)
uint32_t n_audio_inputs(bool with_aux=true) const
void forward_signal(Presonus::IContextInfoHandler2 *, FIDString) const
void set_parameter(uint32_t p, float value, int32 sample_off, bool to_list=true, bool force=false)
void enable_io(std::vector< bool > const &, std::vector< bool > const &)
bool parameter_is_automatable(uint32_t p) const
Definition: vst3_plugin.h:121
bool & component_is_synced()
Definition: vst3_plugin.h:170
uint32_t plugin_tailtime()
PBD::ScopedConnectionList _ac_connection_list
Definition: vst3_plugin.h:327
std::map< int, AudioBusInfo > const & bus_info_in() const
Definition: vst3_plugin.h:151
uint32_t plugin_latency()
uint32_t n_midi_outputs() const
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_plugin.h:107
std::vector< Vst::AudioBusBuffers > _busbuf_out
Definition: vst3_plugin.h:338
std::shared_ptr< ConnectionProxy > _controller_cproxy
Definition: vst3_plugin.h:275
std::vector< Vst::AudioBusBuffers > _busbuf_in
Definition: vst3_plugin.h:337
std::map< int, int > _n_buschn_out
Definition: vst3_plugin.h:342
bool remove_slave(Vst::IEditController *)
Vst::ParameterInfo const & program_change_port() const
Definition: vst3_plugin.h:113
PBD::ScopedConnectionList _strip_connections
Definition: vst3_plugin.h:326
Vst::ParamID index_to_id(uint32_t) const
VST3PI(std::shared_ptr< ARDOUR::VST3PluginModule > m, std::string unique_id)
void psl_subscribe_to(std::shared_ptr< ARDOUR::AutomationControl >, FIDString)
void vst3_to_midi_buffers(ARDOUR::BufferSet &, ARDOUR::ChanMapping const &)
ARDOUR::RouteProcessorChange _rpc_queue
Definition: vst3_plugin.h:356
uint32_t n_audio_outputs(bool with_aux=true) const
PBD::Signal< void(ParameterChange, uint32_t, float)> OnParameterChange
Definition: vst3_plugin.h:181
bool add_slave(Vst::IEditController *, bool)
tresult PLUGIN_API requestOpenEditor(FIDString name) SMTG_OVERRIDE
Vst::IEditController * controller() const
Definition: vst3_plugin.h:209
bool try_set_parameter_by_id(Vst::ParamID id, float value)
tresult PLUGIN_API restartComponent(int32 flags) SMTG_OVERRIDE
Vst3ParameterChanges _output_param_changes
Definition: vst3_plugin.h:288
std::string parameter_label(uint32_t p) const
Definition: vst3_plugin.h:123
tresult PLUGIN_API performEdit(Vst::ParamID id, Vst::ParamValue value) SMTG_OVERRIDE
std::optional< uint32_t > _plugin_tail
Definition: vst3_plugin.h:332
std::vector< bool > _enabled_audio_in
Definition: vst3_plugin.h:321
std::map< uint32_t, Vst::ParamID > _ctrl_index_id
Definition: vst3_plugin.h:315
uint32_t n_midi_inputs() const
void get_parameter_descriptor(uint32_t, ARDOUR::ParameterDescriptor &) const
bool _restart_component_is_synced
Definition: vst3_plugin.h:361
Vst::ProcessContext _context
Definition: vst3_plugin.h:283
IPtr< Vst::IAudioProcessor > _processor
Definition: vst3_plugin.h:282
void set_event_bus_state(bool enabled)
std::map< int, int > _n_buschn_in
Definition: vst3_plugin.h:341
Vst::IEditController * _controller
Definition: vst3_plugin.h:279
Vst::IComponent * _component
Definition: vst3_plugin.h:278
bool subscribe_to_automation_changes() const
void block_notifications()
bool is_loading_state() const
Definition: vst3_plugin.h:190
tresult PLUGIN_API beginEdit(Vst::ParamID id) SMTG_OVERRIDE
std::map< int, AudioBusInfo > _bus_info_out
Definition: vst3_plugin.h:345
bool disconnect_components()
void stripable_property_changed(PBD::PropertyChange const &)
void psl_stripable_property_changed(PBD::PropertyChange const &)
bool connect_components()
std::atomic< bool > _in_set_owner
Definition: vst3_plugin.h:365
void update_shadow_data()
float default_value(uint32_t p) const
uint32_t designated_bypass_port() const
Definition: vst3_plugin.h:119
bool set_program(int p, int32 sample_off)
std::vector< float > _shadow_data
Definition: vst3_plugin.h:316
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
void session(lua_State *L)
PBD::PropertyDescriptor< timepos_t > start
uint32_t pframes_t
std::shared_ptr< Plugin > PluginPtr
Definition: plugin.h:62
Temporal::samplecnt_t samplecnt_t
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
std::set< uint32_t > PluginOutputConfiguration
Definition: plugin.h:67
PBD::Signal< void(Parser &, byte *, size_t)> Signal
Definition: parser.h:45
Definition: axis_view.h:42
PV(uint32_t p, float v)
Definition: vst3_plugin.h:468
AudioBusInfo(Vst::BusType t, int32_t c, bool a)
Definition: vst3_plugin.h:143