LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rread a huge wave file and do thd analysis

I need desperate help, cannot able to understand the logic of labview . Can someone help me ???
0 Kudos
Message 1 of 5
(2,993 Views)
To properly help you, we need more information.
  1. What version of LabVIEW are you using?  The WAV file VIs changed at version 8.0, and the change will mean a lot less work on your part.
  2. Define "huge".  Is this 100kBytes of data?  100MBytes? 2GBytes?  LabVIEW can handle any of these sizes, but the methods used will get progressively more difficult as the data size gets larger.
  3. Do you need to know how THD changes as you go through the data, or do you need a single THD value for the entire file?
  4. Is the file compressed in any way?  If so, is it lossless or lossy?  Note that lossy compression schemes, such as MP3, will cause distortion, so such files are not suitable for serious analysis.  LabVIEW does not natively support compression on WAV files, so this will also cause extra work.
It appears you are new to LabVIEW, so I would highly recommend you work through the tutorials to learn the basics, if you have not already done so.  The biggest thing to learn is that the best data buffers in LabVIEW are the wires, not the front panel controls, locals, or globals.  LabVIEW is most efficient when wires, and only wires, are used.  Sequencing of operations is determined by the data flow through the wires.  Any node or subVI will execute when all its inputs are valid.  Position on the block diagram does not matter.  If you have two parallel sets of code on the same block diagram, LabVIEW will try to execute them truly parallel in separate threads or on separate processors (if you have them).  This is why it is very important not to use locals, globals, or controls/indicators as data buffers unless you really know what you are doing.  The parallel execution model makes race conditions very easy to create.  Using data flow through the wires takes care of this issue.  Experienced LabVIEW users rarely use globals and use locals only for GUI issues.  The use of sequence structures should also be kept to a minimum.  They, too, are rarely necessary.

Once you have got the basics down, look at the tutorial Managing Large Data Sets in LabVIEW.  It is an advanced tutorial, and relies upon some in-depth knowledge of how LabVIEW works.  However, to successfully handle 100MByte+ data sets, you will need this information.

Good luck!  Don't get discouraged.  Once you know the basics, LabVIEW is a fast, efficient language for analysis programming.
0 Kudos
Message 2 of 5
(2,982 Views)

i'm using Labview 8.2, and my wav file is 32 MB. I"m trying to connect it to the sinad analyzer and then filter the feedback and then play it back. That's my goal.

What functions do I need?

I have the snread.vi and sinad.vi and that's fine but the wav file i think is too huge, the computer freezes. I don't know how to make it into wav chunks

0 Kudos
Message 3 of 5
(2,971 Views)
Philipk7,
I'm confused, it sounds like you've already found the sinad analyzer... this will preform the analysis I think you're looking for. When you say that the comptuer freezes, at what function is it freezing?
 
chris C
0 Kudos
Message 4 of 5
(2,955 Views)
The easiest way to chunk the WAV file is to read it from the file in pieces.  You can't use the simple read VI for this.  Use the open to open the file.  Use the read repeatedly to read a piece of the file and analyze, then close when done with the file.  Combine your results at the end, be they an array or an "average" value.
0 Kudos
Message 5 of 5
(2,942 Views)