ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sound wave sampling frequency problem

Hi guys, 

I am trying to use a couple of bandpass filters on a few wav files, but I am having problems.

It works for frequencies below 4000, but anything above that I have problems. I assume it is because the total number of samples is 8000 per channel. Is there a way I can increase that to 40000?

Here the vi with the problem.

0 Kudos
Message 1 of 2
(2,456 Views)

It's not the number of samples but the sampling frequency.  Here's one way to understand it -- there are three numbers important in digital signals -- the Sampling Frequency (SF), the Number of Samples (N), and the total time (T) of the sample.  They are closely related by the equation N / T = SF (which makes sense, Number of Samples per Time = Samples per Time).  It can also be written SF * T = N.

 

Now, what is the lowest, and highest, sinusoid that can be represented in the N samples?  The fewest number of sinewaves you can put in is 1.  1 wave in T seconds, 1/T, is the lowest frequency that can be represented.  The fewest points to define a sine wave is 2, one at the peak, one at the trough.  So the highest frequency that you can extract from a waveform sampled at SF is SF/2 (or N/2 divided by T = SF/2).

 

In your description of the task, you mention N, but don't say anything about SF.  Increasing N can allow you to represent lower frequencies, but doesn't change the maximum frequency.  To do that, you need to increase the sampling frequency.

 

Bob Schor

0 Kudos
Message 2 of 2
(2,431 Views)