I just bought an LSD2 mic, which can do mid/side recording. So I'll have to play with it.

I don't have a special preamp, so I figure I just record the mid track and side track seperately and then try to mix them at home.
I'm a linux geek, and prefer command line programs (like sox or ssrc) which just run without interaction, and then I can glue them together in a script, let it run and walk away. I can use audacity if I have to, but would prefer not to. I'm not fluent in ecasound, but recognize that may be the solution. I'm running Debian sarge and etch, and prefer apt-get'able apps, but can build from source too.
I can envision a process something like this, which should be easily scriptable with a bunch of sox one-liners, but I can't figure out the right commands for sox:
- take a whole set, isolate 1 song to experiment with... call it 1song.wav
- split 1song.wav into left track and right track, i.e. mid and side track, called mid.wav and side.wav
- invert side.wav into inverted.wav
- run a mix of 75%/25% mid/side > left7525.wav
- run a mix of 75%/25% mid/inverted > right7525.wav
- combine left7525.wav and right7525.wav into a stereo track 7525mix.wav
- repeat the last 3 steps for various mixes like 40/60, 50/50, 60/40, etc.
then
- listen to the various mixes, and decide which one I like the best.
then
- repeat the split, invert, mix, combine for the whole set(s) to get a left/right mix to the preferred ratio.
then
- track out out like any other Left/right mix.
Any experience and ideas out there?