Ensuring [random] Doesn't Output Same Value Twice

May 27, 2013 at 5:01am

Ensuring [random] Doesn't Output Same Value Twice

So I have a max patch which utilizes audio samples which are randomly selected. However, it sounds ridiculous when the same sound is played twice consecutively. I have a [random] object connecting to a [select] object, whose selectors trigger the individual samples. Is it possible to ensure that the [random] object wont output the same value twice consecutively? It would be fine to output “1, 2, 1″, just not “1, 1″.

Thanks!

#250787
May 27, 2013 at 5:10am

just use the [urn] object !

#250789
May 27, 2013 at 6:21am

This was something I probably should have thought of earlier… Thanks for making the obvious clear to me! Hahaha

#250793
May 27, 2013 at 6:55am

[urn] can repeat when you “refill” it (i.e., the first value of a new cycle can be the same as the last value from the previous cycle).

There are numerous threads on this subject if you take the time to search the forum. There are other solutions to this problem.

#250798
May 27, 2013 at 7:07am

[urn-jb] is your friend find it in :  /examples/max-tricks/random_with_no_repeat

#250799

You must be logged in to reply to this topic.