Hallo, Andy Farnell hat gesagt: // Andy Farnell wrote: > #X array $1-THREE 6485 float 0; > > Maybe an easy one, we create an array called $1-THREE of size > 6485 of type float. And an array doesn't need coordinates because a graph > has the coordinates not the array. But what is that 0 at the end?
It's a flag specifiying the array's properties: "save contents", "draw as points" etc. I don't know how exactly this is built, use the source, Luke. ;) > #N canvas 0 22 450 300 graph1 0; > #X restore 235 308 graph1; > > What is the real purpose of restore? What are these parameters? How does > it relate to the canvas? The pair (canvas, restore) is like a bracket. Usually this is used to specify start and end of a subpatches. It also resets the object counter temporarily: "connect" inside a subpatch starts counting objetcs at 0 again. The object counter of the parent is restored after the end of the subpatch. See attached example "canvas-restore.pd" It also contains things like "GOP enabled?" etc. Your example is a pure graph however, not a subpatch. Pure graphs are used to hold arrays, and they have a bit different parameters. See below. I think the parameters to "restore" hold the position of the subcanvas in the parent. > What the hell is coords? Why? > > #X coords 0 1.02 6484 -1.02 200 130 1; Coordinates (size etc.) of the subpatch or graph. Check the "Properties" of the graph/subpatch. and attached example "graphs-and-arrays.pd" Ciao -- Frank Barknecht _ ______footils.org__
canvas-restore.pd
Description: application/puredata
graphs-and-arrays.pd
Description: application/puredata
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
