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:
- Real-time waveform display for all LFO wave shapes
- Animated phase indicators (dots) showing current position
- Supports multiple simultaneous phase indicators (for voices)
- Depth and offset visualization
- Optional unclamped mode for values outside -1 to +1
- Automatic waveform regeneration on parameter changes
The component works with LFO parameters including wave shape, sync mode, rate, beat division, depth, offset, phase, and enable state.
Usage:
lfoViz.
setParams(waveParam, syncParam, rateParam, beatParam,
depthParam, offsetParam, phaseParam, enableParam);
lfoViz.setBounds(0, 0, 200, 100);
std::vector<float> phases;
for (auto* voice : activeVoices)
phases.push_back(voice->getLFOPhase());
return phases;
};
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)
std::function< std::vector< float >()> phaseCallback
Definition gin_lfocomponent.h:57
- See also
- Parameter, MultiParamComponent, LFO, StepLFO