We'll first use the stereo scope to illustrate these transforms. Let's boot the server:
To display signals as lissajous patterns:
Our first two transforms translate between different representations of a stereo image. The left-right (LR) and middle-and-side (MS) domains are orthogonal: no information is lost transforming between the two.1 Note that for both transforms, each channel is the scaled sum or difference of its counterpart's channels.
Stereo rotation is the full-stereo equivalent of the Sine-Cosine panning law. Under the rotation transform, all elements of the stereo image are repositioned without any change to gain. Note that with true stereo rotation, it is possible to place the image in "phasey" regions of the stereo field, reducing mono compatibility.
Let's take a listen. Evaluate the following code block to hear the rotation of two enveloped sinusoids. Note the rotation of the the lissajous pattern on the stethoscope.
The width transformation adjusts the relative gains of the M and S components of the stereo signal, compressing the image towards the M- or S- axis. This is equivalent to rotating the L and R axes opposite one another by a given angle.
The code below illustrates the bounds of the width transformation. On the lissajous display, observe the compression of the pattern towards one axis, then another (Note: this display is rotated 45 degrees from what one would expect to see on a goniometer. Here, the stereo L and R channels are mapped to the X- and Y- inputs, respectively).
Stereo balance, on the other hand, adjusts the relative gains of the L and R components of the stereo signal. It is the L-R domain equivalent of the width transformation, as if rotating the M and S axes opposite one another.
In this example, we'll hear a pair of enveloped sinusoids panned hard left and right. Modulating the balance of the stereo image results in the alternation between apparent singals. Observe how this produces a lissajous pattern similar to that of the width transform, but shifted 90 degrees.
Middle panorama rotates the M-axis, leaving the S-axis in place. The equation below is derived from the rotation transform applied in the MS domain.
In the following example, we start by defining an input signal in the MS domain. Decorrelated sinusoid appear in the side, while pink noise appears in the middle channel. After encoding the stereo signal in the LR domain, transforming the image with middle panorama rotates the noise component around the stereo field, leaving the sinusoids at the side of the image.
Similarly, asymmetry is the rotation of the S-axis, leaving the M-axis in place.
Like the above example, we author a stereo image in the MS domain. This time, we rotate the side component: enveloped noise. The sinusoid in the middle of the image is static.
Left and Right panorama are the LR domain applications of the above two transforms. Note the similarity between left panorama and asymmetry and between right and middle panorama.
These examples use a pair of harmonic sinusoids panned hard left and right to illustrate the rotation of only L or R channels.
This tutorial is derived from lecture notes from DXARTS 462: Digital Sound Processing, University of Washington, Spring 2022.2
The following analysis functions assume that the input is a stereo signal. To begin, let's consider a mono source encoded with the Sine-Cosine Panning Law. The following are the scalars with which to multiply the mono signal to derive the left and right stereo channels.
Though all BlumBox analysis functions have a flag for instantaneous analysis, we'll focus on their time averaged counterparts. We'll denote time averaging of a signal with angle brackets:
The time averaged power of the input monphonic signal is calculated:
With a signal encoded with the sine-cosine law, let's review how to find the power of the encoded input signal:
What we see is that given the Pythagorean trigonometric identity, the coefficients gL and gR drop out, and we can directly extract the time averaged power of the input monphonic signal. We can re-write for clarity:
The BlumBox includes an analysis function for both instantaneous and time averaged stereo signal power: BlumFollowPower.
The time averaged balance indicates how the power is balanced across the left-right axis of the stereo field, and can be found:
And solving for the trigonometric expression:
The returned value varies between 1
and -1
, and these are mapped across the image:
position | left | center | right |
value | 1.0 | 0.0 | -1.0 |
To find stereo signal balance, we'll use the BlumBox's BlumFollowBalance.
Time averaged correlation indicates how the power is balanced across the middle-side axis of the stereo field. We can think of this value as indicating how stereo the signal is:
And solving for the trigonometric expression:
The returned value varies between 1
and -1
and these are mapped:
position | middle | de-correlated | side |
value | 1.0 | 0.0 | -1.0 |
See Kendall's discussion as to how these values of correlation audition.3
BlumFollowCorrelation gives us a quick way to return stereo correlation.
Both balance and correlation are returned to us as trigonometric expressions:
You'll notice that we can extract the panorama angle:
The Blumlein Box function BlumFollowAngle does this for us!
Similarly, using the trigonometric relationship between balance and correlation, we can extract the encoding radius of the stereo signal with BlumFollowRadius.
What use is this?
SuperCollider's colored noise generators can be used to return decorrelated signals. Given a decorrelated SOURCE, we can use stereo imaging transforms to further shape the panorama of the generated image. In the example below we'll use width followed by rotate.
We'll then display an analysis of balance and correlation of the synthesized image in a scope. Left-Right balance is mapped to the x-axis and Middle-Side correlation to the y-axis. Additionally, we'll poll the analyzed panorama angle to the post window.
We'll render this in realtime.
____________________
Evaluate the codeblock below. Notice, there are several example note calls to try.