02-23-2013 03:25 AM
Hello,
I am trying to learn Labview by creating an audio spectrum analyzer, like this one, for a wav file. The idea is to be able to listen to the song and watch the waveform graph as it constantly updates. I'm hoping this functionality is possible with Labview.
So far I've figured out how to convert the wav file into a waveform, and to play the wav file through my sound card. I need help with graphing the different bands of frequencies and having the graph constantly refresh. I figure a while loops is needed here.
Thanks.
02-23-2013 08:45 AM
Getting the Spectrum is straightforward. There are several spectral analysis VIs and the basic FFT available in the Signal Processing palettes.
However, taking the spectum of the entire waveform at once is probably not what you want. To get the spectrum representing a short time segment of the waveform (such as one second or a fraction of a second) you will need to break the waveform into segments and calculate the spectrum of each segment separately. You can use Get Waveform Subset.vi from the Waveform palette or lower level functions from the array palette. You will need to use a while loop.
The trickiest part may be synchronizing the display with the portion of the waveform being played through the sound card. You can play each segment as its spectrum is displayed but that may result in breaks in the sound.
Lynn