2020-11-03 11:04:40 +01:00
|
|
|
(
|
2020-11-03 11:43:14 +01:00
|
|
|
var scale = Scale.zhi;
|
2020-11-03 11:04:40 +01:00
|
|
|
|
|
|
|
10.do{ arg i;
|
|
|
|
{
|
|
|
|
var snd, trig, freq, decaytime, envspec, env, noise;
|
|
|
|
|
2020-11-03 11:43:14 +01:00
|
|
|
trig = Impulse.ar(
|
|
|
|
freq: i * 0.083 * rrand(0.8, 1.2),
|
|
|
|
phase: 100.rand*0.01);
|
2020-11-03 11:04:40 +01:00
|
|
|
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);
|
2020-11-03 11:43:14 +01:00
|
|
|
|
2020-11-03 11:04:40 +01:00
|
|
|
noise = BrownNoise.ar * env;
|
|
|
|
|
|
|
|
freq = (scale.degrees+60).choose.midicps * [0.5,1,2].choose;
|
|
|
|
decaytime = rrand(0.01,2);
|
2020-11-03 11:43:14 +01:00
|
|
|
snd = Ringz.ar(
|
|
|
|
in:noise,
|
|
|
|
freq: freq,
|
|
|
|
decaytime: decaytime,
|
|
|
|
mul:0.015);
|
|
|
|
snd = snd.dup; // mono on both speakers.
|
|
|
|
snd; // lastline = what functions returns = output for .play
|
2020-11-03 11:04:40 +01:00
|
|
|
}.play;
|
|
|
|
}
|
|
|
|
)
|