FastLED 3.9.15
Loading...
Searching...
No Matches
advanced.h File Reference
#include <Arduino.h>
#include <FastLED.h>
#include "fl/ui.h"
#include "fl/audio.h"
#include "fl/fft.h"
#include "fl/xymap.h"
#include "fl/math.h"
#include "fl/math_macros.h"
#include "fl/compiler_control.h"
+ Include dependency graph for advanced.h:

Go to the source code of this file.

Macros

#define COLOR_ORDER   GRB
 
#define FFT_SIZE   512
 
#define HEIGHT   64
 
#define LED_PIN   3
 
#define LED_TYPE   WS2812B
 
#define NUM_LEDS   (WIDTH * HEIGHT)
 
#define SAMPLE_RATE   44100
 
#define WIDTH   64
 

Functions

UIAudio audio ("Audio Input")
 
UISlider audioGain ("Audio Gain", 1.0f, 0.1f, 5.0f, 0.1f)
 
UICheckbox autoGain ("Auto Gain", true)
 
UICheckbox beatDetect ("Beat Detection", true)
 
UICheckbox beatFlash ("Beat Flash", true)
 
UISlider beatSensitivity ("Beat Sensitivity", 1.5f, 0.5f, 3.0f, 0.1f)
 
UISlider brightness ("Brightness", 128, 0, 255, 1)
 
void clearDisplay ()
 
UIDropdown colorPalette ("Color Palette", {"Rainbow", "Heat", "Ocean", "Forest", "Party", "Lava", "Cloud"})
 
UIDescription description ("Real-time audio visualizations with beat detection and multiple modes")
 
bool detectBeat (float energy)
 
void drawFireEffect (float peak)
 
void drawMatrixRain (float peak)
 
void drawPlasmaWave (float peak)
 
void drawRadialSpectrum (FFTBins *fft, float)
 
void drawSpectrumBars (FFTBins *fft, float)
 
void drawVUMeter (float rms, float peak)
 
void drawWaveform (const Slice< const int16_t > &pcm, float)
 
UICheckbox enableAudio ("Enable Audio", true)
 
UISlider fadeSpeed ("Fade Speed", 20, 0, 255, 1)
 
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING (float-conversion) FL_DISABLE_WARNING(sign-conversion) FL_DISABLE_WARNING(implicit-float-conversion) FL_DISABLE_WARNING(implicit-int-float-conversion) using namespace fl
 
CRGBPalette16 getCurrentPalette ()
 
void loop ()
 
UICheckbox mirrorMode ("Mirror Mode", false)
 
UISlider noiseFloor ("Noise Floor", 0.1f, 0.0f, 1.0f, 0.01f)
 
void setup ()
 
SoundLevelMeter soundMeter (0.0, 0.0)
 
UITitle title ("Audio Reactive Visualizations")
 
void updateAutoGain (float level)
 
UIDropdown visualMode ("Visualization Mode", {"Spectrum Bars", "Radial Spectrum", "Waveform", "VU Meter", "Matrix Rain", "Fire Effect", "Plasma Wave"})
 
XYMap xyMap (WIDTH, HEIGHT, false)
 

Variables

float autoGainValue = 1.0f
 
float beatAverage = 0
 
float beatHistory [20] = {0}
 
int beatHistoryIndex = 0
 
float beatVariance = 0
 
float fftSmooth [NUM_BANDS] = {0}
 
uint8_t fireBuffer [WIDTH][HEIGHT] = {{0}}
 
uint8_t hue = 0
 
bool isBeat = false
 
uint32_t lastBeatTime = 0
 
CRGB leds [NUM_LEDS]
 
static const int NUM_BANDS = 16
 
float peakLevel = 0
 
float plasma [WIDTH][HEIGHT] = {{0}}