Ensuring [random] Doesn't Output Same Value Twice

    May 27 2013 | 12:01 pm
    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".

    • May 27 2013 | 12:10 pm
      just use the [urn] object !
    • May 27 2013 | 1:21 pm
      This was something I probably should have thought of earlier... Thanks for making the obvious clear to me! Hahaha
    • May 27 2013 | 1:55 pm
      [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.
    • May 27 2013 | 2:07 pm
      [urn-jb] is your friend find it in :  /examples/max-tricks/random_with_no_repeat