Ardour  9.0-pre0-582-g084a23a80d
AudioGrapher::Analyser Class Reference

#include <analyser.h>

Inheritance diagram for AudioGrapher::Analyser:
[legend]

Public Member Functions

 Analyser (float sample_rate, unsigned int channels, samplecnt_t bufsize, samplecnt_t n_samples, size_t width=800, size_t bins=200)
 
 ~Analyser ()
 
void process (ProcessContext< float > const &c)
 
ARDOUR::ExportAnalysisPtr result (bool ptr=false)
 
void set_duration (samplecnt_t n_samples)
 
void set_normalization_gain (float gain)
 
- Public Member Functions inherited from AudioGrapher::LoudnessReader
 LoudnessReader (float sample_rate, unsigned int channels, samplecnt_t bufsize)
 
 ~LoudnessReader ()
 
void reset ()
 
float calc_peak (float target_lufs=-23, float target_dbtp=-1) const
 
bool get_loudness (float *integrated, float *short_term=NULL, float *momentary=NULL) const
 
- Public Member Functions inherited from AudioGrapher::ListedSource< float >
void add_output (typename Source< float >::SinkPtr output)
 
void clear_outputs ()
 Removes all outputs added. More...
 
void remove_output (typename Source< float >::SinkPtr output)
 
- Public Member Functions inherited from AudioGrapher::Source< T >
virtual ~Source ()
 
virtual void add_output (SinkPtr output)=0
 Adds an output to this source. All data generated is forwarded to output. More...
 
virtual void remove_output (SinkPtr output)=0
 Removes a specific output from this source. More...
 
- Public Member Functions inherited from AudioGrapher::Sink< float >
virtual ~Sink ()
 
virtual void process (ProcessContext< float > &context)
 

Static Public Attributes

static const float fft_range_db
 

Private Member Functions

float fft_power_at_bin (const uint32_t b, const float norm) const
 

Private Attributes

ARDOUR::ExportAnalysisPtr _rp
 
ARDOUR::ExportAnalysis_result
 
samplecnt_t _n_samples
 
samplecnt_t _pos
 
samplecnt_t _spp
 
samplecnt_t _fpp
 
float * _hann_window
 
uint32_t _fft_data_size
 
double _fft_freq_per_bin
 
float * _fft_data_in
 
float * _fft_data_out
 
float * _fft_power
 
fftwf_plan _fft_plan
 

Additional Inherited Members

- Public Types inherited from AudioGrapher::Source< T >
typedef std::shared_ptr< Sink< T > > SinkPtr
 
- Protected Types inherited from AudioGrapher::ListedSource< float >
typedef std::list< typename Source< float >::SinkPtrSinkList
 
- Protected Member Functions inherited from AudioGrapher::ListedSource< float >
void output (ProcessContext< float > const &c)
 Helper for derived classes. More...
 
void output (ProcessContext< float > &c)
 
bool output_size_is_one ()
 
- Protected Attributes inherited from AudioGrapher::LoudnessReader
Vamp::Plugin * _ebur_plugin
 
std::vector< Vamp::Plugin * > _dbtp_plugins
 
float _sample_rate
 
unsigned int _channels
 
samplecnt_t _bufsize
 
samplecnt_t _pos
 
float * _bufs [2]
 
- Protected Attributes inherited from AudioGrapher::ListedSource< float >
SinkList outputs
 

Detailed Description

Definition at line 29 of file audiographer/audiographer/general/analyser.h.

Constructor & Destructor Documentation

◆ Analyser()

AudioGrapher::Analyser::Analyser ( float  sample_rate,
unsigned int  channels,
samplecnt_t  bufsize,
samplecnt_t  n_samples,
size_t  width = 800,
size_t  bins = 200 
)

◆ ~Analyser()

AudioGrapher::Analyser::~Analyser ( )

Member Function Documentation

◆ fft_power_at_bin()

float AudioGrapher::Analyser::fft_power_at_bin ( const uint32_t  b,
const float  norm 
) const
private

◆ process()

void AudioGrapher::Analyser::process ( ProcessContext< float > const &  context)
virtual

Process given data. The data can not be modified, so in-place processing is not allowed. At least this function must be implemented by deriving classes

Reimplemented from AudioGrapher::LoudnessReader.

◆ result()

ARDOUR::ExportAnalysisPtr AudioGrapher::Analyser::result ( bool  ptr = false)

◆ set_duration()

void AudioGrapher::Analyser::set_duration ( samplecnt_t  n_samples)

◆ set_normalization_gain()

void AudioGrapher::Analyser::set_normalization_gain ( float  gain)
inline

Definition at line 39 of file audiographer/audiographer/general/analyser.h.

Member Data Documentation

◆ _fft_data_in

float* AudioGrapher::Analyser::_fft_data_in
private

Definition at line 62 of file audiographer/audiographer/general/analyser.h.

◆ _fft_data_out

float* AudioGrapher::Analyser::_fft_data_out
private

Definition at line 63 of file audiographer/audiographer/general/analyser.h.

◆ _fft_data_size

uint32_t AudioGrapher::Analyser::_fft_data_size
private

Definition at line 60 of file audiographer/audiographer/general/analyser.h.

◆ _fft_freq_per_bin

double AudioGrapher::Analyser::_fft_freq_per_bin
private

Definition at line 61 of file audiographer/audiographer/general/analyser.h.

◆ _fft_plan

fftwf_plan AudioGrapher::Analyser::_fft_plan
private

Definition at line 65 of file audiographer/audiographer/general/analyser.h.

◆ _fft_power

float* AudioGrapher::Analyser::_fft_power
private

Definition at line 64 of file audiographer/audiographer/general/analyser.h.

◆ _fpp

samplecnt_t AudioGrapher::Analyser::_fpp
private

Definition at line 57 of file audiographer/audiographer/general/analyser.h.

◆ _hann_window

float* AudioGrapher::Analyser::_hann_window
private

Definition at line 59 of file audiographer/audiographer/general/analyser.h.

◆ _n_samples

samplecnt_t AudioGrapher::Analyser::_n_samples
private

Definition at line 54 of file audiographer/audiographer/general/analyser.h.

◆ _pos

samplecnt_t AudioGrapher::Analyser::_pos
private

Definition at line 55 of file audiographer/audiographer/general/analyser.h.

◆ _result

ARDOUR::ExportAnalysis& AudioGrapher::Analyser::_result
private

Definition at line 52 of file audiographer/audiographer/general/analyser.h.

◆ _rp

ARDOUR::ExportAnalysisPtr AudioGrapher::Analyser::_rp
private

Definition at line 51 of file audiographer/audiographer/general/analyser.h.

◆ _spp

samplecnt_t AudioGrapher::Analyser::_spp
private

Definition at line 56 of file audiographer/audiographer/general/analyser.h.

◆ fft_range_db

const float AudioGrapher::Analyser::fft_range_db
static

Definition at line 44 of file audiographer/audiographer/general/analyser.h.


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