32 vid_fx->setFade(0, 0);
72 bool ok =
mEffects.get(index, &removedFx);
void setAudio(fl::shared_ptr< fl::audio::Processor > proc)
Connects an audio processor for automatic audio delivery.
fl::vector< AudioFrame > mAudioBack
bool nextFx(u16 transition_ms=500)
Transitions to the next effect in the sequence.
int addFx(FxPtr effect)
Adds a new effect to the engine.
FxEngine(u16 numLeds, bool interpolate=true)
Constructs an FxEngine with the specified number of LEDs.
bool mDurationSet
Flag indicating if a new transition has been set.
FxCompositor mCompositor
Handles effect transitions and rendering.
int mCurrId
Id of the current effect.
fl::vector< AudioFrame > mAudioFront
fl::shared_ptr< fl::audio::Processor > mAudioProcessor
~FxEngine() FL_NOEXCEPT
Destructor for FxEngine.
u16 mDuration
Duration of the current transition.
bool setNextFx(int index, u16 duration)
Sets the next effect to transition to.
IntFxMap mEffects
Collection of effects.
bool draw(fl::u32 now, fl::span< CRGB > outputBuffer)
Renders the current effect or transition to the output buffer.
void pushAudioFrame(const AudioFrame &frame)
Pushes an audio frame into the back buffer.
FxPtr removeFx(int index)
Requests removal of an effect from the engine, which might not happen immediately (for example the Fx...
FxPtr getFx(int index)
Retrieves an effect from the engine without removing it.
static Scheduler & instance()
#define FASTLED_FX_ENGINE_MAX_FX
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Base definition for an LED controller.
fl::u32 timestamp
When this audio sample was captured (ms)
float volume
Overall volume (0.0-1.0, normalized RMS)
float mid
Mid energy (0.0-1.0, normalized)
float bass
Bass energy (0.0-1.0, normalized)
bool beat
True if a beat was detected this sample.
float treble
Treble energy (0.0-1.0, normalized)
Lightweight snapshot of pre-computed audio analysis for one audio sample.
Task scheduler — manages timer and frame-based tasks.