ardour
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
ARDOUR::PeakMeter Class Reference

#include <meter.h>

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

Public Member Functions

 PeakMeter (Session &s, const std::string &name)
 
 ~PeakMeter ()
 
void reset ()
 
void reset_max ()
 
bool can_support_io_configuration (const ChanCount &in, ChanCount &out)
 
bool configure_io (ChanCount in, ChanCount out)
 
void set_max_channels (const ChanCount &)
 
void reflect_inputs (const ChanCount &in)
 
void emit_configuration_changed ()
 
void run (BufferSet &bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
 
void activate ()
 
void deactivate ()
 
ChanCount input_streams () const
 
ChanCount output_streams () const
 
float meter_level (uint32_t n, MeterType type)
 
void set_type (MeterType t)
 
MeterType get_type ()
 
XMLNodestate (bool full)
 
- 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 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 flush ()
 
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)
 
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::Signal1< void, MeterTypeTypeChanged
 
- 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
 

Private Attributes

ChanCount current_meters
 
bool _reset_dpm
 
bool _reset_max
 
uint32_t _bufcnt
 
std::vector< float > _peak_buffer
 
std::vector< float > _peak_power
 
std::vector< float > _max_peak_signal
 
std::vector< Kmeterdsp * > _kmeter
 
std::vector< Iec1ppmdsp * > _iec1meter
 
std::vector< Iec2ppmdsp * > _iec2meter
 
std::vector< Vumeterdsp * > _vumeter
 
MeterType _meter_type
 

Friends

class IO
 

Additional Inherited Members

- Public Types inherited from Evoral::ControlSet
typedef std::map< Parameter,
boost::shared_ptr< Control > > 
Controls
 
- Static Public Member Functions inherited from ARDOUR::SessionObject
static void make_property_quarks ()
 
- 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

Meters peaks on the input and stores them for access.

Definition at line 41 of file meter.h.

Constructor & Destructor Documentation

PeakMeter::PeakMeter ( Session s,
const std::string &  name 
)

Definition at line 38 of file meter.cc.

PeakMeter::~PeakMeter ( )

Definition at line 51 of file meter.cc.

Member Function Documentation

void ARDOUR::PeakMeter::activate ( )
inlinevirtual

Reimplemented from ARDOUR::Processor.

Definition at line 69 of file meter.h.

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

Implements ARDOUR::Processor.

Definition at line 221 of file meter.cc.

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

Reimplemented from ARDOUR::Processor.

Definition at line 228 of file meter.cc.

void ARDOUR::PeakMeter::deactivate ( )
inlinevirtual

Reimplemented from ARDOUR::Processor.

Definition at line 70 of file meter.h.

void PeakMeter::emit_configuration_changed ( )

Definition at line 251 of file meter.cc.

MeterType ARDOUR::PeakMeter::get_type ( )
inline

Definition at line 78 of file meter.h.

ChanCount ARDOUR::PeakMeter::input_streams ( ) const
inlinevirtual

Reimplemented from ARDOUR::Processor.

Definition at line 72 of file meter.h.

float PeakMeter::meter_level ( uint32_t  n,
MeterType  type 
)

Definition at line 311 of file meter.cc.

ChanCount ARDOUR::PeakMeter::output_streams ( ) const
inlinevirtual

Reimplemented from ARDOUR::Processor.

Definition at line 73 of file meter.h.

void PeakMeter::reflect_inputs ( const ChanCount in)

Definition at line 242 of file meter.cc.

void PeakMeter::reset ( )

Definition at line 187 of file meter.cc.

void PeakMeter::reset_max ( )

Definition at line 208 of file meter.cc.

void PeakMeter::run ( BufferSet bufs,
framepos_t  start_frame,
framepos_t  end_frame,
pframes_t  nframes,
bool   
)
virtual

Compute peaks

Get peaks from bufs Input acceptance is lenient - the first n buffers from bufs will be metered, where n was set by the last call to setup(), excess meters will be set to 0.

(runs in jack realtime context)

Reimplemented from ARDOUR::Processor.

Definition at line 79 of file meter.cc.

void PeakMeter::set_max_channels ( const ChanCount chn)

Definition at line 256 of file meter.cc.

void PeakMeter::set_type ( MeterType  t)

Definition at line 370 of file meter.cc.

XMLNode & PeakMeter::state ( bool  full)
virtual

Reimplemented from ARDOUR::Processor.

Definition at line 407 of file meter.cc.

Friends And Related Function Documentation

friend class IO
friend

Definition at line 85 of file meter.h.

Member Data Documentation

uint32_t ARDOUR::PeakMeter::_bufcnt
private

Definition at line 96 of file meter.h.

std::vector<Iec1ppmdsp *> ARDOUR::PeakMeter::_iec1meter
private

Definition at line 102 of file meter.h.

std::vector<Iec2ppmdsp *> ARDOUR::PeakMeter::_iec2meter
private

Definition at line 103 of file meter.h.

std::vector<Kmeterdsp *> ARDOUR::PeakMeter::_kmeter
private

Definition at line 101 of file meter.h.

std::vector<float> ARDOUR::PeakMeter::_max_peak_signal
private

Definition at line 99 of file meter.h.

MeterType ARDOUR::PeakMeter::_meter_type
private

Definition at line 106 of file meter.h.

std::vector<float> ARDOUR::PeakMeter::_peak_buffer
private

Definition at line 97 of file meter.h.

std::vector<float> ARDOUR::PeakMeter::_peak_power
private

Definition at line 98 of file meter.h.

bool ARDOUR::PeakMeter::_reset_dpm
private

Definition at line 93 of file meter.h.

bool ARDOUR::PeakMeter::_reset_max
private

Definition at line 94 of file meter.h.

std::vector<Vumeterdsp *> ARDOUR::PeakMeter::_vumeter
private

Definition at line 104 of file meter.h.

ChanCount ARDOUR::PeakMeter::current_meters
private

The number of meters that we are currently handling; may be different to _configured_input and _configured_output as it can be altered outside a ::configure_io by ::reflect_inputs.

Definition at line 91 of file meter.h.

PBD::Signal1<void, MeterType> ARDOUR::PeakMeter::TypeChanged

Definition at line 82 of file meter.h.


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