aboutsummaryrefslogtreecommitdiff
path: root/doc/pddp/set-help.pd
diff options
context:
space:
mode:
Diffstat (limited to 'doc/pddp/set-help.pd')
-rw-r--r--doc/pddp/set-help.pd240
1 files changed, 201 insertions, 39 deletions
diff --git a/doc/pddp/set-help.pd b/doc/pddp/set-help.pd
index aa991903..8654c7cb 100644
--- a/doc/pddp/set-help.pd
+++ b/doc/pddp/set-help.pd
@@ -1,40 +1,202 @@
-#N struct help-set-template1 float x float y;
-#N canvas 346 46 655 535 12;
-#X msg 272 235 next;
-#X floatatom 19 265 5 0 0 2 X_value - -;
-#X floatatom 106 265 5 0 0 2 Y_value - -;
-#X obj 258 260 pointer;
-#X text 261 189 output first scalar in list;
-#X text 318 235 output next item;
-#X text 282 332 First argument selects template.;
-#X text 282 347 Remaining args are names of fields.;
-#X msg 258 211 traverse pd-help-set-data \, next;
-#N canvas 0 22 288 134 help-set-data 1;
-#X scalar help-set-template1 44 50 \;;
-#X scalar help-set-template1 99 73 \;;
-#X restore 377 409 pd help-set-data;
-#N canvas 164 72 425 146 help-set-template1 0;
-#X obj 41 87 filledpolygon 9 0 1 0 0 20 0 20 30 0 30;
-#X obj 60 21 template float x float y;
-#X restore 377 431 pd help-set-template1;
-#X text 86 10 -- set values in a scalar;
-#X obj 19 338 set help-set-template1 x y;
-#X text 359 497 updated for Pd version 0.35;
-#X text 6 72 [set] takes a pointer to a scalar in its rightmost inlet
-\; the remaining inlets set numeric values of fields. Only the leftmost
-inlet is "hot". You can't [set] "arrays" or "sublists". Instead \,
-you can get pointers into them using [element] and [sublist] (probably
+#N struct set-help-template float x float y float a float b symbol
+desc;
+#N canvas 0 0 555 619 10;
+#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
+14 -228856 -66577 0;
+#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header set 3 12 0 18 -204280
+-1 0;
+#X obj 0 230 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
+-228856 -1 0;
+#N canvas 50 245 494 344 META 0;
+#X text 12 105 PLATFORM windows macosx gnulinux;
+#X text 12 185 LIBRARY internal;
+#X text 12 225 WEBSITE http://crca.ucsd.edu/~msp/;
+#X text 12 65 LICENSE SIBSD;
+#X text 12 205 AUTHOR Miller Puckette;
+#X text 12 285 HELP_PATCH_AUTHORS Updated for Pd version 0.33. Revised
+by Jonathan Wilkes to conform to the PDDP template for Pd version 0.42.
+;
+#X text 12 5 GENRE help;
+#X text 12 45 KEYWORDS control data_structure;
+#X text 12 85 DESCRIPTION set values in a scalar;
+#X text 12 25 NAME set;
+#X text 12 125 INLET_0 float list symbol bang;
+#X text 12 145 INLET_N float symbol;
+#X text 12 165 INLET_R pointer;
+#X text 12 245 RELEASE_DATE 1997;
+#X text 12 265 RELEASE_VERSION;
+#X restore 500 597 pd META;
+#X obj 0 402 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
+13 -228856 -1 0;
+#X obj 0 425 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
+0 13 -228856 -1 0;
+#X obj 0 505 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
+0 13 -228856 -1 0;
+#N canvas 76 482 428 109 Related_objects 0;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [set] Related Objects;
+#X obj 23 44 get;
+#X obj 55 44 append;
+#X obj 105 44 getsize;
+#X obj 161 44 setsize;
+#X obj 221 44 element;
+#X obj 23 69 sublist;
+#X obj 81 69 struct;
+#X obj 133 69 pointer;
+#X restore 102 598 pd Related_objects;
+#X obj 78 332 cnv 17 3 35 empty \$0-pddp.cnv.let.n n 5 9 0 16 -228856
+-162280 0;
+#X text 98 237 float;
+#X text 98 265 list;
+#X obj 78 374 cnv 17 3 17 empty \$0-pddp.cnv.let.r r 5 9 0 16 -228856
+-162280 0;
+#X obj 492 3 set;
+#X obj 466 20 pddp/pddplink http://wiki.puredata.info/en/set -text
+pdpedia: set;
+#X text 11 23 set values in a scalar;
+#N canvas 114 251 428 334 set-help-template 0;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [set] Data Structure Template;
+#X obj 23 43 struct set-help-template float x float y float a float
+b symbol desc;
+#X obj 23 124 drawcurve 0 1 60 50 70 50 70 60 60 60 60 50;
+#X obj 23 244 drawcurve 0 1 25 85 50 a 75 85;
+#N canvas 128 146 428 443 poll 0;
+#X obj 22 95 metro 500;
+#X msg 22 117 traverse pd-set-help.pd \, next;
+#X msg 22 172 next;
+#X obj 111 173 pointer;
+#X obj 22 195 pointer;
+#X obj 22 142 t b a;
+#X obj 111 217 get set-help-template a;
+#X obj 22 262 get set-help-template a;
+#X obj 111 239 moses 87;
+#X msg 156 285 symbol Comedy;
+#X obj 111 336 set -symbol set-help-template desc;
+#X obj 111 195 t a a;
+#X obj 22 217 t a a;
+#X msg 111 307 symbol Tragedy;
+#X msg 22 386 symbol Tragedy;
+#X msg 67 364 symbol Comedy;
+#X obj 22 408 set -symbol set-help-template desc;
+#X obj 22 73 loadbang;
+#X obj 22 337 moses 88;
+#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 7 1 [set] Subpatch;
+#X text 19 29 This subpatch just makes the help patch a little more
+interactive by changing the text depending on whether there is a frown
+or a smile.;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 2 0 4 0;
+#X connect 3 0 4 1;
+#X connect 3 0 11 0;
+#X connect 4 0 12 0;
+#X connect 5 0 2 0;
+#X connect 5 1 3 0;
+#X connect 6 0 8 0;
+#X connect 7 0 18 0;
+#X connect 8 0 13 0;
+#X connect 8 1 9 0;
+#X connect 9 0 10 0;
+#X connect 11 0 6 0;
+#X connect 11 1 10 1;
+#X connect 12 0 7 0;
+#X connect 12 1 16 1;
+#X connect 13 0 10 0;
+#X connect 14 0 16 0;
+#X connect 15 0 16 0;
+#X connect 17 0 0 0;
+#X connect 18 0 14 0;
+#X connect 18 1 15 0;
+#X restore 25 307 pd poll;
+#X text 25 272 The following subpatch is used to change the symbol
+"desc" depending on whether each face is smiling or frowning.;
+#X obj 23 80 drawcurve 0 1 0 20 100 20 100 120 0 120 0 20;
+#X text 298 79 <- Head;
+#X obj 23 102 drawcurve 0 1 30 50 40 50 40 60 30 60 30 50;
+#X text 298 102 <- Left eye;
+#X text 298 124 <- Right eye;
+#X text 25 198 The following drawing instruction associates the field
+"a" with the midpoint of a curve. Thus you can set the value of a and
+change the arc/direction of the curve.;
+#X text 217 244 <- Mouth;
+#X text 187 152 <- Text;
+#X obj 25 152 drawsymbol desc 30 b 0 b=;
+#X text 187 175 <- Text;
+#X obj 25 175 drawnumber a 40 a 0 a=;
+#X restore 415 193 pd set-help-template;
+#X scalar set-help-template 2 65 107 0 Comedy \;;
+#X obj 357 166 pointer;
+#X msg 357 113 traverse pd-set-help.pd \, next;
+#X floatatom 210 167 5 0 0 0 - - -;
+#X text 364 96 output first scalar in list;
+#X scalar set-help-template 107 42 63 127 Tragedy \;;
+#X msg 368 138 next;
+#X text 403 137 output next item;
+#X text 98 373 pointer;
+#X text 168 265 - a list is distributed among the inlets.;
+#X text 98 405 (none);
+#X obj 210 193 set set-help-template a b;
+#X floatatom 256 144 5 0 0 0 - - -;
+#X obj 78 238 cnv 17 3 85 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
+-162280 0;
+#X text 98 332 float;
+#X text 98 283 bang;
+#X obj 256 166 t b a;
+#X text 98 346 symbol;
+#X text 98 310 symbol;
+#X text 354 72 Click here first:;
+#X text 168 464 - all subsequent arguments are names of fields. There
+is one inlet created per field (plus the rightmost inlet for the pointer).
+;
+#X text 167 373 - a pointer to a scalar.;
+#X text 168 446 - the template of a scalar.;
+#X text 168 283 - a bang to the leftmost inlet sets the field(s) of
+the scalar with the last stored field value(s).;
+#X text 168 237 - a float to the leftmost inlet updates the value(s)
+for the field(s) specified in the creation arguments.;
+#X text 168 332 - an inlet is added for each additional field specified
+by the creation arguments. All fields must be the same type (i.e. \,
+floats or symbols \, but not a mixture of the two).;
+#X text 98 509 You can't [set] "arrays" or "sublists". Instead \, you
+can get pointers into them using [element] and [sublist] (Note: [sublist]
not working yet) and set individual items.;
-#X obj 29 432 all_about_data_structures;
-#X text 13 408 for more info \, open this patch:;
-#X obj 106 298 t b f;
-#X text 273 474 Miller's help patch:;
-#X obj 474 474 help-set;
-#X obj 21 10 set;
-#X connect 0 0 3 0;
-#X connect 1 0 12 0;
-#X connect 2 0 17 0;
-#X connect 3 0 12 2;
-#X connect 8 0 3 0;
-#X connect 17 0 1 0;
-#X connect 17 1 12 1;
+#X text 168 310 - see the subpatch "Setting_Symbolic_Fields" below.
+;
+#N canvas 98 376 428 215 Setting_Symbolic_Fields 0;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [set] Setting symbolic fields;
+#X obj 224 124 pointer;
+#X msg 224 71 traverse pd-set-help.pd \, next;
+#X msg 235 96 next;
+#X obj 23 151 set -symbol set-help-template desc;
+#X msg 23 84 symbol Trauermarsch;
+#X msg 48 109 symbol Scherzo;
+#X text 20 37 To set symbolic fields of a scalar \, the "-symbol" flag
+must be used as follows:;
+#X text 20 178 You cannot set symbols and floats using the same [set]
+object.;
+#X connect 2 0 5 1;
+#X connect 3 0 2 0;
+#X connect 4 0 2 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X restore 101 552 pd Setting_Symbolic_Fields;
+#X text 80 446 1) symbol atom;
+#X text 80 464 n) symbol atom;
+#X obj 4 597 pddp/pddplink pddp/help.pd -text help;
+#X obj 98 572 pddp/pddplink ../4.data.structures/03.setting.data.pd
+-text doc/4.data.structures/03.setting.data.pd;
+#X obj 353 552 pddp/pddplink scalar-help.pd;
+#X connect 17 0 27 2;
+#X connect 18 0 17 0;
+#X connect 19 0 27 0;
+#X connect 22 0 17 0;
+#X connect 28 0 32 0;
+#X connect 32 0 27 0;
+#X connect 32 1 27 1;