Hello Martin,

Generally, SoX should do what it’s been told to do i.e. not try to guess what 
alternative would please the user when this is not possible.

For example, in this particular case, as well as a cut-off point, the lowpass 
sinc filter has a transition band width that is adjustable by the user, who may 
just as concerned in achieving the associated (perhaps gentle) roll-off as the 
ultimate cut-off.  So the ‘correct’ behaviour in this case might be to increase 
the sample-rate, apply the sinc, and optionally return the sample-rate to the 
original.

Scripting works well in such situations i.e. using soxi to query the audio file 
attributes and building up the sox command line as appropriate to the user’s 
preferences.

That said, the current code does allow for effects that deem themselves 
redundant to simply remove themselves from the effects chain.  E.g. see the 
rate effect: it will remove itself if its input rate and requested rate are 
equal.

If the sinc effect were given the ability to auto-remove when the cutoff is 
above Nyquist, it would need to emit a WARN message or perhaps better, to 
auto-remove only if instructed to do so via a new flag. 

HTH,
Rob


_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to