El resultado es una una de casi infinitas posibilidades y aun contiene muchos parámetros modulables, la secuencia de las notas se encuentra en la tonalidad de "C" así que es un patch que puede tocar por horas melodías agradables al oído y con variaciones ricas en su timbre, fuerza y velocidad.
//ejemplo sonoro: track: m_melbx
:::click:descarga el audio:::
////escrito en Gedit sobre PureDyne 9.11
/////////////codigo:////////////////
s.boot;
s.quit
s.scope;
/////
TempoClock.default.tempo=72/60//..10/60
///
(
(
SynthDef(\mastfx2,{|gate=1,amp=0.9,tes=1,out=34|
var fx,env;
fx=PitchShift.ar(In.ar(32),0.75,tes);
env=EnvGen.ar(Env.adsr(0.01,0.25,0.98,0.01),gate,doneAction: 2);
Normalizer.ar(Out.ar(out,Pan2.ar(fx*env,[0.95,-0.82])),amp);
}).add;
);
(
SynthDef(\mastfx,{|gate=1,amp=0.9,deltime=0.1,out=0|
var fx,env;
fx=Limiter.ar(In.ar(30),0.98);
fx=CombC.ar(fx,0.5,deltime,0.5);
fx=FreeVerb.ar(fx,0.35,0.9,0.01);
env=EnvGen.ar(Env.adsr(0.01,0.25,0.98,0.01),gate,doneAction: 2);
Normalizer.ar(Out.ar(out,Pan2.ar(fx*env,[0.95,-0.82])),amp);
}).add;
);
(
SynthDef(\rev,{|gate=1,amp=1|
var fx,env;
fx=In.ar(34);
fx=DelayC.ar(fx,0.25,0.15);
fx=FreeVerb.ar(fx,0.65,0.95,0.01,1.5);
env=EnvGen.ar(Env.adsr(0.01,0.25,0.98,0.01),gate,doneAction: 2);
Normalizer.ar(Out.ar(0,Pan2.ar(fx*env,[0.95,-0.82])),amp);
}).add;
);
(//sinte
SynthDef(\timbre,{|gate=1,nota=60,amp=0.95,irdist=0.25,amp2=0.85,panl=1,rel=2,panr= -1,out=0|
var tono,tono2,env;
tono=Mix([LFTri.ar(nota.midicps,0,0.6)*LFPulse.ar(LFNoise0.ar(nota.midicps,0.5,0.26),0.6),
Saw.ar(nota.midicps,0.5,0.6)],Saw.ar(nota.midicps,0,0.75));
tono=InRange.ar(tono,0,irdist);
tono=FreeVerb.ar(tono,0.85,0.9,0.01);
tono=RLPF.ar(tono,Line.kr(120,3350,0.25),0.95);
tono=CombC.ar(tono,1,0.25,2);
tono2=FreeVerb.ar(SinOsc.ar(nota.midicps,0,amp2),0.3,0.85,0.75);
env=EnvGen.ar(Env.perc(0.15,rel),gate,doneAction: 2);
Normalizer.ar(Limiter.ar(Out.ar(out,Pan2.ar(Mix.new([tono,tono2])*env,[panl,panr])*amp),0.05),0.85)
}).add
);
///secuencias voces
(///FX
Pdef(\fxseq,
Pbind(\instrument, \mastfx,
\dur, Pwrand([0.5,0.25,0.75,1],[0.7,0.2,0.075,0.025],inf),
\deltime, Prand([0.01,0.02,0.03,0.04,0.05,0.07,0.09,1],inf),
\amp, Pn([1,1],inf),
\out, Pn([[0,34],[0,34]],inf)
)
)
);
(///FX2
Pdef(\fxseq2,
Pbind(\instrument, \mastfx2,
\dur, Prand([1,0.5,2],inf),
\amp, Pseq([0.95,1],inf),
\tes, Prand([1,1.5,2,2.7,3.3],inf),
\out, Prand([34,0],inf)
)
)
);
(///bajo
Pdef(\secuenciaescala,
Pbind(\instrument, \timbre,
\dur, Pwrand([2,3,0.5,1]*1/*este valor altera la velocidad de la duracion*/,[0.3,0.3,0.05,0.35],inf),
\nota, Prand([60,62,64,65,67,69,71,72]-24,inf),
\amp2, Pseq([0.35,0.46],inf),
\amp, Pseq([0.35],inf),
\rel, Pwrand([1,1.5,2],[0.2,0.3,0.5],inf),
\irdist, Prand([0.25,0.32,0.4],inf),
\out, Pseq([[0,30,34],[34]],inf)//[0,32,34]//[0,32]//30
)
)
);
(//segunda voz
Pdef(\secuenciaescala2,
Pbind(\instrument, \timbre,
\dur, Pwrand([1,2]/2,[0.6,0.4]*1,inf),
\nota, Prand([60,62,64,65,67,69,71,72],inf),
\panl, Prand([-0.2, -0.5, -1],inf),
\panr, Pseq([0.8,0.6,0.2],inf),
\amp2, Pseq([0.5,0.45],inf),
\rel, Pwrand([0.5,0.75,1,1.25],[0.2,0.3,0.45,0.05],inf),
\irdist, Prand([0.23,0.45,0.55],inf),
\out, Prand([[32,34],[30,0]],inf)//[32,34]//30
)
)
);
(////3er voz
Pdef(\secuenciaescala3,
Pbind(\instrument, \timbre,
\dur, Pwrand([0.5,0.25,0.75,1]*2,[0.3,0.4,0.2,0.1],inf),
\nota, Prand([60,64,67,72]+7,inf),
\panl, Pseq([0.1,0.3,0.5,0.7,0.9],inf),
\panr, Pseq([-1, -0.8, -0.6, -0.4, -0.2],inf),
\amp2, Pseq([0.35,0.4],inf),
\rel, Pwrand([3,2.5,2,1],[0.2,0.3,0.35,0.1],inf),
\irdist, Prand([0.35,0.4,0.5,0.6],inf),
\out, Pwrand([[0,34],[0,32,34],[0,30,34],[30,34]],[0.5,0.1,0.2,0.2],inf)//[0,34,32]//[0,30,32]//0
)
)
);
);
//////declarar primero los efectos
Synth(\rev)//fx
Pdef(\fxseq).play;//fx
Pdef(\fxseq2).play;//fx
(
Pdef(\secuenciaescala3).play;
Pdef(\secuenciaescala2).play;
Pdef(\secuenciaescala).play;
);
Pdef(\secuenciaescala3).stop;
Pdef(\secuenciaescala2).stop;
Pdef(\secuenciaescala).stop;
s.record;
s.stopRecording