Here’s a little synthdef i’m working on, I’m wondering if there’s a more efficient way of getting the signals panned how I want them to be?
Specifically, this is the line that seems a bit unwieldy - it’d be cool to find a way that was more flexible so that I could change the size of the freqs array a bit quicker:
sig = [[sig[0], sig[2], sig[4], sig[6]], [sig[1], sig[3], sig[5], sig[7]]];
(
SynthDef(\organ, { |freq|
var sig;
var phases, freqs;
freqs = freq * [0.5, 1, 2, 3] +.x (LFNoise2.kr(3) ! 2);
phases = freqs.size.collect { LFNoise2.kr(3).linlin(-1, 1, 0, 2pi) };
sig = LFPar.ar(freqs, phases) * [-10, 0, -8, -10].dbamp * (LFNoise2.kr(3).linlin(-1, 1, -1, 1).dbamp ! freqs.size);
sig = [[sig[0], sig[2], sig[4], sig[6]], [sig[1], sig[3], sig[5], sig[7]]];
sig = sig + (sig * PinkNoise.ar(-22.dbamp));
sig = (sig * 1.5).tanh;
sig = sig + GVerb.ar(sig * -35.dbamp);
sig = sig * Env.asr(0.5, 1, 1.5).ar(Done.freeSelf, \gate.kr(1));
sig = sig * -33.dbamp;
Out.ar(0, sig);
}).add;
)
Thanks for any help,
Jordan