






radioactivity: sc3d5 code
"modeling" radioactive decay
jr 2001/01
//a single burst of dissolution
(
#{
var thalf, natoms, activity;
thalf = 0.7;
natoms = 1e+3;
{ natoms = Plug.kr(natoms);
activity = Dust.ar(2.log/thalf*natoms);
Sequencer.ar({ natoms.source = natoms.source-1; 0.0 }, activity);
activity
}.play;
}.send;
)
//a single burst of dissolution, ending
(
#{
var thalf, natoms, activity;
thalf = 0.7;
natoms = 1e+3;
{ natoms = Plug.kr(natoms);
activity = Dust.ar(2.log/thalf*natoms);
Sequencer.ar({ natoms.source = natoms.source-1; 0.0 }, activity);
EndThresh.ar(activity, time: 0.1);
}.play;
}.send;
)
//_________slow radiation beats
(
Synth.scope(
#{
var trig;
trig = Impulse.kr(0.3);
TSpawn.ar({
var thalf, natoms, activity, sound;
thalf = rrand(0.02, 1);
natoms = rrand(0.8, 2) * 1e+3;
natoms = Plug.kr(natoms);
activity = Dust.ar(2.log/thalf*natoms);
Sequencer.ar({ natoms.source = natoms.source-1; 0.0 }, activity);
sound = Pan2.ar(Ringz.ar(activity, natoms.max(110), 0.02, 0.1), 1.rand2);
EndThresh.ar(sound, time: 0.1)
}, 2, trig)
});
)
Links to this Page