Ardour  9.0-pre0-1051-g8dd89616e1
ARDOUR::DSP::PerceptualAnalyzer Class Reference

#include <dsp_filter.h>

Inheritance diagram for ARDOUR::DSP::PerceptualAnalyzer:
[legend]

Classes

class  Trace
 

Public Types

enum  ProcessMode { MM_NONE , MM_PEAK , MM_AVER }
 
enum  Speed {
  Rapid , Fast , Moderate , Slow ,
  Noise
}
 
enum  Warp { Bark , Medium , High }
 

Public Member Functions

 PerceptualAnalyzer (double rate, int ipsize=4096)
 
 ~PerceptualAnalyzer ()
 
 PerceptualAnalyzer (PerceptualAnalyzer const &)=delete
 
void set_wfact (float wfact)
 
void set_speed (float speed)
 
void set_wfact (enum Warp)
 
void set_speed (enum Speed)
 
void reset ()
 
int fftlen () const
 
float * ipdata () const
 
Tracepower () const
 
Tracepeakp () const
 
float pmax () const
 
void process (int iplen, ProcessMode mode=MM_NONE)
 
float freq_at_bin (const uint32_t bin) const
 
float power_at_bin (const uint32_t bin, const float gain=1.f, bool pink=false) const
 
- Public Member Functions inherited from ARDOUR::DSP::SpectrumAnalyzer
virtual ~SpectrumAnalyzer ()
 

Static Public Member Functions

static double warp_freq (double w, double f)
 

Private Member Functions

void init ()
 
float conv0 (fftwf_complex *)
 
float conv1 (fftwf_complex *)
 

Private Attributes

int _ipsize
 
int _icount
 
fftwf_plan _fftplan
 
float * _ipdata
 
float * _warped
 
fftwf_complex * _trdata
 
Trace_power
 
Trace_peakp
 
float _fsamp
 
float _wfact
 
float _speed
 
float _pmax
 
float _fscale [513]
 
float _bwcorr [513]
 

Static Private Attributes

static const int _fftlen = 512
 

Detailed Description

Definition at line 340 of file dsp_filter.h.

Member Enumeration Documentation

◆ ProcessMode

Enumerator
MM_NONE 
MM_PEAK 
MM_AVER 

Definition at line 356 of file dsp_filter.h.

◆ Speed

Enumerator
Rapid 
Fast 
Moderate 
Slow 
Noise 

Definition at line 362 of file dsp_filter.h.

◆ Warp

Enumerator
Bark 
Medium 
High 

Definition at line 370 of file dsp_filter.h.

Constructor & Destructor Documentation

◆ PerceptualAnalyzer() [1/2]

ARDOUR::DSP::PerceptualAnalyzer::PerceptualAnalyzer ( double  rate,
int  ipsize = 4096 
)

◆ ~PerceptualAnalyzer()

ARDOUR::DSP::PerceptualAnalyzer::~PerceptualAnalyzer ( )

◆ PerceptualAnalyzer() [2/2]

ARDOUR::DSP::PerceptualAnalyzer::PerceptualAnalyzer ( PerceptualAnalyzer const &  )
delete

Member Function Documentation

◆ conv0()

float ARDOUR::DSP::PerceptualAnalyzer::conv0 ( fftwf_complex *  )
private

◆ conv1()

float ARDOUR::DSP::PerceptualAnalyzer::conv1 ( fftwf_complex *  )
private

◆ fftlen()

int ARDOUR::DSP::PerceptualAnalyzer::fftlen ( ) const
inline

Definition at line 384 of file dsp_filter.h.

◆ freq_at_bin()

float ARDOUR::DSP::PerceptualAnalyzer::freq_at_bin ( const uint32_t  bin) const
virtual

◆ init()

void ARDOUR::DSP::PerceptualAnalyzer::init ( )
private

◆ ipdata()

float* ARDOUR::DSP::PerceptualAnalyzer::ipdata ( ) const
inline

Definition at line 385 of file dsp_filter.h.

◆ peakp()

Trace* ARDOUR::DSP::PerceptualAnalyzer::peakp ( ) const
inline

Definition at line 387 of file dsp_filter.h.

◆ pmax()

float ARDOUR::DSP::PerceptualAnalyzer::pmax ( ) const
inline

Definition at line 388 of file dsp_filter.h.

◆ power()

Trace* ARDOUR::DSP::PerceptualAnalyzer::power ( ) const
inline

Definition at line 386 of file dsp_filter.h.

◆ power_at_bin()

float ARDOUR::DSP::PerceptualAnalyzer::power_at_bin ( const uint32_t  bin,
const float  gain = 1.f,
bool  pink = false 
) const
virtual

◆ process()

void ARDOUR::DSP::PerceptualAnalyzer::process ( int  iplen,
ProcessMode  mode = MM_NONE 
)

process current data in buffer

◆ reset()

void ARDOUR::DSP::PerceptualAnalyzer::reset ( )

◆ set_speed() [1/2]

void ARDOUR::DSP::PerceptualAnalyzer::set_speed ( enum  Speed)

◆ set_speed() [2/2]

void ARDOUR::DSP::PerceptualAnalyzer::set_speed ( float  speed)

◆ set_wfact() [1/2]

void ARDOUR::DSP::PerceptualAnalyzer::set_wfact ( enum  Warp)

◆ set_wfact() [2/2]

void ARDOUR::DSP::PerceptualAnalyzer::set_wfact ( float  wfact)

◆ warp_freq()

static double ARDOUR::DSP::PerceptualAnalyzer::warp_freq ( double  w,
double  f 
)
static

Member Data Documentation

◆ _bwcorr

float ARDOUR::DSP::PerceptualAnalyzer::_bwcorr[513]
private

Definition at line 418 of file dsp_filter.h.

◆ _fftlen

const int ARDOUR::DSP::PerceptualAnalyzer::_fftlen = 512
staticprivate

Definition at line 399 of file dsp_filter.h.

◆ _fftplan

fftwf_plan ARDOUR::DSP::PerceptualAnalyzer::_fftplan
private

Definition at line 407 of file dsp_filter.h.

◆ _fsamp

float ARDOUR::DSP::PerceptualAnalyzer::_fsamp
private

Definition at line 413 of file dsp_filter.h.

◆ _fscale

float ARDOUR::DSP::PerceptualAnalyzer::_fscale[513]
private

Definition at line 417 of file dsp_filter.h.

◆ _icount

int ARDOUR::DSP::PerceptualAnalyzer::_icount
private

Definition at line 406 of file dsp_filter.h.

◆ _ipdata

float* ARDOUR::DSP::PerceptualAnalyzer::_ipdata
private

Definition at line 408 of file dsp_filter.h.

◆ _ipsize

int ARDOUR::DSP::PerceptualAnalyzer::_ipsize
private

Definition at line 405 of file dsp_filter.h.

◆ _peakp

Trace* ARDOUR::DSP::PerceptualAnalyzer::_peakp
private

Definition at line 412 of file dsp_filter.h.

◆ _pmax

float ARDOUR::DSP::PerceptualAnalyzer::_pmax
private

Definition at line 416 of file dsp_filter.h.

◆ _power

Trace* ARDOUR::DSP::PerceptualAnalyzer::_power
private

Definition at line 411 of file dsp_filter.h.

◆ _speed

float ARDOUR::DSP::PerceptualAnalyzer::_speed
private

Definition at line 415 of file dsp_filter.h.

◆ _trdata

fftwf_complex* ARDOUR::DSP::PerceptualAnalyzer::_trdata
private

Definition at line 410 of file dsp_filter.h.

◆ _warped

float* ARDOUR::DSP::PerceptualAnalyzer::_warped
private

Definition at line 409 of file dsp_filter.h.

◆ _wfact

float ARDOUR::DSP::PerceptualAnalyzer::_wfact
private

Definition at line 414 of file dsp_filter.h.


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