| User-Defined Opcode Database |
|---|
Changes the image width of a stereo signal
Download UDO FileChanges the width of a stereo image, equivalent to adjusting the side component of an M/S signal. Negative values from 0 to -45 will narrow the width of the image. Positive values will in principle increase the width of an image, with the risk of "phasey" components.
al, ar stereoWidth ainl, ainr, kwidth
ainl, ainr -- input audio signal
kwidth -- the width of rotation in degrees, usually in the range of -45 to +45
opcode stereoWidth, aa, aak ainl, ainr, ktheta xin ; constants ipi = 3.141592653589793 iradfac = ipi/180 ;compute coeffs ktheta = iradfac*ktheta kstheta = sin(ktheta) kctheta = cos(ktheta) ;Do Width aoutl = kctheta*ainl - kstheta*ainr aoutr = -kstheta*ainl + kctheta*ainr xout aoutl, aoutr endop
instr 1 ainl, ainr ins aoutl, aoutr stereoWidth ainl, ainr, -40 ; crunch the image to almost mono outs aoutl, aoutr endin
Joseph Anderson and ma++, jan 2011
| Previous | Home | Next |
| stereoRotate | StrayElMem |