LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I start and stop record a recording using sound levels

I am attempting to record sound to a file through a DAQ channel.  The problem I am having is starting the recording when the sound level is over a limit and and stopping it when it is under the limit for a certian amount of time.
0 Kudos
Message 1 of 2
(2,524 Views)
Hi,
 
Regarding the conditions for starting and stopping the record, when you say the sound is over and under the 'level', what exactaly do you mean?
 
As sound is a continuously varying waveform, the 'level' of the signal will vary really rapidly from positive to negative and through the 0 point in the time domain (several thousand times s second), so taking a level against each sample as a double won't really work.
 
If you're looking to check against the VOLUME of the sound wave, you should consider using a function to measure the power spectrum of the signal, which will give you an idea of the signal's relative volume - once you work out what the volume you get during a 'normal' acquisition is, you can then set some limits for LabVIEW to monitor.
 
If you need to check the level of a particular frequency (such as the bass or the treble), you'll need to do some spectral analysis and/or filtration to weed out the frequency of interest.
 
The functions available to do this in LabVIEW can normally be found under the Signal Processing - Spectral Analysis sub palette, or under the Express - Signal Analysis palette. You can find examples relating to using the Express signal measurement vis by looking at the context help, or browsing to:
 
labview\examples\express\Basic Spectral Measurement.vi
 
I hope this helps with your application!
 
Best wishes,
 
Mark
 
 
0 Kudos
Message 2 of 2
(2,511 Views)