Is there a more elegant way to do this?...

nicnut's icon

Hi,

I'm trying to get only the 4th tick of a counter object. I can do it using the sel object, but I have a feeling there is a better way. I was messing around with expr $i1/4 and although it gives me the right number, it gives a bang on every tick of the counter. I also tried expr $i1/4. ( float version) and that didn't seem to work either. I thought I would throw this out there because it seems like there has to be a more efficient way to do this.

thanks, Nick

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

bennyfromtheblock's icon

See how this is

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

Benny

Chris Muir's icon

Module math is often a good way to go for this sort of thing. I'm not at a computer right now so I can't post an example but [%] followed by [sel 0]

Roman Thilenius's icon

what also works is expr int($f1/4.) followed by a [change].

when using modulo, it all fits into one [if] object.

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

hello,
there's this too, which is less subtle than %