iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
IPeakAvgSender< MAXNC, QUEUE_SIZE > Class Template Reference

IPeakAvgSender is a utility class which can be used to defer peak & avg/RMS data from sample buffers for sending to the GUI It also features an envelope follower to control meter ballistics. More...

#include <ISender.h>

Inheritance diagram for IPeakAvgSender< MAXNC, QUEUE_SIZE >:
[legend]

Classes

class  EnvelopeFollower
 

Public Member Functions

 IPeakAvgSender (double minThresholdDb=-90.0, bool rmsMode=true, float windowSizeMs=5.0f, float attackTimeMs=1.0f, float decayTimeMs=100.0f, float peakHoldTimeMs=500.0f)
 
void Reset (double sampleRate)
 
void SetAttackTimeMs (double timeMs, double sampleRate)
 
void SetDecayTimeMs (double timeMs, double sampleRate)
 
void SetWindowSizeMs (double timeMs, double sampleRate)
 
void SetPeakHoldTimeMs (double timeMs, double sampleRate)
 
void ProcessBlock (sample **inputs, int nFrames, int ctrlTag=kNoTag, int nChans=MAXNC, int chanOffset=0)
 Queue peaks from sample buffers into the sender This can be called on the realtime audio thread. More...
 
- Public Member Functions inherited from ISender< MAXNC, QUEUE_SIZE, T >
void PushData (const ISenderData< MAXNC, T > &d)
 Pushes a data element onto the queue. More...
 
void TransmitData (IEditorDelegate &dlg)
 Pops elements off the queue and sends messages to controls. More...
 
void TransmitDataToControlsWithTags (IEditorDelegate &dlg, const std::initializer_list< int > &ctrlTags)
 This variation can be used if you need to supply multiple controls with the same ISenderData, overrideing the tags in the data packet. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ISender< MAXNC, QUEUE_SIZE, T >
static constexpr int kUpdateMessage = 0
 

Detailed Description

template<int MAXNC = 1, int QUEUE_SIZE = 64>
class IPeakAvgSender< MAXNC, QUEUE_SIZE >

IPeakAvgSender is a utility class which can be used to defer peak & avg/RMS data from sample buffers for sending to the GUI It also features an envelope follower to control meter ballistics.

Definition at line 187 of file ISender.h.

Constructor & Destructor Documentation

◆ IPeakAvgSender()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
IPeakAvgSender< MAXNC, QUEUE_SIZE >::IPeakAvgSender ( double  minThresholdDb = -90.0,
bool  rmsMode = true,
float  windowSizeMs = 5.0f,
float  attackTimeMs = 1.0f,
float  decayTimeMs = 100.0f,
float  peakHoldTimeMs = 500.0f 
)
inline

Definition at line 226 of file ISender.h.

Member Function Documentation

◆ ProcessBlock()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::ProcessBlock ( sample **  inputs,
int  nFrames,
int  ctrlTag = kNoTag,
int  nChans = MAXNC,
int  chanOffset = 0 
)
inline

Queue peaks from sample buffers into the sender This can be called on the realtime audio thread.

Parameters
inputsthe sample buffers to analyze
nFramesthe number of sample frames in the input buffers
ctrlTaga control tag to indicate which control to send the buffers to. Note: if you don't supply the control tag here, you must use TransmitDataToControlsWithTags() and specify one or more tags there
nChansthe number of channels of data that should be sent
chanOffsetthe starting channel

Definition at line 284 of file ISender.h.

References ISender< MAXNC, QUEUE_SIZE, T >::PushData().

◆ Reset()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::Reset ( double  sampleRate)
inline

Definition at line 238 of file ISender.h.

◆ SetAttackTimeMs()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::SetAttackTimeMs ( double  timeMs,
double  sampleRate 
)
inline

Definition at line 247 of file ISender.h.

◆ SetDecayTimeMs()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::SetDecayTimeMs ( double  timeMs,
double  sampleRate 
)
inline

Definition at line 253 of file ISender.h.

◆ SetPeakHoldTimeMs()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::SetPeakHoldTimeMs ( double  timeMs,
double  sampleRate 
)
inline

Definition at line 271 of file ISender.h.

◆ SetWindowSizeMs()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakAvgSender< MAXNC, QUEUE_SIZE >::SetWindowSizeMs ( double  timeMs,
double  sampleRate 
)
inline

Definition at line 259 of file ISender.h.


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