About the Random node (on iPad)
  • Greetings,

    First post here. I'm fairly new to Audulus, but already seriously hooked...

    I've been working on some patches that make a lot of use of the Random node and I've noticed some aspects of this node's behavior that I hadn't anticipated.

    Originally, I created a patch in which I added a number of Random nodes that were sampled via a common clock. It worked exactly as I hoped it would.

    Later, when I re-loaded the patch, I noticed that all the Random nodes were producing identical number streams. I was able to revert to the previous behavior by deleting and then Undoing the delete, one by one. Not a very practical solution though. I'm guessing that each Random node is initialized with the same seed value when the patch is loaded.

    I have found some workarounds to this, but would somehow like to find a way to get each node to produce a different number stream, even when sampled via the same clock.

    Any thoughts?


  • ha! that's kinda funny. not so random after all, eh? @taylor will know more.

    i think the random node and the noise node are the same (it says the noise node is just the random + a lpf in the documentation), but i haven't had this problem with the noise node. does seem odd though.
  • welcome, btw! :)
  • Thanks, happy to join the community.

    Actually, I did some experimenting with multiple Noise nodes and got the same result as for the Random nodes (not surprising, considering it's constituents).
  • I have run up against this. I have two ways to deal with it. If I don't I need big random numbers, I use a few digits of my random number here and a few other digits somewhere else.
    Another way is to feed the random generator to several s/h nodes and use non-simultaneous slightly delayed triggers to generate unique values. You can do this by sending a trigger through the LPF set to almost 1 or through the crossfade node with the output feeding back to one of the inputs.
    (Deep in Taylor's list of requests is one for the inclusion of a seed input for the random function.)
  • +1 good solution above
  • Thanks for the tips, JDRaoul.

    I was hoping to be able to generate independent random number streams within multiple subpatch instances, but it looks like that would be rather complicated.

    I was wondering if a seed input was under consideration--thanks for confirming that.

  • Actually both approaches mentioned by @JDRaoul will let you create random number streams, I came up against the same problem and created the following two solutions (attached)

    'Random Seeds' - Has pseudo random seed nodes that work by sampling the random node at different sampling frequencies, the 'seed' can be from 0-1 and affects the sampling frequency.

    '4xRandom' - Is a node that outputs 4 random number streams which are derived from a single random node. The values are only to two decimal places so you don't have the resolution as the first approach but it is more CPU efficient as it uses poly nodes to split the random stream into 4.
    Random Seeds.audulus