After many software projects in our Data Visualization class (we scraped Twitter for DHS keywords, blended Toy Story, and mapped filming locations with Three.js), we decided to try something with hardware.
We used a Raspberry Pi to play music and to control LEDs set in goggles in time with the music. The goggles were sandblasted so that the wearer would be immersed/isolated within the music and lights.
For making the goggles, we started with chemistry/lab goggles and a breadboard on top, then eventually moved on to welder’s goggles which were easier to mount LEDS in.
After lots of wiring, soldering, and writing python to run on the pi, the goggles were done! It’s definitely not the prettiest headgear, but it worked on the first try incredibly.
After building the goggles was complete, we did a lot of code-tweaking to match the music better and to be more visually pleasing. The below video shows one of our early efforts, when it was still a bit seizure-ific:
We made it less flashy by lowering our beat detection threshold (so the color would change less often) and by keeping the LEDs on between beats. Unfortunately, we didn’t get a more up-to-date video or one with synced audio. Check below for the code and specific tools/libraries that we used.
- Source: https://gist.github.com/grschafer/01a3c2db59a3f4f2d7eb
- Python with pygame for audio playback
- Aubio for pitch and onset/beat detection in music
- smithje/RGB_LED_Driver for LED control on a Raspberry Pi
- Raspberry Pi