Pages: [1]   Go Down
Author Topic: Audio input via computers built-in microphone? minim for arduino?  (Read 1304 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, noob here. I'm trying to use LEDs to visualize volume or any available, simple-to-do aspect of live sound input. I assumed that there would be an arduino library for using my computer's built-in microphone (macbook), but I am realizing that this is not the case? What is the arduino equivalent of processing's minim library? Should I be looking for a library to achieve this, or is there some kind of built in read audio input function? Again, I want to input sound through my computer's mic, process it through the arduino code, and output the data to the LED's connected to my arduino device.

I haven't been able to find the answers with extensive google / arduino forum searches surprisingly.. I'm using arduino UNO. Any help greatly appreciated.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 602
Posts: 33384
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Should I be looking for a library to achieve this,
Yes but not an arduino library, you need something on your computer to take the microphone input, digitise it, and then send it in serial form to the arduino.
I doubt if such a thing exists, how good are you at writing code.
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1288
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You know...   most recording/audio editor programs (Audacity, GoldWave, etc.) have a meter display on the computer screen (with no additional hardware).

If you are going to use the Arduino and buld some circuitry, I'd recommend NOT using a computer. But, if you want to use the computer as an amplified microphone, you can simply turn-on the mic in the Windows 'Playback' Mixer and turn it up volume.   Then, the amplified line-level signal should come out of the headphone jack...  You can run the headphone-output into the Arduino (with the proper signal conditioning to block negative voltage swing, which can kill the Arduino).

I normally use a Peak Detector Circuit to condition the audio input.   But, you can also use a pair of  resistors and a capacitor to simply bias the signal at 2.5V.

Here is a little pre-assembled PC board with a microphone and an amplfier.   You can connect it directly to the Arduino and you won't need a computer.  (of course, you will need a computer during the design & construction process to to develop your code and to program the Arduino.)

Before you start making a VU meter, this simple Analog Input Example blinks an LED depending on the analog signal.   You might want to experiment with replacin the pot with an audio input.

Here is a VU Meter Example Projcet
« Last Edit: February 05, 2013, 01:21:54 pm by DVDdoug » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 602
Posts: 33384
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But, if you want to use the computer as an amplified microphone, you can simply turn-on the mic in the Windows 'Playback' Mixer and turn it up volume.   Then, the amplified line-level signal should come out of the headphone jack.
Doh!
I was too much wrapped up in the digital domain to think of that, well done!
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1288
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

P.S.
If your goal is to have fun with Arduino and learn about it, a VU meter could be a good project.  But, if your goal is to build a VU meter, there are easier ways to build one without programming a microcontroller, such as this kit.

...I have a VU meter lighting effect that's built with an Arduino, but it it's programmed to do lots of random things, like reverse, invert, dot-mode, and other sequences/ options that are not VU meter related.

P.P.S.
I didn't read carefully...  Of course you don't have a "Windows" mixer, and GoldWave does not run on a Mac either (but Audacity does).
« Last Edit: February 05, 2013, 01:51:28 pm by DVDdoug » Logged

Pages: [1]   Go Up
Jump to: