LMMS
Loading...
Searching...
No Matches
Phaser Class Reference

#include <Phaser.h>

Inheritance diagram for Phaser:
Effect

Public Member Functions

 Phaser (const int &insertion_, float *efxoutl_, float *efxoutr_, unsigned int srate, int bufsize)
 ~Phaser ()
void out (const Stereo< float * > &input)
void setpreset (unsigned char npreset)
void changepar (int npar, unsigned char value)
unsigned char getpar (int npar) const
void cleanup ()
Public Member Functions inherited from Effect
 Effect (bool insertion_, float *efxoutl_, float *efxoutr_, FilterParams *filterpars_, unsigned char Ppreset_, unsigned int srate, int bufsize)
virtual ~Effect ()
void out (float *const smpsl, float *const smpsr)
virtual float getfreqresponse (float freq)

Private Member Functions

void setvolume (unsigned char Pvolume)
void setdepth (unsigned char Pdepth)
void setfb (unsigned char Pfb)
void setdistortion (unsigned char Pdistortion)
void setwidth (unsigned char Pwidth)
void setoffset (unsigned char Poffset)
void setstages (unsigned char Pstages)
void setphase (unsigned char Pphase)
void analog_setup ()
void AnalogPhase (const Stereo< float * > &input)
float applyPhase (float x, float g, float fb, float &hpf, float *yn1, float *xn1)
void normalPhase (const Stereo< float * > &input)
float applyPhase (float x, float g, float *old)

Private Attributes

EffectLFO lfo
unsigned char Pvolume
unsigned char Pdistortion
unsigned char Pdepth
unsigned char Pwidth
unsigned char Pfb
unsigned char Poffset
unsigned char Pstages
unsigned char Poutsub
unsigned char Pphase
unsigned char Phyper
unsigned char Panalog
bool barber
float distortion
float width
float offsetpct
float feedback
float depth
float phase
Stereo< float * > old
Stereo< float * > xn1
Stereo< float * > yn1
Stereo< float > diff
Stereo< float > oldgain
Stereo< float > fb
float invperiod
float offset [12]
float mis
float Rmin
float Rmax
float Rmx
float Rconst
float C
float CFs

Additional Inherited Members

Static Public Member Functions inherited from Effect
static void crossover (float &a, float &b, float crossover)
Public Attributes inherited from Effect
unsigned char Ppreset
float *const efxoutl
float *const efxoutr
float outvolume
float volume
FilterParamsfilterpars
Protected Member Functions inherited from Effect
void setpanning (char Ppanning_)
void setlrcross (char Plrcross_)
void alias ()
Protected Attributes inherited from Effect
const bool insertion
char Ppanning
float pangainL
float pangainR
char Plrcross
float lrcross
unsigned int samplerate
int buffersize
float samplerate_f
float halfsamplerate_f
float buffersize_f
int bufferbytes

Constructor & Destructor Documentation

◆ Phaser()

Phaser::Phaser ( const int & insertion_,
float * efxoutl_,
float * efxoutr_,
unsigned int srate,
int bufsize )

◆ ~Phaser()

Phaser::~Phaser ( )

Member Function Documentation

◆ analog_setup()

void Phaser::analog_setup ( )
private

◆ AnalogPhase()

void Phaser::AnalogPhase ( const Stereo< float * > & input)
private

◆ applyPhase() [1/2]

float Phaser::applyPhase ( float x,
float g,
float * old )
private

◆ applyPhase() [2/2]

float Phaser::applyPhase ( float x,
float g,
float fb,
float & hpf,
float * yn1,
float * xn1 )
private

◆ changepar()

void Phaser::changepar ( int npar,
unsigned char value )
virtual

Change parameter npar to value

Parameters
nparchosen parameter
valuechosen new value

Implements Effect.

◆ cleanup()

void Phaser::cleanup ( void )
virtual

Reset the state of the effect

Reimplemented from Effect.

◆ getpar()

unsigned char Phaser::getpar ( int npar) const
virtual

Get the value of parameter npar

Parameters
nparchosen parameter
Returns
the value of the parameter in an unsigned char or 0 if it does not exist

Implements Effect.

◆ normalPhase()

void Phaser::normalPhase ( const Stereo< float * > & input)
private

◆ out()

void Phaser::out ( const Stereo< float * > & input)
virtual

Implements Effect.

◆ setdepth()

void Phaser::setdepth ( unsigned char Pdepth)
private

◆ setdistortion()

void Phaser::setdistortion ( unsigned char Pdistortion)
private

◆ setfb()

void Phaser::setfb ( unsigned char Pfb)
private

◆ setoffset()

void Phaser::setoffset ( unsigned char Poffset)
private

◆ setphase()

void Phaser::setphase ( unsigned char Pphase)
private

◆ setpreset()

void Phaser::setpreset ( unsigned char npreset)
virtual

Choose a preset

Parameters
npresetnumber of chosen preset

Implements Effect.

◆ setstages()

void Phaser::setstages ( unsigned char Pstages)
private

◆ setvolume()

void Phaser::setvolume ( unsigned char Pvolume)
private

◆ setwidth()

void Phaser::setwidth ( unsigned char Pwidth)
private

Member Data Documentation

◆ barber

bool Phaser::barber
private

◆ C

float Phaser::C
private

◆ CFs

float Phaser::CFs
private

◆ depth

float Phaser::depth
private

◆ diff

Stereo<float> Phaser::diff
private

◆ distortion

float Phaser::distortion
private

◆ fb

Stereo<float> Phaser::fb
private

◆ feedback

float Phaser::feedback
private

◆ invperiod

float Phaser::invperiod
private

◆ lfo

EffectLFO Phaser::lfo
private

◆ mis

float Phaser::mis
private

◆ offset

float Phaser::offset[12]
private

◆ offsetpct

float Phaser::offsetpct
private

◆ old

Stereo<float *> Phaser::old
private

◆ oldgain

Stereo<float> Phaser::oldgain
private

◆ Panalog

unsigned char Phaser::Panalog
private

◆ Pdepth

unsigned char Phaser::Pdepth
private

◆ Pdistortion

unsigned char Phaser::Pdistortion
private

◆ Pfb

unsigned char Phaser::Pfb
private

◆ phase

float Phaser::phase
private

◆ Phyper

unsigned char Phaser::Phyper
private

◆ Poffset

unsigned char Phaser::Poffset
private

◆ Poutsub

unsigned char Phaser::Poutsub
private

◆ Pphase

unsigned char Phaser::Pphase
private

◆ Pstages

unsigned char Phaser::Pstages
private

◆ Pvolume

unsigned char Phaser::Pvolume
private

◆ Pwidth

unsigned char Phaser::Pwidth
private

◆ Rconst

float Phaser::Rconst
private

◆ Rmax

float Phaser::Rmax
private

◆ Rmin

float Phaser::Rmin
private

◆ Rmx

float Phaser::Rmx
private

◆ width

float Phaser::width
private

◆ xn1

Stereo<float *> Phaser::xn1
private

◆ yn1

Stereo<float *> Phaser::yn1
private

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