Hallo, 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
This is a good excercise to get familiar with the [trigger] object and Pd's execution order.
Frank