Getting two numbers at the same time,.. I want just one at a time

Mario Fernando Cardoso's icon

Hi!
Do you know how to get only one number at a time? Trying to make a cartesian type sequencer where both X and Y axes have their own speed. But when they move at the same time they trigger two sounds at the same time (they trigger two steps from live.step at the same time).
When X and Y moves together, seems like they are triggered with minimum miliseconds diference and therefore sound like they were triggered at the same time. I want only the last triggered number, not the first one.
I only want the number of the indicated numbox. I only want one step triggered at a time.

Hope you can help me. THANKS!!

cart sequencer v1.amxd
amxd 78.35 KB
M4L version

cart sequencer.maxpat
Max Patch
Max MSP version

Pedro Santos's icon

Haven't tested this, but suspect the problem lies in the double triggering after the unpack (that button/bang that forces the calculation). Does this work?

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

Mario Fernando Cardoso's icon

Hey!
Nop, still sounds two notes at the same time.
But now the calculation area looks cleaner!
I came up with a sketchy solution using tresh, unpack and a gate controlled by a zl.len
It works, now it sounds just one step at a time, but I havent tested it that much, it feels sketchy.

cartesian sketchy.maxpat
Max Patch

Mario Fernando Cardoso's icon

If someone has a better solution to share that will be great!

Roman Thilenius's icon

there are two ways: either you avoid sending a trigger into it already, which requries that you control both clocks from a main clock.
or you filter successive data out at the end using for example gate and timer - or alternatively tresh 0 with zl slice 1.

Pedro Santos's icon

"matrixctrl" is sending not only the on state (x y 1), but is also turning off the previous value (x y 0). Since you are ignoring the last value in your unpack, the system understands both on and off values as being notes to be played, hence the doubling.

Here, I rotate the last value (on or off) to be the first in the list, and route every list starting with 1 (on value), ignoring the 0s.

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

Mario Fernando Cardoso's icon

That makes sense, but still getting two notes at the same time. Seems like its sending two activations (1) for each time the dot moves on the matrixctrl. I will try gate and timer or tresh 0 with zl slice 1 as Roman Thilenius suggests.
But its getting better, so thanks for your help!

Mario Fernando Cardoso's icon

Once again, using thresh, zl len and a gate make it work. One of the problems is that when X and Y moves at the same time, it sends a two number list. When they move one by one in separate moments, just one number is sent and there is no problem, but when X and Y moves together, they send two numbers of which only the last is the one that should pass, so its necessary to detect if its sending one number or two and that's where the zl len and the gate comes into play.