FastLED 3.9.15
Loading...
Searching...
No Matches
audio_reactive.h
Go to the documentation of this file.
1// audio_reactive.h - Wire AudioProcessor / VibeDetector to FxEngine speed
2#pragma once
3
4#include "FastLED.h"
6#include "fl/fx/fx_engine.h"
7#include "fl/ui/ui.h"
8
11 bool autoPump = false;
12 uint32_t sampleCount = 0;
13
14 // Create the AudioProcessor, routing through FastLED.add() when possible.
15 void begin(fl::UIAudio &audio);
16
17 // Connect vibe levels to FxEngine speed. Call once after begin().
19 fl::UISlider &speedMultiplier,
21
22 // Pump audio manually when auto-pump is unavailable.
23 void pump(fl::UIAudio &audio, fl::UICheckbox &enableVibe);
24};
fl::UIAudio audio("Audio Input")
fl::FxEngine fxEngine(NUM_LEDS)
fl::UISlider timeSpeed("Time Speed", 1, -10, 10,.1)
Manages and renders multiple visual effects (Fx) for LED strips.
Definition fx_engine.h:33
void pump(fl::UIAudio &audio, fl::UICheckbox &enableVibe)
void begin(fl::UIAudio &audio)
uint32_t sampleCount
void connectToEngine(fl::FxEngine &fxEngine, fl::UICheckbox &enableVibe, fl::UISlider &speedMultiplier, fl::UISlider &baseSpeed, fl::UISlider &timeSpeed)
fl::shared_ptr< fl::audio::Processor > processor
Aggregator header for the fl/ui/ family of per-element UI types.