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 and Converting 192/24 to 96/24 (Read 9066 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SoX and Converting 192/24 to 96/24

Not sure this matters, but I'd thought I'd ask the experts here. I would like to bring on a trip some hi-res files I've purchased, but I don't want to bring the 192/24; so I thought I'd reduce to 96/24 and learn something more about SoX. I am curious as to which options may provide better a better resample (though I realize I may not hear that much of a difference). From the SoX  manual:

Quote
−M/−I/−L Phase response = minimum/intermediate/linear
−s Steep filter (band-width = 99%)
−a Allow aliasing/imaging above the pass-band
−b 74−99 . 7 Any band-width %
−p 0−100 Any phase response (0 = minimum, 25 = intermediate, 50 = linear, 100 = maximum)

I figure -L is fine for linear, but I am not sure about if I should try a steep filter or not, or any of the other options. Or, really, if it even matters for this sample conversion.

I had settled on
Quote
-v -L -b 95 96000
but I thought I should ask here.

If anyone has any suggestions let me know.  Thanks

Re: SoX and Converting 192/24 to 96/24

Reply #1
I see nothing wrong. This filter acts above 45kHz. No idea how to mess that up.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: SoX and Converting 192/24 to 96/24

Reply #2
thank you...when would one want to use a "steep" filter?

Re: SoX and Converting 192/24 to 96/24

Reply #3
I guess the 'steep' setting is meant to keep most content for lower samplerates in one setting like other softwares do. I'd never use it.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: SoX and Converting 192/24 to 96/24

Reply #4
thanks for responding...I'll keep with what I have. I have read that some use it going to 44.1, but I gather you would not? Is there any particular reason why not?

Cheers!

Re: SoX and Converting 192/24 to 96/24

Reply #5
It is just me and over here we have found no prove if a steep filter really harms.
https://hydrogenaud.io/index.php/topic,109900.25.html
There is also a famous listening test of filters thats result is said to be at fault because it uses an unusual narrow filtering wide of 500Hz :)
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: SoX and Converting 192/24 to 96/24

Reply #6
@ron spencer

Explanation is not needed if you can actually hear the differences. Try to resample to something like 16-32kHz with different parameters to make the differences more likely to be audible in order to understand what those parameters mean. Many DACs don't support native sample rate below 44.1k, so the files will likely be upsampled to at least 44.1kHz again, but when this upsampling process is constant, then all audible differences are caused by the downsampling process, therefore still useful for comparison. Also, make sure the resampling process doesn't clip:
https://hydrogenaud.io/index.php/topic,101850.0.html

A drawback of this experiment is, most hi-res audio files don't have meaningful and high amplitude signal beyond somewhere around 30-40kHz, read this thread for example:
https://hydrogenaud.io/index.php/topic,114247.0.html

So when resample from 192k to 96k, slight differences like 90-99% bandwidth actually mean nothing, even if you play a hi-res file at half or even quarter speed to inspect higher frequencies. How can the filtering effects audible if there is nothing to filter at the first place?

Re: SoX and Converting 192/24 to 96/24

Reply #7
It is just me and over here we have found no prove if a steep filter really harms.
https://hydrogenaud.io/index.php/topic,109900.25.html
There is also a famous listening test of filters thats result is said to be at fault because it uses an unusual narrow filtering wide of 500Hz :)

What kind of proof are you looking for?

Of course in science, there are no proofs, just different pieces of evidence whose strength varies.

One seemingly relevant factoid is that most means for making steep filters, or more properly filters with narrow transition bands, have the effect of creating more ringing.

Ringing is audible if extreme and at audible frequencies, and it becomes audible even when at inaudible frequencies if it for example stimulates clipping.

Re: SoX and Converting 192/24 to 96/24

Reply #8
In all honesty, I am just looking at getting the best I can get. I don't seem to be able to hear with any differences, so unless there is something else I can add I think I'm ok.

Re: SoX and Converting 192/24 to 96/24

Reply #9
thanks for responding...I'll keep with what I have. I have read that some use it going to 44.1, but I gather you would not? Is there any particular reason why not?
The default parameters, i.e. no options at all, are good for all common situations.

Advantages of a steep filter:
  • More frequencies are preserved. (Though in order to hear them—of course, only if in the audible range—you may need subsequent upsampling in software or reconstruction in your DAC with a similarly steep filter.)

Disadvantages of a steep filter:
  • Slower to resample. (Though not much of an issue on modern hardware unless converting very large numbers of tracks.)
  • More prone to clipping on ‘smashed’ (or artificial) signals. (Though if the audio is smashed anyway, a little extra clipping may not make it sound any worse.)
  • Will produce more audible artefacts at non-silent ends of tracks, i.e. segues. (Though this issue can and should be avoided entirely by concatenating, resampling, then resplitting segued tracks.)

Re: SoX and Converting 192/24 to 96/24

Reply #10
http://sox.sourceforge.net/Docs/FAQ -> 5. What are the best 'rate' settings to resample a file and retain the highest quality?

Personally, I just use:
Code: [Select]
sox -G input_file -b 16 -r 44100 output_file
I don't seem to be able to hear with any differences
Did you check how far can you go and still hear no differences? Why stop at 96/24? :)

Re: SoX and Converting 192/24 to 96/24

Reply #11
In all honesty, I am just looking at getting the best I can get. I don't seem to be able to hear with any differences, so unless there is something else I can add I think I'm ok.

The narrowest frequency range for transparent reproduction with normal music is 20 Hz - 16 KHz.

Some instruments produce significant output down to 16 Hz or less. Then there are ambient sounds like foot tapping that my go lower.

The narrowest sonically transparent dynamic range for most music in most venues and listening situations is about 75 dB, which corresponds to 13 bits.

So, 16/44 is an "overkill" format, and not by a little.

Re: SoX and Converting 192/24 to 96/24

Reply #12

Ringing is audible if extreme and at audible frequencies, and it becomes audible even when at inaudible frequencies if it for example stimulates clipping.


How do you mean? Are you talking about the Gibbs effect where the peaky bits due to a sharp filter may cause clipping?

Re: SoX and Converting 192/24 to 96/24

Reply #13
Hiyas, having similar task and not wanting to make new topic:
Can anybody advice what's wrong with commandline syntax for redirecting of stdin downscaled to 16bit preserving sampling rate to stdout?

Code: [Select]
... | sox -t wav --ignore-length - -G -b 16 -t wav dither | ...

I'm getting the list of supported arguments so It's not correct

Or is there by chance a foobar's DSP plugin to do the same?

Re: SoX and Converting 192/24 to 96/24

Reply #14
How piping can work together with -G option??

Re: SoX and Converting 192/24 to 96/24

Reply #15
Piping does work with -G if resampling too:

sox -t wav --ignore-length - -G -b 16 -t wav - rate -v -L 44100 dither

But I don't want to resample here

Re: SoX and Converting 192/24 to 96/24

Reply #16
Hiyas, having similar task and not wanting to make new topic:
Can anybody advice what's wrong with commandline syntax for redirecting of stdin downscaled to 16bit preserving sampling rate to stdout?

Code: [Select]
... | sox -t wav --ignore-length - -G -b 16 -t wav dither | ...
I think you are missing "-" for output file:
Code: [Select]
... -b 16 -t wav - dither | ...