repeat operation?

emergencyofstate's icon

Hi everyone , first let me say hello! I'm new here and eager to learn. MaxforLive has roped me in

Anyway, I'm dissecting a sequencer and trying to add some random functionality to the pitch right now. What I want to do is make it so when I click a button, 16 random numbers get distributed to each of the 16 steps in the sequencer. I've got the random thing working great:

[random 128]

[-64]

and I can attach it one step of the sequecer. BUT Is there I way I can have my random function fired off 16 times and distributed out to the 16 inlets. I'm trying to avoid making 16 duplicate random patches. Thanks!!

bkshepard's icon

Take a look at [uzi] and [cycle]

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

emergencyofstate's icon

wow, perfect. Thanks for this patch.

bkshepard's icon

You're welcome. BTW, I noticed that it looked like you were trying to get a random between 1 and 64, that's why I did my random the way I did. However, after looking at it again, I realized that I made a mistake. I should have done [random 64] (instead of 63) since random outputs a number between 0 and "one less than the value of your argument." Thus [random 64] connected to [+ 1] will yield random values between 1 and 64. Sorry for the confusion.