Random Object / ggate

apcuddling's icon

Alright, so here's the gist of what I'm working with...

[random 15]
|
[ggate] (with 15 outs)
|
15 different buffers

Okay, I'm using the [random 15] to fire off a number to select a random output. I'm sending bangs through the ggate to trigger 1 of 15 different buffers. That's all working fine and dandy like I planned.

Now I'm trying to make it to where the range is adjustable. As of right now I can adjust the range of the [random] via the right inlet. Doing this only lowers the max number. (Instead of it ranging from 1-15, it will lower to 1-14, or 1-13, and so on.) But what I want to do is raise the minimum number too. So the range could be adjusted to 2-12, 4-9, 3-7, or whatever. I know you can offset the [random 15] by adding to the output but my issue with doing it this way is, any number that comes out that is over 15, will be shaved off into a 15. Which results in way more 15's being outputted.

Does anybody know a way to adjust the minimum and maximum numbers without this happening?

Also is there away to turn off one of the outputs of the ggate? For example, if I don't want it to output to the 3rd slot, but still output to the others.

Thanks everybody.

o s's icon
Max Patch
Copy patch and select New From Clipboard in Max.

There are surely more elegant ways to achive what you want but maybe this keeps you going:

apcuddling's icon

O S,

Perfect. This was actually very close to what I was going for. Had to do a little bit of tweaking but it helped me out a lot and now it's just the way I want it. Thanks!

o s's icon
Max Patch
Copy patch and select New From Clipboard in Max.

By doubleclicking the [table] you get a visual feedback of your randomness..

hth

ole

apcuddling's icon

O S,

Very cool. Nice visual touch. Would you happen to know how to exclude numbers? For example, if the range is 1-14, but I don't want it to fire off the number 2.

Right now I've managed to set it up to where I can mute the buffers that are triggered which works fine, but the issue with doing this is that when the [random] fires off the number to trigger the muted buffer, obviously there's just empty space. I'm trying to find a way to tell the [random] to just skip over certain numbers.

Thanks again for your help. I really appreciate it.

o s's icon
Max Patch
Copy patch and select New From Clipboard in Max.

you have to make the list of numbers manually..maybe that is not what you are after?

apcuddling's icon

O S,

Close. I think with this I may be able to figure it out. Thanks!