Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StepLFO Class Reference

Step sequencer-style LFO with programmable values per step. More...

#include <gin_steplfo.h>

Public Member Functions

 StepLFO ()=default
 
void setSampleRate (double sr)
 
void setFreq (float f)
 
void setNumPoints (int n)
 
void setPoint (int n, float v)
 
void reset ()
 
void noteOn (float phase_=-1.0f)
 
float process (int numSamples)
 
float getOutput ()
 
float getCurrentPhase ()
 

Detailed Description

Step sequencer-style LFO with programmable values per step.

StepLFO provides a stepped low-frequency oscillator where each step can have an independently programmed value. Unlike smooth LFOs, this creates stepped/ quantized modulation patterns useful for rhythmic effects and sequenced modulation.

Key Features:

Usage:

stepLFO.setSampleRate(44100.0);
stepLFO.setNumPoints(8); // 8-step sequence
stepLFO.setFreq(2.0f); // 2 Hz (complete cycle every 0.5 seconds)
// Program step values
stepLFO.setPoint(0, 1.0f); // Step 1: max
stepLFO.setPoint(1, 0.5f); // Step 2: half
stepLFO.setPoint(2, 0.0f); // Step 3: center
stepLFO.setPoint(3, -0.5f); // Step 4: negative
stepLFO.setPoint(4, -1.0f); // Step 5: min
stepLFO.setPoint(5, -0.5f);
stepLFO.setPoint(6, 0.0f);
stepLFO.setPoint(7, 0.5f);
stepLFO.noteOn(); // Reset to beginning
// In audio callback
float modValue = stepLFO.process(numSamples);
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
Step sequencer-style LFO with programmable values per step.
Definition gin_steplfo.h:57
See also
MSEG, LFO

Constructor & Destructor Documentation

◆ StepLFO()

StepLFO::StepLFO ( )
default

Member Function Documentation

◆ setSampleRate()

void StepLFO::setSampleRate ( double  sr)

◆ setFreq()

void StepLFO::setFreq ( float  f)

◆ setNumPoints()

void StepLFO::setNumPoints ( int  n)

◆ setPoint()

void StepLFO::setPoint ( int  n,
float  v 
)

◆ reset()

void StepLFO::reset ( )

◆ noteOn()

void StepLFO::noteOn ( float  phase_ = -1.0f)

◆ process()

float StepLFO::process ( int  numSamples)

◆ getOutput()

float StepLFO::getOutput ( )

◆ getCurrentPhase()

float StepLFO::getCurrentPhase ( )

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