Oops, I mean deleting and reconnecting the connection between the +1 and the number box, not the connection to the route object.<br><br>
<div><span class="gmail_quote">On 11/6/05, <b class="gmail_sendername">Chuckk Hubbard</b> <<a href="mailto:badmuthahubbard@gmail.com">badmuthahubbard@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div>Hi, Brad.</div>
<div> </div>
<div>The problem is depth-first message passing. And, in PD, if one outlet connects to two things, the messages are sent in the order the connections were made... which you can't tell by looking.</div>
<div>If you insert a [print] object after your [+ 1] object, you will see that it always outputs 0 before outputting another number. This is because it first sends its output to the [route], which follows its chain of messages through all the way to the [-1( message, BEFORE sending the same output to the [float] object. So after 4, it outputs 0 and 5, then 0 and 6, etc. It sends its result twice, and the second one replaces the -1 message to the float. Solving it would be as simple as deleting the connection to the [route] object and reconnecting it, so that that message is sent last.
</div>
<div> </div>
<div>Also, I don't know if it matters, but the loadbang means that a 0 is sent on opening. You could just make the float object -1 instead of 0, and delete the loadbang, unless you want an initial 0 output on opening.</div>
<div> </div>
<div>-Chuckk</div>
<div> </div>
<div> </div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Date: Sat, 5 Nov 2005 20:36:20 +0100<br>From: Brad Kligerman <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:bkligerman@gmail.com" target="_blank">
bkligerman@gmail.com </a>><br>Subject: [PD] Building a counter problem<br>To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a><br>Message-ID:<br>
<<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:9afc437d0511051136x2bdf06bi50fe74584f14651d@mail.gmail.com" target="_blank">9afc437d0511051136x2bdf06bi50fe74584f14651d@mail.gmail.com </a>
><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Skipped content of type multipart/alternative-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: counter-1.pd <br>
Type: application/octet-stream<br>Size: 1186 bytes<br>Desc: not available<br>Url : <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.puredata.info/pipermail/pd-list/attachments/20051105/adc49dff/counter-1-0001.obj" target="_blank">
http://lists.puredata.info/pipermail/pd-list/attachments/20051105/adc49dff/counter-1-0001.obj </a><br><br></blockquote></div></blockquote></div><br><br clear="all"><br>-- <br>"It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters."
<br>-Friedrich Nietzsche, "Thus Spoke Zarathustra"