Transform speed of a potar (second request better explained)
Hi guys and girls,
Inside the patcher potar ratio. Problem to trig $i2 or $i3 at the good moment
In my patch (at the top), I have the position, here 19550, of a motor that I transform into data from 0 to 127 for a knob that I use in max4live. One round is 6400 step.
As you can see https://www.youtube.com/watch?v=CTfMDb0Wu3A. at the end, the motors go very fast and I can, when recording in Live, put a ratio of 0.5 for example and therefore my pots go half as fast as the real position of the motors. In fact, I would like to control the knob"phase8bis" with a 1/2 ratio from "phase8" recorded with a 1/1 ratio. The difficulty is that when the knob "phase8" arrives at 127 then 0, either the "phase8bis" is at 64 and must go to 65, or "phase8bis" is at 127 and must go to 0. My patcher potar ratio works but not always.
I have a problem to trig $i2 and $i3 at the good moment. That's all, I hope to have been clear, and that you will be able to find the solution ;)
of course there is always interaction between layout and code in both directions... but in this case... i would suggest to clear the layout a bit in order to understand what you are doing and where the error could be.
the 9 numberboxes and 3 triggers makes the patch really hard to read and removing them would be of great help.
if you choose 7196 with this first number box, you will understand how works the patcher potar ratio.
I have changed something useless inside.
Actually, in the patcher potar ratio the number box 4 trig a bang when the number is upper than 127. Between 7196 and 7200 you have 4 times the number upper than 127, that's why I put a counter until 4, in order to have the number 1. And if $i1 < 2 then $i2 means, let the numbers from box 3 come.
I hope it will help. Thanks ;)
It's hard to understand what your patch is doing. The description of the problem is also a bit hard to follow, it would be better if you tried formulating it in a more abstract way.
However, I think I understand what you are trying to do, after scaling the value from the motors, you have a dial that wraps around 127 and you want a dial that moves with half the speed. When the normal-speed dial wraps from 127 to 0 the half-speed dial needs to go from 64 to 65 (or 0 to 127), this means that you need to keep track of wrap-arounds and change the half-speed dial's value accordingly.
I solved this issue a while ago, here is my solution.
Tell me if I'm understanding your problem correctly and if my patch is helping you.
(my patch doesn't work with negative numbers, I believe you need to change all modulos (%) with something else for it to work)
Thanks man, it looks like working very well. I 'll try to integrate it to my M4L controller tomorrow. Thanks again. I kiss you as much as possible
if i remove all the superflous litter from the patch it looks like that.

now we can freeze the order using triggers

...and now you have a chance to see which part might be wrong. :)