11-08-2021 09:43 AM
Hello,
I have a VI that is displaying some audio data on a graph that I am also saving to a .bin file. What I really need is this data in a .wav file format. Is there a way to convert the saved binary data to a .wav file when I am finished displaying the data on the graph (like when the stop button is pressed.. or a save button)?
I have attached my VI for reference. I appreciate any help with this.
Thanks,
11-08-2021 10:45 AM
Read back the binary data, add the stuff necessary to make it a waveform, then use Sound File Write VI to write to wave file.
11-08-2021 10:50 AM
where would I do that? Outside of the while loop attached to a save button?
11-08-2021 01:10 PM - edited 11-08-2021 01:10 PM
11-08-2021 01:26 PM
What am I doing wrong here?? I don't even see an empty .wav file created.. Sorry just confused here.
Thanks
11-08-2021 01:36 PM
11-08-2021 01:40 PM
No errors upstream. Should this overwrite my .bin file with a .wav file or create a .wav file of the same name?
11-08-2021 01:46 PM
Hi LKcire,
@LKcire wrote:
No errors upstream. Should this overwrite my .bin file with a .wav file or create a .wav file of the same name?
Yes, it overwrites (or it should) because I never change the filepath.
I made this image just for suggestion: you need to implement some error handling and add some filepath manipulation when you want to convert to a different filename!
11-08-2021 01:49 PM
appreciate the image, I don't need to convert to a different filename so this is fine but it is not overwriting. It really doesn't seem to be doing anything which is why I'm stuck...
I can't import your image to see if I missed something because I have LabVIEW 2016 and it won't let me.
Again, thanks for your help.
11-09-2021 07:21 AM
Hi,
I have a VI that plots a portion of a data frame (2 bytes of audio) on a graph. I am also saving these 2 bytes to a .bin file, but would like to convert the bin file to a .wav file when pressing the stop button.
I think I want to read the bin file, build a "waveform" and then write it using the sound file simple write. I am not doing something right because this doesn't even create or overwrite the bin file to an empty .wav file. Nothing seems to be happening and I'm not sure where I'm going wrong.
Thanks for any help in advance.