Forums > MaxMSP

Random Max question involving 1's and 0's

June 17, 2011 | 2:12 pm

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


June 17, 2011 | 2:32 pm

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.

– Pasted Max Patch, click to expand. –

June 17, 2011 | 3:00 pm

That little patch is perfect, thank you very much.

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

James


June 17, 2011 | 3:46 pm

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


Viewing 4 posts - 1 through 4 (of 4 total)