ardour
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
ARDOUR::PluginInsert Class Reference

#include <plugin_insert.h>

Inheritance diagram for ARDOUR::PluginInsert:
ARDOUR::Processor ARDOUR::SessionObject ARDOUR::Automatable ARDOUR::Latent ARDOUR::SessionHandleRef PBD::StatefulDestructible Evoral::ControlSet PBD::ScopedConnectionList PBD::Stateful PBD::Destructible

Classes

struct  Match
 
struct  PluginControl
 
struct  PluginPropertyControl
 

Public Types

enum  MatchingMethod {
  Impossible, Delegate, NoInputs, ExactMatch,
  Replicate, Split, Hide
}
 
- Public Types inherited from Evoral::ControlSet
typedef std::map< Parameter,
boost::shared_ptr< Control > > 
Controls
 

Public Member Functions

 PluginInsert (Session &, boost::shared_ptr< Plugin >=boost::shared_ptr< Plugin >())
 
 ~PluginInsert ()
 
XMLNodestate (bool)
 
XMLNodeget_state (void)
 
int set_state (const XMLNode &, int version)
 
void run (BufferSet &in, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
 
void silence (framecnt_t nframes)
 
void activate ()
 
void deactivate ()
 
void flush ()
 
bool reset_parameters_to_default ()
 
bool can_reset_all_parameters ()
 
int set_block_size (pframes_t nframes)
 
ChanCount output_streams () const
 
ChanCount input_streams () const
 
ChanCount natural_output_streams () const
 
ChanCount natural_input_streams () const
 
bool set_count (uint32_t num)
 
uint32_t get_count () const
 
bool can_support_io_configuration (const ChanCount &in, ChanCount &out)
 
bool configure_io (ChanCount in, ChanCount out)
 
bool has_no_inputs () const
 
bool has_no_audio_inputs () const
 
bool is_midi_instrument () const
 
void realtime_handle_transport_stopped ()
 
void realtime_locate ()
 
void monitoring_changed ()
 
boost::shared_ptr< Pluginplugin (uint32_t num=0) const
 
PluginType type ()
 
std::string describe_parameter (Evoral::Parameter param)
 
framecnt_t signal_latency () const
 
boost::shared_ptr< Pluginget_impulse_analysis_plugin ()
 
void collect_signal_for_analysis (framecnt_t nframes)
 
bool splitting () const
 
- Public Member Functions inherited from ARDOUR::Processor
 Processor (Session &, const std::string &name)
 
 Processor (const Processor &other)
 
virtual ~Processor ()
 
virtual std::string display_name () const
 
virtual bool display_to_user () const
 
virtual void set_display_to_user (bool)
 
bool active () const
 
virtual bool does_routing () const
 
bool get_next_ab_is_active () const
 
void set_next_ab_is_active (bool yn)
 
virtual bool requires_fixed_sized_buffers () const
 
XMLNodeget_state (void)
 
int set_state (const XMLNode &, int version)
 
void set_pre_fader (bool)
 
void set_ui (void *)
 
void * get_ui () const
 
ProcessorWindowProxywindow_proxy () const
 
void set_window_proxy (ProcessorWindowProxy *wp)
 
void set_owner (SessionObject *)
 
SessionObjectowner () const
 
- Public Member Functions inherited from ARDOUR::SessionObject
 SessionObject (Session &session, const std::string &name)
 
Sessionsession () const
 
std::string name () const
 
virtual bool set_name (const std::string &str)
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 
- 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::Automatable
 Automatable (Session &)
 
 Automatable (const Automatable &other)
 
virtual ~Automatable ()
 
boost::shared_ptr
< Evoral::Control
control_factory (const Evoral::Parameter &id)
 
boost::shared_ptr
< AutomationControl
automation_control (const Evoral::Parameter &id, bool create_if_missing=false)
 
boost::shared_ptr< const
AutomationControl
automation_control (const Evoral::Parameter &id) const
 
virtual void add_control (boost::shared_ptr< Evoral::Control >)
 
void clear_controls ()
 
virtual void transport_located (framepos_t now)
 
virtual void transport_stopped (framepos_t now)
 
virtual std::string value_as_string (boost::shared_ptr< AutomationControl >) const
 
AutoState get_parameter_automation_state (Evoral::Parameter param)
 
virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState)
 
AutoStyle get_parameter_automation_style (Evoral::Parameter param)
 
void set_parameter_automation_style (Evoral::Parameter param, AutoStyle)
 
void protect_automation ()
 
const std::set
< Evoral::Parameter > & 
what_can_be_automated () const
 
void what_has_existing_automation (std::set< Evoral::Parameter > &) const
 
int set_automation_xml_state (const XMLNode &, Evoral::Parameter default_param)
 
XMLNodeget_automation_xml_state ()
 
- Public Member Functions inherited from Evoral::ControlSet
 ControlSet ()
 
 ControlSet (const ControlSet &)
 
virtual ~ControlSet ()
 
boost::shared_ptr< Controlcontrol (const Parameter &id, bool create_if_missing=false)
 
boost::shared_ptr< const Controlcontrol (const Parameter &id) const
 
Controlscontrols ()
 
const Controlscontrols () const
 
bool find_next_event (double start, double end, ControlEvent &ev) const
 
virtual bool controls_empty () const
 
void what_has_data (std::set< Parameter > &) const
 
Glib::Threads::Mutex & control_lock () const
 
- 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)
 

Public Attributes

PBD::Signal2< void, BufferSet
*, BufferSet * > 
AnalysisDataGathered
 
PBD::Signal0< void > PluginIoReConfigure
 
- Public Attributes inherited from ARDOUR::Processor
PBD::Signal0< void > ActiveChanged
 
PBD::Signal2< void, ChanCount,
ChanCount
ConfigurationChanged
 
- 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
 
- Public Attributes inherited from ARDOUR::Automatable
PBD::Signal0< void > AutomationStateChanged
 

Static Public Attributes

static const std::string port_automation_node_name = "PortAutomation"
 
- Static Public Attributes inherited from ARDOUR::Processor
static const std::string state_node_name = "Processor"
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version = 0
 
static int loading_state_version = 0
 
- Static Public Attributes inherited from ARDOUR::Automatable
static const std::string xml_node_name = X_("Automation")
 

Private Types

typedef std::vector
< boost::shared_ptr< Plugin > > 
Plugins
 

Private Member Functions

 PluginInsert (const PluginInsert &)
 
void parameter_changed (uint32_t, float)
 
void set_parameter (Evoral::Parameter param, float val)
 
float get_parameter (Evoral::Parameter param)
 
float default_parameter_value (const Evoral::Parameter &param)
 
Match private_can_support_io_configuration (ChanCount const &, ChanCount &)
 
void automation_run (BufferSet &bufs, framepos_t start, pframes_t nframes)
 
void connect_and_run (BufferSet &bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now=0)
 
void create_automatable_parameters ()
 
void control_list_automation_state_changed (Evoral::Parameter, AutoState)
 
void set_parameter_state_2X (const XMLNode &node, int version)
 
void set_control_ids (const XMLNode &, int version)
 
boost::shared_ptr< Pluginplugin_factory (boost::shared_ptr< Plugin >)
 
void add_plugin (boost::shared_ptr< Plugin >)
 
void start_touch (uint32_t param_id)
 
void end_touch (uint32_t param_id)
 

Private Attributes

Plugins _plugins
 
boost::weak_ptr< Plugin_impulseAnalysisPlugin
 
framecnt_t _signal_analysis_collected_nframes
 
framecnt_t _signal_analysis_collect_nframes_max
 
BufferSet _signal_analysis_inputs
 
BufferSet _signal_analysis_outputs
 
ChanCount midi_bypass
 
Match _match
 

Additional Inherited Members

- Static Public Member Functions inherited from ARDOUR::SessionObject
static void make_property_quarks ()
 
- Protected Member Functions inherited from ARDOUR::Processor
virtual int set_state_2X (const XMLNode &, int version)
 
- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void session_going_away ()
 
virtual void insanity_check ()
 
- 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 Member Functions inherited from ARDOUR::Automatable
void can_automate (Evoral::Parameter)
 
virtual void automation_list_automation_state_changed (Evoral::Parameter, AutoState)
 
int load_automation (const std::string &path)
 
int old_set_automation_state (const XMLNode &)
 
- Protected Member Functions inherited from Evoral::ControlSet
virtual void control_list_marked_dirty ()
 
virtual void control_list_interpolation_changed (Parameter, ControlList::InterpolationStyle)
 
- Protected Attributes inherited from ARDOUR::Processor
int _pending_active
 
bool _active
 
bool _next_ab_is_active
 
bool _configured
 
ChanCount _configured_input
 
ChanCount _configured_output
 
bool _display_to_user
 
bool _pre_fader
 true if this processor is currently placed before the Amp, otherwise false More...
 
void * _ui_pointer
 
ProcessorWindowProxy_window_proxy
 
SessionObject_owner
 
- Protected Attributes inherited from ARDOUR::SessionObject
PBD::Property< std::string > _name
 
- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 
- 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::Automatable
Session_a_session
 
std::set< Evoral::Parameter_can_automate_list
 
framepos_t _last_automation_snapshot
 
- Protected Attributes inherited from Evoral::ControlSet
Glib::Threads::Mutex _control_lock
 
Controls _controls
 
PBD::ScopedConnectionList _list_connections
 
- Protected Attributes inherited from ARDOUR::Latent
framecnt_t _user_latency
 

