Skip to content

Instantly share code, notes, and snippets.

@moxuse
Created August 31, 2011 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moxuse/1183270 to your computer and use it in GitHub Desktop.
Save moxuse/1183270 to your computer and use it in GitHub Desktop.
Cut Oscillator Sequence with BBCut
(
SynthDef("sinerl0",{arg amp=0.8,att,rel,note;
var src,freq;
src=Mix.fill(3,{freq=(note+[0,5,7,12,36,48].choose).midicps;SinOsc.ar([freq,freq+(5.rand)],0,0.2)*amp})
*EnvGen.ar(Env.perc(att,rel,0.99,-3),doneAction:2);
Out.ar(10,src);
}).store;
SynthDef("sinerl1",{arg amp,note;
var src,freq;
freq=note.midicps;
src=(SinOsc.ar([freq*2,freq*2.01,freq*11/12,freq*2/3],0,0.1)+SinOsc.ar((note-7).midicps,0,0.06))
*EnvGen.ar(Env.perc(0.01,1.01,1,2),doneAction:2);
Out.ar(10,src);
}).store;
SynthDef("sinerl2",{arg amp,midinote;
var src,freq;
freq=midinote.midicps;
src=Mix.fill(3,{SinOsc.ar(([0,5,7,12].choose+midinote).midicps,SinOsc.ar(freq*(8.rand)),0.05)}.dup)
*EnvGen.ar(Env.perc(0.01,0.3,1,-2),doneAction:2);
Out.ar(10,src);
}).store;
)
(
Pdef(\pars,
Paddp(\ctranspose, Pseq([0,3,0,-5,0,-3,0,5], inf),
Ppar([
Pbind(\instrument,\sinerl0,
\amp,0.75,
\dur,Prand([3,1,2,4,0.75,1],inf),
\att,Prand([0.5,1,0.05,0.35,0.02],inf),
\rel,Prand([2,3,1,2],inf),
\note,Pseq([0,[5,-12],7,0,[2,-7],0,5,-2,0,[7,0],5,2]+54-12,inf)
),
Pbind(
\instrument,\sinerl1,
\amp,0.5,
\dur,Prand([0.3,1,2,Pgeom(0.85,0.9,9),0.75,1,Pgeom(0.99,0.8,8)],inf),
\note,Prand([0,5,7,0,2,0,5,-2,0,7,5,2]+78,inf)
),
Pbind(
\instrument,\sinerl2,
\dur,Prand([0.25,0.88,0.09,0.54,0.567,0.25,0.56,0.13]/2,inf),
\midinote,Prand([0,5,7,0,2,0,5,-2,0,7,5,2]+78,inf)
)
],
1)
)
)
)
Pdef(\pars).play;
Pdef(\pars).stop;
(
s.latency=0.05;
c=ExternalClock(TempoClock(4)).play;
a=BBCut2(
CutGroup([
CutFunc({arg i;NetAddr("127.0.0.1", 5500).sendMsg("tr",i)}),
CutStream1.new(10,relprop:0.9,curve:5,dutycycle:1.75),
CutMixer(0,1.4,RollAmplitude.new,CutPan1.new({0.3.rand2}))
]),
CageCut.new(44.0,[1,3,3,1,0.8,2,3,1,4,5]),
BBCutQuantise1.new(0.5)
).play(c);
)
a.play(c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment