A color organ was a staple of the music scene in the 1970s and is still in use today at concerts and select home theaters.
The principle is simple: flash colored lights in step with music or other sounds.
Color organs sample sound and flash lights based either the sound intensity or frequency. The higher end units use analog or digital signal analysis to determine the sound energy in selective parts of the frequency spectrum and flash the lights accordingly.
The Adafruit Ampli-Tie project, using FLORA, has two different algorithms to light a string of Neopixel LEDsaccording to sound intensity. We will reuse much of the first Ampli-Tie algorithm’s code. The more complex algorithm uses a good deal of floating point math, which is too large to fit on a Trinket or Gemma. The simpler algorithm fits with room to spare, using integer math. The code is slightly modified to give the effect one may want in a color organ. The user may alter this code to produce other effects for their own projects.