18#ifndef FASTLED_FX_ENGINE_MAX_FX
19#define FASTLED_FX_ENGINE_MAX_FX 64
fl::UISlider scale("Scale", 4,.1, 4,.1)
FxPtr getFx(int index) FL_NO_EXCEPT
Retrieves an effect from the engine without removing it.
FxPtr removeFx(int index) FL_NO_EXCEPT
Requests removal of an effect from the engine, which might not happen immediately (for example the Fx...
fl::vector< AudioFrame > mAudioBack
void setAudio(fl::shared_ptr< fl::audio::Processor > proc) FL_NO_EXCEPT
Connects an audio processor for automatic audio delivery.
int addFx(FxPtr effect) FL_NO_EXCEPT
Adds a new effect to the engine.
bool nextFx(u16 transition_ms=500) FL_NO_EXCEPT
Transitions to the next effect in the sequence.
bool mDurationSet
Flag indicating if a new transition has been set.
bool setNextFx(int index, u16 duration) FL_NO_EXCEPT
Sets the next effect to transition to.
void pushAudioFrame(const AudioFrame &frame) FL_NO_EXCEPT
Pushes an audio frame into the back buffer.
FxCompositor mCompositor
Handles effect transitions and rendering.
int getCurrentFxId() const FL_NO_EXCEPT
int mCurrId
Id of the current effect.
fl::vector< AudioFrame > mAudioFront
fl::shared_ptr< fl::audio::Processor > mAudioProcessor
u16 mDuration
Duration of the current transition.
void setSpeed(float scale) FL_NO_EXCEPT
Sets the speed of the fx engine, which will impact the speed of all effects.
IntFxMap mEffects
Collection of effects.
fl::flat_map< int, FxPtr > IntFxMap
bool draw(fl::u32 now, fl::span< CRGB > outputBuffer) FL_NO_EXCEPT
Renders the current effect or transition to the output buffer.
int addFx(Fx &effect) FL_NO_EXCEPT
Adds a new effect to the engine.
FxEngine(u16 numLeds, bool interpolate=true) FL_NO_EXCEPT
Constructs an FxEngine with the specified number of LEDs.
IntFxMap & _getEffects() FL_NO_EXCEPT
float getSpeed() const FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
shared_ptr< T > make_shared_no_tracking(T &obj) FL_NO_EXCEPT
Base definition for an LED controller.
Lightweight snapshot of pre-computed audio analysis for one audio sample.