[PD] Array that scrolls from right to left

Sebastien Lelong sebastien.lelong at gmail.com
Mon Feb 23 19:28:06 CET 2009

Hi Frank,

Thanks for your help. I'm getting things that "kind of" scroll... building
an horrible patch :) Some values are random, I guess I have a problem when
access extremities of the array. I'm sure there's something simpler,
probably using trigger, but I can't figure out how I could use a trigger
here. Could you give one last hint ? I guess I need to learn how to "think"
pure data...

Anyway, thanks again.


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

Sébastien Lelong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20090223/a9395abf/attachment.htm>

More information about the Pd-list mailing list