How to detect beats of a sound. you probably think about a microphone, fourier transform, peak detection, But after real case testing. a v easy sound detector sensor can do the job, because we can just use the volume. I used the sound detector sensor as below. if using the digital output of the sensor. I can only get binary, it will not give a good music visualizer to me, but when I use the analog output of it, it gave me the scale of volume by voltage. this is what my music visualizer is based on. so when I move this project to raspberry pi. I need a ADS1015 to do the job.
The prototype is made with a v budget version of
+ an unofficial Neopixel LED Ring (made trouble to pi)
+ a NODEMCU
+ a digital sound detector (not even a microphone)
(I don't know how to draw the connection, man. here is the photo. sorry for that, I will make it formal asap.)
To join the competition of Visualize it with PI
I modified to
+ raspberry PI Zero
+ same sound detector
+ ADS1015
+ NeoPixel Ring
(Unfortanately, since the NeoPixel Ring I used is too bad quality, it doesn't work properly with the standard LED library rpi_ws281x. )
the hardware in the prototype is not integrated to the lemonade itself. but a LED ring place under the glass bottle. (pretty lame, right? I know. can be anything, but lemonade is ideal diffusion.)
Future Plan,
I need an good quality Neo Ring to make the library works on Pi.
and also if I don't play electronic music which counts lots on rhythm but play some pop music with vocal. you will see the bottle keeps blinking. v not cool, so I want a hardware knob to control the sensitivity, it is necessary if I wanna make the bottle universal fitting, from free jazz to heavy metal.
second thought is replacing the sound detector with a real microphone. then i can have more room on the processing,
third thought is if I can get better LED equipment, I wanna make the visual more playful and dynamic. like particle chasing game or physics bouncing effect but on LED. (so much on my mind, too less got done.)
I also need a clever design, will be good if anyone can give me an direction how to really design a stand-alone bottle music visualizer. where I can not only hide all the component cleverly but also can drink the blinky drink,
So if anyone is interested, yoooooo, of course we can work on it further together.
I have done similar project using the Adafruit circuit playground express. It has 10 neopixels on the board and a microphone, light sensor etc.
Using Makecode, I have got it responding to sound quiet smoothly.