<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br><div><div>Le 21 mars 09 à 14:59, Husk 00 a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Thank you all, but I expressed bad my necessity. I found a solution but still don't like it. I find inelgant and too much complex for what it has to do. I need a counter with two bang, first one for add one unit to the counter, second one for subtract one unit. Couter must have min and max limits, like 0 and 10 (for example). I attach my patch just like example, but as I said it's not a good solution.<br> How should you do this?<br>cheers <br>Husk<br><br>Ben Baker-Smith &lt;<a href="mailto:bbakersmith@gmail.com">bbakersmith@gmail.com</a>&gt;<br><div class="gmail_quote">On Wed, Mar 18, 2009 at 8:38 PM, Ben Baker-Smith <span dir="ltr">&lt;<a href="mailto:bbakersmith@gmail.com">bbakersmith@gmail.com</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">So you want a counter that counts to 100 and then begins at 0 (or 1) again?<br><br>If I'm understanding correctly I would do the following:<br> <br>[bang(<br>|<br>[float]X[+ 1]<br>|<br>[select 100]<br>|<br>[0(<br><br><br> the 0 message at the end could also be a 1 depending on if you want the counter to begin on 0 or 1, it is sent to the right inlet of float.<br><br>the outlet of float is, in addition to [select], also sent wherever you want the counter to be output to.<br> <br>here is the same patch as a subpatch (keeping in mind that the 0 message still must be connected to the right inlet of float):<br><br>[inlet]<br>|<br>[b]<br>|<br>[float]X[+ 1]<br>| \<br>| [outlet]<br>|<br>[select 100]<br> |<br>[0(<br><br>...of course you can always use the [counter] object.&nbsp; [counter 100] will probably do the trick all by itself.<br>and finally, if i'm understanding incorrectly and you wanted it to count up and back down, use the example that was posted previously with the absolute values and [wrap],<br> or use [counter 100] with the up/down message sent to it, you'll have to check the help file for exactly what that message is...<br><br>hope something in there helps.<br><font color="#888888"><br>-Ben<br><a href="mailto:pd-list@iem.at" target="_blank"></a> </font><br>_______________________________________________<br> <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br> UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br> <br></blockquote></div><br><span>&lt;updown-counter.pd&gt;</span><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a></div> </blockquote></div><br></div></body></html>