Como cierre del curso
Introducción a ambientes de animación en tiempo
real impartido por Luis Navarro los alumnos realizaron ejercicios de
live coding (programación en tiempo real en escena) con
gráficos a partir del software libre fluxus.
Músicos electrónicos invitados hicieron mancuerna
para generar una propuesta visual sonora todo dentro del concepto de
live coding.
a=Pdef(\aa,Pbind(\midinote,40,\amp,2,\dur,0.5)).play
a.stop
b=Pdef(\chia,Pbind(\midinote,20,\amp,1.5,\dur,0.1)).play
b.stop
c=Pdef(\caradeano,Pbind(\midinote,Pseq([40,80,120], inf))).play
c.stop
d=Pdef(\yalacague,Pbind(\midinote,40,\amp,2,
\dur,Pseq([0.1,0.1,0.1,0.1,(1..5).choose])))
d.stop
e=Pdef(\ahoryano,Pbind(\midinote,15,\amp,2,\dur,Pseq([5,\r,1,\r],inf))).play
e.stop
(clear)
(define (isra)
(rotate (vector (* 33(sin(time))) 1 (* 122(cos(time)))))
(colour(rndvec))
(with-state)
(colour(vector 1 1 9)))
(draw-cube)
(translate(vector (* 15(cos(time))) 1 1 ))
(scale(* 22 (sin(time))))
(draw-torus))
(every-frame (isra))
SI, epa!!!!
currentEnvironmet
p=ProxySpace.push(s)
~a1 = {Mix(SinOsc.ar(LFNoise0.ar([0.25, 0.5, 0.75]*2).range(24,
48).midicps, 0, 0.4)*Pulse.ar([0.25, 0.5, 0.75], [0.1, 0.2,0.4]))!2}
~a1.play
~a1.end
~a1.clear
~a2 = {Mix(SinOsc.ar(LFNoise0.ar([0.25, 0.5, 0.75]*2).range(48,
79).midicps, 0, 0.2)*Pulse.ar([0.25, 0.5, 0.75]*4, LFNoise0.ar([2, 1,
0.4]).range(0.01, 0.5))!2}
~a2.play
~a1.end
~a1.clear
p.end
(clear)
(start-audio "" 1024 44100)
(hint-wire)
(gain 0.5)
(blur 0.04)
(define (albo n)
(cond
((zero? n) 0)
(else
(translate (vector 1.4 0 0))
(rotate (vector (gh 2) (gh 5)
9))
(colour (vector (gh 1) (gh 5) (gh (* n
14))))
(scale (vector (gh 2) (gh 7) (gh 20)))
(draw-cube)
(albo (- n 1)))))
(every-frame (albo 11))
(
// LIVE CODING SYNTHS - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
SynthDef(\lv1, { | f = 440, a = 0.01, d = 0.18, out = 0, gate = 1, cps
= 4|
var sen1, sen2, sen3, env, filtro;
sen1=Gendy1.ar(0, rrand(0,6), 0, 0, f, f+20, 0.5, 0, cps, 2);
sen2=Gendy1.ar(2, rrand(0,6), 0.01, 0.8, f, f+20, 0.5, 0.22,
SinOsc.kr(1, 0, 9, 21), 2);
sen3=Gendy1.ar(3, rrand(0,6), 0.3, 0, f/2, f/2+20, 0.5, 0.4,
SinOsc.kr(1, 0, 48.5, 51.5), 20);
filtro = Resonz.ar( sen1+sen2+sen3, f, rrand(20,3000)/f*2);
env = EnvGen.kr( Env.asr(a, 0.7, d), gate, doneAction:2);
Out.ar(out, (filtro+((sen1+sen2+sen3)*0.01))*env);
}).store;
SynthDef(\lv2, { | f = 440, a = 0.01, d = 0.18, out = 0, gate = 1, cps
= 4|
var sen1, sen2, sen3, env, filtro;
sen1=SinOsc.ar(f,0,0.5) * BrownNoise.kr(rrand(1,4.1));
sen2=LFTri.ar(Line.kr(f, f-20, 0.25),0.3) * BrownNoise.kr(rrand(1,4.1));
sen3=Pulse.ar( Line.kr(f, f-20, 0.5),0.02) *
BrownNoise.kr(rrand(1,4.1));
filtro = Resonz.ar( sen1+sen2+sen3, f, rrand(20,3000)/(f/2));
env = EnvGen.kr( Env.asr(a, 0.7, d), gate, doneAction:2);
Out.ar(out, (filtro+((sen1+sen2+sen3)*0.01))*env);
}).store;
)
// INICIA LIVE CODING- - - - -
g = Synth(\lv1, [\a, 45, \d, 30, ]);
g.set(\gate, 0);
// BASS - - - - -
~bass1 = Pbind(
\midinote, Pseq(Array.rand(100,19,25), inf),
\dur, Pseq(([0.25,0.25,0.5]).pyramid, inf),
\pan, -1, \out, 1
).play;
~bass1.stop;
~bass1.play;
~bass2 = Pbind(
\midinote, Pseq(Array.rand(100,19,25), inf),
\dur, Pseq(([0.25,0.25,0.5]).pyramid, inf),
\pan, -1, \out, 2
).play;
~bass2.stop;
~bass2.play;
~bass2H = Pbind(
\midinote, Pseq(Array.rand(100,19,25)*2.6, inf),
\dur, Pseq(([0.25,0.25,0.5]).pyramid, inf),
\pan, -1, \out, 2
).play;
~bass2H.stop;
~bass2H.play;
~bass3 = Pbind(
\midinote, Pseq(Array.rand(100,19,25), inf),
\dur, Pseq(([0.25,0.25,0.5]/2).pyramid, inf),
\pan, -1, \out, 2
).play;
~bass3.stop;
~bass3.play;
// SX - - - - -
~sx = Pbind(
\instrument, \lv1,
\f, Pseq(Array.rand(100,19,25)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/1).pyramid, inf),
\pan, -1, \out, 3
).play;
~sx.stop;
~sx.play;
~sx2 = Pbind(
\instrument, \lv2,
\f, Pseq(Array.rand(100,19,25)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/1).pyramid, inf),
\pan, -1, \out, 4
).play;
~sx2.stop;
~sx2.play;
~sx3 = Pbind(
\instrument, \lv2,
\f, Pseq(Array.rand(100,19,25)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/2).pyramid, inf),
\pan, -1, \out, 4
).play;
~sx3.stop;
~sx3.play;
ç// RR
~rr = Pbind(
\instrument, \lv2,
\f, Pseq(Array.rand(100,55, 57.5)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/1).pyramid, inf),
\pan, -1, \out, 6
).play;
~rr.stop;
~rr.play;
~rr2 = Pbind(
\instrument, \lv1,
\f, Pseq(Array.rand(100,55, 57.5)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/1).pyramid, inf),
\pan, -1, \out, 4
).play;
~rr2.stop;
~rr2.play;
// MG .- . . . . .
~mg = Pbind(
\instrument, \lv1,
\f, Pseq(Array.rand(100,55, 57.5)*10, inf),
\dur, Pseq(([0.25,0.25,0.5]/10).pyramid, inf),
\pan, -1, \out, 7
).play;
~mg.stop;
~mg.play;
(clear) ; ACD
(start-audio "" 1024 44100)
(define esfera (build-sphere 10 20))
(define (acd)
(with-primitive esfera
(colour (vector (gh 0) (gh 5) (gh 15)))
(rotate (vector 0 (sin (gh 5)) 0))
(pdata-map!
(lambda (p) (rndvec))
"p")
(pdata-map!
(lambda (n) (rndvec))
"n")))
(every-frame (acd))
* nota: los siguientes
códigos no fueron hechos en vivo.
;BaseRythm
TempoClock.default.tempo = 100/60
(
(
SynthDef(\tar,{|amp=1,gate=1,frecuencia=218|
var sen, env,ruido;
ruido=LPF.ar(WhiteNoise.ar(0.65),XLine.kr(7000,3000,0.9),amp);
sen=Pan2.ar(SinOsc.ar(frecuencia,0,1)+ruido,0,amp);
env=EnvGen.kr(Env.perc(0,0.2),gate,doneAction:2);
Out.ar(0,sen*env)
}).send(s)
);
/*
Synth(\tar)
*/
(
SynthDef(\bom,{|amp=2,gate=1,freq=60,pan=0|
var sen, env;
10.do{sen=Limiter.ar(SinOsc.ar(freq,pi/4,amp),amp)};
env=EnvGen.kr(Env.perc(0,0.3),gate,doneAction:2);
Out.ar(0,Pan2.ar(sen*env,pan,amp))
}).send(s)
);
/*
Synth(\bom)
*/
)
(
~seq1= PatternProxy(Pseq([1,1],inf));
~seq2= PatternProxy(Pseq([2,2],inf));
)
(
Pdef(\seqBom,Pbind(
\instrument, \bom,
\freq, 60,
\dur, ~seq1,
\amp, 1
));
Pdef(\seqTar,Pbind(
\instrument, \tar,
\dur, ~seq2,
\amp, 1
));
)
(
Pdef(\seqBom).play;
Pdef(\seqTar).play;
)
(
Pdef(\seqBom).stop;
Pdef(\seqTar).stop;
)
~seq1.source = Pseq([0.5,0.75,0.25,0.25],inf);
~seq2.source = Pseq([2,0.25,1,2,0.25],inf);
~seq2.source = Pseq([2],inf);
~seq2.source = Pseq([2,0.75,1.25],inf);
;El Batido
(
SynthDef(\batimento2,{|amp=0.3,gate=1|
var sign, env, pan;
sign=SinOsc.ar(104,0,0.2)+SinOsc.ar(101,0,0.2);
pan=SinOsc.kr(1);
env=EnvGen.kr(Env.asr(0,0.4,1),Line.kr(1,0,2),doneAction:2);
Out.ar(0,Pan2.ar(sign*env,pan,amp))}
).send(s)
)
/*
Synth(\batimento2)
*/
~trig= PatternProxy(Pseq([4,8],inf));
(
Pdef(\buzz,Pbind(
\instrument, \batimento2,
\dur, ~trig,
\amp, 5
));
)
Pdef(\buzz).play;
Pdef(\buzz).stop;
~trig.source = Pseq([2,4],inf);
;Synth
(
SynthDef(\trip,{ |freq=100,amp=1,pan,gate=1,rel=0.1|
Out.ar(0,Pan2.ar(LFTri.ar(freq,0,amp),pan,amp)*EnvGen.kr(Env.perc(0.1,rel),gate,doneAction:2)
)}).send(s)
)
/*
Synth(\trip)
*/
(
~nots= PatternProxy(Pseq([62,67,65,64,70,65,69,72].midicps,inf));
~ladur= PatternProxy(Pseq([0.125/2,0.125/5,0.125/8,0.125/3],inf));
~amplitud= 0.3;
)
(
Pdef(\triping,Pbind(
\instrument, \trip,
\freq, ~nots,
\dur, ~ladur,
\amp, ~amplitud
));
)
Pdef(\triping).play;
Pdef(\triping).stop;
~nots.source = Pseq([62,67,64,70,65,69,72].midicps,inf);
~nots.source = Pseq([61,65,66,62,67,70].midicps,inf);
~nots.source = Pseq([62,67,65,64,69,65].midicps,inf);
~amplitud= 0.1;
~amplitud= 0.3;
~ladur.source = Pseq([0.125/2,0.125/5,0.125/8,0.125/3],inf);
;hola...
(clear)
(start-audio "" 1024 44100)
(hint-none)
(hint-wire)
(define (mixi n)
(cond
((zero? n) 0)
(else
(rotate (vector (gh 2) (gh 5) 1))
(colour (rndvec))
(wire-colour (vector 2 0 0))
(draw-cube)
(with-state
(scale (vector (time) 5 5))
(mixi (- n 1))))))
(blur 0.4)
(every-frame (mixi 10))
s.boot
(
SynthDef(\avi,{|freq=100,amp,gate=1,out=0,pan=0,
rq=0.1,freq1=140,freq2=4,freq3=1600|
var sig, env, eco;
sig =
Formant.ar(freq2,freq1,freq3)*RHPF.ar(WhiteNoise.ar(0.1,SinOsc.kr(2,0.50,2,1)),freq,SinOsc.kr(0.04,0.75,2.0,1.00));
eco =
GVerb.ar(sig,XLine.kr(2,200,10),2,0.5,0.5,1,0.1,0.3,XLine.kr(1,2,30),1);
env = EnvGen.kr(Env.adsr(0,1,1,0),gate,doneAction:2);
Out.ar(out,Pan2.ar(eco*env,pan,RHPF.ar(Saw.ar(80),freq+200,rq)));
}).send(s);
)
d = Synth(\avi)
d.set(\freq,100);
d.set(\freq1,1000.0);
d.set(\rq,1.0005);
d.set(\freq2,1.3000);
d.set(\freq3,2000);
d.set(\pan,-1);
(clear)
(start-audio "" 1024 44100)
(hint-wire)
(define (jess n)
(cond
((not (zero? n))
(translate (vector 1.5 0 0))
(rotate (vector (* 45 (sin (time))) 100 50))
(colour (rndvec))
(draw-cube)
(jess (- n 1 )))))
(every-frame (jess 1000))
(
SynthDef(\man, {|freq 3000, dur 1, att 5, rel 0.5|
var sig, env;
sig=GbmanL.ar(freq, -0.7, -2.7);
env=EnvGen.kr(Env.sine(att, rel), doneAction:2);
Out.ar(0, Pan2.ar(sig*env*0.5, LFNoise1.kr(0.2)));
}).send(s)
)
Synth(\man)
(
SynthDef(\manMouse, {|freq 3000, dur 1, att 5, rel 0.5|
var sig, env;
sig=GbmanL.ar(MouseY.kr(20000,100), -0.7, -2.7);
env=EnvGen.kr(Env.sine(att, rel), doneAction:2);
Out.ar(0, Pan2.ar(sig*env*0.5*MouseButton.kr(0,1), LFNoise1.kr(0.2)));
}).send(s)
)
Synth(\manMouse)
~w=Array.rand(7,340,12000)
(
Tdef(\si, {
inf.do{|i|
Synth(\man, [\freq, ~w[i%(~w.size)]]);
0.1.wait;
}
}).quant_(0);
)
(
Tdef(\si, {
inf.do
{Synth(\man, [\freq, Array.rand(7, 300,3000).choose*2]);
0.1.wait;
}
}).quant_(0);
)
(
Tdef(\no, {var e=Array.rand(7, 3000,30000);
inf.do
{|i|
Synth(\man, [\freq, e[i%7], \att, 0.2]);
[0.1,0.2,0.4].choose.wait;
}
}).quant_(0);
)
Tdef(\no).play
Tdef(\si).play
(define (collider g)
(cond
((not (zero? n))
(translate (vector 1.2 0 0))
(draw-sphere)
(collider (- g 1)))
(every-frame (collider 1300))
(clear)
(start-audio "system:capture_1" 1024 44100)
(hint-wire)
(opacity 0.4)
(define (laad)
(with-state
(scale (vector (+ 1 (* 0.05 (gh 6))) 1 1))
(rotate (vector (* 1.5 (gh 0)) (* 1.3 (gh 16)) 0))
(colour (vector (* 0.85 (gh 6)) 0 (* 0.85 (sin (time)))))
(draw-cube))
(with-state
(for ((n (in-range 0 15)))
(rotate (vector (* 5 (sin (time))) (* 5 (gh 5)) 0))
(translate (vector 1.2 2 0))
(colour (vector (* 0.5 (gh 1)) (* 0.25 (gh 8)) (* 0.25 (gh 16))))
(draw-cube))
(with-state
(for ((n (in-range 0 15)))
(rotate (vector (* 5 (sin (time))) (* 5 (gh 5)) 0))
(translate (vector 0 1.2 2))
(colour (vector (* 0.5 (gh 1)) (* 0.25 (gh 8)) (* 0.25 (gh 16))))
(draw-cube))
)
)
(with-state
(scale (vector (+ 1 (* 0.05 (gh 6))) 1 1))
(rotate (vector (* 1.5 (gh 0)) (* 1.3 (gh 16)) 0))
(colour (vector (* 0.85 (gh 6)) 0 (* 0.85 (sin (time)))))
(draw-cube))
)
(blur 0.2)
(every-frame (laad))
(
SynthDef("KSpluck",
{
arg midinote = 69, delayDecay = 1.0, out=0;
var burstEnv, att = 0, dec = 0.001;
var signalOut, delayTime;
delayTime = midinote.midicps.reciprocal;
burstEnv = EnvGen.kr(Env.perc(att, dec));
signalOut = PinkNoise.ar(burstEnv);
signalOut = CombL.ar(signalOut, delayTime,
delayTime,
delayDecay, add: signalOut);
DetectSilence.ar(signalOut, doneAction:2);
Out.ar(out, signalOut) } ).store;
)
(Pdef(\alvuelo, Pbind(\instrument, \KSpluck, \dur,0.3333, \midinote,
Prand([60,45,34,56,7,8,9],inf),\out,{1.rand2})).play)
(Pdef(\alvuelo2, Pbind(\instrument, \lucas, \dur,1/8, \midinote,
6,\amp,0.3,\out,{1.rand2})).play)
(
Pdef(\polyphony,
Ppar([
Pbind(\instrument, \lucas, \dur, 1/8, \midinote, 6,\out,
{1.0.rand2},\db,-130),
Pbind(\instrument, \KSpluck, \dur, 1, \midinote, 48,\out,
{1.0.rand2},\db,-13),
],inf)
))
(
Pdef(\polyfony).play
)
Pdef(\myLoopedNote, Pbind( \instrument, \KSpluck, \midinote, 40, \dur,
1/4, \db, -12)).play
Pdef(\myLoopedNote, Pbind( \instrument, \KSpluck, \midinote, 40, \dur,
1/4, \db, -12, \out, 1)).play
Pdef(\myLoopedNote, Pbind( \instrument, \KSpluck, \midinote, 40, \dur,
1, \db, -12, \out, {1.rand2})).play
Pdef(\myLoopedNote, Pbind( \instrument, \KSpluck, \midinote,
{80.rrand(30)}, \dur, 0.12, \db, -12, \out, {1.rand})).play
(
Pdef(\myLoopedNote, Ppar([
Pbind(\instrument, \KSpluck, \midinote, {96.rrand(30).round(4)}, \dur,
0.12, \db, -6, \out, {1.rand2}),
Pbind(\instrument, \KSpluck, \midinote, 30, \dur, 1, \db, -6, \out,
{1.rand2})],inf)
).play
)
//*******¨¨¨¨**************************
(
SynthDef(\lucas, { arg i_out=0, sustain=1, freq;
var out;
out = RLPF.ar(
LFSaw.ar( freq ),
LFNoise1.kr(1, 36, 110).midicps,
0.1
) * EnvGen.kr( Env.perc, levelScale: 0.3,
timeScale: sustain, doneAction: 2 );
4.do({ out = AllpassN.ar(out, 0.05, [0.05.rand, 0.05.rand], 4) });
Out.ar( i_out, out );
} * amp).store;
)
(
Pdef(\polyphony,
Ppar([
Pbind(\instrument, \lucas, \dur, 1/8, \midinote, 60,\amp,0.0),
Pbind(\instrument, \default, \dur, 1, \midinote, 48),
],inf)
).play
)
Help.gui
Pdef(\poly,
Ppar([
Pbind(\dur, Pbrown(0.06125,0.25, 0.125),
\midinote,Pbrown(30,70,5),\amp,0.14,\pan, Pfunc({1.0.rand2})),
Pbind(\dur, Pbrown(0.125,1, 0.25),
\midinote,Pseq([30,9,5,40,34,78,2,3,5],inf),\amp,0.14)], inf)
).play
Pdef(\poly, Pbind(\