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

#include <amp.h>

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

Classes

struct  GainControl
 

Public Member Functions

 Amp (Session &s, std::string type="amp")
 
std::string display_name () const
 
bool visible () const
 
bool can_support_io_configuration (const ChanCount &in, ChanCount &out)
 
bool configure_io (ChanCount in, ChanCount out)
 
void run (BufferSet &bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
 
bool apply_gain () const
 
void apply_gain (bool yn)
 
void set_gain_automation_buffer (gain_t *)
 
void setup_gain_automation (framepos_t start_frame, framepos_t end_frame, framecnt_t nframes)
 
bool apply_gain_automation () const
 
void apply_gain_automation (bool yn)
 
XMLNodestate (bool full)
 
int set_state (const XMLNode &, int version)
 
gain_t gain () const
 
void set_gain (gain_t g, void *src)
 
void inc_gain (gain_t delta, void *src)
 
boost::shared_ptr< GainControlgain_control ()
 
boost::shared_ptr< const
GainControl
gain_control () const
 
std::string value_as_string (boost::shared_ptr< AutomationControl >) const
 
- Public Member Functions inherited from ARDOUR::Processor
 Processor (Session &, const std::string &name)
 
 Processor (const Processor &other)
 
virtual ~Processor ()
 
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 framecnt_t signal_latency () const
 
virtual int set_block_size (pframes_t)
 
virtual bool requires_fixed_sized_buffers () const
 
virtual void silence (framecnt_t)
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void flush ()
 
virtual ChanCount input_streams () const
 
virtual ChanCount output_streams () const
 
virtual void realtime_handle_transport_stopped ()
 
virtual void realtime_locate ()
 
virtual void monitoring_changed ()
 
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 describe_parameter (Evoral::Parameter param)
 
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)
 

Static Public Member Functions

static gain_t apply_gain (BufferSet &bufs, framecnt_t sample_rate, framecnt_t nframes, gain_t initial, gain_t target, bool midi_amp=true)
 
static void apply_simple_gain (BufferSet &bufs, framecnt_t nframes, gain_t target, bool midi_amp=true)
 
static gain_t apply_gain (AudioBuffer &buf, framecnt_t sample_rate, framecnt_t nframes, gain_t initial, gain_t target)
 
static void apply_simple_gain (AudioBuffer &buf, framecnt_t nframes, gain_t target)
 
static void declick (BufferSet &bufs, framecnt_t nframes, int dir)
 
static void update_meters ()
 
- Static Public Member Functions inherited from ARDOUR::SessionObject
static void make_property_quarks ()
 

Private Attributes

bool _denormal_protection
 
bool _apply_gain
 
bool _apply_gain_automation
 
float _current_gain
 
framepos_t _current_automation_frame
 
boost::shared_ptr< GainControl_gain_control
 
gain_t_gain_automation_buffer
 
std::string _type
 
bool _midi_amp
 

Additional Inherited Members

- Public Types inherited from Evoral::ControlSet
typedef std::map< Parameter,
boost::shared_ptr< Control > > 
Controls
 
- 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 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")
 
- 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

Applies a declick operation to all audio inputs, passing the same number of audio outputs, and passing through any other types unchanged.

Definition at line 37 of file amp.h.

Constructor & Destructor Documentation

Amp::Amp ( Session s,
std::string  type = "amp" 
)

Definition at line 41 of file amp.cc.

Member Function Documentation

bool ARDOUR::Amp::apply_gain ( ) const
inline

Definition at line 50 of file amp.h.

void ARDOUR::Amp::apply_gain ( bool  yn)
inline

Definition at line 51 of file amp.h.

gain_t Amp::apply_gain ( BufferSet bufs,
framecnt_t  sample_rate,
framecnt_t  nframes,
gain_t  initial,
gain_t  target,
bool  midi_amp = true 
)
static

Apply a (potentially) declicked gain to the buffers of bufs

Definition at line 166 of file amp.cc.

gain_t Amp::apply_gain ( AudioBuffer buf,
framecnt_t  sample_rate,
framecnt_t  nframes,
gain_t  initial,
gain_t  target 
)
static

Definition at line 275 of file amp.cc.

bool ARDOUR::Amp::apply_gain_automation ( ) const
inline

Definition at line 57 of file amp.h.

void ARDOUR::Amp::apply_gain_automation ( bool  yn)
inline

Definition at line 58 of file amp.h.

void Amp::apply_simple_gain ( BufferSet bufs,
framecnt_t  nframes,
gain_t  target,
bool  midi_amp = true 
)
static

Definition at line 306 of file amp.cc.

void Amp::apply_simple_gain ( AudioBuffer buf,
framecnt_t  nframes,
gain_t  target 
)
static

Definition at line 351 of file amp.cc.

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

Implements ARDOUR::Processor.

Definition at line 66 of file amp.cc.

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

Reimplemented from ARDOUR::Processor.

Definition at line 73 of file amp.cc.

void Amp::declick ( BufferSet bufs,
framecnt_t  nframes,
int  dir 
)
static

Definition at line 233 of file amp.cc.

std::string Amp::display_name ( ) const
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 60 of file amp.cc.

gain_t ARDOUR::Amp::gain ( ) const
inline

Definition at line 71 of file amp.h.

boost::shared_ptr<GainControl> ARDOUR::Amp::gain_control ( )
inline

Definition at line 105 of file amp.h.

boost::shared_ptr<const GainControl> ARDOUR::Amp::gain_control ( ) const
inline

Definition at line 109 of file amp.h.

void Amp::inc_gain ( gain_t  delta,
void *  src 
)

Definition at line 361 of file amp.cc.

void Amp::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 83 of file amp.cc.

void Amp::set_gain ( gain_t  g,
void *  src 
)

Definition at line 374 of file amp.cc.

void Amp::set_gain_automation_buffer ( gain_t g)

Sets up the buffer that setup_gain_automation and ::run will use for gain automationc curves. Must be called before setup_gain_automation, and must be called with process lock held.

Definition at line 499 of file amp.cc.

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

Implements PBD::Stateful.

Definition at line 390 of file amp.cc.

void Amp::setup_gain_automation ( framepos_t  start_frame,
framepos_t  end_frame,
framecnt_t  nframes 
)

Write gain automation for this cycle into the buffer previously passed in to set_gain_automation_buffer (if we are in automation playback mode and the transport is rolling).

Definition at line 454 of file amp.cc.

XMLNode & Amp::state ( bool  full)
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 380 of file amp.cc.

static void ARDOUR::Amp::update_meters ( )
static
std::string Amp::value_as_string ( boost::shared_ptr< AutomationControl ac) const
virtual

Reimplemented from ARDOUR::Automatable.

Definition at line 482 of file amp.cc.

bool Amp::visible ( ) const

Definition at line 476 of file amp.cc.

Member Data Documentation

bool ARDOUR::Amp::_apply_gain
private

Definition at line 117 of file amp.h.

bool ARDOUR::Amp::_apply_gain_automation
private

Definition at line 118 of file amp.h.

framepos_t ARDOUR::Amp::_current_automation_frame
private

Definition at line 120 of file amp.h.

float ARDOUR::Amp::_current_gain
private

Definition at line 119 of file amp.h.

bool ARDOUR::Amp::_denormal_protection
private

Definition at line 116 of file amp.h.

gain_t* ARDOUR::Amp::_gain_automation_buffer
private

Buffer that we should use for gain automation

Definition at line 125 of file amp.h.

boost::shared_ptr<GainControl> ARDOUR::Amp::_gain_control
private

Definition at line 122 of file amp.h.

bool ARDOUR::Amp::_midi_amp
private

Definition at line 127 of file amp.h.

std::string ARDOUR::Amp::_type
private

Definition at line 126 of file amp.h.


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