aboutsummaryrefslogtreecommitdiff
path: root/help/param-help.pd
blob: abcf5ab172a1063818cf1ea8544b80bcfc063fd6 (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
199
200
201
202
#N canvas 98 175 722 412 10;
#X obj -23 2 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
0;
#X text -18 54 author: mrtoftrash@gmail.com;
#X text -19 75 version: 2009-09-19 (localized release);
#X text -18 1 description: [param] is a state saving and message routing
system.;
#X text -19 33 tags: state routing;
#X text -17 106 [param] is to state saving what [list] is to lists
:);
#X floatatom 144 229 5 0 0 0 - - -;
#X obj 136 351 dac~;
#X obj 184 275 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X msg 144 251 /modulation/index \$1;
#X msg 181 297 /volume \$1;
#N canvas 237 177 542 366 [param 0;
#X text 210 53 argument 1: param name (must start with a slash);
#X obj 21 56 tof/param /my_name my_value;
#X text 210 70 argument 2...: param value (can be anything;
#X text 210 86 argument ...: special keywords;
#X text 24 120 A param object creates a storage area for anything.
This data can be accessed through a unique symbolic path.;
#X text 24 227 If the param is inside an abstraction (or inside an
abstraction contained inside another abstraction an so forth) \, the
path starts at the root and follows every child patch (abstraction)
until it reaches the param object \, at which point the param's name
is appended:;
#X text 85 303 /abstraction's name/.../param's name;
#X text 147 171 /my_name;
#X restore -16 164 pd [param /name];
#N canvas 0 0 975 555 keywords 0;
#X text 565 152 nbx: creates a numberbox;
#X text 564 171 slider min max: creates a slider with the indicated
minimum and maximum;
#X text 564 200 bng: creates a bang;
#X text 564 218 tgl: creates a toggle;
#X text 566 236 symbolatom: creates a symbol box;
#X floatatom 509 121 5 0 0 0 - - -;
#X obj 509 95 tof/param /number 30 /g nbx;
#X text 506 137 /g options:;
#X text 509 55 When you create a param \, you can optinally use the
"/g" keyword to flag the param with gui options.;
#X floatatom 162 129 5 0 0 0 - - -;
#X obj 162 106 tof/param /test 50 /nlb;
#X text 49 63 A param automatically ouputs its value when it is created.
You can disable this behavior with the "/nlb" (no loadbang) keyword.
;
#X text 451 38 /g keyword: GUI options;
#X text 18 41 /nlb keyword: No loadbang;
#X text 24 155 /wfb keyword: Wait for bang;
#X text 56 177 This param will only output its contents on a bang.
;
#X obj 49 227 tof/param /waiting 50 /wfb;
#X floatatom 49 200 5 0 0 0 - - -;
#X floatatom 49 250 5 0 0 0 - - -;
#X obj 93 203 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 36 296 /ns keyword: No save;
#X text 67 317 This param will never be saved.;
#X obj 177 298 tof/param /nope 50 /ns;
#X text 249 449 /nps keyword: No preset save;
#X text 280 471 This param will never be saved in a preset file.;
#X obj 448 449 tof/param /noPresets 67 /nps;
#X text 284 411 Special keywords for [param /name] and [param custom]
;
#X text 350 5 Special keywords for [param /name];
#X connect 6 0 5 0;
#X connect 10 0 9 0;
#X connect 16 0 18 0;
#X connect 17 0 16 0;
#X connect 19 0 16 0;
#X restore 150 164 pd keywords;
#N canvas 0 0 450 300 [param 0;
#X text 26 80 outlet 1: bang when a param save is called;
#X text 29 106 outlet 2: the data to be restored (loaded from the save
file);
#X obj 46 228 param custom /cname;
#X text 30 60 inlet 1: data to be saved (can be multiple messages)
;
#X text 31 18 description: allows to save and restore any type of data
in a state.;
#X obj 157 252 print custom_restored;
#X msg 46 196 this will be saved;
#X msg 205 197 this will also be saved;
#X obj 106 156 t b b;
#X connect 2 0 8 0;
#X connect 2 1 5 0;
#X connect 6 0 2 0;
#X connect 7 0 2 0;
#X connect 8 0 6 0;
#X connect 8 1 7 0;
#X restore -16 187 pd [param custom /name];
#N canvas 43 205 542 321 [param 0;
#X obj 48 278 print;
#X obj 49 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 92 170 guis;
#X text 72 99 A bang will output all the params and their values.;
#X msg 73 129 symbol /FM_MOD;
#X text 169 127 A symbol will dump only the params that start with
that path.;
#X text 129 167 Guis will output all the optional /g values.;
#X obj 49 244 tof/param dump;
#X text 35 23 description: dumps the values or the gui options of params
;
#X msg 134 188 guis /FM_MOD;
#X text 41 6 [param dump];
#X connect 1 0 7 0;
#X connect 2 0 7 0;
#X connect 4 0 7 0;
#X connect 7 0 0 0;
#X connect 9 0 7 0;
#X restore -16 235 pd [param dump];
#N canvas 288 382 637 377 [param 0;
#X obj 336 180 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X obj 392 230 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X obj 37 185 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 94 225 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 336 204 5 0 0 0 - - -;
#X floatatom 392 252 5 0 0 0 - - -;
#X text 376 202 Save preset N;
#X text 430 251 Restore preset N;
#X text 26 46 description: saves and restores params in individual
files on the hard disk.;
#X text 27 27 [param file];
#X obj 37 266 param file;
#X obj 336 279 param file;
#X text 30 110 Data is saved/restored in the same folder as the root
patch.;
#X text 116 223 Restore main save file;
#X text 59 182 Save main save file;
#X connect 0 0 4 0;
#X connect 1 0 5 0;
#X connect 2 0 10 0;
#X connect 3 0 10 1;
#X connect 4 0 11 0;
#X connect 5 0 11 1;
#X restore -16 257 pd [param file];
#N canvas 461 363 450 300 [param 0;
#X text 26 47 description: routes param messages.;
#X text 26 20 [param route];
#X text 28 92 [param route] routes messages to params. It relativitize
target names.;
#X restore -16 280 pd [param route];
#N canvas 0 0 517 280 [param 0;
#X text 19 28 description: builds pd guis for params.;
#X obj 21 68 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 90 120 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 42 65 This inlet creates the guis once. All further bangs only
display the gui window.;
#X obj 21 157 tof/param gui;
#X text 112 117 This inlet creates and displays the window everytime
it is banged. The content is always up to date \, but a bit slower.
;
#X connect 1 0 4 0;
#X connect 2 0 4 1;
#X restore -15 302 pd [param gui];
#N canvas 0 0 525 231 /id 0;
#X text 26 42 Abstraction /id:;
#X text 63 67 If an abstraction's arguments contains the "/id" keyword
\, the symbol following the "/id" keyword \, instead of the abstraction's
name \, will be used to build the path.;
#X restore -16 323 pd /id;
#N canvas 0 0 450 300 [param 0;
#X text 38 36 [param path];
#X text 37 57 description: outputs the current param path.;
#X obj 42 105 param path;
#X obj 46 83 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 43 130 print;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X restore -16 210 pd [param path];
#X obj 144 322 ./param-abs /id FM_MOD /carrier 600;
#X obj 404 243 cnv 15 200 20 empty empty /FM_MOD/ 2 12 0 8 -258401
-262144 0;
#X obj 404 266 nbx 5 14 -1e+37 1e+37 0 0 /FM_MOD/modulation/freq /FM_MOD/modulation/freq_
modulation/freq 50 8 0 8 -262144 -1 -1 29 256;
#X obj 404 284 nbx 5 14 -1e+37 1e+37 0 0 /FM_MOD/modulation/index /FM_MOD/modulation/index_
modulation/index 50 8 0 8 -262144 -1 -1 20 256;
#X obj 404 302 hsl 100 15 0 1 0 0 /FM_MOD/volume /FM_MOD/volume_ volume
105 7 0 8 -262144 -1 -1 0 1;
#X obj 404 320 hsl 100 15 200 2000 0 0 /FM_MOD/carrier /FM_MOD/carrier_
carrier 105 7 0 8 -262144 -1 -1 2200 1;
#X obj 441 129 tof/param route;
#X msg 440 91 /FM_MOD/modulation/freq \$1;
#X floatatom 444 44 5 0 0 0 - - -;
#X connect 6 0 9 0;
#X connect 8 0 10 0;
#X connect 9 0 20 0;
#X connect 10 0 20 0;
#X connect 20 0 7 0;
#X connect 20 0 7 1;
#X connect 27 0 26 0;
#X connect 28 0 27 0;