LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build a time waveform from waveform data type 2

Hi guys...
 
I m trying to connect a output of waveform data type to an original waveform input.
 
First of all, waveform data type has three input.. i had bypass them through a array to cluster.vi then from it to unbundle.vi..
however, it turns out to have more than 3 outputs.. i m confused.
 
tutorial.vi
 
 
0 Kudos
Message 1 of 13
(3,648 Views)
Hi guys.. this my second edition.. my graph still blank.. pls help
0 Kudos
Message 2 of 13
(3,641 Views)
0 Kudos
Message 3 of 13
(3,640 Views)
What you are doing does not make any sense. The Sound File read returns an array of waveforms where each element in the array is a channel. Converting to a cluster with three elements and wiring one of the channel waveforms to dt is wrong even though the Build Waveform function allows you to do that. Then you wire the waveform you've created to a point by point function and the only valid input to that is a scalar (single value - not a waveform with an array of y values. Why don't you try using the index array function on the output of the sound read and wiring that single waveform to the normal STFT function - not the point-by-point function.
0 Kudos
Message 4 of 13
(3,628 Views)

sorry, can explain abt the an array of waveforms where each element in the array is a channel???

Qns1)My understanding for this.. the data is divided into the waveform data type; 0t, dt and etc.

 

so u mean i m wrong in the first place?

Qns2)In addition, what u mean by one of my wiring is wrong? I thought the unbundle would distributed iteself in order of the array? thus, there shouldnt be any mistake??

 

Qns3) Though, I had did what u told me? nothing appeared.

 

THanks for ur help!!

0 Kudos
Message 5 of 13
(3,620 Views)

It's all in the help for the read sound file function. The function returns an array of waveforms. Each of the elements is a single waveform and it is all of the data for a single channel. A waveform data type consists of a y array, dt, and t0. If you wanted to extract the y array, dt, and to for a specific waveform, you would first index the array and then use the get waveform components. The hierarchy looks like

Array of channels

   Channel 1 waveform

         Y array

          dt

         t0

  Channel 2 waveform

        Y array

        dt

         t0

 

I don't have a .wav file to try but the code in the image below should get you something. Don't need a while loop since you only have a single file.

Message Edited by Dennis Knutson on 05-08-2008 09:57 PM

Message Edited by Dennis Knutson on 05-08-2008 09:59 PM
0 Kudos
Message 6 of 13
(3,616 Views)
yahoo!!!!
 
Somehow get it... but honestly, not very good with Array... But big thanks... i have a direction now..
 
THanks!!!
 
 
0 Kudos
Message 7 of 13
(3,607 Views)

Hi dennis!

Though u had shown me and brief me on this,

I still have some enquires.

How come there is the use of SFTF.vi instead of STFT PtByPt ? i have read. it listed one is time domain wherease STFT PtByPt is by time waveform???

Whats the difference?

Could u illustrate?

Why come I cant use STFT PtByPt?

 

 

 

0 Kudos
Message 8 of 13
(3,591 Views)
All of the point-by-point functions are designed to get a scalar. A scalar is a single value. Internally, they use a shift register to build up an array over time.  If you were acquiring one point at a time, you could use the point by point. What happens when you wire an array to the point by point function, it extracts a single element of the array and uses that. In your original example, since you are reading from a file, it would extract the same element each and every time. You would not be passing it new data. Since you are acquiring an entire waveform with a Y array, it only makes sense to use the function that accepts an array as an input.
0 Kudos
Message 9 of 13
(3,584 Views)
Hi Denise,
 
erm... point by point function??
Do you mean?===> waveform1(Y, deltat and etc) as a 1 point? and u deemed this as scalar?
 
 
not passing any new data???
you mean the array to cluster holds the same point?
0 Kudos
Message 10 of 13
(3,581 Views)