-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbop.sampler~.pd
309 lines (309 loc) · 8.8 KB
/
bop.sampler~.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
#N canvas 0 37 1470 891 12;
#X declare -path ./babs;
#X obj 63 535 outlet~;
#X obj 62 82 inlet~, f 41;
#X obj 398 181 outlet;
#X obj 1254 828 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X text 1622 1804 comment;
#X obj 1183 981 change;
#X obj 107 255 r \$0-to-clone;
#X obj 1203 1581 s \$0-to-clone;
#X msg 1277 1540 vis 2 \$1;
#X obj 1280 1513 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 1203 1509 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 1203 1540 vis 1 \$1;
#X obj 1132 720 loadbang;
#N canvas 282 74 581 816 load-samples 0;
#X obj 101 32 inlet;
#X obj 140 284 file glob;
#X obj 141 250 makefilename %s/*.wav;
#X msg 161 120 clear;
#X obj 140 317 list split 1;
#X obj 121 431 - 1;
#X msg 121 492 range 0 \$1;
#X obj 121 520 s \$0-set-sample;
#X obj 121 463 max 0;
#X obj 101 83 t b b f b;
#X text 332 347 store paths to samples;
#X text 181 423 number of samples;
#X obj 98 569 t b b, f 27;
#X msg 284 677 set 0;
#X msg 98 599 line 0 \, auto;
#X msg 98 661 next read \$1;
#X obj 333 533 outlet;
#X text 287 205 get path to folder;
#X obj 98 706 outlet;
#X obj 161 155 text define \$0-samples;
#X obj 140 349 text set \$0-samples 1e+10;
#X obj 98 632 text sequence \$0-samples;
#X obj 121 392 text size \$0-samples;
#X obj 141 208 text get \$0-folders;
#X connect 0 0 9 0;
#X connect 1 0 4 0;
#X connect 2 0 1 0;
#X connect 3 0 19 0;
#X connect 4 0 20 0;
#X connect 5 0 8 0;
#X connect 6 0 7 0;
#X connect 8 0 6 0;
#X connect 9 0 12 0;
#X connect 9 1 22 0;
#X connect 9 2 23 0;
#X connect 9 3 3 0;
#X connect 12 0 14 0;
#X connect 12 1 13 0;
#X connect 13 0 18 0;
#X connect 14 0 21 0;
#X connect 15 0 18 0;
#X connect 21 0 15 0;
#X connect 22 0 5 0;
#X connect 22 0 16 0;
#X connect 23 0 2 0;
#X restore 1155 1168 pd load-samples;
#X f 17;
#X obj 1271 1228 s \$0-num-samples;
#X obj 627 1138 r \$0-num-samples;
#X obj 613 1168 %, f 6;
#X obj 72 698 r \$0-midi;
#X obj 594 1220 pack, f 26;
#X text 666 1165 wrap notes;
#X obj 518 1560 s \$0-to-clone;
#X obj 1132 803 t b b b, f 15;
#X msg 1183 863 set -1;
#X obj 1132 1018 f;
#X obj 1199 947 int;
#X text 1103 683 ---------- SAMPLE LOADING ------------;
#X text 240 669 ---------- MIDI HANDLING ------------;
#X text 1138 1414 ---------- DEBUG ------------;
#N canvas 0 37 735 891 load-folders 0;
#X obj 32 18 inlet;
#X obj 102 347 file glob;
#X obj 104 260 pdcontrol;
#X msg 104 228 dir;
#X msg 125 136 clear;
#X obj 104 382 list split 1;
#X obj 88 1046 - 1;
#X msg 89 1075 range 0 \$1;
#X text 124 1044 number of banks;
#X text 123 410 store paths to banks;
#X obj 32 85 t b b b b b, f 14;
#X obj 56 956 babs.accum, f 30;
#X obj 56 690 t b b b, f 30;
#X obj 94 750 babs.iter;
#X obj 94 783 sel \\\;;
#X obj 95 815 file split;
#X obj 128 873 list length;
#X obj 96 843 t l l;
#X obj 96 927 babs.nth;
#X obj 128 897 - 1;
#X obj 89 1015 list length;
#X obj 56 986 t l l;
#X obj 89 1106 s \$0-set-folder;
#X obj 54 1179 s \$0-set-folder-enum;
#X text 68 1154 names of folders;
#X obj 127 168 text define \$0-folders;
#X obj 104 433 text set \$0-folders 1e+10;
#X obj 84 720 text tolist \$0-folders;
#X obj 374 20 inlet;
#X text 419 20 custom path;
#X obj 374 58 symbol;
#X msg 376 238 set %s/samplepacks/\$1/*/;
#X obj 104 306 makefilename %s/samplepacks/bop_samplepack/*/;
#X obj 82 581 text size \$0-folders;
#X obj 82 605 outlet;
#X text 105 545 output number of folders;
#X connect 0 0 10 0;
#X connect 1 0 5 0;
#X connect 2 0 32 0;
#X connect 3 0 2 0;
#X connect 4 0 25 0;
#X connect 5 0 26 0;
#X connect 6 0 7 0;
#X connect 7 0 22 0;
#X connect 10 1 12 0;
#X connect 10 2 33 0;
#X connect 10 3 3 0;
#X connect 10 4 4 0;
#X connect 11 0 21 0;
#X connect 12 0 11 0;
#X connect 12 1 27 0;
#X connect 12 2 11 1;
#X connect 13 0 14 0;
#X connect 14 1 15 0;
#X connect 15 0 17 0;
#X connect 16 0 19 0;
#X connect 17 0 18 0;
#X connect 17 1 16 0;
#X connect 18 0 11 0;
#X connect 19 0 18 1;
#X connect 20 0 6 0;
#X connect 21 0 23 0;
#X connect 21 1 20 0;
#X connect 27 0 13 0;
#X connect 28 0 30 0;
#X connect 30 0 31 0;
#X connect 31 0 32 0;
#X connect 32 0 1 0;
#X connect 33 0 34 0;
#X restore 1254 863 pd load-folders;
#X obj 139 401 r~ \$0-get-gain;
#X obj 107 432 *~, f 5;
#X text 318 938 keymap mode;
#X obj 594 1346 list append;
#X obj 667 1310 r \$0-get-root;
#X obj 752 950 r \$0-get-sample;
#X obj 752 976 int;
#X obj 734 1007 +;
#X obj 145 1341 list append;
#X obj 1155 1311 text define \$0-sample-info;
#X obj 1132 1051 t b f b;
#X obj 1178 1106 text delete \$0-sample-info, f 16;
#X obj 1132 778 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X msg 1178 1080 -1;
#X obj 1183 1205 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 1183 1236 vis 1 \$1;
#X text 604 1259 sample velocity;
#X text 605 1382 sample velocity pitch;
#X obj 71 813 pack f f f;
#X obj 71 782 poly 4 1;
#X text 170 809 target \, pitch \, velocity;
#X obj 518 1064 unpack f f f, f 31;
#X obj 517 1472 list append;
#X msg 518 1520 \$1 play \$2 \$3 \$4;
#X obj 518 1348 - 1;
#X text 607 1451 pitch velocity sample;
#X msg 594 1424 \$3 \$2 \$1;
#X text 66 1528 [target] play [pitch] [velocity] [sample];
#X text 80 938 repitch mode;
#X obj 70 1101 unpack f f f, f 29;
#X obj 145 1176 pack, f 23;
#X obj 70 1409 list append;
#X text 158 1406 target pitch velocity sample;
#X obj 70 1496 s \$0-to-clone;
#X msg 70 1456 \$1 play \$2 \$3 \$4;
#X obj 69 1197 - 1;
#X obj 1135 1508 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 1135 1540 vis 0 \$1;
#X obj 1132 748 delay 100;
#X text 783 981 todo \; offset sample \; may need to flush hanging notes when changing sample, f 13;
#X obj 653 170 r \$0-stop;
#X obj 687 214 r \$0-params;
#X obj 670 192 r \$0-midi;
#X obj 636 148 r \$0-dump;
#X obj 1201 921 r \$0-get-folder;
#X obj 400 133 babs.inout \$0 sampler~;
#X obj 60 29 declare -path ./babs;
#X obj 107 330 clone sub/sampler~/voice 4 \$0, f 33;
#X obj 399 85 inlet;
#X obj 661 106 savestate, f 14;
#X obj 1294 752 t b a;
#X obj 1294 724 r \$0-get-pack;
#X obj 1255 895 s \$0-num-folders;
#X obj 92 726 r \$0-get-stop;
#X msg 92 750 stop;
#X obj 661 80 babs.savestate \$0;
#X obj 213 1297 value \$0-get-sample;
#X obj 147 1259 t a b;
#X obj 950 607 babs.param \$0 gain 1;
#X obj 945 572 babs.param.spacer \$0;
#X obj 932 536 babs.param \$0 release 0.3;
#X obj 928 503 babs.param \$0 attack 0.1;
#X obj 945 477 babs.param.spacer \$0;
#X obj 933 440 babs.param \$0 loop-length 1;
#X obj 934 416 babs.param \$0 loop-start 0;
#X obj 931 383 babs.param \$0 loop 1 0 1;
#X obj 941 350 babs.param.spacer \$0;
#X obj 939 318 babs.param \$0 root 40 0 127;
#X obj 939 291 babs.param \$0 tune 0 -100 100;
#X obj 939 265 babs.param.spacer \$0;
#X obj 929 225 babs.param \$0 sample 0 0 999;
#X obj 926 201 babs.param.enum \$0 mode repitch keymap;
#X obj 925 170 babs.param \$0 mode 0 0 1;
#X obj 930 142 babs.param.spacer \$0;
#X obj 926 85 babs.param \$0 folder 0 0 999;
#X obj 925 56 babs.param.attr \$0 pack bop_samplepack;
#X obj 71 861 list prepend;
#X obj 152 836 r \$0-get-mode;
#X text 80 880 mode \, target \, pitch \, velocity;
#X text 78 1074 target \, pitch \, velocity;
#X text 523 1037 target \, pitch \, velocity;
#X obj 71 911 route 0 1, f 57;
#X obj 1271 1198 min 128;
#X obj 1155 1281 clone sub/sampler~/loader 128 \$0;
#X connect 1 0 0 0;
#X connect 1 1 74 0;
#X connect 3 0 28 0;
#X connect 5 0 23 0;
#X connect 6 0 76 0;
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 11 0;
#X connect 11 0 7 0;
#X connect 12 0 67 0;
#X connect 13 0 112 0;
#X connect 13 1 111 0;
#X connect 15 0 16 1;
#X connect 16 0 18 0;
#X connect 17 0 48 0;
#X connect 18 0 32 0;
#X connect 21 0 23 0;
#X connect 21 1 22 0;
#X connect 21 2 3 0;
#X connect 22 0 5 0;
#X connect 23 0 39 0;
#X connect 24 0 5 0;
#X connect 28 0 81 0;
#X connect 29 0 30 1;
#X connect 30 0 0 0;
#X connect 32 0 55 0;
#X connect 33 0 32 1;
#X connect 34 0 35 0;
#X connect 35 0 36 1;
#X connect 37 0 60 1;
#X connect 39 1 13 0;
#X connect 39 2 42 0;
#X connect 41 0 21 0;
#X connect 42 0 40 0;
#X connect 43 0 44 0;
#X connect 44 0 112 0;
#X connect 47 0 105 0;
#X connect 48 0 47 0;
#X connect 48 1 47 1;
#X connect 48 2 47 2;
#X connect 50 0 53 0;
#X connect 50 1 16 0;
#X connect 50 2 18 1;
#X connect 51 0 52 0;
#X connect 52 0 20 0;
#X connect 53 0 51 0;
#X connect 55 0 51 1;
#X connect 58 0 64 0;
#X connect 58 1 59 0;
#X connect 58 2 59 1;
#X connect 59 0 86 0;
#X connect 60 0 63 0;
#X connect 63 0 62 0;
#X connect 64 0 60 0;
#X connect 65 0 66 0;
#X connect 66 0 7 0;
#X connect 67 0 41 0;
#X connect 73 0 24 0;
#X connect 74 0 2 0;
#X connect 76 0 30 0;
#X connect 77 0 74 0;
#X connect 78 0 84 1;
#X connect 78 1 84 0;
#X connect 79 0 41 0;
#X connect 79 1 28 1;
#X connect 80 0 79 0;
#X connect 82 0 83 0;
#X connect 83 0 48 0;
#X connect 84 0 78 0;
#X connect 85 0 37 1;
#X connect 86 0 37 0;
#X connect 86 1 85 0;
#X connect 105 0 110 0;
#X connect 106 0 105 1;
#X connect 110 0 58 0;
#X connect 110 1 50 0;
#X connect 111 0 14 0;