Cannot open simple sox wav file - "is not in a supported format"

apson

Registered
Thread Starter
Joined
Jul 16, 2021
Messages
3
I just installed REW for the first time on my mac.

In sox, I generated a simple wav file:

Bash:
sox -V -r 96000 -n -b 24 -c 1 sin1k.wav synth 1 sin 1000 vol -10dB
In REW, in the top menu I clicked RTA and then in the RTA window I clicked WAV, opened the file.

No combination of options in the wav opening dialog would work. Maybe this isn't how this is supposed to be used? I was hoping to see an FFT of the data.

I get "File format error" with the text "sin1k.wav is not in a supported audio format."

I attempted to search this forum and couldn't find anything.
 

apson

Registered
Thread Starter
Joined
Jul 16, 2021
Messages
3
Sure thing. Thanks! Attaching zip version. I don't have enough posts to share link to the wav in dropbox.
 

Attachments

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
4,656
The file has an odd value for the sample format field which the Java readers don't recognise (nor do I :)). I can import it to Audacity, and Audacity thinks it has float data, but you used -b 24 which isn't an IEEE float format. Perhaps you should generate the file with -e float instead of -b 24, or -e float -b 32. Don't know what the -n option in your command does either.
 

apson

Registered
Thread Starter
Joined
Jul 16, 2021
Messages
3
Thanks -- that was my mistake. -n is the null input, from man:

-n, --null Use the `null' file handler; e.g. with synth effect

I succeeded with -e float:

Bash:
sox -V -r 96000 -n -b 32 -e float -c 1 sin1k.wav synth 2 sin 1000 vol 0dB
The original command I found on audiosciencereview but I carelessly modified it. Thanks for the help and sorry for wasting your time on something trivial!
 
Top Bottom