LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I take the FFT of a .wav sorted by frequency over time?

I am working with some short 3 second .wav files of audio recordings I made. I am looking to get the reverb time from this (namely the fall off time for 60 dB). The way I am trying to do this now is to fourier transform this over time so that I have multiple frequencies and the time for each to fall (since it is of note to see how the rooms react to different frequencies). I have a .vi that will open each .wav in succesion in a specific folder and perform an action on them. I can't figure out the correct way to fourier transform the data from teh .wav. I am very new to LabVIEW but have experience with JAVA. What should I try next? I think my problem is that I'm not converting the .wav to a form the fourier transform likes. Ideas?
0 Kudos
Message 1 of 2
(3,924 Views)

One possible starting point might be the 'Wav File Player.VI' example.

This example loads a WAV file and processes it into an array. You can then take this array data, and iterate through it feeding blocks of input samples into an FFT.

Before doing this you need to apply the appropriate window function to the block of data (Hanning). These functions already exists as Vi's (they may not be in student versions but they are very straight forward to code).

Each block length will be the sample period and its sort of assumed that the amplitude and frequency would be static over this sample (which it probably is not). Then you take the output from the FFT blocks and store each succesive block it into say a 2D array. You might want to remove the imaginary data from the real data at this point as well. Now you have slices of FFT data in the 2D array. The output block consists of frequency bins and amplitudes of interest and each of which represents a period of time equal to the number of input samples multiplied by the sampling period. The block lengths are selected based on the frequencys and times that you need to work with.

You can now look into each slice in the 2D array or plot them on say an intensity chart or some other representation more suitable.

I suspect that alternative analysis techniques might be better and you may want to consider the Sound and Vibration Toolkit sold by NI for more advanced analysis tools. This will save you hours if you need more advanced analysis tools.

I hope this helps you on your way.

0 Kudos
Message 2 of 2
(3,901 Views)