Many SoX Effects take arguments, often numeric.
These effects can be used with Play (and Rec).
It would be good to be able to change the 'effect-options' in real time (e.g. adjust mixing
of multiple input channels as the result is played).
If instead of a command line string for 'effect-options'
one could specify a (text) file and if SoX looked at
this file (not 48,000 times a second(!), probably
ten to a hundred times?) and then adjusted the effect
to match the newly specified 'effect-options' (if they
had changed) then it would be very easy to script
dynamic effects.
(My interest is in yawing, pitching, rolling and
zooming ambisonics files, but there are obviously
much, much wider applications.)
Michael
The prerelease of SoX 14.2.0 gets us closer to this. Give it a try and see if it supports things you'd like to do.
Its arguable if a batch processing program like SoX should have real time settings but its getting closer to that none the less.
First up, SoX now supports setting up multiple effects chains and running them over the whole file. This isn't real time because you have to compute all your changes up front but it at least lets you make changes over time without splitting the file up first. This may be all you were asking for?
Next, there is also support for a new --effects-file so that effects can be read from a file instead of command line. What SoX is currently missing is a way to have it re-read that file.
While developing that code, I did have a version that would re-read the effects-file each time an effects stopped (such as trim) so its not difficult to code... just would need to define very well what conditions would cause it to re-read the file. That part would be hard because writting even one byte to the file would make timestamp change and reading it to early would result in corrupt data.
Sorry delayed reply been experimenting with 14.2, had to rewrite much code (i.e. replace 30-40 line subroutines with
one SoX command (i.e. I am _not_ complaining;-)>).
See your point about real-time v. batch processing (but we do have play and rec, also if the alsa/jack issue is sorted it does move us into different pastures). This is, though, a policy issue -for you.
As one example: I create various stereo mixes (Blumlein, uhj, crossed cardiods) of the same recording and then edit one, and I want to apply the same editing to the other files -sort of batch processing?
In answer to your question: No, I was wanting real dynamic processing (one model has me listening and 'mixing' using a USB-keypad on the arm of my armchair, the mixing-commands go to a file SoX reads and also I save the contents of that (changing) file -how to do all that is my problem, if SoX reads the file).
Think the file just needs re-reading 'regularly' (fraction of a second). Some latency would be no problem. The other issues are a little beyond me.
I would be happy with a plain text file (but for the killer application OSC (opensoundcontrol.org) is interesting).
Maybe I should be using a DAW (but I like (and, perhaps more importantly, trust) SoX.
Think the issue is really where does SoX want to go in the future. So I am not embarassed to renew the request, and at the same time to say I like where it has got to now so trust your judgment.
Thanks.