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

Visual display of LFO waveform with animated phase indicators. More...

#include <gin_lfocomponent.h>

Inheritance diagram for LFOComponent:

Public Member Functions

 LFOComponent ()
 
 ~LFOComponent () override=default
 
void setUnclamped (bool b)
 
void setParams (Parameter::Ptr wave, Parameter::Ptr sync, Parameter::Ptr rate, Parameter::Ptr beat, Parameter::Ptr depth, Parameter::Ptr offset, Parameter::Ptr phase, Parameter::Ptr enable)
 
- Public Member Functions inherited from MultiParamComponent
 MultiParamComponent ()
 
 ~MultiParamComponent () override
 
juce::Colour dimIfNeeded (const juce::Colour &c)
 
- Public Member Functions inherited from Parameter::ParameterListener
virtual ~ParameterListener ()
 

Public Attributes

std::function< std::vector< float >()> phaseCallback
 

Additional Inherited Members

- Protected Member Functions inherited from MultiParamComponent
void showBubble (const juce::String &text, const juce::Rectangle< int > &rc)
 
void hideBubble ()
 
void watchParam (Parameter *p)
 
void unwatchParam (Parameter *p)
 
void unwatchParams ()
 
void enablementChanged () override
 
void valueUpdated (Parameter *) override
 
void handleAsyncUpdate () override
 
- Protected Attributes inherited from MultiParamComponent
juce::Array< Parameter * > params
 
std::unique_ptr< juce::BubbleMessageComponent > bubble
 

Detailed Description

Visual display of LFO waveform with animated phase indicators.

LFOComponent provides a real-time visualization of an LFO's output waveform with animated dots showing the current phase position. It displays the waveform shape based on all LFO parameters and updates in real-time.

Key Features:

The component works with LFO parameters including wave shape, sync mode, rate, beat division, depth, offset, phase, and enable state.

Usage:

lfoViz.setBounds(0, 0, 200, 100);
// Optional: Show current LFO phases for multiple voices
lfoViz.phaseCallback = [this]() {
std::vector<float> phases;
for (auto* voice : activeVoices)
return phases;
};
Visual display of LFO waveform with animated phase indicators.
Definition gin_lfocomponent.h:46
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
See also
Parameter, MultiParamComponent, LFO, StepLFO

Constructor & Destructor Documentation

◆ LFOComponent()

LFOComponent::LFOComponent ( )

◆ ~LFOComponent()

LFOComponent::~LFOComponent ( )
overridedefault

Member Function Documentation

◆ setUnclamped()

void LFOComponent::setUnclamped ( bool  b)

◆ setParams()

void LFOComponent::setParams ( Parameter::Ptr  wave,
Parameter::Ptr  sync,
Parameter::Ptr  rate,
Parameter::Ptr  beat,
Parameter::Ptr  depth,
Parameter::Ptr  offset,
Parameter::Ptr  phase,
Parameter::Ptr  enable 
)

Member Data Documentation

◆ phaseCallback

std::function<std::vector<float>()> LFOComponent::phaseCallback

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