Forums > MaxMSP

Counter carry bugs

March 11, 2006 | 7:42 pm

The carry outlets of counter show a misbehaviour:
The carry bang for the minimum is coming out of the third outlet instead
of the second, thus the third outlet will bang on maximum and minimum (2
times) and the minimum (second outlet) will never bang.

4.5.7 on Powerbook with OS X 10.4.5

Very obvious this needs a fix:

#P button 309 275 15 0;
#P button 292 275 15 0;
#P button 255 198 15 0;
#P window setfont "Sans Serif" 9.;
#P number 255 275 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#N counter 0 5;
#X flags 0 0;
#P newobj 255 225 74 196617 counter 0 5;
#P connect 0 2 4 0;
#P connect 0 1 3 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P window clipboard copycount 5;

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


March 13, 2006 | 8:49 pm

This works the way I would expect, switch the bangs for toggles in your patch (like in the help patch). Third outlet sends out a 1 when it hits the maximum and 0 when it goes to non-maximum. If you reverse it to count down, you’ll see the same thing from outlet two.

I can’t recall if counter ever worked some other way, but this seems fairly workable to me.

mzed


March 14, 2006 | 10:45 am

You can also set counter’s carry outs to output bangs instead of 0/1′s by sending it a carrybang message.
I think this behaviour did change, albeit several versions ago; I have a dim memory of being confused by this myself once,
cheers
Roger


March 15, 2006 | 8:57 pm

Thanks for clarifying, I was confused by the hints of the outlets of the
object.

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


July 14, 2006 | 11:13 am

Hello,
I have a question for [counter], to me it seems to work correctly, but there is something I do not understand. What does come out from the 3rd outlet "Carry (Counter Hit Maximum) Flag" ?

I’d like to treat this information, but I do not know what a "flag" represent.

The thing is that when I send a "bang" with a [button] to a [GSwitch] or [toggle] simply by clicking, their states change. But if I use what is going out from the 3rd outlet of [counter], it detects a "bang" in a [button], but it neither change [toggle] nor [GSwitch] values…

So, could you help me ? Thanks very much.
PS: English isn’t my first language so please be cool ;)


July 14, 2006 | 1:43 pm

The default output for counter is a 1 when the counter
hits the maximum count, and 0 for any other value; a
toggle will change to it’s ‘on’ state (ie. displaying
an ‘x’), when it receives a 1, or on alternate bangs,
which is probably what was confusing you.
Counter can be set to output a bang instead of a 1,
on hitting the count maximum, by sending it a
‘carrybang’ message,
hth
Roger


July 14, 2006 | 2:08 pm

cheers
I should have read more of this topic because you gave the answer just before (but I didn’t understood).


February 2, 2012 | 9:07 pm

I dont know if its a bug, or if i’m just stupid, but the ‘carrybang’ message doesnt seem to work.
The patch below should show the problem:

– Pasted Max Patch, click to expand. –

As u should see the carrybang message doesnt change the behavior of the counter…or am i doing something wrong?


February 2, 2012 | 9:56 pm

Hi, it doesn’t work with the message "carrybang" but with "carryflag 1" or by setting the attribute in the inspector.


Viewing 9 posts - 1 through 9 (of 9 total)