Recent topics
Recent Comments 
Metronome, Timer, pulse at regular intervals: sending serial commands at regular intervalsI'm trying to send a serial command through the Kineme Serial Out patch at regular intervals but can't find how to generate a regular time base. Right now, I'm using an interpolation patch that feeds into three conditional patches into a mathematical expression. See the attached picture. Is there a better way to do this? Am I missing something? Thanks!

The range patch or math and math expression patches using modulo. This what you mean?
I don't quite understand your posted example but I thank you for leading me in the right direction:
Since I'm running at 60fps and need to send serial commands at roughly 30fps, I can live with doing a modulo 2 on the frames patch. It works a lot better than my old mess of connections.
Thanks again!
Lol — study them!
Ignore the display macros, they add the function of turning a one quick pulse into a longer pulse that is usable for displaying or whatever.
I've reposted with Math, Math Expression and JS patches to do Modulo.
Why does Math expression evaluate to an integer, while JS and Math patches evaluate to the complete "remainder"?! Anybody?
There is also the private Signal patch.
Correct, the
Mathematical Expression
patch performs integer modulus, whileMath
performs floating point modulus — this is known behavior....and the
LFO
patch, when set to Square or PWM mode.