I am trying to do a Max For Live Midi Device that would let incoming midi notes pass only if they are on beats 1 and 3.
Assuming the time signature is 4/4 and there is a constant stream of 16th notes on the note A, I want this device's output sound like this:
In order to make this work, I need to receive the info about transport's location before the note is played.
I've tried with transport, phasor~, and the object when, but I always get inconsistent results. Sometimes it works, sometimes it doesn't... I also get different results if notes are played from a midi clip in Live, or from a metro object within the M4L device. Here is my patch with the three different ways to get transport location and the two different inputs: