aboutsummaryrefslogtreecommitdiff
path: root/doc/pddp/set-help.pd
blob: fb306664d0b856fbc6239db926818e50823e4007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#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 125 LIBRARY internal;
#X text 12 165 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 25 LICENSE SIBSD;
#X text 12 145 AUTHOR Miller Puckette;
#X text 12 205 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 KEYWORDS control data_structure;
#X text 12 45 DESCRIPTION set values in a scalar;
#X text 12 65 INLET_0 float list symbol bang;
#X text 12 85 INLET_N float symbol;
#X text 12 105 INLET_R pointer;
#X text 12 185 RELEASE_DATE 1997;
#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 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 all_about_help_patches.pd -text Usage Guide;
#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;