Goal:
Enter a line of code that would use a random seed and produce the same bell collection twice in a row.
Solution of myself, which doesn’t work and I don’t see why exactly. It doesn’t produce sound
( // Let it run for a while, the strikes are random
{
var trigger, partials = 12;
trigger = RandSeed.kr(Dust.kr(3/7), seed:56789);
Pan2.ar(
Mix.ar(
{
SinOsc.ar(exprand(50.0, 4000)) *
EnvGen.kr(
Env.perc(0, rrand(0.2, 3.0)),
trigger,
1.0.rand
)
}.dup(partials)
)/partials,
1.0.rand2
)
}.play
)
Take another look at the RandSeed help file. You’ll see that all of the examples put RandSeed into an expression by itself. None of them try to use RandSeed’s result.
In the first example, RandSeed.kr is triggered, but it doesn’t use RandSeed.kr as a trigger.
That is, you’ve created a graph that goes Dust → RandSeed → EnvGen. But the correct graph is:
/--> RandSeed
Dust
\--> EnvGen
… where the trigger (Dust) feeds separately into the two other units.