URN - maximum upper limit exceeded

Steve Smith's icon

I have a coll with 4800 entries in it. The URN tells me this exceeds the upper limit allowable. Please - what is the upper limit? And what object will allow me to run thru 4800 random numbers ONCE ONLY?
Many thanks up front.
Steve Smith

slo ~|•'s icon

Looks to me like a table object can have a size of 4800 so you could bang the table to get a random number, then set that address to zero. See example patch.

Max Patch
Copy patch and select New From Clipboard in Max.

Floating Point's icon
Steve Smith's icon

Thanks for your quick reply.
I will need to be able to set the range (to the length of a coll) on the fly. I don't see a way to do that.

ASIDE:
I must study the itable object. I don't see how after sending the constant message, that you can still bang it and get all the random numbers again. Mystery to me.

Floating Point's icon

just send a size message to it to change its size ie (size 4800), followed by a const message ie (size 4800, const 2)
edit: or (size $1, const 2) to have its size change on the fly

Roman Thilenius's icon

the upper limit is 4094

slo ~|•'s icon

Yes, you can change the size of the table/itable with a message because size is an attribute that can be set.

You can read up on the quantile and random quantile (a bang) messages to table if you like, but the effect is that a higher y value for a particular x address makes that x address more likely to be output when the table is sent a bang message. When all y values are equal every x address is equally likely to be selected. When some y values are 0 then those x addresses will not be chosen. When all y values are set to 0 then the x address 0 will output every time. Therefore you will need to test for a complete cycle of selections by counting the queries or use of the max os sum messages to table.

Yes, the upper limit of urn is 4096, but not table.

Max Patch
Copy patch and select New From Clipboard in Max.

Steve Smith's icon

Much appreciated