Values from my conversion to .dat format using sox does not seem to be normalized - hope someone can see what I am doing wrong.
I am trying to do something similar to what is described in this great SO post about sox and gnuplot (I am sending the values to processing in Java, so a bit different context). The problem is that in my .dat file I get "only small values", while the man pages says they will be normalized between -1 and 1.
After installing sox and mp3-handling packages, I do the following to test:
sox elevator.mp3 -c 1 -r 11000 elevator_mediumres.dat
cat elevator_mediumres.dat |cut -c21-33 > elevator_mediumres_values_only.dat
sort -n elevator_mediumres_values_only.dat > elevator_mediumres_values_only_sorted.dat
# echo min $(head -1 elevator_mediumres_values_only_sorted.dat) max $(tail -1 elevator_mediumres_values_only_sorted.dat)
This gives the output "min -0.48370361 max 9.1552734e-05". If I do the first command to wav instead of dat, the wav file sounds OK (as OK as 11kHz mono of Aerosmith's "Love in an elevator" ever does). I could of course normalize manually the data afterwards, but I am hoping there is a a better and more straightforward way.
Thanks,
-S-