Saxophone changes color on every note using Python, Raspberry Pi and NeoPixels
This saxophone accessory sits inside the instrument’s bell and lights up in different colors based on the note being played.
PyAudio interfaces with the microphone and captures audio emitted by the saxophone, then aubio derives separate tones from the recording. After that, NumPy converts this output into MIDI tones and a particular colour is assigned to each tone across the range of MIDI tones recorded. The colours are assigned sequentially based on an RGB colour wheel.
Everything is coded in Python and the LEDs even respond to the saxophone’s volume, shining brighter as the instrument gets louder, fading as a note trails off, and appearing again when the next note is played.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey