Random Max question involving 1's and 0's

JSMilton's icon

Hi Guys,

Just wondering if anyone knows of an object that can create a preference for one value over another if both values are received at the same time.

For example:

A constant stream of 0's are being banged by a metro and these are stored in a zl group. However, every now and then a 1 will be banged at the same time as a 0. I need the zl group to ignore the 0 if this happens and store the 1 instead. The stream of 0's needs to stay constant.

Does anyone know of an object that can do this?

Thanks for any help

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

You should bear in mind that nothing in Max happens 'at the same time'. There is order to all events. In the below patcher, on each metro bang, the contents of int is sent, and then it is set to 0. By sending a 1 to int, we can replace the 0 that will next be sent.

JSMilton's icon

That little patch is perfect, thank you very much.

Also thanks for the advice, i won't forget it.

James

Roman Thilenius's icon

as long as there are 0s and 1s involved into your computing issues, everything is okay.

when you ever see a 2 in your computer, there is something really really wrong.

-110