NanoLux (Device) 3.0
Codebase for the open-source AudioLux device.
|
Go to the source code of this file.
Classes | |
struct | Strip_Buffer |
Holds persistent data for currently-running patterns. More... | |
Functions | |
void | nextPattern () |
void | clearLEDSegment (Strip_Buffer *buf, int len) |
void | setColorHSV (CRGB *leds, byte h, byte s, byte v, int len) |
void | getFhue (uint8_t min_hue, uint8_t max_hue) |
void | getVbrightness () |
get vol brightness | |
void | blank (Strip_Buffer *buf, int len, Pattern_Data *params) |
void | confetti (Strip_Buffer *buf, int len, Pattern_Data *params) |
Confetti effect using frequency and brightness. Colored speckles that blink and fade smoothly are scattered across the strip. | |
void | pix_freq (Strip_Buffer *buf, int len, Pattern_Data *params) |
Based on a sufficient volume, a pixel will float to some position on the light strip and fall down (vol_show adds another threshold) | |
void | eq (Strip_Buffer *buf, int len, Pattern_Data *params) |
Short and sweet function. Each pixel corresponds to a value from vReal, where the volume at each pitch determines the brightness of each pixel. Hue is locked in to a rainbow. | |
void | tug_of_war (Strip_Buffer *buf, int len, Pattern_Data *params) |
Strip is split into two sides, red and blue showing push and pull motion based on either frequency or volume. | |
void | saturated (Strip_Buffer *buf, int len, Pattern_Data *params) |
Fills the light strip with a nice ambient mess of colors that shift slowly over time. This function is similar to grovvy noise except the scale and hue_shift values are quiote different. Hue Octave Config remaps the volume to the range of hues present on strip. Hue Shift Config remaps volume as octaves and hhue_shift parameters in fill_noise16() Noise Compression config rremaps volume as hue_x parameter. | |
void | random_raindrop (Strip_Buffer *buf, int len, Pattern_Data *params) |
A random spot is chosen along the length and does a ripple based on frequency. | |
void | hue_trail (Strip_Buffer *buf, int len, Pattern_Data *params) |
Outputs a steady moving stream of lights where each pixel correlates to a previous fHue value. Visually tracks pitch over time, with brightness determined by volume. blur configuration adds blur. | |
void | groovy (Strip_Buffer *buf, int len, Pattern_Data *params) |
A cool fluctuating pattern that changes color in waves of greens, yellows, purples and blue. This function is similar to saturated_noise but the values of scale and hue_shift are 100 and 5 respectively. This is a moving pattern but it does not change based on and volume or frequency changes. Uses fill_noise16() and blur. Hue Shift Change configuration remaps volume variable as hue_shift. | |
void | talking (Strip_Buffer *buf, int len, Pattern_Data *params) |
Generates three clusters of lights, one in the middle, and two symmetric ones that travel out from the center and return. The distance the two outer LEDS from the center is determined by the detected volume. Formant configuration takes the clusters to be red,green,blue. Moving configuration, the three clusters move up and down according to sine wave motion. | |
void | glitch (Strip_Buffer *buf, int len, Pattern_Data *params) |
Creates two light clusters that move according to sine wave motion, but their speed is affected by the volume. One pulls its color from fHue, and the other pulls its color from the formant values. Talk configuration combines glitch with talking_moving(). Sections configuration creates 4 seperate sine wave clusters. | |
void | bands (Strip_Buffer *buf, int len, Pattern_Data *params) |
Basic band config : Uses the band_split_bounce() function to generate a five band split, and maps that split to the light strip. The strip is broken into five chunks of different colors, where the volume of each band determines how much of each section of the LED strip is lit. Advanced bands config : he strip is broken into five chunks of different colors, where the volume of each band determines how much of each section is lit, and that portion will diminish over time if a certain volume threshold is not met Fomant bands config: emonstrates the formant feature of the audio analysis code. Each of the three formant values correspond to a third of the entire LED strip, where the individual formant values determine the hue of each third. | |
void | Fire2012 (Strip_Buffer *buf, int len, Pattern_Data *params) |
Fire2012 pattern utilizing heating and cooling. | |
void | bar_fill (Strip_Buffer *buf, int len, Pattern_Data *params) |
Displays a pattern that occupies "lower" pixels at lower values, and "higher" pixels at higher values. | |
void | vowels_raindrop (Strip_Buffer *buf, int len, Pattern_Data *params) |
Variables | |
Pattern_Data | params |
This file contains function headers for patterns.cpp along with the Strip_Buffer struct definition.
void bands | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Basic band config : Uses the band_split_bounce() function to generate a five band split, and maps that split to the light strip. The strip is broken into five chunks of different colors, where the volume of each band determines how much of each section of the LED strip is lit. Advanced bands config : he strip is broken into five chunks of different colors, where the volume of each band determines how much of each section is lit, and that portion will diminish over time if a certain volume threshold is not met Fomant bands config: emonstrates the formant feature of the audio analysis code. Each of the three formant values correspond to a third of the entire LED strip, where the individual formant values determine the hue of each third.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void bar_fill | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Displays a pattern that occupies "lower" pixels at lower values, and "higher" pixels at higher values.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void confetti | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Confetti effect using frequency and brightness. Colored speckles that blink and fade smoothly are scattered across the strip.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void eq | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Short and sweet function. Each pixel corresponds to a value from vReal, where the volume at each pitch determines the brightness of each pixel. Hue is locked in to a rainbow.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void Fire2012 | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Fire2012 pattern utilizing heating and cooling.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void glitch | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Creates two light clusters that move according to sine wave motion, but their speed is affected by the volume. One pulls its color from fHue, and the other pulls its color from the formant values. Talk configuration combines glitch with talking_moving(). Sections configuration creates 4 seperate sine wave clusters.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void groovy | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
A cool fluctuating pattern that changes color in waves of greens, yellows, purples and blue. This function is similar to saturated_noise but the values of scale and hue_shift are 100 and 5 respectively. This is a moving pattern but it does not change based on and volume or frequency changes. Uses fill_noise16() and blur. Hue Shift Change configuration remaps volume variable as hue_shift.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void hue_trail | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Outputs a steady moving stream of lights where each pixel correlates to a previous fHue value. Visually tracks pitch over time, with brightness determined by volume. blur configuration adds blur.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void pix_freq | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Based on a sufficient volume, a pixel will float to some position on the light strip and fall down (vol_show adds another threshold)
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void random_raindrop | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
A random spot is chosen along the length and does a ripple based on frequency.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void saturated | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Fills the light strip with a nice ambient mess of colors that shift slowly over time. This function is similar to grovvy noise except the scale and hue_shift values are quiote different. Hue Octave Config remaps the volume to the range of hues present on strip. Hue Shift Config remaps volume as octaves and hhue_shift parameters in fill_noise16() Noise Compression config rremaps volume as hue_x parameter.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void talking | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Generates three clusters of lights, one in the middle, and two symmetric ones that travel out from the center and return. The distance the two outer LEDS from the center is determined by the detected volume. Formant configuration takes the clusters to be red,green,blue. Moving configuration, the three clusters move up and down according to sine wave motion.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |
void tug_of_war | ( | Strip_Buffer * | buf, |
int | len, | ||
Pattern_Data * | params ) |
Strip is split into two sides, red and blue showing push and pull motion based on either frequency or volume.
buf | Pointer to the Strip_Buffer structure, holds LED buffer and history variables. |
len | The length of LEDs to process |
params | Pointer to Pattern_Data structure containing configuration options. |