Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: SoX in cmd - A little help (Read 3877 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SoX in cmd - A little help

I should begin with the disclaimer that I am completely a noob at cmd.  In fact, I only recently got acquainted with it in order to experiment with lossyWAV, and I still have much learning to do.

I'm trying to set up an ABX experiment to see whether or not files resampled to 32k via SoX' VHQ linear phase algorithm are transparent.  If they are, this would mean that I could be comfortable resampling all of my lossless content to 32k (consequently saving a lot of space) and then converting to Vorbis, hopefully maximizing the efficiency of its psychoacoustic engine.  After I downloaded the binary and moved the executable file to my output folder, however, cmd is not recognizing its presence at all.  Could anyone lend me a hand there, first of all, and then help me with the parameters for resampling (if further help is necessary)?

Thanks in advance.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #1
Did some fooling around and got it to work - now it's just fooling about with parameters and then onto the ABX.

I can either request deletion of the thread, or keep the original content and report my findings with the ABX.  Mods, what say you?
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #2
Okay, got it all figured out.

Here are the two files, the first is the reference track and the second is the one I created with the following syntax:

C:\work>sox.exe mkh96k.wav mkh32k.wav rate -v 32000 norm

It did warn me that there was an instance of clipping during the conversion.

I have not yet conducted the test, but it does not sound transparent to me off the bat.  The softened breath of the flautist and lack of noise at the end in concurrence with the footsteps are giveaways, and I plan to substantiate these claims momentarily.

http://dl.dropbox.com/u/62992626/mkh96k.flac
http://dl.dropbox.com/u/62992626/mkh32k.flac
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #3
Sorry to disturb your monologue but downsampling to 32kHz somehow makes no sense, no matter what you may hear.
These days you may argue about 24/96 being a waste on HD space but from 44.1kHz to 32kHz!? Maybe some day a new generation of hearing aid is developed and what then?
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

SoX in cmd - A little help

Reply #4
If there is no appreciable content which is audible to me above 16k (or more reasonably 15.5ishk for the passband), I see no reason to keep it around, especially material intended for playback and not further processing.  This is still relevant for portable devices at this point in time.  When we all have 2TB flash storage in the palms of our hands, carrying around lossless 24/96 masters will seem more reasonable.  For now, I want to hear only what is audible to me, and nothing more, so long as the loss of that which isn't audible will be palliative for storage.

I'm afraid I don't understand the hearing aid argument.  How many sane people are going to pay for an implant so that they can hear a few kHz higher than 20?  Certainly not I.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #5
If there is no appreciable content which is audible to me above 16k (or more reasonably 15.5ishk for the passband), I see no reason to keep it around, especially material intended for playback and not further processing.  This is still relevant for portable devices at this point in time.  When we all have 2TB flash storage in the palms of our hands, carrying around lossless 24/96 masters will seem more reasonable.  For now, I want to hear only what is audible to me, and nothing more, so long as the loss of that which isn't audible will be palliative for storage.

I'm afraid I don't understand the hearing aid argument.  How many sane people are going to pay for an implant so that they can hear a few kHz higher than 20?  Certainly not I.

The "Hearing Aid" thing was meant as joke. Otherwise better use some lossy code for carrying around music and keep your home collection untouched.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

SoX in cmd - A little help

Reply #6
Absolutely.  This is completely experimental.  I'm certainly not going to corrupt reference material.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #7
So looking at spectrograms for those two files, it appears that there is some content which is far lower in frequency than 16k which was attenuated.  Considering how sharp the lowpass filter is for 96-->44.1 conversion, it surprises me that anything below 15.5k is even touched.  Can anyone who has more experience using SoX chime in here?  Did my syntax even yield the VHQ linear phase algorithm?

The results of my ABX were 10 out of 10 identified correctly, by the way.  The character of the noise at the end was the giveaway for me.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

SoX in cmd - A little help

Reply #8
Don't add 'norm' -- you are adjusting the volume as well as resampling.

-v (VHQ) refers only to the noise floor; for a sharper cut-off specify -s (or -b 99.7) for the maximum passband SoX will give you.

So I think what you want is this:

sox mkh96k.flac mkh32k.flac rate -vs 32k
sox mkh32k.flac mkh32-96k.flac rate -vs 96k

The spectrograms of mkh96k.flac and mkh32-96k.flac then look identical (below the cut-off).

Do your ABXing using the same two files (i.e. not using mkh32k.flac) in order to eliminate any differences in your play-back chain.  If you still hear a difference then it means you can hear above the cut-off freq, or you can hear the filter 'ringing' at the cut-off.