-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.pd
368 lines (368 loc) · 11.4 KB
/
main.pd
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
#N canvas 0 90 1920 990 10;
#X declare -path ../../o-knob;
#X declare -path o-knob;
#X obj 744 163 cnv 15 400 450 empty empty page_2 20 12 0 14 -154742
-66577 0;
#X obj 188 163 cnv 15 400 450 empty empty page_1 20 12 0 14 -154742
-66577 0;
#X obj 23 435 osc~;
#X obj 23 491 *~;
#X obj 201 231 * 1024;
#X obj 201 409 * 40;
#X obj 146 468 osc~;
#X obj 145 502 *~;
#X obj 24 589 *~;
#X obj 596 432 osc~;
#X obj 596 499 *~;
#X obj 757 247 * 1024;
#X obj 757 418 * 40;
#X obj 597 585 *~;
#X obj 355 704 *~;
#X obj 392 687 r vol;
#X obj 317 796 throw~ outL;
#X obj 407 796 throw~ outR;
#X obj 98 552 -~;
#X obj 97 437 sig~ 1;
#X obj 669 533 -~;
#X obj 709 464 osc~;
#X obj 708 498 *~;
#X obj 668 433 sig~ 1;
#X obj 359 230 * 1024;
#X obj 915 237 * 1024;
#X obj 387 430 * 40;
#X obj 943 437 * 40;
#X obj 351 310 expr int($f1*100)/100;
#X obj 387 404 expr int($f1*100)/100;
#X obj 380 532 expr int($f1*100)/100;
#X obj 908 320 expr int($f1*100)/100;
#X obj 943 412 expr int($f1*100)/100;
#X obj 936 530 expr int($f1*100)/100;
#X msg 359 252 \; screenLine1 1: freq \$1 hz;
#X msg 351 330 \; screenLine2 2: amp \$1;
#X msg 387 467 \; screenLine3 3: lfo freq \$1;
#X msg 380 558 \; screenLine4 4: lfo amp \$1;
#X msg 915 259 \; screenLine1 1: freq \$1 hz;
#X msg 908 341 \; screenLine2 2: amp \$1;
#X msg 944 460 \; screenLine3 3: lfo freq \$1;
#X msg 936 550 \; screenLine4 4: lfo amp \$1;
#X floatatom 500 227 5 0 0 0 to_synth - -, f 5;
#X floatatom 499 207 5 0 0 0 display_only - -, f 5;
#X floatatom 1058 226 5 0 0 0 to_synth - -, f 5;
#X floatatom 1058 205 5 0 0 0 display_only - -, f 5;
#X obj 958 706 cnv 15 100 60 empty empty page_3 20 12 0 14 -154742
-66577 0;
#N canvas 363 90 1495 990 presets 1;
#X obj 452 99 int;
#X obj 704 103 int;
#X obj 704 81 * 2;
#X floatatom 704 125 5 0 0 0 - - -, f 5;
#X obj 704 146 t f f;
#X obj 705 188 -;
#X obj 705 208 > 0;
#X obj 705 231 change;
#X obj 705 253 sel 1;
#X text 32 42 save/load;
#X text 349 33 (in) preset number;
#X obj 128 105 int;
#X obj 452 77 * 10;
#X obj 128 83 * 2;
#X obj 128 127 sel 0 1;
#X obj 399 270 f;
#X obj 399 300 pack f f;
#X obj 399 322 route 0 1;
#X text 362 371 save;
#X text 741 372 load;
#X floatatom 163 105 5 0 0 0 - - -, f 5;
#X floatatom 489 100 5 0 0 0 - - -, f 5;
#X obj 341 516 list prepend;
#X obj 341 688 s;
#X obj 341 538 list split 1;
#X msg 128 151 symbol save;
#X msg 151 176 symbol load;
#X obj 341 650 list trim;
#X obj 341 624 list;
#X obj 341 578 t b s, f 10;
#X msg 742 82 \; screenLine3 3: L to R => OK;
#X text 585 416 clean;
#X text 445 518 route;
#X text 267 421 get;
#X msg 22 365 \; screenLine4 SAVED to PRESET \$1;
#X msg 665 421 \; screenLine4 PRESET \$1 LOADED;
#X msg 452 121 \; screenLine2 2: preset \$1;
#X msg 128 217 \; screenLine1 1: operation : \$1;
#X msg 207 796 \; o2-lfo-amp 0.898438 \; o2-lfo-freq 0.310547 \; o2-amp
0.72168 \; o2-freq 0.544922 \; o1-amp 0.589844 \; o1-lfo-freq 0.352539
\; o1-lfo-amp 0.855469 \; o1-freq 0.496094 \;;
#X msg 618 796;
#X msg 888 796;
#X msg 1028 796;
#X msg 1165 796;
#X msg 1307 796;
#X text 25 736 Your presets are here. You can have as much presets
as you want. Note that you can only save floats !;
#X obj 299 420 s o-get-params;
#X obj 341 461 r o-params;
#X obj 229 303 r o-save;
#X obj 617 299 r o-load;
#X text 710 315 you can load a preset or save current parameters to
a preset by sending a integer to o-load or o-save;
#X msg 445 400 \; o-preset-\$1 set \; o-preset-\$1 addsemi;
#X msg 422 490 o-preset-\$1;
#X msg 617 361 \; o-preset-\$1 bang;
#X obj 27 772 r o-preset-0;
#X obj 207 772 r o-preset-1;
#X obj 347 772 r o-preset-2;
#X obj 477 772 r o-preset-3;
#X obj 617 772 r o-preset-4;
#X obj 757 772 r o-preset-5;
#X obj 887 772 r o-preset-6;
#X obj 1026 772 r o-preset-7;
#X obj 1167 772 r o-preset-8;
#X obj 1307 772 r o-preset-9;
#X obj 974 49 cnv 15 450 80 empty empty empty 20 12 0 14 -154742 -66577
0;
#X text 632 12 do it ! (turn from left to right);
#X obj 768 119 loadbang;
#X msg 768 145 -1;
#X text 982 54 As the knobs are only useful on this page and not a
part of the synth \, we can use the second outlet only (no hidden update
of the ouput value). Also \, note that these knobs do not have a unique
name \, because it's not useful to save their state in a preset.;
#X msg 477 796;
#X msg 347 796;
#X msg 27 796 \; o2-lfo-freq 0.410156 \; o2-amp 0.413086 \; o1-lfo-amp
0.84375 \; o1-lfo-freq 0.138672 \; o1-amp 0.612305 \; o1-freq 0.0869141
\; o2-lfo-amp 0.712891 \; o2-freq 0.634766 \;;
#X obj 29 61 o-knob 3 1;
#X obj 350 56 o-knob 3 2;
#X obj 639 36 o-knob 3 3;
#X msg 154 419 menusave;
#X obj 154 441 s pd-main.pd;
#X obj 399 372 t b b f f;
#X msg 757 796;
#X connect 0 0 36 0;
#X connect 0 0 16 1;
#X connect 0 0 21 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 4 1 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 15 0;
#X connect 11 0 14 0;
#X connect 11 0 15 1;
#X connect 11 0 20 0;
#X connect 12 0 0 0;
#X connect 13 0 11 0;
#X connect 14 0 25 0;
#X connect 14 1 26 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 34 0;
#X connect 17 0 76 0;
#X connect 17 1 52 0;
#X connect 17 1 35 0;
#X connect 22 0 24 0;
#X connect 24 0 29 0;
#X connect 24 1 28 1;
#X connect 25 0 37 0;
#X connect 26 0 37 0;
#X connect 27 0 23 0;
#X connect 28 0 27 0;
#X connect 29 0 28 0;
#X connect 29 1 23 1;
#X connect 46 0 22 0;
#X connect 47 0 76 0;
#X connect 48 0 52 0;
#X connect 51 0 22 1;
#X connect 53 0 70 0;
#X connect 54 0 38 0;
#X connect 55 0 69 0;
#X connect 56 0 68 0;
#X connect 57 0 39 0;
#X connect 58 0 77 0;
#X connect 59 0 40 0;
#X connect 60 0 41 0;
#X connect 61 0 42 0;
#X connect 62 0 43 0;
#X connect 65 0 66 0;
#X connect 66 0 5 0;
#X connect 71 1 13 0;
#X connect 72 1 12 0;
#X connect 73 1 30 0;
#X connect 73 1 2 0;
#X connect 74 0 75 0;
#X connect 76 0 74 0;
#X connect 76 1 45 0;
#X connect 76 2 51 0;
#X connect 76 3 50 0;
#X restore 971 737 pd presets;
#X obj 768 706 cnv 15 100 60 empty empty empty 20 12 0 14 -154742 -66577
0;
#N canvas 23 50 503 439 browsing 0;
#X obj 49 50 r aux;
#X obj 49 72 sel 1;
#X msg 49 94 1;
#X obj 49 116 +;
#X obj 88 118 f;
#X floatatom 49 138 5 0 0 0 - - -, f 5;
#X obj 172 23 loadbang;
#X obj 125 119 % 3;
#X msg 202 147 \; screenLine1 : \; screenLine2 : \; screenLine3 : \;
screenLine4 : \;;
#X msg 179 95 0;
#X obj 49 157 t f f f b;
#X obj 69 244 sel 1 2 3;
#X msg 49 367 \; led \$1;
#X msg 108 304 symbol Presets;
#X msg 69 335 \; screenLine5 Page : \$1;
#X msg 69 263 symbol OSC1;
#X msg 89 283 symbol OSC2;
#X obj 89 221 s o-page-selected;
#X obj 179 117 s o-load;
#X obj 178 54 delay 1000;
#X text 328 164 *clear the screen*;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 0 5 0;
#X connect 4 0 7 0;
#X connect 5 0 10 0;
#X connect 6 0 2 0;
#X connect 6 0 19 0;
#X connect 7 0 3 1;
#X connect 9 0 18 0;
#X connect 10 0 12 0;
#X connect 10 1 11 0;
#X connect 10 2 17 0;
#X connect 10 3 8 0;
#X connect 11 0 15 0;
#X connect 11 1 16 0;
#X connect 11 2 13 0;
#X connect 13 0 14 0;
#X connect 15 0 14 0;
#X connect 16 0 14 0;
#X connect 19 0 9 0;
#X restore 778 728 pd browsing;
#X obj 188 12 cnv 15 956 150 empty empty no_im_not_hiding 20 20 0 12
-154742 -262144 0;
#X obj 191 15 cnv 15 950 144 empty empty O-knob!_v2_"Smoking_Pots"_(for_Organelle)
20 20 0 24 -245564 -154742 0;
#X text 690 121 Contact : patchstorage.com/author/baptiste or baptiste.chatel@gmail.com
;
#X text 224 48 It is a very simple knob/parameter page system and preset
manager for Critter & Guitari's Organelle. Each parameter of each page
is tied to a knob. When you browse through pages \, the knob may not
be in sync with the new corresponding parameter. There are several
ways to get it in sync. Instead of making the parameter jump to the
knob value \, you need to pick it up by dialing the knob to the location
you left it last time.;
#X text 1196 58 argument 1 : PAGE NUMBER - integer: The page number
on which is this parameter.;
#X text 1196 87 argument 2 : KNOB NUMBER - integer: which knob is it
?;
#X text 690 48 This simple example is a duophonic synth with 2 LFOs.
Use the AUX button to browse through the pages.;
#X text 1178 264 Open [pd presets] to see how to handle presets.;
#X text 1177 162 You can send floats to [s UNIQUE NAME] to override
the pot value. Sending a bang to [s o-get-params] will send a name-value
pair to [r o-params] if it exists.;
#X text 1177 226 See [pd browsing] to get a grasp about how to browse
through pages.;
#N canvas 6 50 440 271 RESERVED 0;
#X obj 241 123 s o-get-params;
#X obj 241 104 r o-params;
#X obj 241 66 r o-save;
#X obj 241 85 r o-load;
#X obj 241 142 s o-page-selected;
#X text 19 25 These names are reserved ! Don't use them unless you
know what you're doing !;
#X text 17 73 GOOD USE EXAMPLES \; -save values to preset \; -load
preset \; -receive parameters \; -get parameters \; -select a page
\;;
#X text 16 178 WRONG USE EXAMPLES \; -using one of these for anything
but one of the good examples above \; -naming your child;
#X restore 849 790 pd RESERVED NAMES;
#X text 1176 31 Usage : [o-knob [page number] [knob number] [receive-name]]
, f 92;
#X obj 758 190 o-knob 2 1 o2-freq;
#X text 1178 599 KNOWN ISSUES \; -Due to the [threshold] \, it's sometimes
hard to pick extreme values as 0.99707 in [0:0.99707], f 49;
#X obj 757 510 o-knob 2 4 o2-lfo-amp;
#X obj 201 191 o-knob 1 1 o1-freq;
#X obj 201 291 o-knob 1 2 o1-amp;
#X obj 201 381 o-knob 1 3 o1-lfo-freq;
#X obj 201 511 o-knob 1 4 o1-lfo-amp;
#X obj 758 300 o-knob 2 2 o2-amp;
#X obj 757 390 o-knob 2 3 o2-lfo-freq;
#X obj 1248 387 declare -path ../../o-knob;
#X obj 838 666 declare -path o-knob;
#X text 1175 318 TIP : the o-knob library folder can be placed in /usbdrive
\, at the same level as the Patches folder. If you do so \, you need
to [declare] the o-knob library folder in your patch as follows :;
#X text 1195 111 argument 3 : UNIQUE NAME - symbol. The name of the
parameter you want to save. optional;
#X text 1179 658 TO DO \; -make it a state machine -remove all user
doc from browsing and presets \; -make real help files \; -make browsing
and presets abstractions instead of subpatches \; -install guide;
#X text 1177 431 CHANGELOG for v2 \; -Added [threshold 0.001] to prevent
pot noise \; -Changed pick-up method from "we're close enough" to "we're
past the old value" \, fast dialing is now possible \; -Removed need
for tolerance argument - WHEN UPDATING PLEASE REMOVE ALL TOLERANCE
ARGUMENTS (0.02 typically) OTHERWISE IT WON'T WORK -Moved existing
documentation to example patch, f 49;
#X connect 2 0 3 0;
#X connect 3 0 8 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 18 1;
#X connect 8 0 14 0;
#X connect 9 0 10 0;
#X connect 10 0 13 0;
#X connect 11 0 9 0;
#X connect 12 0 21 0;
#X connect 13 0 14 0;
#X connect 14 0 16 0;
#X connect 14 0 17 0;
#X connect 15 0 14 1;
#X connect 18 0 8 1;
#X connect 19 0 18 0;
#X connect 20 0 13 1;
#X connect 21 0 22 0;
#X connect 22 0 20 1;
#X connect 23 0 20 0;
#X connect 24 0 34 0;
#X connect 25 0 38 0;
#X connect 26 0 36 0;
#X connect 27 0 40 0;
#X connect 28 0 35 0;
#X connect 29 0 26 0;
#X connect 30 0 37 0;
#X connect 31 0 39 0;
#X connect 32 0 27 0;
#X connect 33 0 41 0;
#X connect 62 0 11 0;
#X connect 62 0 44 0;
#X connect 62 1 25 0;
#X connect 62 1 45 0;
#X connect 64 0 22 1;
#X connect 64 1 33 0;
#X connect 65 0 4 0;
#X connect 65 0 42 0;
#X connect 65 1 24 0;
#X connect 65 1 43 0;
#X connect 66 0 3 1;
#X connect 66 1 28 0;
#X connect 67 0 5 0;
#X connect 67 1 29 0;
#X connect 68 0 7 1;
#X connect 68 1 30 0;
#X connect 69 0 10 1;
#X connect 69 1 31 0;
#X connect 70 0 12 0;
#X connect 70 1 32 0;