Using desktop audio to have an led visualizer

Hello, so I have an led strip which has 4 “outputs” R,G,b and 12V. now how can I take the desktop audio,so I dont mean having an audio sensor ,but rather detecting the audio from the desktop directly not matter if I have headphones connected or not. And then taking that audio and using it as an audio visualizer like in this video here: RGB LED strip beat detection (Arduino with Processing) - YouTube or in the video here: How to connect LED STRIP to speaker(BASS) - YouTube
Also I do not know how to code or anything soo complete beginner(also I have an arduino mega and uno)

If you get an identical LED strip, then you can follow, step by step, what is shown in the video. No Arduino involved, so how do you think an Arduino is involved with the examples you gave?
Paul

I already have the led strip installed and I dont want to buy a new one,the one I bought was pretty pricy and I live in a country where all the cheap ones on amazon dont ship here the the shipping is expensive

I thought you could use an arduino to have a connection with the leds I suppose

and I dont have speakers,I have a laptop so I cant do the version in the second video

Do you have a 30-40 watt audio amplifier that can amplify the laptop audio?
Paul

no I dont are they cheap?

is there a way to do it without the amplifier or use an arduino as I have that on hand

Typically you connect to the audio output with a Y-splitter so you can use headphones or external speakers at the same time. (That won’t work with your built-in laptop speakers.)

The 1st example looks 80% computer programming and 20% Arduino programming. The 2nd example might be just driving the LEDs from the amplifier with no additional electronics but I didn’t watch the whole thing. In general, “computer programming” is more complicated than Arduino programming, mostly because of the GUI.

>Also I do not know how to code or anything soo complete beginner(also I have an arduino mega and uno)<
Almost any project can be divided into (at least) 2 parts - Input and output.

Figure-out the input & output (hardware & software) separately and then “connect” them with more software.

It’s also helpful for development/testing/troubleshooting to use the Serial Monitor to send out little messages about what your program is doing or variable values, etc. The Analog Read Serial Example shows you how to do that. (That same code can be used to read and display analog sound-signal level/volume(1) but you should take-out the delay.)

Here is a little example program I made that I call “The World’s Simplest Lighting Effect” and it shows how to connect & read the “loudness” of a line-level or headphone-level audio signal. It’s mostly “input” plus a little processing.

The output-side simply flashes-on the built-in pin-13 LED whenever the signal is louder than the moving average. I made a similar real-world effect that uses solid-state relays and 120VAC lamps instead of the little LED.

To control (and optionally dim) an RGB LED strip you’ll need 3 MOSFET driver circuits and you should be able to find examples. That’s your “output” and you can build and test that separately with some simple test-code that turns-on one color at a time, etc. You might want to work on that first, but it’s up to you.

Addressable LED strips have a built-in driver for each RGB LED so the hardware connection is super-easy. But the software is more complicated.

Depending on what you want to do with the colors you may want some frequency (“pitch”) detection. That can be done in software with the FFT (or FHT) libraries. That’s advanced DSP (digital signal processing) but you don’t have to understand everything about it to use the library.

Or, there is also a specialized chip called the MSGEQ7 that does the frequency filtering in hardware and it gives you 7 frequency bands. And it takes the audio input without the bias circuit.

(1) Just remember you are “sampling” and audio waveform that crosses-through zero twice per cycle and is negative half of the time (if the bias is subtracted out). So the readings will “look random”. But you can usually pick-out the peak readings to get a hint about the signal and to see if you are getting useful readings.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.