That worked very nicely.  I had to change the until input to 4 to get it to do the right number of iterations, since the input didn&#39;t also kick off the loop, but that&#39;s fine.<div><br></div><div>I&#39;m not sure I understand exactly what was going on before, but I now have a [trigger] object that does the [tabread] first, and then the mod/div math.  So I understand why it works now.  Just not exactly why it didn&#39;t before :)</div>

<div><br></div><div>Now...  I have another [pipe 0] object in the button_handler sub-patch which delays a message while a [expr] object does its thing.  Replacing it with a [trigger] doesn&#39;t work.  But it&#39;s not coordinated with the other outputs of the [unpack] object.<br>

<div><br></div><div>Is there an object like [trigger] that has multiple inputs and lets you control the timing of the outputs?  [pipe] can take multiple inputs but doesn&#39;t have the same right-to-left coordinated output that [trigger] does.</div>

<div><br></div><div>The FLOSS manual says that the order you hook things up in part determines the order they do things.  But I can&#39;t make that make a difference.</div><div><div><br></div><div><br></div><div>Thanks,</div>
<div><br></div><div>-Theron</div>
<div>^<br><br><div class="gmail_quote">On Fri, Feb 4, 2011 at 12:50 PM, Theron Trowbridge <span dir="ltr">&lt;<a href="mailto:theron.trowbridge@gmail.com" target="_blank">theron.trowbridge@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks!  I used [pipe] because I had an obvious timing problem and that was an explicit delay object.  Didn&#39;t occur to me that [trigger] could control the timing as well.  It&#39;s use wasn&#39;t obvious to me from what I had read about it.<div>


<br></div><div>I will make the adjustments you suggest and see where I get.  I expect I will have more questions.<div><br></div><div><br></div><div>Thanks again,</div><div><br></div><div>-Theron</div><div>^<div><div></div>

<div><br><div><div><br>
<div class="gmail_quote">On Fri, Feb 4, 2011 at 5:17 AM, Matt Barber <span dir="ltr">&lt;<a href="mailto:brbrofsvl@gmail.com" target="_blank">brbrofsvl@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hello,<br>
<br>
Before you go any further in Pd, you should check out the [trigger]<br>
object. It&#39;s the single most important object in Pd, in my opinion -<br>
it will help you get the timing right in these kinds of situations.<br>
Trigger forces hot-cold things to happen in the correct order<br>
explicitly -- without it you have to rely on the order in which you<br>
made the connections, which you can&#39;t SEE in the patch.<br>
<br>
You should use [trigger] instead of the [pipe 0] construction you have<br>
as well, the number box should most likely be a message with a zero in<br>
it (to hardwire it to zero), and you should probably be sending it to<br>
the cold inlet of the [int] (so that it just sets the [int] state<br>
rather than passing the zero through once when you set it and then<br>
once again on the first bang of the [until]).<br>
<br>
But again, master the use of [trigger] before you go any further --<br>
multiple lines coming from an object should make you feel<br>
uncomfortable until you&#39;re sure you&#39;re doing it correctly.<br>
<br>
I hope this helps.<br>
<font color="#888888"><br>
MB<br>
</font><div><div></div><div><br>
<br>
&gt;<br>
&gt; I&#39;ve looked over the help patches, the FLOSS manual, and at a number of<br>
&gt; examples, but I&#39;m clearly missing something.<br>
&gt;<br>
&gt; I&#39;m trying to build a proof-of-concept state table for a grid sequencer.  I<br>
&gt; figured out to use an array to store my states, and I can write to and read<br>
&gt; from the table, except when I&#39;m trying to use pack.<br>
&gt;<br>
&gt; The reason for pack is to get the column, row, and state of each button in a<br>
&gt; range of the state table (will be a single column in my end use, but I&#39;m<br>
&gt; doing the whole thing for now).<br>
&gt;<br>
&gt; Attached is a patch with a 2x2 grid set up and you can click on them and set<br>
&gt; the state table.  That works.  It&#39;s the lookup part that doesn&#39;t.  I&#39;m<br>
&gt; stepping through the entire state table, deriving the column and row from<br>
&gt; the index and looking up the value of that index.  This all works until I<br>
&gt; send those three pieces of information to a pack object, it re-arranges<br>
&gt; things in inconsistent manner.  Clearly there&#39;s either a timing thing or I&#39;m<br>
&gt; not understanding the data flow of what I&#39;m doing.  Or maybe I&#39;m just not<br>
&gt; getting the point of pack.<br>
&gt;<br>
&gt; I&#39;m pretty new to this and every step is a struggle, so any suggestions are<br>
&gt; welcome.  But if there are any tips or pointers on why pack is not working<br>
&gt; the way I think it should - or what I should be using to accomplish what I&#39;m<br>
&gt; trying to do - I would appreciate it.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Long-winded description of how the attached patch is behaving:<br>
&gt;<br>
&gt; Buttons are arranged in column, row order.  I&#39;m just storing 0/1 values in<br>
&gt; the state_table array.  If I click on the first and last buttons, my array<br>
&gt; is then 1 0 0 1.  So state_table[i] gets me the off/on value for the button.<br>
&gt;  i div 2 gets me the column number and i mod 2 gets me the row number.<br>
&gt;<br>
&gt; If I just print these three outputs I get everything out in the order I<br>
&gt; expect:<br>
&gt;<br>
&gt; column: 0<br>
&gt; row: 0<br>
&gt; state: 1<br>
&gt; column: 0<br>
&gt; row: 1<br>
&gt; state: 0<br>
&gt; column: 1<br>
&gt; row: 0<br>
&gt; state: 0<br>
&gt; column: 1<br>
&gt; row: 1<br>
&gt; state: 1<br>
&gt;<br>
&gt; If I send the three values into a pack object and print the output of that,<br>
&gt; I get:<br>
&gt;<br>
&gt; pack: 0 1 0<br>
&gt; pack: 0 0 1<br>
&gt; pack: 1 1 0<br>
&gt; pack: 1 0 0<br>
&gt;<br>
&gt; I would expect this:<br>
&gt;<br>
&gt; pack: 0 0 1<br>
&gt; pack: 0 1 0<br>
&gt; pack: 1 0 0<br>
&gt; pack: 1 1 1<br>
&gt;<br>
&gt; So things are coming in the wrong order overall, and the state values are<br>
&gt; wrong.<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; -Theron<br>
</div></div></blockquote></div><br></div></div></div></div></div></div>
</blockquote></div><br></div></div></div>