LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a spectrogram from a soundwaveform using the intensity chart function?

I want to make a spectrogram for a sound waveform where the x-axis is time, the y-axis is frequency, and the intensity is amplitude. I performed a DFT on the sound waveform, then used it as an input to the intensity chart function. Every time I run my program the x-axis has a scale from 0 to 1 sec, when my sound is longer. The y-axis doesn't give me the same range of frequencies as the DFT. The intensity scale is correct. Can anyone suggest another approach? The labview example did not help since I'm not generating an array and creating the intensity chart at the same time.
0 Kudos
Message 1 of 2
(3,645 Views)
Hello -

You could probably use a 3D surface graph.

I am including an attachment to show you what I mean. This example program is available here. I just made a few modifications to make it look as an intensity graph:

1. By right clicking on the graph and going to CWGraph3D >> Properties and selecting the Grid Planes tab in the Graph tab, I unchecked the grids, to show just the graph. Then, I went to the 3D tab in the Graph tab, and selected Towards X-Y Plane in the View Direction section. Click OK.

2. Then, I right clicked on the graph again and went to Advanced >> Enabled State and selected Disabled, so
that the user cannot change the orientation any more.

You can build your own plot using time and frequency as X & Y, and the amplitude will give you the color. You only need to adjust the orientation so that you can see it from �the top� and it looks like an intensity plot.

Hope this helps.
Message 2 of 2
(3,645 Views)