02-26-2018 11:52 AM
Hi there,
I am attempting to save a very large .wav file. I have already programmed a way to read in four large .wav files and then have merged them into one (using Sound File Read.vi and reading in chunks). My problem arises when I try to save them. I can't figure out a way to save in chunks - it appears that you can not append to a .wav file using the Sound File Write Simple.vi. It seems to only allow an overwrite of the file.
Has anyone figured out a way to do this? Any suggestions would be awesome!
Thanks!
02-26-2018 12:10 PM
How big are the wav files in question? Here is how you might read 4 files and merge them into one. I don't understand the need to read and write in chunks unless you are talking about 4x 1GB wav files on a machine with 2GB of RAM.
02-26-2018 12:17 PM
Sorry - I should have stated that the .wav files I am merging are ~ 1 GB each. I have the merge under control - I downsample - line up the files graphically and then determine the start and duration of the larger files that I want to merge and save. I am just having difficulty saving these very large files! I think I need a way to save in chunks thus appending the large file gradually instead of all at once. Not enough memory to do it otherwise.
02-26-2018 12:39 PM
Do you really need to save them as WAV files?
Also, seems like you're pushing the limits of what is possible with a classic wave file?
02-27-2018 04:07 PM
Thanks for that link. I have figured out how to do it - the save .wav vi has the refnum out that you have to rewire from the call library function node. This can be used to save in chunks. If the file is over 2 GB it can't be open so I guess that is a limiting factor of this whole endeavor. We have other programs that are looking for a .wav file that is why i am trying to save it in the same format. But, I guess a basic binary file might be better?
Thanks again for your help!