12-01-2010 10:45 AM
Does anyone know if there is a VI to do this
I would like to leave a microphone connected to the computer and if there is a noise in the room make a boolean true.
any help is appreciated
Solved! Go to Solution.
12-01-2010 11:10 AM
see the attached VI
the concept is that first use the convert from dynamic data type to a 1d array of samples points to get the min max values when the mic is silent. now use this values as reference , if there is noise it will be out of these values . and a simple comparision to make the boolean true
with regards
12-01-2010 11:36 AM
Thanks for the quick response and the example VI
when silence, i get values -0.00408936 or -0.0041198
and i get -0.003967 or -0.003936 when the noise event happend
do you think the mic is working OK
thanks
12-02-2010 09:20 AM
That example is only pulling a single value out of essentially a periodic array. That will give very inconsistent results. Attached is a VI that may work better for you. Run it with no sound and a threshold of a couple hundred to get the normal background of your room. Multiply your background by about 10% or 20% to add a little padding, then set this for the threshold. Run and it should work. Since you are looking for an impulse, the analysis is a simple peak-to-peak measurement. If your background noise lasts very long, you may want to replace this with an RMS measurement to give you more noise immunity.
12-06-2010 05:43 PM
thanks for the response.
I did not have time to try your VI, i will test it tomorrow.
What i am trying to do is to trigger a photo flash when a noise is captured by the mic. i hope your vi works
thank you