ardour
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ARDOUR::VSTPlugin Class Reference

#include <vst_plugin.h>

Inheritance diagram for ARDOUR::VSTPlugin:
ARDOUR::Plugin PBD::StatefulDestructible ARDOUR::Latent PBD::Stateful PBD::Destructible ARDOUR::LXVSTPlugin ARDOUR::WindowsVSTPlugin

Public Member Functions

 VSTPlugin (AudioEngine &, Session &, VSTHandle *)
 
virtual ~VSTPlugin ()
 
void activate ()
 
void deactivate ()
 
int set_block_size (pframes_t)
 
float default_value (uint32_t port)
 
float get_parameter (uint32_t port) const
 
uint32_t nth_parameter (uint32_t port, bool &ok) const
 
void set_parameter (uint32_t port, float val)
 
bool load_preset (PresetRecord)
 
int get_parameter_descriptor (uint32_t which, ParameterDescriptor &) const
 
std::string describe_parameter (Evoral::Parameter)
 
framecnt_t signal_latency () const
 
std::set< Evoral::Parameterautomatable () const
 
bool parameter_is_audio (uint32_t) const
 
bool parameter_is_control (uint32_t) const
 
bool parameter_is_input (uint32_t) const
 
bool parameter_is_output (uint32_t) const
 
int connect_and_run (BufferSet &, ChanMapping in, ChanMapping out, pframes_t nframes, framecnt_t offset)
 
std::string unique_id () const
 
const char * label () const
 
const char * name () const
 
const char * maker () const
 
uint32_t parameter_count () const
 
void print_parameter (uint32_t, char *, uint32_t len) const
 
bool has_editor () const
 
AEffectplugin () const
 
VSTStatestate () const
 
MidiBuffermidi_buffer () const
 
int set_state (XMLNode const &, int)
 
int first_user_preset_index () const
 
- Public Member Functions inherited from ARDOUR::Plugin
 Plugin (ARDOUR::AudioEngine &, ARDOUR::Session &)
 
 Plugin (const Plugin &)
 
virtual ~Plugin ()
 
XMLNodeget_state ()
 
virtual void set_insert_id (PBD::ID id)
 
virtual std::string get_docs () const
 
virtual std::string get_parameter_docs (uint32_t) const
 
virtual void flush ()
 
virtual std::string state_node_name () const =0
 
virtual boost::shared_ptr
< ScalePoints
get_scale_points (uint32_t) const
 
void realtime_handle_transport_stopped ()
 
void realtime_locate ()
 
void monitoring_changed ()
 
PresetRecord save_preset (std::string)
 
void remove_preset (std::string)
 
void clear_preset ()
 
const PresetRecordpreset_by_label (const std::string &)
 
const PresetRecordpreset_by_uri (const std::string &)
 
std::vector< PresetRecordget_presets ()
 
virtual bool presets_are_MIDI_programs () const
 
virtual bool current_preset_uses_general_midi () const
 
PresetRecord last_preset () const
 
bool parameter_changed_since_last_preset () const
 
virtual bool configure_io (ChanCount, ChanCount)
 
virtual bool can_support_io_configuration (const ChanCount &, ChanCount &)
 
virtual ChanCount output_streams () const
 
virtual ChanCount input_streams () const
 
PluginInfoPtr get_info () const
 
virtual void set_info (const PluginInfoPtr inf)
 
ARDOUR::AudioEngineengine () const
 
ARDOUR::Sessionsession () const
 
void set_cycles (uint32_t c)
 
cycles_t cycles () const
 
virtual const PropertyDescriptorsget_supported_properties () const
 
virtual const ParameterDescriptorget_property_descriptor (uint32_t id) const
 
virtual void set_property (uint32_t key, const Variant &value)
 
