Skip to content

Commit

Permalink
added rm to \balloon
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmxyz committed Mar 10, 2019
1 parent db4c656 commit 9a40372
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions synthdefs.scd
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ s.stopRecording

(
SynthDef.new(\balloon, {
arg notea = 48, noteb = 48, notec = 48, noted = 48, tuning = 12, envab = 0, envbc = 0, envcd = 0, gain = 0.3, pan = 0.5, bandpfa = 1, bandpfb = 1, bandpfc = 1, bandpqa = 1, bandpqb = 1, bandpqc = 1, bandpga = 1, bandpgb = 1, bandpgc = 1, upbound=1000000, lobound=1, sustain = 0.5, timescale = 1;
var line, octavea, octaveb, octavec, octaved, freqa, freqb, freqc, freqd, path, env, filteda, filtedb, filtedc, sig, wave;
arg notea = 48, noteb = 48, notec = 48, noted = 48, tuning = 12, envab = 0, envbc = 0, envcd = 0, gain = 0.3, pan = 0.5, bandpfa = 1, bandpfb = 1, bandpfc = 1, bandpqa = 1, bandpqb = 1, bandpqc = 1, bandpga = 1, bandpgb = 1, bandpgc = 1, upbound=1000000, lobound=1, sustain = 0.5, timescale = 1, ringmod = 0, ringenv = 10000, ringfreq = 1;
var line, octavea, octaveb, octavec, octaved, freqa, freqb, freqc, freqd, path, env, filteda, filtedb, filtedc, sig, wave, ringline, ringed, unringed, prefilt;
line = Line.kr (1,0,sustain * timescale,gain,0,2);
notea = notea.wrap(lobound,upbound);
octavea = ((notea/tuning)-5).trunc(1);
Expand All @@ -44,9 +44,13 @@ SynthDef.new(\balloon, {
path = Env.new([freqa, freqb, freqc, freqd], [envab * timescale, envbc * timescale, envcd * timescale], \exp);
env = EnvGen.ar (path);
wave = LFPulse.ar (env);
filteda = (BBandPass.ar(wave, bandpfa * env, bandpqa) * bandpga);
filtedb = (BBandPass.ar(wave, bandpfb * env, bandpqb) * bandpgb);
filtedc = (BBandPass.ar(wave, bandpfc * env, bandpqc) * bandpgc);
ringline = XLine.ar (env*ringfreq, env, ringenv);
ringed = wave * (SinOsc.ar(ringline, 0, ringmod));
unringed = wave * (1-ringmod);
prefilt = ringed + unringed;
filteda = (BBandPass.ar(prefilt, bandpfa * env, bandpqa) * bandpga);
filtedb = (BBandPass.ar(prefilt, bandpfb * env, bandpqb) * bandpgb);
filtedc = (BBandPass.ar(prefilt, bandpfc * env, bandpqc) * bandpgc);
sig = ((filteda + filtedb + filtedc) / 3 * line);
Out.ar (0, Pan2.ar (sig, pan, 1));
}).add
Expand Down

0 comments on commit 9a40372

Please sign in to comment.