If you’ve used Audacity a bit with stereo, you’d know it has a bit of a split personality. Meaning that to change just on channel, you have to “Split Stereo Track”, which splits it into to two mono tracks that have the proper L and R pan slider set. (If you choose “split to Mono” instead, these pan sliders will be centered instead.)
But it’s pretty annoying to have to split and merge back to stereo all the time. So, for some of my plugins I’ve managed make them work on the “split stereo” tracks too.
As example I’ve uploaded on github a modification of Steve Daulton’s Isomod to have different amplitude phases on each channel. I chose that one because it’s probably the simplest one to understand. The essence of the trick to make it work for split stereo (as in the image above) is to read pan data for the split tracks.
;; converts mono track pan slider to phase: -1..1 to phaseL..phaseR
(defun phase-from-signed-pan (signed-pan)
(let ((unsigned-pan (* (+ 1.0 signed-pan) 0.5)))
(+ phaseL (* (- phaseR phaseL) unsigned-pan))))
;; if stereo track make array of phases for multichan-expand else compute one phase using mono track pan
(setq multichan-phase
(if (arrayp *track*)
(vector (phase-from-signed-pan -1) (phase-from-signed-pan 1))
; ^^ ignoring stereo track pan b/c it has different semantics than mono pan
(phase-from-signed-pan (get '*track* 'pan))))
(multichan-expand #'isomod-with-phase *track* multichan-phase)
It’s only possible with this simple technique if the L and R channels can be calculated separately, i.e. if there’s no data dependency between the channels, otherwise it gets more complicated as you’d need to save the relevant temp data to a scratch etc.
Perhaps also worth mentioning here is that to quickly get a selection on both tracks one way it to make a diagonal move with the mouse, i.e. start dragging the section on one track, but finish on the other. In fact you can go back to the original track while dragging; as long as you enter some other track briefly with the mouse while drag-selecting will result in a multi-track selection of the same time span.