virtual void announce_property_values ()
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_changes (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (Command *) const
 
virtual void rdiff (std::vector< Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
 Destructible ()
 
virtual ~Destructible ()
 
void drop_references ()
 
- Public Member Functions inherited from ARDOUR::Latent
 Latent ()
 
virtual ~Latent ()
 
framecnt_t user_latency () const
 
framecnt_t effective_latency () const
 
virtual void set_user_latency (framecnt_t val)
 

Protected Member Functions

void set_plugin (AEffect *)
 
gchar * get_chunk (bool) const
 
int set_chunk (gchar const *, bool)
 
void add_state (XMLNode *) const
 
bool load_user_preset (PresetRecord)
 
bool load_plugin_preset (PresetRecord)
 
std::string do_save_preset (std::string name)
 
void do_remove_preset (std::string name)
 
XMLTreepresets_tree () const
 
std::string presets_file () const
 
void find_presets ()
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &)
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 

Protected Attributes

VSTHandle_handle
 
VSTState_state
 
AEffect_plugin
 
MidiBuffer_midi_out_buf
 
- Protected Attributes inherited from ARDOUR::Plugin
ARDOUR::AudioEngine_engine
 
ARDOUR::Session_session
 
PluginInfoPtr _info
 
uint32_t _cycles
 
std::map< std::string,
PresetRecord
_presets
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 
- Protected Attributes inherited from ARDOUR::Latent
framecnt_t _user_latency
 

Additional Inherited Members

- Public Types inherited from ARDOUR::Plugin
typedef std::map< uint32_t,
ParameterDescriptor
PropertyDescriptors
 
- Public Attributes inherited from ARDOUR::Plugin
PBD::Signal0< void > PresetAdded
 
PBD::Signal0< void > PresetRemoved
 
PBD::Signal0< void > PresetLoaded
 
PBD::Signal2< void, uint32_t,
float > 
ParameterChanged
 
PBD::Signal2< void, uint32_t,
Variant
PropertyChanged
 
PBD::Signal1< void, uint32_t > StartTouch
 
PBD::Signal1< void, uint32_t > EndTouch
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal1< void, const
PropertyChange & > 
PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal0< void > Destroyed
 
PBD::Signal0< void > DropReferences
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version = 0
 
static int loading_state_version = 0
 

Detailed Description

Parent class for VST plugins of both Windows and Linux varieties

Definition at line 35 of file vst_plugin.h.

Constructor & Destructor Documentation

VSTPlugin::VSTPlugin ( AudioEngine engine,
Session session,
VSTHandle handle 
)

Definition at line 42 of file vst_plugin.cc.

VSTPlugin::~VSTPlugin ( )
virtual

Definition at line 51 of file vst_plugin.cc.

Member Function Documentation

void VSTPlugin::activate ( )
virtual

Implements ARDOUR::Plugin.

Definition at line 75 of file vst_plugin.cc.

void VSTPlugin::add_state ( XMLNode ) const
protectedvirtual

Add state to an existing XMLNode

Implements ARDOUR::Plugin.

Definition at line 159 of file vst_plugin.cc.

set< Evoral::Parameter > VSTPlugin::automatable ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 517 of file vst_plugin.cc.

int VSTPlugin::connect_and_run ( BufferSet bufs,
ChanMapping  in,
ChanMapping  out,
pframes_t  nframes,
framecnt_t  offset 
)
virtual

Reimplemented from ARDOUR::Plugin.

Definition at line 529 of file vst_plugin.cc.

void VSTPlugin::deactivate ( )
virtual

Implements ARDOUR::Plugin.

Definition at line 69 of file vst_plugin.cc.

float VSTPlugin::default_value ( uint32_t  port)
virtual

Implements ARDOUR::Plugin.

Definition at line 90 of file vst_plugin.cc.

string VSTPlugin::describe_parameter ( Evoral::Parameter  param)
virtual

Implements ARDOUR::Plugin.

Definition at line 490 of file vst_plugin.cc.

void VSTPlugin::do_remove_preset ( std::string  )
protectedvirtual

Do the actual removal of a preset of the provided name

Implements ARDOUR::Plugin.

Definition at line 474 of file vst_plugin.cc.

string VSTPlugin::do_save_preset ( std::string  )
protectedvirtual

Do the actual saving of the current plugin settings to a preset of the provided name. Should return a URI on success, or an empty string on failure.

Implements ARDOUR::Plugin.

Definition at line 428 of file vst_plugin.cc.

void VSTPlugin::find_presets ( )
protectedvirtual

Fill _presets with our presets

Implements ARDOUR::Plugin.

Definition at line 668 of file vst_plugin.cc.

int VSTPlugin::first_user_preset_index ( ) const
virtual
Returns
Index of the first user preset in our lists

Reimplemented from ARDOUR::Plugin.

Definition at line 745 of file vst_plugin.cc.

gchar * VSTPlugin::get_chunk ( bool  single) const
protected

Get VST chunk as base64-encoded data.

Parameters
singletrue for single program, false for all programs.
Returns
0-terminated base64-encoded data; must be passed to g_free () by caller.

Definition at line 132 of file vst_plugin.cc.

float VSTPlugin::get_parameter ( uint32_t  port) const
virtual

Implements ARDOUR::Plugin.

Definition at line 96 of file vst_plugin.cc.

int VSTPlugin::get_parameter_descriptor ( uint32_t  which,
ParameterDescriptor desc 
) const
virtual

Implements ARDOUR::Plugin.

Definition at line 248 of file vst_plugin.cc.

bool VSTPlugin::has_editor ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 639 of file vst_plugin.cc.

const char * VSTPlugin::label ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 627 of file vst_plugin.cc.

bool VSTPlugin::load_plugin_preset ( PresetRecord  r)
protected

Definition at line 344 of file vst_plugin.cc.

bool VSTPlugin::load_preset ( PresetRecord  r)
virtual

Set parameters using a preset

Reimplemented from ARDOUR::Plugin.

Definition at line 326 of file vst_plugin.cc.

bool VSTPlugin::load_user_preset ( PresetRecord  r)
protected

Definition at line 364 of file vst_plugin.cc.

const char * VSTPlugin::maker ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 621 of file vst_plugin.cc.

MidiBuffer* ARDOUR::VSTPlugin::midi_buffer ( ) const
inline

Definition at line 76 of file vst_plugin.h.

const char * VSTPlugin::name ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 615 of file vst_plugin.cc.

uint32_t VSTPlugin::nth_parameter ( uint32_t  port,
bool &  ok 
) const
virtual

Implements ARDOUR::Plugin.

Definition at line 121 of file vst_plugin.cc.

uint32_t VSTPlugin::parameter_count ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 633 of file vst_plugin.cc.

bool ARDOUR::VSTPlugin::parameter_is_audio ( uint32_t  ) const
inlinevirtual

Implements ARDOUR::Plugin.

Definition at line 55 of file vst_plugin.h.

bool ARDOUR::VSTPlugin::parameter_is_control ( uint32_t  ) const
inlinevirtual

Implements ARDOUR::Plugin.

Definition at line 56 of file vst_plugin.h.

bool ARDOUR::VSTPlugin::parameter_is_input ( uint32_t  ) const
inlinevirtual

Implements ARDOUR::Plugin.

Definition at line 57 of file vst_plugin.h.

bool ARDOUR::VSTPlugin::parameter_is_output ( uint32_t  ) const
inlinevirtual

Implements ARDOUR::Plugin.

Definition at line 58 of file vst_plugin.h.

AEffect* ARDOUR::VSTPlugin::plugin ( ) const
inline

Definition at line 74 of file vst_plugin.h.

string VSTPlugin::presets_file ( ) const
protected

Definition at line 751 of file vst_plugin.cc.

XMLTree * VSTPlugin::presets_tree ( ) const
protected
Returns
XMLTree with our user presets; could be a new one if no existing one was found, or 0 if one was present but badly-formatted.

Definition at line 715 of file vst_plugin.cc.

void VSTPlugin::print_parameter ( uint32_t  param,
char *  buf,
uint32_t  len 
) const
virtual

Implements ARDOUR::Plugin.

Definition at line 645 of file vst_plugin.cc.

int VSTPlugin::set_block_size ( pframes_t  nframes)
virtual

Implements ARDOUR::Plugin.

Definition at line 81 of file vst_plugin.cc.

int VSTPlugin::set_chunk ( gchar const *  data,
bool  single 
)
protected

Set VST chunk from base64-encoded data.

Parameters
0-terminatedbase64-encoded data.
singletrue for single program, false for all programs.
Returns
0 on success, non-0 on failure

Definition at line 149 of file vst_plugin.cc.

void VSTPlugin::set_parameter ( uint32_t  which,
float  val 
)
virtual
Parameters
val`plugin' value

Reimplemented from ARDOUR::Plugin.

Definition at line 102 of file vst_plugin.cc.

void VSTPlugin::set_plugin ( AEffect e)
protected

Definition at line 57 of file vst_plugin.cc.

int VSTPlugin::set_state ( XMLNode const &  node,
int  version 
)
virtual

Reimplemented from ARDOUR::Plugin.

Definition at line 196 of file vst_plugin.cc.

framecnt_t VSTPlugin::signal_latency ( ) const
virtual

Implements ARDOUR::Latent.

Definition at line 507 of file vst_plugin.cc.

VSTState* ARDOUR::VSTPlugin::state ( ) const
inline

Definition at line 75 of file vst_plugin.h.

string VSTPlugin::unique_id ( ) const
virtual

Implements ARDOUR::Plugin.

Definition at line 604 of file vst_plugin.cc.

Member Data Documentation

VSTHandle* ARDOUR::VSTPlugin::_handle
protected

Definition at line 95 of file vst_plugin.h.

MidiBuffer* ARDOUR::VSTPlugin::_midi_out_buf
protected

Definition at line 99 of file vst_plugin.h.

AEffect* ARDOUR::VSTPlugin::_plugin
protected

Definition at line 97 of file vst_plugin.h.

VSTState* ARDOUR::VSTPlugin::_state
protected

Definition at line 96 of file vst_plugin.h.


The documentation for this class was generated from the following files: