LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set position in large sound files

Sound VIs of LabVIEW 8.2.
I need to "move around" in large .wav files (say 1GB). I need only 8192 samples to read from a random position (at  500MB e.g.).When using the position offset input of "sound file read.vi", LabVIEW begins to load the whole file until memory overflow. Unfortunately no "set position" or "lseek" function exists.
Real player and windows media player allow both to move around with a slider without any problem.
Does somebody already know a solution? (e.g. using windows DLLs).
Thanks for tips!
Klaus
0 Kudos
Message 1 of 7
(3,621 Views)
Hi Mezger ,

I would try to perform this task with usual LV binary file read-set position VI's.
And then using the "wav info " to get the wav bitrate and other things...

 Best Regards,
 Michael.
_________________________________________________________________________________________________
LV 8.2 at Windows & Linux


0 Kudos
Message 2 of 7
(3,608 Views)
Hello.
See this link:  http://forums.ni.com/ni/board/message?board.id=170&message.id=142895&query.id=46434#M142895

The ejemplowav should help you to reas wav files in chunks and move back and forwar throug them.

I guess I have some newer vis for this job, but ... will see on monday, if this one is not good for you.

Perhaps yuo should take a look at this link, too. http://www.zeitnitz.de/Christian/WaveIO/waveio.html


Cheers
Alipio




Mensaje editado por alipio

Mensaje editado por alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 3 of 7
(3,604 Views)
Hi Alipio, Hi Michael

Thanks for your messages
Unfortunately, I get many errors during the opening of your example, Alipio.
But I have understood the idea in using the normal binary read function and convert the file to usable sound info.
I will try to develop a solution and will present it here.
Thanks!
Klaus
0 Kudos
Message 4 of 7
(3,571 Views)

Sorry about that.
I saved the vis for 8.2. Hope you can open and use the vis.
The important vi is wav_file_info, that decodes the header info of a wav file to read the data in the right way: number of channels, bits, sample rate, start of data, size of data block, etc.
This one will give an error for files other than wav mono 16 bits. You can modifie it for other formats.


Hope it helps
Alipio


---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 5 of 7
(3,561 Views)
LabVIEW Version 8.21

Hi Alipio

Thanks for your support.

Here is a solution to "move around" in a huge sound file using your VIs as a base.
I modified your files a bit to fit better in our environment.
Hope, this solution will help people, who will playback measurement data stored into .wav files.
The principle may be enhanced by displaying a FFT over the selected range etc.
The VI's are valid for 16 Bit stereo wav files, but may "easily" be changed.
Next step is to include "cue points" int the .wav file to mark special events and more...

Have fun.
Klaus
Message 6 of 7
(3,516 Views)

Thanks a ton!  This is exactly what I needed to process large audio files!

0 Kudos
Message 7 of 7
(2,928 Views)