[PD] Quick question

Christof Ressi info at christofressi.com
Wed Oct 27 14:11:29 CEST 2021


> I cannot find a way to graph-on-parent a struct - is it just not possible?
It is certainly possible. After all, graphical arrays are just that: 
data structure arrays inside a GOP subpatch.

You just have to remember to set the "x range" and "y range" in the GOP 
settings to match the value range of your data structure(s).

Attached you will find a simple example.

Christof

On 27.10.2021 13:12, Pierre Alexandre Tremblay wrote:
> Hello
>
> I’m trying to made a plotter abstraction and I cannot find a way to graph-on-parent a struct - is it just not possible?
>
> If not possible, is there a good repo of examples of vanilla-only programmed plotter abstractions that would graph-in-parent like Arrays do?
>
> Any pointer (pun intended) welcome
>
> p
>
> _______________________________________________
> Pd-list at lists.iem.at  mailing list
> UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20211027/dac70af1/attachment.htm>
-------------- next part --------------
#N struct myarray float x float y array a foo;
#N struct foo float y;
#N canvas 324 283 667 372 12;
#X obj 351 42 loadbang;
#X obj 353 146 pointer;
#X msg 352 116 traverse pd-view \, bang;
#X msg 353 194 0 0;
#N canvas 0 50 450 300 view 0;
#X scalar myarray 0 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; \;;
#X coords 0 0 100 100 100 100 2 100 100;
#X restore 61 153 pd view;
#X obj 353 170 t b p;
#X obj 354 65 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 355 87 t b b;
#X msg 427 145 \; pd-view clear;
#X obj 353 220 append myarray x y;
#X obj 230 286 array size -s myarray a;
#X text 273 226 resize;
#X obj 353 244 t b p;
#X msg 230 260 5;
#N canvas 230 124 450 300 element-template 0;
#X obj 39 150 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5;
#X obj 40 117 struct foo float y;
#X restore 195 59 pd element-template;
#N canvas 785 254 420 239 array-template 0;
#X obj 44 178 plot a 500 1 10 10 20;
#X obj 43 144 struct myarray float x float y array a foo;
#X restore 195 90 pd array-template;
#X connect 0 0 6 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 9 0;
#X connect 5 0 3 0;
#X connect 5 1 9 2;
#X connect 6 0 7 0;
#X connect 7 0 2 0;
#X connect 7 1 8 0;
#X connect 9 0 12 0;
#X connect 12 0 13 0;
#X connect 12 1 10 1;
#X connect 13 0 10 0;


More information about the Pd-list mailing list