Need some help with a patch (simple example provided)


#1

Hi,
I dont know what i am doing wrong here .
When i reset the logic counter (use ctrl button) i dont understand why the equality is not true (0=0).
I mean the radio control is at position 0 and the counter is supposed to start at position 0 no ?
It work for position other than 0 though.

Thanks for any advice.

PS this is not the final patch but just an example of a problem i have.


#2

Why the logic/toggle object?
This interferes with the pattern you expect.


#3

This is just for debugging purpose. (on or off i dont really mind i just want an output to verify the equality, a change of state)
I cant get 0 = 0.


#4

Then at least connect another disp/bool to the output of math/==
And maybe add disp/i objects to diagnose the outlets of logic/counter and your radio buttons.


#5

Hi,
Yea, thats what i did (logic counter and radio object = 0). I've made this example at work whiteout the Axoloti just to show the problem i am having so its incomplete. I am just trying to reset a counter to a certain positions , it work except for 0 value. Anyway i will upload the true patch at the end of the day.
Thanks smile


#6

Ok, the first example i provided was correct. Here is a part of the patch i am working on. What im trying to do is init the counter value to a predefined value set by a radio control when changing value. I dont know if there is a simple way but now it work. Executing order is important and that was my problem before. initCounterValue.axp (5.1 KB)

EDIT : Had to use a constant otherwise the counter seems to start at 1 and that was causing problems.


#7

Well , so i've made an object to set a predefined value when resetting the counter. Pretty simple but could be useful

.