01-21-2010 12:42 AM
Hi all,
I am trying to plot a spectrogram from a sound waveform. I based my sound input on the Finite Sound Input.vi example, and am trying to produce the spectrogram from the 1-D waveform produced at the Sound Input Read.vi output. The attached file, using STFT Spectrogram.vi is the only method I've tried which doesn't give me outright errors, but it doesn't plot the spectrogram.
One other method I have tried is using Get Waveform Components to get the t0, dt, Y data from the 1-D waveform from the Sound Input Read to try for a more sophisticated solution, but when I wire them together I get the error that I am connecting the wrong datatypes (1-D Waveform(DBL) with Waveform(DBL)). How does 1-D Waveform(DBL) differ from Waveform(DBL, and how do I get Get Waveform Components to work?
Best regards from a LabView newbie,
Kathryn
01-21-2010 01:06 AM
hi
to convert 1-D waveform (DBL) to waveform (DBL)...all you need to do is to use index array .
as the name suggest one is an array of dimension 1 and other is a simple waveform (t0, dt ,y) as is its componets.
01-21-2010 01:14 AM - edited 01-21-2010 01:18 AM
Also look at this http://forums.ni.com/ni/board/message?board.id=170&message.id=18784&query.id=1820753#M18784
01-21-2010 01:28 AM
01-21-2010 01:37 AM
Thanks nolsqn for the replies to that part of my post. Further to that question, the part I don't understand is why Sound Input Read is producing a 1-D array, why is there not just one simple waveform? Does the 1-D array only contain one simple waveform, just packed up as a 1-D array? (Or is it a 1-D array of waveforms where each element somehow represents a waveform in itself? This doesn't make sense to me as it implies a 2-D array)
The core of my post is really about plotting the spectrogram from the sound waveform. Given that the spectrogram is frequency vs. time, I had assumed I could use the STFT spectrogram to do the FT of the waveform across the time of the waveform but nothing I have tried so far has worked. Thanks for your mod, but it just plots one time channel of the sound waveform - it seems to be the final time bin . I'd like to be able to get time bins from t=0 to t=end.
thanks again,
Kathryn
01-21-2010 02:31 PM