1
0
Fork 0

adding new snippet 2020-11-03

main
Luka Prinčič 2020-11-03 11:04:40 +01:00
parent c0dd907bc4
commit c206e71fe9
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
(
var scale="something";
scale = Scale.zhi;
postln("chosen scale:" + scale.name);
10.do{ arg i;
//postln("creating iteration: " + i);
{
var snd, trig, freq, decaytime, envspec, env, noise;
//trig = Impulse.ar(freq: (1..10).choose * 0.083);
trig = Impulse.ar(freq: i * 0.083 * rrand(0.8, 1.2), phase: 100.rand*0.01);
envspec = Env.perc(
attackTime: 0.001,
releaseTime: rrand(0.001, 0.1),
level: LFNoise0.ar(100).range(0,1));
env = EnvGen.ar(
envelope: envspec,
gate: trig);
noise = BrownNoise.ar * env;
//freq = (Scale.minor.degrees+60).choose.midicps;
freq = (scale.degrees+60).choose.midicps * [0.5,1,2].choose;
decaytime = rrand(0.01,2);
snd = Ringz.ar(noise, freq, decaytime, mul:0.015);
snd = snd.dup;
//Limiter.ar(snd); // lastline = what functions returns = output for .play
}.play;
}
)