Forums > MaxMSP

Ensuring [random] Doesn't Output Same Value Twice

May 27, 2013 | 5:01 am

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!


May 27, 2013 | 5:10 am

just use the [urn] object !


May 27, 2013 | 6:21 am

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


May 27, 2013 | 6:55 am

[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 | 7:07 am

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


Viewing 5 posts - 1 through 5 (of 5 total)