I have seen various references on the web to sox parameters that I cannot see on the sox home page's pdf/html documentation.
To prove I wasnt seeing things I downloaded the sox code and had a look around.
I saw this snippet indicating that some of the referenced parameters not in the doco (say -R) were in theory accepted from the command line:
while ((c = lsx_getopt(&optstate)) != -1) switch (c) {
GETOPT_NUMERIC(optstate, 'i', coef_interp, -1, 2)
GETOPT_NUMERIC(optstate, 'c', max_coefs_size, 100, INT_MAX)
GETOPT_NUMERIC(optstate, 'p', phase, 0, 100)
GETOPT_NUMERIC(optstate, 'B', bw_0dB_pc, 53, 99.5)
GETOPT_NUMERIC(optstate, 'A', anti_aliasing_pc, 85, 100)
GETOPT_NUMERIC(optstate, 'd', bit_depth, 15, 33)
GETOPT_LOCAL_NUMERIC(optstate, 'b', bw_3dB_pc, 74, 99.7)
GETOPT_LOCAL_NUMERIC(optstate, 'R', rej, 90, 200)
GETOPT_LOCAL_NUMERIC(optstate, 'Q', quality, 0, 7)
case 'M': p->phase = 0; break;
case 'I': p->phase = 25; break;
case 'L': p->phase = 50; break;
case 'a': allow_aliasing = sox_true; break;
case 'f': p->rolloff = rolloff_none; break;
case 'n': p->noIOpt = sox_true; break;
case 's': bw_3dB_pc = 99; break;
case 't': p->use_hi_prec_clock = sox_true; break;
default:
if ((found_at = strchr(qopts, c)))
quality = found_at - qopts;
else {
lsx_fail("unknown option `-%c'", optstate.opt);
return lsx_usage(effp);
}
}
After compiling and running with an undocumented value that was out of scope (-R), it shows that this parameter is part of sox BUT neither the help inherent in the sox exe or the website make any reference to -R and other values I see referenced on the web.
So where is the latest version of the sox doco?
/usr/local/bin/sox -D -t wav bob.wav -t flac -C 0 -b 24 --buffer 131072 bob.flac gain -h -n -4 rate -v -R 80 -b 95.4 -p 45 -a 96000
/usr/local/bin/sox FAIL rate: parameter `rej' must be between 90 and 200
/usr/local/bin/sox FAIL rate: usage: [-q|-l|-m|-h|-v] [override-options] RATE[k]
BAND-
QUALITY WIDTH REJ dB TYPICAL USE
-q quick n/a ~30 @ Fs/4 playback on ancient hardware
-l low 80% 100 playback on old hardware
-m medium 95% 100 audio playback
-h high (default) 95% 125 16-bit mastering (use with dither)
-v very high 95% 175 24-bit mastering
OVERRIDE OPTIONS (only with -m, -h, -v)
-M/-I/-L Phase response = minimum/intermediate/linear(default)
-s Steep filter (band-width = 99%)
-a Allow aliasing 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)
Thanks,
Peter
To prove I wasnt seeing things I downloaded the sox code and had a look around.
I saw this snippet indicating that some of the referenced parameters not in the doco (say -R) were in theory accepted from the command line:
while ((c = lsx_getopt(&optstate)) != -1) switch (c) {
GETOPT_NUMERIC(optstate, 'i', coef_interp, -1, 2)
GETOPT_NUMERIC(optstate, 'c', max_coefs_size, 100, INT_MAX)
GETOPT_NUMERIC(optstate, 'p', phase, 0, 100)
GETOPT_NUMERIC(optstate, 'B', bw_0dB_pc, 53, 99.5)
GETOPT_NUMERIC(optstate, 'A', anti_aliasing_pc, 85, 100)
GETOPT_NUMERIC(optstate, 'd', bit_depth, 15, 33)
GETOPT_LOCAL_NUMERIC(optstate, 'b', bw_3dB_pc, 74, 99.7)
GETOPT_LOCAL_NUMERIC(optstate, 'R', rej, 90, 200)
GETOPT_LOCAL_NUMERIC(optstate, 'Q', quality, 0, 7)
case 'M': p->phase = 0; break;
case 'I': p->phase = 25; break;
case 'L': p->phase = 50; break;
case 'a': allow_aliasing = sox_true; break;
case 'f': p->rolloff = rolloff_none; break;
case 'n': p->noIOpt = sox_true; break;
case 's': bw_3dB_pc = 99; break;
case 't': p->use_hi_prec_clock = sox_true; break;
default:
if ((found_at = strchr(qopts, c)))
quality = found_at - qopts;
else {
lsx_fail("unknown option `-%c'", optstate.opt);
return lsx_usage(effp);
}
}
After compiling and running with an undocumented value that was out of scope (-R), it shows that this parameter is part of sox BUT neither the help inherent in the sox exe or the website make any reference to -R and other values I see referenced on the web.
So where is the latest version of the sox doco?
/usr/local/bin/sox -D -t wav bob.wav -t flac -C 0 -b 24 --buffer 131072 bob.flac gain -h -n -4 rate -v -R 80 -b 95.4 -p 45 -a 96000
/usr/local/bin/sox FAIL rate: parameter `rej' must be between 90 and 200
/usr/local/bin/sox FAIL rate: usage: [-q|-l|-m|-h|-v] [override-options] RATE[k]
BAND-
QUALITY WIDTH REJ dB TYPICAL USE
-q quick n/a ~30 @ Fs/4 playback on ancient hardware
-l low 80% 100 playback on old hardware
-m medium 95% 100 audio playback
-h high (default) 95% 125 16-bit mastering (use with dither)
-v very high 95% 175 24-bit mastering
OVERRIDE OPTIONS (only with -m, -h, -v)
-M/-I/-L Phase response = minimum/intermediate/linear(default)
-s Steep filter (band-width = 99%)
-a Allow aliasing 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)
Thanks,
Peter