From: Chris B. <ch...@cn...> - 2011-10-06 03:11:49
|
On Wed, Oct 5, 2011 at 8:25 PM, Schumacher Marlon <mar...@mu...> wrote: > Hello list, > > I experimented a bit with the fir effect piped as an input to another sox command (MacOS, sox14.3.2). > There seems to be a limit in terms of number of arguments (coefficients) that can be sent through the pipe. > > I did some tests convolving white noise (soundfile) with a 441 point sinc-function (a 'rectangular' lowpass in the frequency domain), providing the coefficients (time-domain sample-values of the sinc function) directly to the command-line, e.g. > > sox infile.aif outfile.aif fir <list-of-coefficients> > > -Works fine as expected. However, when using this sox command as an input pipe to another sox command: > > sox "|sox infile.aif -p fir <list-of-coefficients>" outfile.aif > > -the result looks more like white noise convolved with a damped sinusoid (which made me suspect that a substantial part of the sinc-function must have been truncated). When providing the coefficients as a textfile to fir this does not happen (i.e. the result is correct): > > sox "|sox infile.aif -p fir mycoefficients.txt" outfile.aif > > Truncating the list of coefficients in the textfile to (the last!) 53 coefficients yields the same result as providing the coefficients as a list through pipe. > Is this known? Could someone confirm perhaps? > It sounds like your hitting a platform limitation. There are 2 maximums that are slightly different between Windows, OSX, Linux, etc. 1 max for the total command line supported and 1 max for single parameter. When running without pipe option, each fir coeff is very small so you'll only hit the overall command line length limit. When its in the quotes for the pipe, you'll hit single parameter limit first. I thought max length should be a little higher than your seeing but I'm not exactly sure for OSX. Chris |