Hi Frank,<br><br><br>Thanks for your help. I&#39;m getting things that &quot;kind of&quot; scroll... building an horrible patch :) Some values are random, I guess I have a problem when access extremities of the array. I&#39;m sure there&#39;s something simpler, probably using trigger, but I can&#39;t figure out how I could use a trigger here. Could you give one last hint ? I guess I need to learn how to &quot;think&quot; pure data...<br>
<br>Anyway, thanks again.<br><br>Cheers,<br>Seb<br><br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hallo,<br>

<div class="Ih2E3d">Sebastien Lelong hat gesagt: // Sebastien Lelong wrote:<br>
<br>
&gt; I&#39;ve recently discovered Pure Data as versatile platform I could use to<br>
&gt; build a robotic GUI. The idea is to collect data from a robot, send it to an<br>
&gt; OSC (open source control) server, get the data in pd~ and deal with it. One<br>
&gt; important aspect would be to plot data, in real-time, so the graph scrolls<br>
&gt; from right to left, and data is appended to the end of array (right) (well,<br>
&gt; I hope what I write is understandable...).<br>
&gt;<br>
&gt; So far so good, I&#39;ve been able to build all the OSC part, and even plot<br>
&gt; things in a array in pd~, but I can only find a way to plot data from left<br>
&gt; to right, and when array&#39;s end is reached, clear it and start from beginning<br>
&gt; again. In other words, I can&#39;t make it scroll...<br>
<br>
</div>One simple way to make it scroll would be to use [list-lastx<br>
&lt;TABLESIZE&gt;] from the [list]-abs collection. Just prepend a 0 to the<br>
outgoing list and send it to a receiver named after the table like this:<br>
<br>
&nbsp;[table DATA 16]<br>
<br>
&nbsp;[r ROBOT]<br>
&nbsp;|<br>
&nbsp;[list-lastx 16]<br>
&nbsp;|<br>
&nbsp;[list prepend 0]<br>
&nbsp;|<br>
&nbsp;[s DATA]<br>
<br>
Alternatively do it manuall. The basic algorithm is this:<br>
<br>
If a new ROBOT-float comes in store it. Then start a loop over the table<br>
where you<br>
<br>
1) read out the current element with [tabread]<br>
2) store it in the right inlet of a [float]<br>
3) write the new value into the table with [tabwrite]<br>
4) increment your counter<br>
5) repeat using the float stored in 2) as the new value.<br>
<br>
This is a good excercise to get familiar with the [trigger] object and<br>
Pd&#39;s execution order.<br>
<br>
Ciao<br>
<font color="#888888">--<br>
Frank<br>
<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>
</font></blockquote></div><br><br clear="all"><br>-- <br>Sébastien Lelong<br><a href="http://www.sirloon.net">http://www.sirloon.net</a><br><a href="http://sirbot.org">http://sirbot.org</a><br>