Skip to content

Commit

Permalink
Merge pull request #127 from bgold-cosmos/fix-multidsynths
Browse files Browse the repository at this point in the history
Fix superprimes and superwavemechanics so pan works
  • Loading branch information
telephon authored Jul 28, 2019
2 parents 44590b5 + 6331841 commit 69514a4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/default-synths-extra.scd
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,11 @@ SynthDef(\superprimes, {|out, pan, freq, sustain, accelerate, rate=1, detune=0,
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23];
trig = Impulse.ar(30.0/primes/sustain * rate);
phase = Phasor.kr(trig, 1.0/primes/ControlRate.ir);
sound = SinOsc.ar(freq * (1..9)*[1+(detune/12),1-(detune/12)] / 2.0, phase)
sound = SinOsc.ar(freq * (1..primes.size)*[1+(detune/12),1-(detune/12)] / 2.0, phase)
* LPF.ar(Decay.ar(trig, (primes+3)*sustain/10), voice.linexp(0,2,30,18000));
sound = GVerb.ar(sound.softclip, 10*voice.linexp(0,5,1,0.01), 10).tanh;
OffsetOut.ar(out, DirtPan.ar(0.5*Splay.ar(sound.scramble), ~dirt.numChannels, pan, env));
sound = SplayAz.ar(primes.size, sound.flat, center:LFNoise2.kr(sustain).range(0,primes.size-1));
OffsetOut.ar(out, DirtPan.ar(sound, ~dirt.numChannels, pan, env));
}).add;
);

Expand All @@ -480,13 +481,13 @@ SynthDef(\superwavemechanics, {|out, pan, freq, sustain, accelerate, detune=0, v
var env, sound, i, r, d, bwr, sz;
freq = freq * XLine.ar(1, exp(accelerate), sustain);
env = EnvGen.ar(Env.sine(1.0), timeScale:sustain, doneAction:2);
i = (0..7).scramble;
i = TIRand.kr(0, 3, Impulse.kr(sustain/8).dup(8));
r = [3,5,8,9]/8;
detune = min(detune, 1.5);
d = Rand(1.6*i - detune, 1.7*i + detune).round(0.25);
sound = Resonz.ar(WhiteNoise.ar(0.5), freq * r * d, 0.01 + voice.linexp(0,1,1e-3,1));
sound = HPF.ar(Limiter.ar(55 * GVerb.ar(sound, resonance.linexp(0,1,99,0.1),10) ), 30).sanitize;
OffsetOut.ar(out, DirtPan.ar(Splay.ar(sound), ~dirt.numChannels, pan, env));
OffsetOut.ar(out, DirtPan.ar(sound.flat, ~dirt.numChannels, pan, env));
}).add;
);

Expand Down

0 comments on commit 69514a4

Please sign in to comment.