Ardour  9.0-pre0-2168-g0459902b9a
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 
183 
184  /* API for Ardour -- Setup/Processing */
185  uint32_t plugin_latency ();
186  uint32_t plugin_tailtime ();
187  bool set_block_size (int32_t);
188  bool activate ();
189  bool deactivate ();
190  bool active () const { return _is_processing; }
191  bool is_loading_state () const { return _is_loading_state; }
192 
193  /* State */
194  bool save_state (RAMStream& stream);
195  bool load_state (RAMStream& stream);
196 
197  Vst::ProcessContext& context ()
198  {
199  return _context;
200  }
201 
203  void set_non_realtime (bool);
204 
205  void enable_io (std::vector<bool> const&, std::vector<bool> const&, bool force = false);
206 
207  void process (float** ins, float** outs, uint32_t n_samples);
208 
209  /* PSL Extension */
210  Vst::IEditController* controller () const
211  {
212  return _controller;
213  }
214  bool add_slave (Vst::IEditController*, bool);
215  bool remove_slave (Vst::IEditController*);
216 
218  {
219  public:
221  {
222  _impl->block_notifications ();
223  }
224 
226  {
227  _impl->resume_notifications ();
228  }
229  private:
231  };
232 
233 private:
234  /* prevent copy construction */
235  VST3PI (const VST3PI&);
236 
237  void terminate ();
238 
239  IPlugView* try_create_view () const;
240 
243 
245  int32 count_channels (Vst::MediaType, Vst::BusDirection, Vst::BusType);
246 
247  bool evoral_to_vst3 (Vst::Event&, Evoral::Event<samplepos_t> const&, int32_t);
248 
251 
252  void set_parameter_by_id (Vst::ParamID id, float value, int32 sample_off);
253  void set_parameter_internal (Vst::ParamID id, float value, int32 sample_off);
254 
255  void set_event_bus_state (bool enabled);
256 
257  bool midi_controller (int32_t, int16_t, Vst::CtrlNumber, Vst::ParamID& id);
258  bool live_midi_cc (int32_t, int16_t, Vst::CtrlNumber);
259 
262 
264  void psl_subscribe_to (std::shared_ptr<ARDOUR::AutomationControl>, FIDString);
266 
270 
271  void forward_signal (Presonus::IContextInfoHandler2*, FIDString) const;
272 
273  std::shared_ptr<ARDOUR::VST3PluginModule> _module;
274 
275  std::shared_ptr<ConnectionProxy> _component_cproxy;
276  std::shared_ptr<ConnectionProxy> _controller_cproxy;
277 
278  FUID _fuid;
279  Vst::IComponent* _component;
280  Vst::IEditController* _controller;
281  IPlugView* _view;
282 
283  IPtr<Vst::IAudioProcessor> _processor;
284  Vst::ProcessContext _context;
285  Glib::Threads::Mutex _process_lock;
286 
287  /* Parameters */
288  Vst3ParameterChanges _input_param_changes;
289  Vst3ParameterChanges _output_param_changes;
290 
291  Vst3EventList _input_events;
292  Vst3EventList _output_events;
293 
294  /* state */
297  int32_t _block_size;
299 
300  /* ports */
301  struct Param {
302  uint32_t id;
303  std::string label;
304  std::string unit;
305  int32_t steps; // 1: toggle
306  double normal;
307  bool is_enum;
308  bool read_only;
310  };
311 
312  uint32_t _port_id_bypass;
313  Vst::ParameterInfo _program_change_port;
314  std::vector<Param> _ctrl_params;
315  std::map<Vst::ParamID, uint32_t> _ctrl_id_index;
316  std::map<uint32_t, Vst::ParamID> _ctrl_index_id;
317  std::vector<float> _shadow_data;
318  mutable std::vector<bool> _update_ctrl;
319 
320  std::vector<ARDOUR::Plugin::IOPortDescription> _io_name[Vst::kNumMediaTypes][2];
321 
322  std::vector<bool> _enabled_audio_in;
323  std::vector<bool> _enabled_audio_out;
324 
325  /* PSL extensions, control protocol */
329  std::set<Evoral::Parameter> _ac_subscriptions;
331 
332  std::optional<uint32_t> _plugin_latency;
333  std::optional<uint32_t> _plugin_tail;
334 
337 
338  std::vector<Vst::AudioBusBuffers> _busbuf_in;
339  std::vector<Vst::AudioBusBuffers> _busbuf_out;
340 
341  /* cache channels/bus Vst::AudioBusBuffers::numChannels */
342  std::map<int, int> _n_buschn_in;
343  std::map<int, int> _n_buschn_out;
344 
345  std::map<int, AudioBusInfo> _bus_info_in;
346  std::map<int, AudioBusInfo> _bus_info_out;
347 
355 
356  mutable std::atomic<int> _block_rpc;
358 
359  /* work around UADx plugin crash */
360  bool _no_kMono;
361  /* work around yabridge threading */
363  /* work around PSL calls during set_owner,
364  * while the route holds a processor lock
365  */
366  std::atomic<bool> _in_set_owner;
367 };
368 
369 } // namespace Steinberg
370 
371 namespace ARDOUR {
372 
374 {
375 public:
379 
380  std::string unique_id () const { return get_info ()->unique_id; }
381  const char* name () const { return get_info ()->name.c_str (); }
382  const char* label () const { return get_info ()->name.c_str (); }
383  const char* maker () const { return get_info ()->creator.c_str (); }
384 
385  uint32_t parameter_count () const;
386  float default_value (uint32_t port);
387  void set_parameter (uint32_t port, float val, sampleoffset_t when);
388  float get_parameter (uint32_t port) const;
389  int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
390  uint32_t nth_parameter (uint32_t port, bool& ok) const;
391  bool print_parameter (uint32_t, std::string&) const;
392 
393  bool parameter_is_audio (uint32_t) const { return false; }
394  bool parameter_is_control (uint32_t) const { return true; }
395 
396  bool parameter_is_input (uint32_t) const;
397  bool parameter_is_output (uint32_t) const;
398 
400 
401  std::set<Evoral::Parameter> automatable () const;
403  IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const;
405 
406  void set_automation_control (uint32_t, std::shared_ptr<ARDOUR::AutomationControl>);
407 
408  std::string state_node_name () const
409  {
410  return "vst3";
411  }
412 
413  void add_state (XMLNode*) const;
414  int set_state (const XMLNode&, int version);
415 
417  std::string do_save_preset (std::string);
418  void do_remove_preset (std::string);
419 
420  void activate ()
421  {
422  _plug->activate ();
423  }
424 
425  void deactivate ()
426  {
427  _plug->deactivate ();
428  }
429 
431 
433  void set_non_realtime (bool);
434 
435  void add_slave (std::shared_ptr<Plugin>, bool);
436  void remove_slave (std::shared_ptr<Plugin>);
437 
439  samplepos_t start, samplepos_t end, double speed,
440  ChanMapping const& in, ChanMapping const& out,
441  pframes_t nframes, samplecnt_t offset);
442 
443  bool has_editor () const;
444  Steinberg::IPlugView* view ();
445  void close_view ();
447 
448  PBD::Signal<void(int, int)> OnResizeView;
449 
450 private:
453  void init ();
454  void find_presets ();
455  void forward_resize_view (int w, int h);
457 
459 
461 
462  std::map<std::string, std::string> _preset_uri_map;
463 
464  std::vector<bool> _connected_inputs;
465  std::vector<bool> _connected_outputs;
466 
467  struct PV {
468  PV () : port (0), val (0) {}
469  PV (uint32_t p, float v) : port (p), val (v) {}
470  uint32_t port;
471  float val;
472  };
473 
475 };
476 
477 /* ****************************************************************************/
478 
479 class LIBARDOUR_API VST3PluginInfo : public PluginInfo, public std::enable_shared_from_this<ARDOUR::VST3PluginInfo>
480 {
481 public:
484 
485  PluginPtr load (Session& session);
486  std::vector<Plugin::PresetRecord> get_presets (bool user_only) const;
487  bool is_instrument () const;
489 
490  std::optional<bool> has_editor;
491 
492  std::shared_ptr<VST3PluginModule> m;
493 };
494 
495 #if defined(__clang__)
496 # pragma clang diagnostic pop
497 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
498 # pragma GCC diagnostic pop
499 #endif
500 
501 } // namespace ARDOUR
502 #endif
std::optional< bool > has_editor
Definition: vst3_plugin.h:490
PluginPtr load(Session &session)
std::vector< Plugin::PresetRecord > get_presets(bool user_only) const
std::shared_ptr< VST3PluginModule > m
Definition: vst3_plugin.h:492
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:462
void set_automation_control(uint32_t, std::shared_ptr< ARDOUR::AutomationControl >)
PBD::Signal< void(int, int)> OnResizeView
Definition: vst3_plugin.h:448
uint32_t parameter_count() const
PBD::RingBufferNPT< PV > _parameter_queue
Definition: vst3_plugin.h:474
bool parameter_is_input(uint32_t) const
std::string unique_id() const
Definition: vst3_plugin.h:380
bool parameter_is_audio(uint32_t) const
Definition: vst3_plugin.h:393
float default_value(uint32_t port)
bool has_editor() const
std::string state_node_name() const
Definition: vst3_plugin.h:408
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:394
PBD::ScopedConnectionList _connections
Definition: vst3_plugin.h:460
void add_slave(std::shared_ptr< Plugin >, bool)
const char * maker() const
Definition: vst3_plugin.h:383
uint32_t designated_bypass_port()
VST3Plugin(const VST3Plugin &)
Steinberg::VST3PI * _plug
Definition: vst3_plugin.h:458
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:381
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:382
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:464
std::vector< bool > _connected_outputs
Definition: vst3_plugin.h:465
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:281
tresult PLUGIN_API setDirty(TBool state) SMTG_OVERRIDE
Glib::Threads::Mutex _process_lock
Definition: vst3_plugin.h:285
tresult PLUGIN_API endEdit(Vst::ParamID id) SMTG_OVERRIDE
Vst::ProcessContext & context()
Definition: vst3_plugin.h:197
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:329
bool setup_psl_info_handler()
bool active() const
Definition: vst3_plugin.h:190
std::string print_parameter(uint32_t p) const
Vst3ParameterChanges _input_param_changes
Definition: vst3_plugin.h:288
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:313
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:345
Vst3EventList _input_events
Definition: vst3_plugin.h:291
std::optional< uint32_t > _plugin_latency
Definition: vst3_plugin.h:332
uint32_t _port_id_bypass
Definition: vst3_plugin.h:312
std::map< Vst::ParamID, uint32_t > _ctrl_id_index
Definition: vst3_plugin.h:315
std::vector< Param > _ctrl_params
Definition: vst3_plugin.h:314
float get_parameter(uint32_t p) const
std::shared_ptr< ARDOUR::VST3PluginModule > _module
Definition: vst3_plugin.h:273
std::vector< bool > _update_ctrl
Definition: vst3_plugin.h:318
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:275
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:326
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:292
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:356
std::vector< bool > _enabled_audio_out
Definition: vst3_plugin.h:323
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)
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:328
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
PBD::Signal< void(ARDOUR::RouteProcessorChange)> OnProcessorChange
Definition: vst3_plugin.h:182
std::vector< Vst::AudioBusBuffers > _busbuf_out
Definition: vst3_plugin.h:339
std::shared_ptr< ConnectionProxy > _controller_cproxy
Definition: vst3_plugin.h:276
std::vector< Vst::AudioBusBuffers > _busbuf_in
Definition: vst3_plugin.h:338
std::map< int, int > _n_buschn_out
Definition: vst3_plugin.h:343
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:327
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:357
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:210
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:289
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:333
std::vector< bool > _enabled_audio_in
Definition: vst3_plugin.h:322
std::map< uint32_t, Vst::ParamID > _ctrl_index_id
Definition: vst3_plugin.h:316
uint32_t n_midi_inputs() const
void get_parameter_descriptor(uint32_t, ARDOUR::ParameterDescriptor &) const
bool _restart_component_is_synced
Definition: vst3_plugin.h:362
Vst::ProcessContext _context
Definition: vst3_plugin.h:284
IPtr< Vst::IAudioProcessor > _processor
Definition: vst3_plugin.h:283
void set_event_bus_state(bool enabled)
std::map< int, int > _n_buschn_in
Definition: vst3_plugin.h:342
Vst::IEditController * _controller
Definition: vst3_plugin.h:280
Vst::IComponent * _component
Definition: vst3_plugin.h:279
bool subscribe_to_automation_changes() const
void block_notifications()
bool is_loading_state() const
Definition: vst3_plugin.h:191
tresult PLUGIN_API beginEdit(Vst::ParamID id) SMTG_OVERRIDE
std::map< int, AudioBusInfo > _bus_info_out
Definition: vst3_plugin.h:346
void enable_io(std::vector< bool > const &, std::vector< bool > const &, bool force=false)
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:366
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:317
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< timepos_t > start
uint32_t pframes_t
std::shared_ptr< Plugin > PluginPtr
Definition: plugin.h:61
Temporal::samplecnt_t samplecnt_t
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
std::set< uint32_t > PluginOutputConfiguration
Definition: plugin.h:66
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:469
AudioBusInfo(Vst::BusType t, int32_t c, bool a)
Definition: vst3_plugin.h:143