# Convert Stereo Signal to mono

Hi,

Is there a simple way to convert a stereo signal to mono? Basically a reverse of Pan2.

I have this synth def, which is outputting in stereo.

``````(
SynthDef(\droneFM, {
arg f1Freq=0.1, f2Freq=1.1, f3Freq=2.2, m1Ratio=1, m2Ratio=2, m3Ratio=3,
amp=0.1, dur=55, ampM=0.84;
var sig, car1, mod1, car2, mod2, car3, mod3, env, index, nFreq, out;
index = LFNoise1.kr(0.2).range(2, 12);
env = EnvGen.kr(
\gate.kr(1),
doneAction: 2
);
mod1 = SinOsc.ar([\nFreq.kr(100) * m1Ratio, \nFreq.kr(100)+0.7 * m1Ratio], mul:\nFreq.kr(100) * m1Ratio * index) * ampM;
car1 = SinOsc.ar(f1Freq + mod1);
mod2 = SinOsc.ar([\nFreq.kr(100) * m2Ratio, \nFreq.kr(100)+1.4 * m2Ratio], mul:\nFreq.kr(100) * m2Ratio * index) * ampM;
car2 = SinOsc.ar(f2Freq + mod2);
mod3 = SinOsc.ar([\nFreq.kr(100) * m3Ratio, \nFreq.kr(100)+0.35 * m3Ratio], mul:\nFreq.kr(100) * m3Ratio * index) * ampM;
car3 = SinOsc.ar(f3Freq + mod3) * 0.4;
sig = car1 + car2 + car3 * env * amp;
//sig = Pan2.ar(sig, pan);
Out.ar(\out.kr(1), sig);
)
``````

But I want to convert the signal to mono. Iâ€™m not sure why itâ€™s outputting in stereo, I havenâ€™t specified it to be stereo.

Here is the copy of the Pbind Iâ€™m using with it

``````(
~dronesBucket = Pbind(
\instrument, \droneFM,
\nFreq, 242.5,//485,
\dur, 30,
\ampM, 0.4,
\out, 8,
);
)
``````

You are specifying the frequency of your first SinOsc as

``````[\nFreq.kr(100) * m3Ratio, \nFreq.kr(100)+0.35 * m3Ratio]
``````

This is an Array of 2 elements - SC will multichannel expand this into an array of 2 signals.

If you want to mix them to mono use `Mix.ar( arrayOfSignals )`

Could I use`Mix.ar( arrayOfSignals )` on the output,

For example

``````Out.ar(Mix.ar(\out.kr(1)), sig));
``````

To sum the output channel down to mono?

nope!!

your array of signals is `sig`.

`\out.kr(1)` is a control called `out` that is used to select the output bus

like so:

``````Out.ar( \out.kr(0), Mix.ar(sig))
``````

To break this one down a bit:

The first argument to Out is a bus number. It normally doesnâ€™t make sense to sum bus numbers.

The second argument is the signal (or array of signals) to output â€“ this would be appropriate to mix down.

`\out.kr` produces a control input named â€śout.â€ť By convention, â€śoutâ€ť is generally the leftmost bus number for the output. Usually we define the default bus number as 0, so that the output will begin on the lowest numbered hardware channel. The `(1)` after `kr` sets the default to 1, so that your single-channel output would come out the right-hand speaker in a stereo setup. This may or may not be what you want â€“ just to be clear what itâ€™s doing.

If you wanted to mix down to mono and then play on both left and right channels, it would be `Mix(sig).dup` or even `sig.sum.dup` (onto bus 0).

(Aside: Thereâ€™s no significant difference between `Mix(sig)` and `sig.sum` â€“ Mix might be a holdover from SC2 and might disappear in SC4.)

hjh

1 Like