Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

"Sound" Data Help

1. How to get the data points out of the waveform type sound file?

2. How to highlight the sound data on a waveform graph in real time as the sound file is playing?
 
Thank you.
0 Kudos
Message 1 of 9
(7,120 Views)
PS_N,

You can use the standard sound VI's that come with LabVIEW to read a .WAV file and plot the data on a Waveform graph. Please look at the attached example for your reference. You can find the VI's at Graphics and Sound » Sound. As far as highlighting the plotting on in real-time, I am using a property node to set the color of the graph to yellow.

The example finder in LabVIEW is also a great resource for getting started with new applications. You can find the example finder by clicking Find Examples... on the Help menu.


Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(7,095 Views)
Thank you.
Is there a way to open a new version vi file?
I could not open the example file (8.5 version) with Labview version 7.1.  Thanks.
0 Kudos
Message 3 of 9
(7,091 Views)

Hi PS_N,

here is it as a picture.

Mike

0 Kudos
Message 4 of 9
(7,080 Views)
Thanks.

I try to get the array data from the waveform chart of the sound, which goes back to a sub vi where it built the array data for the waveform chart. But the indicator array I extracted are all 0s.
How to properly get the array data of a sound file?

Regards
0 Kudos
Message 5 of 9
(7,076 Views)
I am not sure what you mean. The description of you problem is not very clear.

If you want to get the data of the waveform out in the form of an array, try something like this.
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 9
(7,057 Views)
From the image of the VI you posted, I can see that your problem is because you have the "write to file" VI outside of the while loop. The way loops work is that data that goes to the tunnel is stored there until the loop is finished executing, but it is overwritten with new data every time the loop runs. So when the loop stops, you only get the data from the last iteration of the loop out. To solve your problem you need to put the VI that is writing to the file INSIDE the while loop.

Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 7 of 9
(7,055 Views)
Thanks a lot.

Please see the attached screen shot showing the two array data from the sound file I extracted, the first data array are all 0s, the second have numbers, which are indicated in the front panel,  why?

Download All
0 Kudos
Message 8 of 9
(7,039 Views)

You are modifying the code inside of the VI. I really recommend you don't do that. As far as the array you placed, it is placed before the end of the code that interacts with the data, and I believe that indicator only reflects the same array input constant (which is zero) that is going into the call library function node. The actual data is the waveform indicator you have.

Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 9
(7,007 Views)