I&#39;ve looked over the help patches, the FLOSS manual, and at a number of examples, but I&#39;m clearly missing something.<div><br></div><div>I&#39;m trying to build a proof-of-concept state table for a grid sequencer.  I figured out to use an array to store my states, and I can write to and read from the table, except when I&#39;m trying to use pack.</div>

<div><br></div><div>The reason for pack is to get the column, row, and state of each button in a range of the state table (will be a single column in my end use, but I&#39;m doing the whole thing for now).</div><div><br>
</div>
<div>Attached is a patch with a 2x2 grid set up and you can click on them and set the state table.  That works.  It&#39;s the lookup part that doesn&#39;t.  I&#39;m stepping through the entire state table, deriving the column and row from the index and looking up the value of that index.  This all works until I send those three pieces of information to a pack object, it re-arranges things in inconsistent manner.  Clearly there&#39;s either a timing thing or I&#39;m not understanding the data flow of what I&#39;m doing.  Or maybe I&#39;m just not getting the point of pack.</div>

<div><br></div><div>I&#39;m pretty new to this and every step is a struggle, so any suggestions are welcome.  But if there are any tips or pointers on why pack is not working the way I think it should - or what I should be using to accomplish what I&#39;m trying to do - I would appreciate it.</div>

<div><br></div><div><br></div><div><br></div><div>Long-winded description of how the attached patch is behaving:</div><div><br></div><div>Buttons are arranged in column, row order.  I&#39;m just storing 0/1 values in the state_table array.  If I click on the first and last buttons, my array is then 1 0 0 1.  So state_table[i] gets me the off/on value for the button.  i div 2 gets me the column number and i mod 2 gets me the row number.  </div>

<div><br></div><div>If I just print these three outputs I get everything out in the order I expect:</div><div><br></div><div><div>column: 0</div><div>row: 0</div><div>state: 1</div><div>column: 0</div><div>row: 1</div><div>

state: 0</div><div>column: 1</div><div>row: 0</div><div>state: 0</div><div>column: 1</div><div>row: 1</div><div>state: 1</div></div><div><br></div><div>If I send the three values into a pack object and print the output of that, I get:</div>

<div><br></div><div><div>pack: 0 1 0</div><div>pack: 0 0 1</div><div>pack: 1 1 0</div><div>pack: 1 0 0</div></div><div><br></div><div>I would expect this:</div><div><br></div><div>pack: 0 0 1</div><div>pack: 0 1 0</div><div>

pack: 1 0 0</div><div>pack: 1 1 1</div><div><br></div><div>So things are coming in the wrong order overall, and the state values are wrong.</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>-Theron</div>

<div>^</div><div><br></div>