#include <FastLED.h>
#if defined(FL_IS_TEENSY)
#include <Audio.h>
#endif
#define NUM_LEDS 200
#define DATA_PIN 3
#define BRIGHTNESS 255
#define COLOR_ORDER RGB
#define I2S_WS 7
#define I2S_SD 8
#define I2S_CLK 4
float t = float(index) / float(
NUM_LEDS - 1);
pt_out.
x = 15.0f +
t * 80.0f;
float straight_y = 5.0f +
t * 90.0f;
pt_out.
y = straight_y - sag;
});
CRGBPalette16 bluePalette(
CRGB(0, 0, 40),
CRGB(0, 40, 120),
CRGB(100, 160, 255),
CRGB(255, 255, 255));
float bass = levels.
bass;
float intensity =
fl::clamp((bass - thresh) / thresh, 0.3f, 1.0f);
int count = 1 + int(intensity * 2.0f);
for (int i = 0; i < count; i++) {
}
}
float intensity =
fl::clamp((bass - thresh) / thresh, 0.4f, 1.0f);
}
});
audio->onDropImpact([&](
float impact) {
});
}
}
}
fl::UIAudio audio("Audio Input")
fl::FxEngine fxEngine(NUM_LEDS)
fl::UIAudio audio_ui("Audio Input")
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::UISlider speedSlider("Particle Speed", 2.6f, 0.1f, 3.0f, 0.1f)
fl::UICheckbox enableMeteors("Beat Meteors", true)
fl::UISlider ambientTrailSlider("Ambient Trail", 217.0f, 0.0f, 255.0f, 1.0f)
fl::UISlider minVelocitySlider("Min Velocity", 0.01f, 0.01f, 0.5f, 0.01f)
fl::audio::Config audioConfig
fl::UICheckbox enableAmbient("Ambient Particles", true)
fl::UISlider ambientDecaySlider("Ambient Fade", 0.955f, 0.90f, 1.0f, 0.005f)
fl::UICheckbox enableTimeWarp("Noise Time-Warp", false)
fl::UISlider debrisVelDecaySlider("Debris Drag", 0.95f, 0.85f, 1.0f, 0.01f)
float noiseTimeMultiplier
fl::UISlider dragSlider("Particle Drag", 0.06f, 0.0f, 1.0f, 0.01f)
fl::UISlider meteorTrailSlider("Meteor Trail", 171.0f, 0.0f, 255.0f, 1.0f)
fl::UISlider debrisDecaySlider("Debris Fade", 0.96f, 0.80f, 1.0f, 0.01f)
fl::UISlider meteorThreshold("Meteor Threshold", 1.5f, 1.5f, 6.0f, 0.1f)
fl::PerlinParticlePunch sailboatFx(NUM_LEDS)
fl::UISlider ambientThreshold("Ambient Threshold", 1.0f, 0.5f, 3.0f, 0.1f)
Runtime chipset timing configuration for clockless LED drivers.
Manages and renders multiple visual effects (Fx) for LED strips.
static Config CreateInmp441(int pin_ws, int pin_sd, int pin_clk, AudioChannel channel, u16 sample_rate=44100ul, int i2s_num=0) FL_NOEXCEPT
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
constexpr ChipsetTimingConfig makeTimingConfig() FL_NOEXCEPT
Convert compile-time CHIPSET type to runtime timing config.
enable_if< is_fixed_point< T >::value, T >::type sin(T angle) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT
Audio-reactive perlin noise background with ambient particles and beat meteor overlay.
Configuration for a single LED channel.
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Clockless chipset configuration (single data pin)
Aggregator header for the fl/ui/ family of per-element UI types.