On Wed, 13 Jun 2007, Kyle wrote:
[inlet keypress] | [sel 0 1] | [f 0]X[+1] | [mod 2] | [outlet to wherever]
This will fail once [f] increments to 16777216 (also known as 256 cubed), and then it will get stuck, because that's the last contiguous integer that you can get with the float type that pd uses. So you need to put the [mod 2] within the loop so that values never get too high.
as I said on the #dataflow chat, you can use [f]X[==] instead.
I also suggested just using [tgl].
Note: the first outlet of [sel] is ignored.
"ascii-art" is very dependent on font width, and as a result, almost everybody who uses that, also switches to a monospaced font, in order to be sure that everybody sees it the same.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Wed, 13 Jun 2007, hard off wrote:
This will fail once [f] increments to 16777216<
yep, you'd get a pretty sore finger doing that many keypresses as well.
I know that it's extremely unlikely to happen, but one day you'll want such a counter for something else that is triggered automatically 100 times faster and has to run for 3 months straight in a gallery far away from home and it'll break. You don't want to think about 16777216 and distinguish between a toggler that might reach that number vs one that won't. So it's better to cultivate good habits now.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
Actually, I usually connect the output of the [mod] object back into the [f 0], but the ASCII patching made that a little difficult to describe.
~Kyle
On 6/13/07, Mathieu Bouchard matju@artengine.ca wrote:
On Wed, 13 Jun 2007, Kyle wrote:
[inlet keypress] | [sel 0 1] | [f 0]X[+1] | [mod 2] | [outlet to wherever]
This will fail once [f] increments to 16777216 (also known as 256 cubed), and then it will get stuck, because that's the last contiguous integer that you can get with the float type that pd uses. So you need to put the [mod 2] within the loop so that values never get too high.
as I said on the #dataflow chat, you can use [f]X[==] instead.
I also suggested just using [tgl].
Note: the first outlet of [sel] is ignored.
"ascii-art" is very dependent on font width, and as a result, almost everybody who uses that, also switches to a monospaced font, in order to be sure that everybody sees it the same.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada