LEDs light up to the sound of music.

Hello,

I need help figuring out how to make LEDs light up to the sound of music but as standalone if possible. What I have so far is a Arduino Uno setup with 3 leds, jumper wires and resistors.

I was following a tutorial located here:

but getting to Step 3 number 9 they want me to use a mp3 file which is confusing (will it only play this song?) this part has got me sided tracked and confused wondering if this is the right tutorial to follow?

Im new to arduino and would like to have 3 LEDs light up to the sound of music (1 for bass, 1 treble, etc). Being so new I can't see how I do this as a standalone project (right now its connected to the computer through usb but later Id like to disconnect it and have it work with a 9V adapter I have).

I was assuming I would need some kind of speaker or something that could hear the sound to turn the lights on and off but Im doing my best to try and figure this out, any help would be greatly appreciated! I must just be thinking about it all wrong?

Sincerely,
Michael

I suppose what you want to do is digitizing the sound, do some analysis/processing and output the result on the leds.
Take look here:coolarduino – Page 4
There is tons of stuff there related to this, but pretty advanced.

Do you think a sound sensor would work for something like this?

I guess Im trying to figure out how to light a LED with sound without having to plug a audio jack into a computer/radio? or is this not possible?

Sincerely,
Michael

You can always make a QD solution by inputting the audio signal to an analog pin, reading it with analogRead() and outputting the value with analogWrite(). But i see not much point in that. That solution is not scalable at all and will lead you nowhere

I found this which looks promising and Im reading through it now.

They mention beat detection so hopefully it will be on the right path.

Please keep sharing if you have a solution so others may benefit as well.

Good tutorial, it shows you the hardware and how to alter the sampling rate. And some simple examples too.
But that is the easy part...

I need help figuring out how to make LEDs light up to the sound of music

Scan the credits for Julie Andrews?

I also found a Electret Microphone Amplifier so Im getting closer... I thought this stuff would be easy(boy was I wrong) and now I'll be happy to see one light dance to the sound of music.

I also found a post that relates to detecting sound with a microphone breakout board which also looks helpful:
https://www.inkling.com/read/arduino-cookbook-michael-margolis-2nd/chapter-6/recipe-6-7
Im not sure if it will give me the results Im looking for because I doubt it'll be able to tell the difference between bass & treble?

@nilton61 what is the QD you mentioned?

@AWOL I don't know how I would have gotten along without that tip :stuck_out_tongue:

Please share links or anything you think might be helpful again I seriously appreciate the help!

QD == Quick and Dirty

I am making a project on LED flash to music using Arduino Uno board.
Look Reference: Make LEDs Flash to Music Using Arduino
Now, my question is, How can I adjust the tune of lights or what program I should write for tunning.

How can I adjust the tune of lights or what program I should write for tunning.

You don't, you let the same program take in a different audio feed.

But another thing you don't do here is to hijack a 5 year old thread. If you want to know then start your own thread. Please read the forum rules here before posting again:-
How to use this forum

What will Arduino bring to the project? Fancy blinking patterns that are triggered by the music? If it is only enough that the leds flash more or less to the music beat or intensity, I believe no digital logic is needed. You would need the audio line (like an AUX out or speaker out from an amplifier or a microphone with some amplifier circuit). Then a low pass filter, a middle pass filter (is it called a band filter?) and a high pass filter. The filter signals could be amplified, rectified, smoothed with a suitable capacitor and put into the leds. For achieving the fading leds, some circuit would still be needed. At this point, Arduino might still be a good choice: analogRead the rectified, smoothed signal, output a PWM signal (analogWrite) to the leds.