Ardour  9.0-rc1-21-gd5464b39db
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 request_bus_layout (uint32_t main_in, uint32_t aux_in, uint32_t main_out);
206  void enable_io (std::vector<bool> const&, std::vector<bool> const&, bool force = false);
207 
208  void process (float** ins, float** outs, uint32_t n_samples);
209 
210  /* PSL Extension */
211  Vst::IEditController* controller () const
212  {
213  return _controller;
214  }
215  bool add_slave (Vst::IEditController*, bool);
216  bool remove_slave (Vst::IEditController*);
217 
219  {
220  public:
222  {
223  _impl->block_notifications ();
224  }
225 
227  {
228  _impl->resume_notifications ();
229  }
230  private:
232  };
233 
234 private:
235  /* prevent copy construction */
236  VST3PI (const VST3PI&);
237 
238  void terminate ();
239 
240  IPlugView* try_create_view () const;
241 
244 
247  int32 count_channels (Vst::MediaType, Vst::BusDirection, Vst::BusType);
248 
249 
250  bool evoral_to_vst3 (Vst::Event&, Evoral::Event<samplepos_t> const&, int32_t);
251 
254 
255  void set_parameter_by_id (Vst::ParamID id, float value, int32 sample_off);
256  void set_parameter_internal (Vst::ParamID id, float value, int32 sample_off);
257 
258  void set_event_bus_state (bool enabled);
259 
260  bool midi_controller (int32_t, int16_t, Vst::CtrlNumber, Vst::ParamID& id);
261  bool live_midi_cc (int32_t, int16_t, Vst::CtrlNumber);
262 
265 
267  void psl_subscribe_to (std::shared_ptr<ARDOUR::AutomationControl>, FIDString);
269 
273 
274  void forward_signal (Presonus::IContextInfoHandler2*, FIDString) const;
275 
276  std::shared_ptr<ARDOUR::VST3PluginModule> _module;
277 
278  std::shared_ptr<ConnectionProxy> _component_cproxy;
279  std::shared_ptr<ConnectionProxy> _controller_cproxy;
280 
281  FUID _fuid;
282  Vst::IComponent* _component;
283  Vst::IEditController* _controller;
284  IPlugView* _view;
285 
286  IPtr<Vst::IAudioProcessor> _processor;
287  Vst::ProcessContext _context;
288  Glib::Threads::Mutex _process_lock;
289 
290  /* Parameters */
291  Vst3ParameterChanges _input_param_changes;
292  Vst3ParameterChanges _output_param_changes;
293 
294  Vst3EventList _input_events;
295  Vst3EventList _output_events;
296 
297  /* state */
300  int32_t _block_size;
302 
303  /* ports */
304  struct Param {
305  uint32_t id;
306  std::string label;
307  std::string unit;
308  int32_t steps; // 1: toggle
309  double normal;
310  bool is_enum;
311  bool read_only;
313  };
314 
315  uint32_t _port_id_bypass;
316  Vst::ParameterInfo _program_change_port;
317  std::vector<Param> _ctrl_params;
318  std::map<Vst::ParamID, uint32_t> _ctrl_id_index;
319  std::map<uint32_t, Vst::ParamID> _ctrl_index_id;
320  std::vector<float> _shadow_data;
321  mutable std::vector<bool> _update_ctrl;
322 
323  std::vector<ARDOUR::Plugin::IOPortDescription> _io_name[Vst::kNumMediaTypes][2];
324 
325  std::vector<bool> _enabled_audio_in;
326  std::vector<bool> _enabled_audio_out;
327 
328  /* PSL extensions, control protocol */
332  std::set<Evoral::Parameter> _ac_subscriptions;
334 
335  std::optional<uint32_t> _plugin_latency;
336  std::optional<uint32_t> _plugin_tail;
337 
340 
341  std::vector<Vst::AudioBusBuffers> _busbuf_in;
342  std::vector<Vst::AudioBusBuffers> _busbuf_out;
343 
344  /* cache channels/bus Vst::AudioBusBuffers::numChannels */
345  std::map<int, int> _n_buschn_in;
346  std::map<int, int> _n_buschn_out;
347 
348  std::map<int, AudioBusInfo> _bus_info_in;
349  std::map<int, AudioBusInfo> _bus_info_out;
350 
358 
359  mutable std::atomic<int> _block_rpc;
361 
362  /* work around UADx plugin crash */
363  bool _no_kMono;
364  /* work around yabridge threading */
366  /* work around PSL calls during set_owner,
367  * while the route holds a processor lock
368  */
369  std::atomic<bool> _in_set_owner;
370 };
371 
372 } // namespace Steinberg
373 
374 namespace ARDOUR {
375 
377 {
378 public:
382 
383  std::string unique_id () const { return get_info ()->unique_id; }
384  const char* name () const { return get_info ()->name.c_str (); }
385  const char* label () const { return get_info ()->name.c_str (); }
386  const char* maker () const { return get_info ()->creator.c_str (); }
387 
388  uint32_t parameter_count () const;
389  float default_value (uint32_t port);
390  void set_parameter (uint32_t port, float val, sampleoffset_t when);
391  float get_parameter (uint32_t port) const;
392  int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
393  uint32_t nth_parameter (uint32_t port, bool& ok) const;
394  bool print_parameter (uint32_t, std::string&) const;
395 
396  bool parameter_is_audio (uint32_t) const { return false; }
397  bool parameter_is_control (uint32_t) const { return true; }
398 
399  bool parameter_is_input (uint32_t) const;
400  bool parameter_is_output (uint32_t) const;
401 
403 
404  std::set<Evoral::Parameter> automatable () const;
406  IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const;
408 
409  void request_bus_layout (ChanCount const& /*in*/, ChanCount const& /*aux_in*/, ChanCount const& /*out*/);
410  bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/);
411 
414 
415  void set_automation_control (uint32_t, std::shared_ptr<ARDOUR::AutomationControl>);
416 
417  std::string state_node_name () const
418  {
419  return "vst3";
420  }
421 
422  void add_state (XMLNode*) const;
423  int set_state (const XMLNode&, int version);
424 
426  std::string do_save_preset (std::string);
427  void do_remove_preset (std::string);
428 
429  void activate ()
430  {
431  _plug->activate ();
432  }
433 
434  void deactivate ()
435  {
436  _plug->deactivate ();
437  }
438 
440 
442  void set_non_realtime (bool);
443 
444  void add_slave (std::shared_ptr<Plugin>, bool);
445  void remove_slave (std::shared_ptr<Plugin>);
446 
448  samplepos_t start, samplepos_t end, double speed,
449  ChanMapping const& in, ChanMapping const& out,
450  pframes_t nframes, samplecnt_t offset);
451 
452  bool has_editor () const;
453  Steinberg::IPlugView* view ();
454  void close_view ();
456 
457  PBD::Signal<void(int, int)> OnResizeView;
458 
459 private:
462  void init ();
463  void find_presets ();
464  void forward_resize_view (int w, int h);
466 
468 
470 
471  std::map<std::string, std::string> _preset_uri_map;
472 
473  std::vector<bool> _connected_inputs;
474  std::vector<bool> _connected_outputs;
475 
476  struct PV {
477  PV () : port (0), val (0) {}
478  PV (uint32_t p, float v) : port (p), val (v) {}
479  uint32_t port;
480  float val;
481  };
482 
484 };
485 
486 /* ****************************************************************************/
487 
488 class LIBARDOUR_API VST3PluginInfo : public PluginInfo, public std::enable_shared_from_this<ARDOUR::VST3PluginInfo>
489 {
490 public:
493 
494  PluginPtr load (Session& session);
495  std::vector<Plugin::PresetRecord> get_presets (bool user_only) const;
496  bool is_instrument () const;
498 
499  bool variable_bus_layout () const { return true; }
500 
501  std::optional<bool> has_editor;
502 
503  std::shared_ptr<VST3PluginModule> m;
504 };
505 
506 #if defined(__clang__)
507 # pragma clang diagnostic pop
508 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
509 # pragma GCC diagnostic pop
510 #endif
511 
512 } // namespace ARDOUR
513 #endif
bool variable_bus_layout() const
Definition: vst3_plugin.h:499
std::optional< bool > has_editor
Definition: vst3_plugin.h:501
PluginPtr load(Session &session)
std::vector< Plugin::PresetRecord > get_presets(bool user_only) const
std::shared_ptr< VST3PluginModule > m
Definition: vst3_plugin.h:503
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:471
void set_automation_control(uint32_t, std::shared_ptr< ARDOUR::AutomationControl >)
PBD::Signal< void(int, int)> OnResizeView
Definition: vst3_plugin.h:457
uint32_t parameter_count() const
PBD::RingBufferNPT< PV > _parameter_queue
Definition: vst3_plugin.h:483
bool parameter_is_input(uint32_t) const
std::string unique_id() const
Definition: vst3_plugin.h:383
bool parameter_is_audio(uint32_t) const
Definition: vst3_plugin.h:396
float default_value(uint32_t port)
bool has_editor() const
std::string state_node_name() const
Definition: vst3_plugin.h:417
ChanCount output_streams() const
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:397
PBD::ScopedConnectionList _connections
Definition: vst3_plugin.h:469
bool reconfigure_io(ChanCount, ChanCount, ChanCount)
void add_slave(std::shared_ptr< Plugin >, bool)
const char * maker() const
Definition: vst3_plugin.h:386
uint32_t designated_bypass_port()
VST3Plugin(const VST3Plugin &)
Steinberg::VST3PI * _plug
Definition: vst3_plugin.h:467
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
ChanCount input_streams() const
void parameter_change_handler(Steinberg::VST3PI::ParameterChange, uint32_t, float)
std::string do_save_preset(std::string)
void request_bus_layout(ChanCount const &, ChanCount const &, ChanCount const &)
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:384
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:385
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:473
std::vector< bool > _connected_outputs
Definition: vst3_plugin.h:474
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:284
tresult PLUGIN_API setDirty(TBool state) SMTG_OVERRIDE
Glib::Threads::Mutex _process_lock
Definition: vst3_plugin.h:288
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:332
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:291
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:316
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:348
Vst3EventList _input_events
Definition: vst3_plugin.h:294
std::optional< uint32_t > _plugin_latency
Definition: vst3_plugin.h:335
uint32_t _port_id_bypass
Definition: vst3_plugin.h:315
std::map< Vst::ParamID, uint32_t > _ctrl_id_index
Definition: vst3_plugin.h:318
std::vector< Param > _ctrl_params
Definition: vst3_plugin.h:317
float get_parameter(uint32_t p) const
std::shared_ptr< ARDOUR::VST3PluginModule > _module
Definition: vst3_plugin.h:276
std::vector< bool > _update_ctrl
Definition: vst3_plugin.h:321
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:278
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:329
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:295
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:359
std::vector< bool > _enabled_audio_out
Definition: vst3_plugin.h:326
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:331
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:342
std::shared_ptr< ConnectionProxy > _controller_cproxy
Definition: vst3_plugin.h:279
std::vector< Vst::AudioBusBuffers > _busbuf_in
Definition: vst3_plugin.h:341
std::map< int, int > _n_buschn_out
Definition: vst3_plugin.h:346
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:330
void request_bus_layout(uint32_t main_in, uint32_t aux_in, uint32_t main_out)
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:360
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:211
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:292
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:336
std::vector< bool > _enabled_audio_in
Definition: vst3_plugin.h:325
std::map< uint32_t, Vst::ParamID > _ctrl_index_id
Definition: vst3_plugin.h:319
uint32_t n_midi_inputs() const
void get_parameter_descriptor(uint32_t, ARDOUR::ParameterDescriptor &) const
bool _restart_component_is_synced
Definition: vst3_plugin.h:365
Vst::ProcessContext _context
Definition: vst3_plugin.h:287
IPtr< Vst::IAudioProcessor > _processor
Definition: vst3_plugin.h:286
void set_event_bus_state(bool enabled)
std::map< int, int > _n_buschn_in
Definition: vst3_plugin.h:345
Vst::IEditController * _controller
Definition: vst3_plugin.h:283
Vst::IComponent * _component
Definition: vst3_plugin.h:282
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:349
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:369
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:320
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:478
AudioBusInfo(Vst::BusType t, int32_t c, bool a)
Definition: vst3_plugin.h:143