07-09-2018 12:44 AM
I'm having trouble to read wav file.
When I read wav file, a value less than -1 or greater than 1 will be -1.
original wav data
attached wave file, vi
Best regards
07-09-2018 01:26 AM
Hi ijerom,
I'm having trouble to read wav file.
What kind of trouble? There is no trouble: LabvIEW doesn't return any errors…
When I read wav file, a value less than -1 or greater than 1 will be -1.
Because all the data in the wave file are limited to values between ±1.
As can be easily checked using Audacity (or any other tool)…
Your wave file contains 5 channels, uses a samplerate of 25.6kHz - and all channels are limited to a range of ±1.
07-09-2018 06:27 AM
and all channels are limited to a range of ±1.
That is trouble. ;;
If you have matlab program, you can use the audioread() function to see that the value is truncated.
You can see from the attached picture.
That has read the same file.
Thank you reply.
07-09-2018 09:02 AM - edited 07-09-2018 09:04 AM
The file you sent does not appear to be a standard .wav file. (Standard .wav files are digital; the file data appears to have fractional values.) More importantly, the graph of the supposed .wav file looks nothing like the "original" .wav file. Something is drastically wrong with this picture, and it's not remotely related to LabVIEW...
07-10-2018 10:46 AM
By default Audacity shows each of the channels on a -1..+1 scale which makes them look like they clip, but if you use the amplify function to attenuate the signals, it's clear that the original data isn't clipped to that range and actually goes beyond it, just like in the graph in the original post. I'm not very familiar with how floating point WAV files are usually done, whether it's expected that the data won't exceed that range; maybe the LabVIEW sound data read function assumes it won't go outside of that range and can't handle values beyond it properly.