-
-
Save mortuosplango/3406580c28b31e83d69d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Hackpact2015 laad.com.mx/hackpact2015eng.html | |
#Day 6 | |
s.reboot; | |
s.gui | |
p = ProxySpace.push(s) | |
( | |
SynthDef(\sin, { |out=0,amp=0.1,sustain=1.0,freq=440,pos=0| | |
var snd, env; | |
snd = SinOsc.ar(freq, phase:0.5pi); | |
env = EnvGen.ar(Env.perc(0.01,sustain), doneAction:2); | |
OffsetOut.ar(out, Pan2.ar(snd * amp, pos)); | |
}).add; | |
) | |
( | |
SynthDef(\noi, { |out=0,amp=0.1,sustain=1.0,freq=440,pos=(-0.5)| | |
var snd, env; | |
snd = LPF.ar(WhiteNoise.ar,freq); | |
env = EnvGen.ar(Env.perc(0.01,sustain), doneAction:2); | |
OffsetOut.ar(out, Pan2.ar(snd * amp, pos)); | |
}).add; | |
) | |
( | |
SynthDef(\saw, { |out=0,amp=0.1,sustain=1.0,freq=440, pos=0.5| | |
var snd, env; | |
snd = Saw.ar(Rand(438.0,442.0) - freq); | |
env = EnvGen.ar(Env.perc(0.01,sustain), doneAction:2); | |
OffsetOut.ar(out, Pan2.ar(snd * amp, pos)); | |
}).add; | |
) | |
( | |
Pdef(\a, | |
Pbind(\instrument, Pseq([\sin,\saw,\sin],inf), | |
\dur, 0.1, | |
\sustain, 0.05, | |
\amp, 0.2, | |
\freq, Pseg(Pwhite(30,300), 40), | |
\pos, Pseg(Pseq([0,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\aa, | |
Pbind(\instrument, Pseq([\sin,\saw,\sin,\saw,\saw],inf), | |
\dur, 0.1, | |
\sustain, 0.05, | |
\amp, 0.2, | |
\freq, Pseg(Pwhite(10,300), 50), | |
\pos, Pseg(Pseq([0,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\b, | |
Pbind(\instrument, \sin, | |
\dur, 0.1, | |
\sustain, 0.05, | |
\freq, Pseg(Pwhite(30,300) * [1,1.3], 30), | |
\pos, Pseg(Pseq([-1,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\c, | |
Pbind(\instrument, Pseq([\sin,\saw,\sin,\sin],inf), | |
\dur, 0.101, | |
\sustain, 0.05, | |
\freq, Pseg(Pwhite(30,300) * [1.2,1.5], 30), | |
\pos, Pseg(Pseq([-1,0],inf), 10) | |
)).play | |
) | |
( | |
Pdef(\noa, | |
Pbind(\instrument, \noi, | |
\dur, 4.2, | |
\sustain, 0.8, | |
\amp, 0.2, | |
\freq, Pseg(Pwhite(30,300) * [1.2,1.5], 30), | |
\pos, Pseg(Pseq([-1,0],inf), 10) | |
)).play | |
) | |
( | |
Pdef(\nob, | |
Pbind(\instrument, \noi, | |
\dur, 1.2, | |
\sustain, 0.2, | |
\amp, 0.5, | |
\freq, Pn(Pseries(30,30,60),inf), | |
\pos, Pseg(Pseq([0,1],inf), 10) | |
)).play | |
) | |
( | |
Pdef(\noc, | |
Pbind(\instrument, \noi, | |
\dur, Pseq([0.2,1],inf), | |
\sustain, 0.15, | |
\amp, 0.6, | |
\freq, Pn(Pstutter(2, Pseries(30,30,60)),inf), | |
\pos, Pseg(Pseq([-1,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\nod, | |
Pbind(\instrument, \noi, | |
\dur, Pseq([0.1,0.1,1],inf), | |
\sustain, 0.05, | |
\amp, 1.0, | |
\freq, Pn(Pstutter(3, Pseries(300,30,60)),inf), | |
\pos, Pseg(Pseq([-1,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\noe, | |
Pbind(\instrument, \noi, | |
\dur, Pseq([0.15,0.05,1],inf), | |
\sustain, 0.05, | |
\amp, 1.5, | |
\freq, Pn(Pstutter(3, Pseries(300,30,60)),inf), | |
\pos, Pseg(Pseq([-1,1],inf), 20) | |
)).play | |
) | |
( | |
Pdef(\nof, | |
Pbind(\instrument, \noi, | |
\dur, Pseq([0.05,0.15,1],inf), | |
\sustain, 0.15, | |
\amp, 2.5, | |
\freq, Pn(Pstutter(3, Pseries(300,30,60)),inf), | |
\pos, Pseg(Pseq([-1,1],inf), 20) | |
)).play | |
) | |
PdefAllGui.new(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment