Pages: [1]   Go Down
Author Topic: VU meter  (Read 421 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 <yet>).

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.
Logged

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2487
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Offline Offline
Full Member
***
Karma: 0
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: