How to randomly change between two metro timing every random beats

F_Dos's icon

I have patch consisting two metro times. one called A - 130 BPM and other called B - 100 BPM

the metro should work for 100 sec since patch is opened. and should Randomly change between A and B every 15 -23 beats. Also each time patch is open the beginning time should also randomly choose. What is best method of doing the above?

F_Dos's icon

ok I think I almost get it.

How can I make the cycle 2 object to start from the outlet correspond to the tempo selected when patch loaded?

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

edit 2:

I think I solved the cycle object issue with set $1 message.

here is my patch that seems to work. I now wonder how to simplify it?

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

TFL's icon

[cycle] has a set message to set next outlet. Alternatively, you could use [onebang] here.

F_Dos's icon

[cycle] has a set message to set next outlet. Alternatively, you could use [onebang] here.

Yes I used the set message but I have something strange in the order of messages when patch is first load. something is off there and I'm not sure what is it

edit: getting close:

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

Source Audio's icon

why do you need cycle object at all ?

you pick start speed, wait 100 sec and then

start banging random counter 15 - 23 to again randomly pick speed

F_Dos's icon

I want the random will be at two things:

1 the strating tempo (130 or 110) then the count num in which it will switch to the next one. it should not choose randomly which tempo to choose rather only the starting tempo and when to move to the next one.

so if tempo 110 is choose when patch start and the number 19 (out of the random object) is choose - the metro will bang 19 times before moving to 130 then again a random number will be choose (lets say 21) so after 21 counts the netro will change back to 110 and so on

Source Audio's icon

1 clocker to measure 100 sec

2 random to pick tempo A or B

3 random 15 - 23 to listen to counter

which resets on every change

and again picks A or B and

creates new listener

You should be able to put that together

Roman Thilenius's icon

i would use two metros, and then would switch between them (i.e. by turning them off and on.)

when a switch should happen at step 23, the first metro would count until 24 and the 24th trigger will be used to start metro #2

F_Dos's icon

I like that to the same thing there is several solution. I worked it out. Probably not the most elegant one but it works!


creates new listener

I am not sure what listener means?

Source Audio's icon
F_Dos's icon

Thank Source Audio.

It looks great! But what I meant is that the random decision should only happen at the very beginning — to decide whether to start from 130 or 100. After that initial choice, it should alternate between the two values. The only random part should be the number of bits after which it switches.

Source Audio's icon

then use toggle instead of decide after initial tempo gamble