C++ - Analyzing Microphone Input

Started by
17 comments, last by PulsarSL 17 years, 9 months ago
Hi, interesting idea, could worth a try. You may want to try FMOD, a free open source sound library that lets you record sounds from the microphone. I think that it already provides FFT (or other tools) for sound analisys. If not, and in case you need it, you can get FFTW.
Advertisement
Quote:Original post by cignox1
Hi, interesting idea, could worth a try. You may want to try FMOD, a free open source sound library that lets you record sounds from the microphone. I think that it already provides FFT (or other tools) for sound analisys. If not, and in case you need it, you can get FFTW.


Thanks for the link, FMOD looks GREAT. I'm going to keep trying to get this to work using MCI though. If I can't get that working, I'll give fmod a shot.

Pulsar
You'll wanna check your laptop's documentation to find out whether the microphone input is really a mic-in or if it's a line-in. Headphone jacks output line level, which is significantly higher than mic level; if the microphone input takes a mic level signal, you'll need to have the radio at a low volume or risk damaging the audio hardware.
FYI, the way lightning pictures are usually take is with long exposures rather than with trying to catch a specific single lightning bolt. It'd be a far, far simpler solution.
As for monitoring audio input, that depends on which sound API you're going to use. If you're using windows' built-in API, you're looking for WaveInOpen and related functions.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
I cut my audio cable (as per these directions: http://www.tkk.fi/Misc/Electronics/circuits/line_to_mic.html). There are three wires in it: a black, a red, and, surprisingly, a bare wire. I'm assuming red is signal and black is ground. What is this third wire for? I'm guessing it's some kind of shield or drain wire. I'll post pics of my hacked cable as soon as I finish soldering.

Thanks

Pulsar

[Edited by - PulsarSL on July 3, 2006 10:03:13 PM]
If it is a stereo audio cable, then the bare one is ground, and the other two are left and right.
.
Guess I'll have to switch that then, thanks.

Pulsar
I switched it from the black wire to the ground... Everything appears to be wired according to the diagram now, so I went ahead and hooked it up to an old PC (that I don't care too much about :)). Right now, only one channel is connected, though I hear the radio out of both speakers. If I hold one speaker to each ear, everything sounds 'centered'. Does the sound card simply copy the existing channel to the other to make it sound better?

[Edited by - PulsarSL on July 5, 2006 9:06:37 PM]
Also, just to make sure everything is wired OK, when I measure the output end with a multimeter, I should expect DC voltage in the millivolt range, correct? I appear to have lost my little digital voltmeter that reads millivolts, but my analog does not move at all when I read either the output or in the cable before it goes through the resistors. Is it possible the radio outputs at mic level already?

Thanks,

Pulsar

This topic is closed to new replies.

Advertisement