1+1 = 1?
Hi,
The attached patch counts space bar presses. However, it takes two presses to make the counter reach 1! I cant figure out what I've done wrong. any help please!?!
Counter starts counting from 0 by default. You can change the minimum number using the "setmin" message
Thanks, but still not working. I have put setmin in teh patch and it still takes 2 key presses to make it register 1.....
Hi
not sure why that happens, but whenever I want to initalize a [counter] I always set it to my minimum via the 4th inlet:
Brendan
yeah, "setmin $1" looks broken, at least on 6.1.2
I hardly ever initialize counters - if I want to count from 1 and upwards I typically do [+ 1] after the counter.
Try: [counter 1 0x7FFFFFFF]
I tend to use the sync reset for this sort of thing:
(and I'm sorry that there are so many quirks in counter. It was my first external, and my first C code)
>> I tend to use the sync reset for this sort of thing
Yes, so do I.
Wetterberg, it was here prior to 6.12. I got mad with this in one on my patches, trying to figure out where my mistake was...
Chris : any chance you rewrite it ?
None of these three solutions works at first try : it only works once you have reset the counter for the first time. That means you have to launch it then reset it to get the desired behavior...
The maintenance of counter has been out of my hands since the 1990s.
I don't see what the problem with initializing to a desired state with something like loadbang / loadmess is, and doesn't Christopher's [counter 1 0x7FFFFFFF] do it without any further initialization?
This sort of initialization is just part of the process, IMO.
And "reset to number immediately" seems pretty self-explanatory to me.
Ok, this works for me like this :
I wrote the previous post because it happened to me to get mad after trying all the solutions you proposed.