Hi everyone!

I’m trying to discover what is up into the ~n and ~rut // How are they related to the Algorithmic Pattern?

Andrea Gómez

(

~n=3;

SynthDef.new(\bellA,{

arg freq=4, amp=0.8;

var fund, harm1,harm2,harm3,harm4,sig,env,p;

//envelope

env=EnvGen.kr(Env.perc(1,0.1));

//spectral content

sig=Klang.ar(`[

[1]++Array.rand((~n-1),1,300).sort,

Array.rand(~n,0.01,0.5).sort.reverse,

Array.rand(~n,0,pi)

],freq);

sig=sig*env;
//effects
sig=Pan2.ar(sig,0);
//output
Out.ar(0,sig);
}).play;
)
(~rut=Routine({
{
p = Pbind(*[

instrument: (\default),

freq: Pseq(Array.rand(5,10,1000).scramble),

db: Pseq(Array.rand(1,-10, -30).scramble),

pan: Pseq([-1,0,1,0], inf),

dur: Pseq([Array.rand(4,1.0,3.0).scramble], inf),

]);

p.play;

1.wait;

}.loop;

}).play;

)

////////////////////////////

(~n=2;

Synth(\bellA))