LMMS
Loading...
Searching...
No Matches
dsp::vumeter Struct Reference

Peak meter class. More...

#include <vumeter.h>

Public Member Functions

 vumeter ()
void reset ()
void set_falloff (double time_20dB, double sample_rate)
void set_reverse (bool rev)
void copy_falloff (const vumeter &src)
 Copy falloff from another object.
void update (const float *src, unsigned int len)
 Update peak meter based on input signal.
void update_stereo (const float *src1, const float *src2, unsigned int len)
 Update peak meter based on louder of two input signals.
void run_sample_loop (const float *src, unsigned int len)
void process (const float value)
void fall (unsigned int len)
void update_zeros (unsigned int len)
 Update clip meter as if update was called with all-zero input signal.

Public Attributes

float level
 Measured signal level.
float falloff
 Falloff of signal level (b1 coefficient of a 1-pole filter).
float clip
 Clip indicator (set to 1 when |value| >= 1, fading otherwise).
float clip_falloff
 Falloff of clip indicator (b1 coefficient of a 1-pole filter); set to 1 if no falloff is required (manual reset of clip indicator).
int count_over
 Amount of samples > 1.f; Clipping occurs if 3 samples are over 0dB.
bool reverse
 reverse VU meter

Detailed Description

Peak meter class.

Constructor & Destructor Documentation

◆ vumeter()

dsp::vumeter::vumeter ( )
inline

Member Function Documentation

◆ copy_falloff()

void dsp::vumeter::copy_falloff ( const vumeter & src)
inline

Copy falloff from another object.

◆ fall()

void dsp::vumeter::fall ( unsigned int len)
inline

◆ process()

void dsp::vumeter::process ( const float value)
inline

◆ reset()

void dsp::vumeter::reset ( )
inline

◆ run_sample_loop()

void dsp::vumeter::run_sample_loop ( const float * src,
unsigned int len )
inline

◆ set_falloff()

void dsp::vumeter::set_falloff ( double time_20dB,
double sample_rate )
inline

Set falloff so that the meter falls 20dB in time_20dB seconds, assuming sample rate of sample_rate

  • time_20dB time for the meter to move by 20dB (default 300ms if <= 0)

◆ set_reverse()

void dsp::vumeter::set_reverse ( bool rev)
inline

◆ update()

void dsp::vumeter::update ( const float * src,
unsigned int len )
inline

Update peak meter based on input signal.

◆ update_stereo()

void dsp::vumeter::update_stereo ( const float * src1,
const float * src2,
unsigned int len )
inline

Update peak meter based on louder of two input signals.

◆ update_zeros()

void dsp::vumeter::update_zeros ( unsigned int len)
inline

Update clip meter as if update was called with all-zero input signal.

Member Data Documentation

◆ clip

float dsp::vumeter::clip

Clip indicator (set to 1 when |value| >= 1, fading otherwise).

◆ clip_falloff

float dsp::vumeter::clip_falloff

Falloff of clip indicator (b1 coefficient of a 1-pole filter); set to 1 if no falloff is required (manual reset of clip indicator).

◆ count_over

int dsp::vumeter::count_over

Amount of samples > 1.f; Clipping occurs if 3 samples are over 0dB.

◆ falloff

float dsp::vumeter::falloff

Falloff of signal level (b1 coefficient of a 1-pole filter).

◆ level

float dsp::vumeter::level

Measured signal level.

◆ reverse

bool dsp::vumeter::reverse

reverse VU meter


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