// title: Periodic Carillion // author: mimetikmusic // description: // A little experiment with periodicity. // code: /* An little experiment with periodicity. Maybe there can be some sync artifact... */ s.boot; SynthDef(\mallet,{arg in=0,out=0,f=0,f2=0,a=0.1,r=1.8; var sig=Array.fill(3,{|n| SinOsc.ar(f*(n+1),mul:a/(n*n+1))}).sum; var env=EnvGen.kr(Env.perc(0.001,r),gate:Impulse.kr(f2),doneAction:0); Out.ar(out,sig*env!2); }; ).add; ~root=60; ~degrees=[0,4,5,7,9,12,16,17,19,21].scramble; ~num=10; ~coeff=0.75; Array.fill(~num,{|n| Synth.new(\mallet,[\f:(~root +~degrees[n]).midicps,\a:0.2/~num,\f2:(1+(n*~coeff))*0.1])}); s.quit;