Skip to content

Instantly share code, notes, and snippets.

@moxuse
Created August 31, 2011 09:52
Show Gist options
  • Save moxuse/1183203 to your computer and use it in GitHub Desktop.
Save moxuse/1183203 to your computer and use it in GitHub Desktop.
gymnopedie
////gymnopedie////
(
//SynthDefs
SynthDef("osc1",{arg freq,amp;
Out.ar(0,
SinOsc.ar([freq,freq*1.01],0,SinOsc.ar(Pulse.ar(freq*2,0.1,freq),0,0.3))
*EnvGen.ar(Env.perc(0.0,0.9,1,-4),doneAction:2)*amp
)
}).store;
SynthDef("osc2",{arg freq,amp;
Out.ar(0,
Pan2.ar(
RLPF.ar(
SinOsc.ar(freq,SinOsc.ar(freq),Pulse.ar(freq/15,0.1,0.3))
,LFNoise2.ar(2,30,90).midicps)
*EnvGen.ar(Env.perc(0.01,0.5,1,-2),doneAction:2)
,LFNoise2.ar(3))*amp
)
}).store;
SynthDef("osc3",{arg freq,amp;
Out.ar(0,
Pan2.ar(
SinOsc.ar([freq,freq*1.01],0,Pulse.ar(freq*2,0.1,0.3))
*EnvGen.ar(Env.perc(0.01,0.2,1,5),doneAction:2)*amp
)
)
}).store;
SynthDef("perc1",{arg amp;
Out.ar(0,
(HenonL.ar([8900,3200],TRand.ar(0.09,0.8,Impulse.ar(20)),
LFNoise2.kr(0.25, 0.15, 0.15),mul:0.2)
wrap2: SinOsc.ar(5,[0,0.12],0.2))
*EnvGen.ar(Env.perc(0.0,0.4,1,6),doneAction:2)*amp
)
}).store;
SynthDef("perc2",{arg amp;
Out.ar(0,
(Blip.ar(Lag.ar(TExpRand.ar(80,12023,Impulse.ar([20,18])),0.02),14,mul:0.25)
clip2: SinOsc.ar(XLine.kr(24,LFNoise2.ar(4,16,6),0.4),0,0.6))
*EnvGen.ar(Env.perc(0.0,0.1,1,6),doneAction:2)*amp
)
}).store;
//sequence
Pdef(\gymnopedie,
Ppar([
Pbind(
\instrument,\osc1,\dur, 3.0,
\midinote, Pseq([67,62] - 12, inf),
\amp,0.9),
Pbind(
\instrument,\osc1,\dur, Pseq([1.0,2.0],inf),
\midinote, Pseq([\,[59,62,66],\, [57,61,66]] , inf),
\amp,0.9),
Pbind(
\instrument,\osc1,
\dur, Pseq([ 1, 1, 1, 1, 1, 1, 1,1 ,1, 3, 12],inf),
\midinote, Pseq([\,66,69,67,66,61,59,61,62,57,54] + 12, inf),
\amp,0.8),
Pbind(
\dur,Prand([0.333333,1.33333],inf),
\instrument,\osc3,
\midinote, Prand([55,59,62,67,69,76,\,\] + 31, inf),
\pan,Pwhite(0,1),
\amp,0.3),
Pbind(
\instrument,\osc3,
\dur,Prand([0.333333,1.33333],inf),
\midinote, Pxrand([57,59,61,62,66,67,\,\] + 48, inf),
\pan,Pwhite(-1,0),
\amp,0.3),
Pbind(
\instrument,\osc2,
\dur,0.333333,
\midinote, Prand([45,50,57,69,76,\,\]-12, inf),
\amp,0.6),
Pbind(
\instrument,\perc1,
\dur,2.66666,
\amp,Pwhite(0,0.8)),
Pbind(
\instrument,\perc2,
\dur,0.66666,
\amp,Pwhite(0,0.8))
])
);
Pdef(\gymnopedie).play;
)
Tempo.bpm=60;
Pdef(\gymnopedie).stop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment