LMMS
Loading...
Searching...
No Matches
calf_plugins::analyzer Class Reference

#include <analyzer.h>

Inheritance diagram for calf_plugins::analyzer:
calf_plugins::frequency_response_line_graph calf_plugins::line_graph_iface

Public Member Functions

 analyzer ()
void process (float L, float R)
void set_sample_rate (uint32_t sr)
bool set_mode (int mode)
void invalidate ()
void set_params (float resolution, float offset, int accuracy, int hold, int smoothing, int mode, int scale, int post, int speed, int windowing, int view, int freeze)
 ~analyzer ()
bool do_fft (int subindex, int points) const
void draw (int subindex, float *data, int points, bool fftdone) const
bool get_graph (int subindex, int phase, float *data, int points, cairo_iface *context, int *mode) const
bool get_moving (int subindex, int &direction, float *data, int x, int y, int &offset, uint32_t &color) const
bool get_gridline (int subindex, int phase, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const
bool get_layers (int generation, unsigned int &layers) const
virtual bool get_graph (int index, int subindex, int phase, float *data, int points, cairo_iface *context, int *mode) const
virtual bool get_gridline (int index, int subindex, int phase, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const
virtual bool get_layers (int index, int generation, unsigned int &layers) const
Public Member Functions inherited from calf_plugins::frequency_response_line_graph
virtual float freq_gain (int index, double freq) const
virtual std::string get_crosshair_label (int x, int y, int sx, int sy, float q, int dB, int name, int note, int cents) const
Public Member Functions inherited from calf_plugins::line_graph_iface
virtual bool get_moving (int index, int subindex, int &direction, float *data, int x, int y, int &offset, uint32_t &color) const
virtual bool get_dot (int index, int subindex, int phase, float &x, float &y, int &size, cairo_iface *context) const
virtual ~line_graph_iface ()
 Standard destructor to make compiler happy.

Public Attributes

uint32_t srate
Public Attributes inherited from calf_plugins::frequency_response_line_graph
bool redraw_graph

Protected Attributes

int fft_buffer_size
float * fft_buffer
intspline_buffer
int fpos
bool sanitize
bool recreate_plan
dsp::fft< float, MAX_FFT_ORDERfft
dsp::fft< float, MAX_FFT_ORDER >::complex fft_temp [1<< MAX_FFT_ORDER]
float * fft_inL
float * fft_outL
float * fft_inR
float * fft_outR
float * fft_smoothL
float * fft_smoothR
float * fft_deltaL
float * fft_deltaR
float * fft_holdL
float * fft_holdR
float * fft_freezeL
float * fft_freezeR
int lintrans
int analyzer_phase_drawn

Static Protected Attributes

static const int MAX_FFT_ORDER = 15
static const int max_fft_cache_size = 32768
static const int max_fft_buffer_size = max_fft_cache_size * 2

Private Attributes

int _accuracy
int _acc
int _scale
int _post
int _hold
int _smooth
int _speed
int _windowing
int _view
int _freeze
int _mode
float _resolution
float _offset
bool _falling
int _draw_upper

Constructor & Destructor Documentation

◆ analyzer()

analyzer::analyzer ( )

◆ ~analyzer()

analyzer::~analyzer ( )

Member Function Documentation

◆ do_fft()

bool analyzer::do_fft ( int subindex,
int points ) const

◆ draw()

void analyzer::draw ( int subindex,
float * data,
int points,
bool fftdone ) const

◆ get_graph() [1/2]

bool frequency_response_line_graph::get_graph ( int index,
int subindex,
int phase,
float * data,
int points,
cairo_iface * context,
int * mode ) const
virtual

Obtain subindex'th graph of parameter 'index'

Parameters
indexparameter/graph number (usually tied to particular plugin control port)
subindexgraph number (there may be multiple overlaid graphs for one parameter, eg. for monosynth 2x12dB filters)
phase0 if in cache phase or 1 if in realtime phase
databuffer for normalized output values
pointsnumber of points to fill
contextcairo context to adjust (for multicolour graphs etc.)
Return values
truegraph data was returned; subindex+1 graph may or may not be available
falsegraph data was not returned; subindex+1 graph does not exist either

Reimplemented from calf_plugins::frequency_response_line_graph.

◆ get_graph() [2/2]

bool analyzer::get_graph ( int subindex,
int phase,
float * data,
int points,
cairo_iface * context,
int * mode ) const

◆ get_gridline() [1/2]

bool frequency_response_line_graph::get_gridline ( int index,
int subindex,
int phase,
float & pos,
bool & vertical,
std::string & legend,
cairo_iface * context ) const
virtual

Obtain subindex'th dot of parameter 'index'

Parameters
indexparameter/dot number (usually tied to particular plugin control port)
subindexdot number (there may be multiple dots graphs for one parameter)
phase0 if in cache phase or 1 if in realtime phase

Reimplemented from calf_plugins::frequency_response_line_graph.

◆ get_gridline() [2/2]

bool analyzer::get_gridline ( int subindex,
int phase,
float & pos,
bool & vertical,
std::string & legend,
cairo_iface * context ) const

◆ get_layers() [1/2]

bool analyzer::get_layers ( int generation,
unsigned int & layers ) const

◆ get_layers() [2/2]

bool frequency_response_line_graph::get_layers ( int index,
int generation,
unsigned int & layers ) const
virtual

Return which layers need to be redrawn in the next GTK drawing cycle

Parameters
indexParameter/graph identifier (usually tied to particular plugin control port)
generationThe overall amount of drawing cycles since the last full refresh of all surfaces
layersBitmask defining the layers to be redrawn (see layers_flags above)
Return values
truethere's at least one layer to be redrawn; false nothing to draw in this cycle

Reimplemented from calf_plugins::frequency_response_line_graph.

◆ get_moving()

bool analyzer::get_moving ( int subindex,
int & direction,
float * data,
int x,
int y,
int & offset,
uint32_t & color ) const

◆ invalidate()

void calf_plugins::analyzer::invalidate ( )

◆ process()

void analyzer::process ( float L,
float R )

◆ set_mode()

bool calf_plugins::analyzer::set_mode ( int mode)

◆ set_params()

void analyzer::set_params ( float resolution,
float offset,
int accuracy,
int hold,
int smoothing,
int mode,
int scale,
int post,
int speed,
int windowing,
int view,
int freeze )

◆ set_sample_rate()

void analyzer::set_sample_rate ( uint32_t sr)

Member Data Documentation

◆ _acc

int calf_plugins::analyzer::_acc
mutableprivate

◆ _accuracy

int calf_plugins::analyzer::_accuracy
mutableprivate

◆ _draw_upper

int calf_plugins::analyzer::_draw_upper
mutableprivate

◆ _falling

bool calf_plugins::analyzer::_falling
mutableprivate

◆ _freeze

int calf_plugins::analyzer::_freeze
mutableprivate

◆ _hold

int calf_plugins::analyzer::_hold
mutableprivate

◆ _mode

int calf_plugins::analyzer::_mode
mutableprivate

◆ _offset

float calf_plugins::analyzer::_offset
mutableprivate

◆ _post

int calf_plugins::analyzer::_post
mutableprivate

◆ _resolution

float calf_plugins::analyzer::_resolution
mutableprivate

◆ _scale

int calf_plugins::analyzer::_scale
mutableprivate

◆ _smooth

int calf_plugins::analyzer::_smooth
mutableprivate

◆ _speed

int calf_plugins::analyzer::_speed
mutableprivate

◆ _view

int calf_plugins::analyzer::_view
mutableprivate

◆ _windowing

int calf_plugins::analyzer::_windowing
mutableprivate

◆ analyzer_phase_drawn

int calf_plugins::analyzer::analyzer_phase_drawn
mutableprotected

◆ fft

dsp::fft<float, MAX_FFT_ORDER> calf_plugins::analyzer::fft
protected

◆ fft_buffer

float* calf_plugins::analyzer::fft_buffer
protected

◆ fft_buffer_size

int calf_plugins::analyzer::fft_buffer_size
protected

◆ fft_deltaL

float* calf_plugins::analyzer::fft_deltaL
protected

◆ fft_deltaR

float * calf_plugins::analyzer::fft_deltaR
protected

◆ fft_freezeL

float* calf_plugins::analyzer::fft_freezeL
protected

◆ fft_freezeR

float * calf_plugins::analyzer::fft_freezeR
protected

◆ fft_holdL

float* calf_plugins::analyzer::fft_holdL
protected

◆ fft_holdR

float * calf_plugins::analyzer::fft_holdR
protected

◆ fft_inL

float* calf_plugins::analyzer::fft_inL
protected

◆ fft_inR

float* calf_plugins::analyzer::fft_inR
protected

◆ fft_outL

float * calf_plugins::analyzer::fft_outL
protected

◆ fft_outR

float * calf_plugins::analyzer::fft_outR
protected

◆ fft_smoothL

float* calf_plugins::analyzer::fft_smoothL
protected

◆ fft_smoothR

float * calf_plugins::analyzer::fft_smoothR
protected

◆ fft_temp

dsp::fft<float,MAX_FFT_ORDER>::complex calf_plugins::analyzer::fft_temp[1<< MAX_FFT_ORDER]
mutableprotected

◆ fpos

int calf_plugins::analyzer::fpos
protected

◆ lintrans

int calf_plugins::analyzer::lintrans
mutableprotected

◆ max_fft_buffer_size

const int calf_plugins::analyzer::max_fft_buffer_size = max_fft_cache_size * 2
staticprotected

◆ max_fft_cache_size

const int calf_plugins::analyzer::max_fft_cache_size = 32768
staticprotected

◆ MAX_FFT_ORDER

const int calf_plugins::analyzer::MAX_FFT_ORDER = 15
staticprotected

◆ recreate_plan

bool calf_plugins::analyzer::recreate_plan
protected

◆ sanitize

bool calf_plugins::analyzer::sanitize
mutableprotected

◆ spline_buffer

int* calf_plugins::analyzer::spline_buffer
protected

◆ srate

uint32_t calf_plugins::analyzer::srate

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