Detailed Description

Plugin inserts: send data through a plugin

Definition at line 45 of file plugin_insert.h.

Member Typedef Documentation

typedef std::vector<boost::shared_ptr<Plugin> > ARDOUR::PluginInsert::Plugins
private

Definition at line 174 of file plugin_insert.h.

Member Enumeration Documentation

Enumeration of the ways in which we can match our insert's IO to that of the plugin(s).

Enumerator
Impossible 

we can't

Delegate 

we are delegating to the plugin, and it can handle it

NoInputs 

plugin has no inputs, so anything goes

ExactMatch 

our insert's inputs are the same as the plugin's

Replicate 

we have multiple instances of the plugin

Split 

we copy one of our insert's inputs to multiple plugin inputs

Hide 

we `hide' some of the plugin's inputs by feeding them silence

Definition at line 153 of file plugin_insert.h.

Constructor & Destructor Documentation

PluginInsert::PluginInsert ( Session s,
boost::shared_ptr< Plugin plug = boost::shared_ptr<Plugin>() 
)

Definition at line 66 of file plugin_insert.cc.

PluginInsert::~PluginInsert ( )

Definition at line 115 of file plugin_insert.cc.

ARDOUR::PluginInsert::PluginInsert ( const PluginInsert )
private

Member Function Documentation

void PluginInsert::activate ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 302 of file plugin_insert.cc.

void PluginInsert::add_plugin ( boost::shared_ptr< Plugin plugin)
private

Add a plugin to our list

Definition at line 1435 of file plugin_insert.cc.

void PluginInsert::automation_run ( BufferSet bufs,
framepos_t  start,
pframes_t  nframes 
)
private

Definition at line 545 of file plugin_insert.cc.

bool PluginInsert::can_reset_all_parameters ( )

Definition at line 606 of file plugin_insert.cc.

bool PluginInsert::can_support_io_configuration ( const ChanCount in,
ChanCount out 
)
virtual

Decide whether this PluginInsert can support a given IO configuration. To do this, we run through a set of possible solutions in rough order of preference.

Parameters
inRequired input channel count.
outFilled in with the output channel count if we return true.
Returns
true if the given IO configuration can be supported.

Implements ARDOUR::Processor.

Definition at line 772 of file plugin_insert.cc.

void PluginInsert::collect_signal_for_analysis ( framecnt_t  nframes)

Definition at line 1422 of file plugin_insert.cc.

bool PluginInsert::configure_io ( ChanCount  in,
ChanCount  out 
)
virtual
Precondition
Caller must hold process lock

Reimplemented from ARDOUR::Processor.

Definition at line 712 of file plugin_insert.cc.

void PluginInsert::connect_and_run ( BufferSet bufs,
pframes_t  nframes,
framecnt_t  offset,
bool  with_auto,
framepos_t  now = 0 
)
private

Definition at line 330 of file plugin_insert.cc.

void PluginInsert::control_list_automation_state_changed ( Evoral::Parameter  which,
AutoState  s 
)
private

Definition at line 120 of file plugin_insert.cc.

void PluginInsert::create_automatable_parameters ( )
private

Definition at line 237 of file plugin_insert.cc.

void PluginInsert::deactivate ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 312 of file plugin_insert.cc.

float PluginInsert::default_parameter_value ( const Evoral::Parameter param)
private

Definition at line 590 of file plugin_insert.cc.

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

Reimplemented from ARDOUR::Automatable.

Definition at line 1233 of file plugin_insert.cc.

void PluginInsert::end_touch ( uint32_t  param_id)
private

Definition at line 1485 of file plugin_insert.cc.

void PluginInsert::flush ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 322 of file plugin_insert.cc.

uint32_t ARDOUR::PluginInsert::get_count ( ) const
inline

Definition at line 75 of file plugin_insert.h.

boost::shared_ptr< Plugin > PluginInsert::get_impulse_analysis_plugin ( )

Definition at line 1408 of file plugin_insert.cc.

float PluginInsert::get_parameter ( Evoral::Parameter  param)
private

Definition at line 534 of file plugin_insert.cc.

XMLNode & PluginInsert::get_state ( void  )
virtual

Implements PBD::Stateful.

Definition at line 929 of file plugin_insert.cc.

bool PluginInsert::has_no_audio_inputs ( ) const

Definition at line 219 of file plugin_insert.cc.

bool PluginInsert::has_no_inputs ( ) const

Definition at line 213 of file plugin_insert.cc.

ChanCount PluginInsert::input_streams ( ) const
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 154 of file plugin_insert.cc.

bool PluginInsert::is_midi_instrument ( ) const

Definition at line 225 of file plugin_insert.cc.

void PluginInsert::monitoring_changed ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 1468 of file plugin_insert.cc.

ChanCount PluginInsert::natural_input_streams ( ) const

Definition at line 207 of file plugin_insert.cc.

ChanCount PluginInsert::natural_output_streams ( ) const

Definition at line 201 of file plugin_insert.cc.

ChanCount PluginInsert::output_streams ( ) const
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 134 of file plugin_insert.cc.

void PluginInsert::parameter_changed ( uint32_t  which,
float  val 
)
private

Definition at line 269 of file plugin_insert.cc.

boost::shared_ptr<Plugin> ARDOUR::PluginInsert::plugin ( uint32_t  num = 0) const
inline

Definition at line 125 of file plugin_insert.h.

boost::shared_ptr< Plugin > PluginInsert::plugin_factory ( boost::shared_ptr< Plugin other)
private

Definition at line 668 of file plugin_insert.cc.

PluginInsert::Match PluginInsert::private_can_support_io_configuration ( ChanCount const &  inx,
ChanCount out 
)
private

A private version of can_support_io_configuration which returns the method by which the configuration can be matched, rather than just whether or not it can be.

Definition at line 782 of file plugin_insert.cc.

void PluginInsert::realtime_handle_transport_stopped ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 1452 of file plugin_insert.cc.

void PluginInsert::realtime_locate ( )
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 1460 of file plugin_insert.cc.

bool PluginInsert::reset_parameters_to_default ( )

Definition at line 633 of file plugin_insert.cc.

void PluginInsert::run ( BufferSet ,
framepos_t  ,
framepos_t  ,
pframes_t  ,
bool   
)
virtual
Parameters
result_requiredtrue if, on return from this method, bufs is required to contain valid data; if false, the method need not bother writing to bufs if it doesn't want to.

Reimplemented from ARDOUR::Processor.

Definition at line 462 of file plugin_insert.cc.

int PluginInsert::set_block_size ( pframes_t  nframes)
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 290 of file plugin_insert.cc.

void PluginInsert::set_control_ids ( const XMLNode node,
int  version 
)
private

Definition at line 955 of file plugin_insert.cc.

bool PluginInsert::set_count ( uint32_t  num)

Definition at line 80 of file plugin_insert.cc.

void PluginInsert::set_parameter ( Evoral::Parameter  param,
float  val 
)
private

Definition at line 510 of file plugin_insert.cc.

void PluginInsert::set_parameter_state_2X ( const XMLNode node,
int  version 
)
private

Definition at line 1149 of file plugin_insert.cc.

int PluginInsert::set_state ( const XMLNode node,
int  version 
)
virtual

Implements PBD::Stateful.

Definition at line 987 of file plugin_insert.cc.

ARDOUR::framecnt_t PluginInsert::signal_latency ( ) const
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 1247 of file plugin_insert.cc.

void PluginInsert::silence ( framecnt_t  nframes)
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 442 of file plugin_insert.cc.

bool ARDOUR::PluginInsert::splitting ( ) const
inline

Definition at line 143 of file plugin_insert.h.

void PluginInsert::start_touch ( uint32_t  param_id)
private

Definition at line 1476 of file plugin_insert.cc.

XMLNode & PluginInsert::state ( bool  full)
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 935 of file plugin_insert.cc.

ARDOUR::PluginType PluginInsert::type ( )

Definition at line 1257 of file plugin_insert.cc.

Member Data Documentation

boost::weak_ptr<Plugin> ARDOUR::PluginInsert::_impulseAnalysisPlugin
private

Definition at line 177 of file plugin_insert.h.

Match ARDOUR::PluginInsert::_match
private

details of the match currently being used

Definition at line 200 of file plugin_insert.h.

Plugins ARDOUR::PluginInsert::_plugins
private

Definition at line 175 of file plugin_insert.h.

framecnt_t ARDOUR::PluginInsert::_signal_analysis_collect_nframes_max
private

Definition at line 180 of file plugin_insert.h.

framecnt_t ARDOUR::PluginInsert::_signal_analysis_collected_nframes
private

Definition at line 179 of file plugin_insert.h.

BufferSet ARDOUR::PluginInsert::_signal_analysis_inputs
private

Definition at line 182 of file plugin_insert.h.

BufferSet ARDOUR::PluginInsert::_signal_analysis_outputs
private

Definition at line 183 of file plugin_insert.h.

PBD::Signal2<void,BufferSet*, BufferSet*> ARDOUR::PluginInsert::AnalysisDataGathered

Definition at line 147 of file plugin_insert.h.

ChanCount ARDOUR::PluginInsert::midi_bypass
private

Definition at line 185 of file plugin_insert.h.

PBD::Signal0<void> ARDOUR::PluginInsert::PluginIoReConfigure

Definition at line 148 of file plugin_insert.h.

const string PluginInsert::port_automation_node_name = "PortAutomation"
static

Definition at line 51 of file plugin_insert.h.


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