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

#include <osc.h>

Inheritance diagram for dsp::triangle_lfo:
dsp::simple_oscillator

Public Member Functions

 triangle_lfo ()
void reset ()
float get ()
Public Member Functions inherited from dsp::simple_oscillator
void reset ()
 Reset oscillator phase to zero.
void set_freq (float freq, float sr)
 Set phase delta based on oscillator frequency and sample rate.
void set_freq_odsr (float freq, double odsr)
 Set phase delta based on oscillator frequency and inverse of sample rate.
void step ()
 Make one phase increment.
float get ()
 Make one phase increment and return a value from -0.5 to 0.5.

Public Attributes

float last
 Previous value (not stored here, but may be used by calling code).
Public Attributes inherited from dsp::simple_oscillator
uint32_t phase
 Phase (from 0 to 0xFFFFFFFF).
uint32_t phasedelta
 Per-sample phase delta (phase increment), equal to 2^32*freq/sr.

Detailed Description

Simple triangle LFO without any smoothing or anything of this sort.

Constructor & Destructor Documentation

◆ triangle_lfo()

dsp::triangle_lfo::triangle_lfo ( )
inline

Member Function Documentation

◆ get()

float dsp::triangle_lfo::get ( )
inline

◆ reset()

void dsp::triangle_lfo::reset ( )
inline

Member Data Documentation

◆ last

float dsp::triangle_lfo::last

Previous value (not stored here, but may be used by calling code).


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