VU meter

Greetings,
i would like some info on whether or not it's possible to "read" a PC's audio output level. like the line that goes into the speakers. not an external wire, rather a digital signal that can be read by the arduino via the serial port. i guess what im looking for are the commands for serial communication that the arduino environment supports (regarding sound and audio that is). something like the Dimmer communications example code, although that uses Processing (which i know nothing of ).

basically the idea is that i'll read the volume level and light up some LEDs accordingly.
i know i could go for the microphone and just read that on an analog pin nut i'll need to add more circuitry than i would like.

Well, if it's just a simple VU meter type output you want for volume only, then I think you'll be better off looking at the line-out. I won't say it's impossible, but decoding a digital signal would involve variables such as sample rate and bit depth. I'm not sure how I'd go about capturing the digital signal, either. On Linux, maybe somehow getting in between the source and /dev/dsp, but then there can be many sources, and multiple DSP devices too.

Don't know any application that provide USB/serial output of the audio data, but there are a few
of them that stream audio music on network. So, still hardware architecture would include Ethernet shield, as additional circuitry. Configuration, probably, would be more challenging than using a mic.

Thanks for the feedback guys. And although discouraging, it's still helpful.
I guess this leaves me with the microphone option. Time to go hunting for microphone pre-amp schematics :slight_smile:

Magician:
Don't know any application that provide USB/serial output of the audio data,

Well, there's an interesting idea. I hadn't thought about a USB "sound card". Such certainly exist -- for example a cheap USB gaming headphone. Of course, using one of those and tapping into the signal with a high-impedance input would be a bit of a challenge. Might want to crack the box, and find the signal in pin for the DAC, and measure that. Of course, then there's still the issue of knowing the sample rate and the bit depth. Or, tapping the pin for analog out. Probably either of those is a teeny-tiny SMD lead.

Microphone is easier/cheaper.

If you just want to avoid prototyping, you van get the spark fun spectrum analyzer shield and, while you'd be under utilizing it, it would work. Alternate,y, if you want to use ONLY software, you can use Processing. There is a vu meter in the demos as I recall that you can use. Just steal the values at the point where they're about tobe printed on th e window and send them via serial to the arduino.