Cycling 74 » Topic: Counting number of toggle boxes toggled
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/feed
Mon, 21 Apr 2014 00:41:59 +0000http://bbpress.org/?v=2.5.3-5249en-UShttp://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-55311<![CDATA[Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-55311
Thu, 03 Mar 2011 18:05:51 +0000evanlivingston
I’m trying to determine how many toggle boxes are switched on (up to 14) in order to determine how many objects are on. What’s the best way to do this? Currently I’m using an FTM external but it’s fairly buggy.
]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199076<![CDATA[Re: Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199076
Thu, 03 Mar 2011 18:11:29 +0000Roman Thilenius
put [if $i1==0 then -1] behind each toggle – then connect those to [accum]

-110

]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199077<![CDATA[Re: Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199077
Thu, 03 Mar 2011 19:18:32 +0000evanlivingston
I was unable to make this work, instead I made the statement [if $i1==0 then -1 else 1] and attached it to the middle inlet of [accum] but I also have to bang the first inlet every time a toggle changes.
]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199078<![CDATA[Re: Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199078
Thu, 03 Mar 2011 20:47:35 +0000Chris Muir
[pak] and [zl sum]
]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199079<![CDATA[Re: Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199079
Thu, 03 Mar 2011 21:16:39 +0000evanlivingston
Perfect Chris, Thanks.
]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199080<![CDATA[Re: Counting number of toggle boxes toggled]]>
http://cycling74.com/forums/topic/counting-number-of-toggle-boxes-toggled/#post-199080
Fri, 04 Mar 2011 15:04:35 +0000pm
When doing this in multiples instances (poly or multiples bpatchers), I store the value in a named coll. In the top patcher, I use dump and zl sum to get the sum of all the toggles.
]]>