-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.pd
915 lines (915 loc) · 24.6 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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
#N canvas 718 355 713 415 12;
#X obj 76 83 bng 45 250 50 0 lp-trig-1 button-1 empty 17 7 0 10 -262144
-1 -1;
#X obj 150 83 bng 45 250 50 0 lp-trig-2 button-2 empty 17 7 0 10 -262144
-1 -1;
#X obj 219 84 bng 45 250 50 0 lp-trig-3 button-3 empty 17 7 0 10 -262144
-1 -1;
#X obj 290 84 bng 45 250 50 0 lp-trig-4 button-4 empty 17 7 0 10 -262144
-1 -1;
#X obj 76 163 bng 45 250 50 0 lp-trig-5 button-5 empty 17 7 0 10 -262144
-1 -1;
#X obj 150 163 bng 45 250 50 0 lp-trig-6 button-6 empty 17 7 0 10 -262144
-1 -1;
#X obj 219 164 bng 45 250 50 0 lp-trig-7 button-7 empty 17 7 0 10 -262144
-1 -1;
#X obj 290 164 bng 45 250 50 0 lp-trig-8 button-8 empty 17 7 0 10 -262144
-1 -1;
#X obj 77 249 bng 45 250 50 0 kick-button-1 button-9 kick_1 0 55 0
10 -4034 -1 -1;
#X obj 150 249 bng 45 250 50 0 snare-button-1 button-10 snare_1 0 55
0 10 -258113 -1 -1;
#X obj 219 250 bng 45 250 50 0 hh-button-1 button-11 Highhat_1 0 55
0 9 -4160 -1 -1;
#X obj 290 250 bng 45 250 50 0 crash-button-1 button-12 Crash_1 0 55
0 10 -4032 -1 -1;
#X obj 78 321 bng 45 250 50 0 kick-button-2 button-13 kick_2 0 55 0
10 -4034 -1 -1;
#X obj 151 321 bng 45 250 50 0 snare-button-2 button-14 snare_2 0 55
0 10 -258113 -1 -1;
#X obj 220 322 bng 45 250 50 0 hh-button-2 button-15 Highhat_2 0 55
0 9 -4160 -1 -1;
#X obj 292 322 bng 45 250 50 0 crash-button-2 button-16 Crash_2 0 55
0 10 -4032 -1 -1;
#X obj 126 83 bng 15 250 50 0 clear-1 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 198 83 bng 15 250 50 0 clear-2 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 268 84 bng 15 250 50 0 clear-3 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 341 85 bng 15 250 50 0 clear-4 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 126 163 bng 15 250 50 0 clear-5 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 198 163 bng 15 250 50 0 clear-6 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 268 164 bng 15 250 50 0 clear-7 empty empty 17 7 0 10 -258113
-1 -1;
#X obj 341 165 bng 15 250 50 0 clear-8 empty empty 17 7 0 10 -258113
-1 -1;
#N canvas 290 29 1009 629 router 0;
#X obj 169 41 netreceive 3000;
#X obj 18 397 s selected_kit;
#X obj 18 336 loadbang;
#X msg 18 365 1;
#X text 167 17 Open socket for Python input;
#X obj 19 233 s dsp_status;
#X obj 19 177 loadbang;
#X msg 19 204 1;
#X text 16 154 init value DSP: on;
#X text 14 309 init value kit: 1;
#X text 393 153 button presses 1-8: loop 9-16: drum;
#X obj 394 556 s button-1;
#X obj 394 168 select 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
#X obj 413 533 s button-2;
#X obj 433 509 s button-3;
#X obj 452 486 s button-4;
#X obj 472 461 s button-5;
#X obj 491 438 s button-6;
#X obj 511 414 s button-7;
#X obj 530 391 s button-8;
#X obj 550 367 s button-9;
#X obj 569 344 s button-10;
#X obj 589 320 s button-11;
#X obj 608 297 s button-12;
#X obj 628 273 s button-13;
#X obj 647 250 s button-14;
#X obj 667 226 s button-15;
#X obj 686 204 s button-16;
#X obj 188 182 select 1 2 3 4 5 6 7 8;
#X obj 188 399 s clear-1;
#X obj 206 375 s clear-2;
#X obj 225 350 s clear-3;
#X obj 244 325 s clear-4;
#X obj 263 300 s clear-5;
#X obj 282 275 s clear-6;
#X obj 301 251 s clear-7;
#X obj 320 228 s clear-8;
#X text 209 162 clear loop: 1-8;
#X obj 188 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 206 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 225 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 244 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 263 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 282 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 301 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 320 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 37 492 s clear-all;
#X text 12 466 clear all loops;
#X text 18 136 channel 0;
#X text 14 293 channel 1;
#X text 391 140 channel 2;
#X text 214 148 channel 3;
#X text 56 447 channel 4;
#X obj 782 158 select 1 2 3 4 5 6 7 8;
#X obj 800 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 819 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 838 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 857 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 876 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 895 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 914 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 808 124 channel 5;
#X text 803 138 overdub loop: 1-8;
#X obj 782 375 s overdub-1;
#X obj 800 351 s overdub-2;
#X obj 819 326 s overdub-3;
#X obj 838 301 s overdub-4;
#X obj 857 276 s overdub-5;
#X obj 876 251 s overdub-6;
#X obj 895 227 s overdub-7;
#X obj 914 204 s overdub-8;
#X obj 782 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 26 550 s audio_input_toggle;
#X obj 169 102 route 0 1 2 3 4 5 6;
#X text 43 528 channel 6;
#X text 25 572 set audio input vol to 1/0;
#X connect 0 0 73 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X connect 6 0 7 0;
#X connect 7 0 5 0;
#X connect 12 0 11 0;
#X connect 12 1 13 0;
#X connect 12 2 14 0;
#X connect 12 3 15 0;
#X connect 12 4 16 0;
#X connect 12 5 17 0;
#X connect 12 6 18 0;
#X connect 12 7 19 0;
#X connect 12 8 20 0;
#X connect 12 9 21 0;
#X connect 12 10 22 0;
#X connect 12 11 23 0;
#X connect 12 12 24 0;
#X connect 12 13 25 0;
#X connect 12 14 26 0;
#X connect 12 15 27 0;
#X connect 28 0 38 0;
#X connect 28 1 39 0;
#X connect 28 2 40 0;
#X connect 28 3 41 0;
#X connect 28 4 42 0;
#X connect 28 5 43 0;
#X connect 28 6 44 0;
#X connect 28 7 45 0;
#X connect 38 0 29 0;
#X connect 39 0 30 0;
#X connect 40 0 31 0;
#X connect 41 0 32 0;
#X connect 42 0 33 0;
#X connect 43 0 34 0;
#X connect 44 0 35 0;
#X connect 45 0 36 0;
#X connect 53 0 71 0;
#X connect 53 1 54 0;
#X connect 53 2 55 0;
#X connect 53 3 56 0;
#X connect 53 4 57 0;
#X connect 53 5 58 0;
#X connect 53 6 59 0;
#X connect 53 7 60 0;
#X connect 54 0 64 0;
#X connect 55 0 65 0;
#X connect 56 0 66 0;
#X connect 57 0 67 0;
#X connect 58 0 68 0;
#X connect 59 0 69 0;
#X connect 60 0 70 0;
#X connect 71 0 63 0;
#X connect 73 0 5 0;
#X connect 73 1 1 0;
#X connect 73 2 12 0;
#X connect 73 3 28 0;
#X connect 73 4 46 0;
#X connect 73 5 53 0;
#X connect 73 6 72 0;
#X restore 382 88 pd router;
#N canvas 302 58 1138 641 drumbox 1;
#X obj 32 29 r selected_kit;
#N canvas 7 188 1418 565 load_sounds 0;
#X obj 768 25 inlet;
#N canvas 0 22 450 278 (subpatch) 0;
#X array kick-1 40403 float 2;
#X coords 0 0.1 40403 -0.1 100 50 1 0 0;
#X restore 36 219 graph;
#X obj 36 114 soundfiler;
#X floatatom 36 147 10 0 0 0 - - -;
#X msg 36 79 read -resize drum_sounds/kick_\$1_1.wav kick-1;
#X msg 37 296 read -resize drum_sounds/kick_\$1_2.wav kick-2;
#X obj 37 327 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array kick-2 24236 float 2;
#X coords 0 0.1 24236 -0.1 100 50 1 0 0;
#X restore 38 431 graph;
#X floatatom 37 361 10 0 0 0 - - -;
#X obj 36 180 s end-kick-1;
#X obj 37 392 s end-kick-2;
#X obj 422 111 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array snare-1 33075 float 2;
#X coords 0 0.1 33075 -0.1 100 50 1 0 0;
#X restore 423 215 graph;
#X floatatom 422 145 10 0 0 0 - - -;
#X msg 422 80 read -resize drum_sounds/snare_\$1_1.wav snare-1;
#X obj 422 176 s end-snare-1;
#X obj 422 327 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array snare-2 29287 float 2;
#X coords 0 0.1 29287 -0.1 100 50 1 0 0;
#X restore 423 431 graph;
#X floatatom 422 361 10 0 0 0 - - -;
#X msg 422 296 read -resize drum_sounds/snare_\$1_2.wav snare-2;
#X obj 422 392 s end-snare-2;
#X obj 787 112 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array hh-1 36201 float 2;
#X coords 0 0.1 36201 -0.1 100 50 1 0 0;
#X restore 788 216 graph;
#X floatatom 787 146 10 0 0 0 - - -;
#X obj 787 328 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array hh-2 43665 float 2;
#X coords 0 0.1 43665 -0.1 100 50 1 0 0;
#X restore 788 432 graph;
#X floatatom 787 362 10 0 0 0 - - -;
#X msg 787 81 read -resize drum_sounds/hh_\$1_1.wav hh-1;
#X obj 787 177 s end-hh-1;
#X msg 787 297 read -resize drum_sounds/hh_\$1_2.wav hh-2;
#X obj 787 393 s end-hh-2;
#X obj 1120 112 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array crash-1 24830 float 2;
#X coords 0 0.1 24830 -0.1 100 50 1 0 0;
#X restore 1121 216 graph;
#X floatatom 1120 146 10 0 0 0 - - -;
#X obj 1120 328 soundfiler;
#N canvas 0 22 450 278 (subpatch) 0;
#X array crash-2 27519 float 2;
#X coords 0 0.1 27519 -0.1 100 50 1 0 0;
#X restore 1121 432 graph;
#X floatatom 1120 362 10 0 0 0 - - -;
#X msg 1120 81 read -resize drum_sounds/crash_\$1_1.wav crash-1;
#X obj 1120 177 s end-crash-1;
#X msg 1120 297 read -resize drum_sounds/crash_\$1_2.wav crash-2;
#X obj 1120 393 s end-crash-2;
#X text 692 4 input: int value of selected_kit;
#X connect 0 0 4 0;
#X connect 0 0 5 0;
#X connect 0 0 14 0;
#X connect 0 0 19 0;
#X connect 0 0 27 0;
#X connect 0 0 29 0;
#X connect 0 0 37 0;
#X connect 0 0 39 0;
#X connect 2 0 3 0;
#X connect 3 0 9 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 8 0;
#X connect 8 0 10 0;
#X connect 11 0 13 0;
#X connect 13 0 15 0;
#X connect 14 0 11 0;
#X connect 16 0 18 0;
#X connect 18 0 20 0;
#X connect 19 0 16 0;
#X connect 21 0 23 0;
#X connect 23 0 28 0;
#X connect 24 0 26 0;
#X connect 26 0 30 0;
#X connect 27 0 21 0;
#X connect 29 0 24 0;
#X connect 31 0 33 0;
#X connect 33 0 38 0;
#X connect 34 0 36 0;
#X connect 36 0 40 0;
#X connect 37 0 31 0;
#X connect 39 0 34 0;
#X restore 32 103 pd load_sounds;
#X obj 32 343 vline~;
#X msg 32 312 \$1 \, \$2 \$3;
#X msg 32 231 0;
#X obj 32 262 pack f f f;
#X text 39 291 start \, end \, duration;
#X obj 171 231 / 44.1;
#X obj 32 427 *~;
#X obj 32 191 r kick-button-1;
#X obj 32 455 dac~;
#X obj 65 231 r end-kick-1;
#X obj 171 207 r end-kick-1;
#X obj 32 373 tabread4~ kick-1;
#X obj 30 651 vline~;
#X msg 30 620 \$1 \, \$2 \$3;
#X msg 30 539 0;
#X obj 30 570 pack f f f;
#X obj 169 539 / 44.1;
#X obj 30 735 *~;
#X obj 30 763 dac~;
#X obj 30 499 r kick-button-2;
#X obj 169 515 r end-kick-2;
#X obj 63 539 r end-kick-2;
#X obj 30 681 tabread4~ kick-2;
#X obj 48 707 r kick_vol;
#X obj 193 102 s kick_vol;
#X obj 193 30 loadbang;
#X obj 50 400 r kick_vol;
#X text 29 8 python input (int);
#X obj 293 338 vline~;
#X msg 293 307 \$1 \, \$2 \$3;
#X msg 293 226 0;
#X obj 293 257 pack f f f;
#X obj 432 226 / 44.1;
#X obj 293 422 *~;
#X obj 293 450 dac~;
#X obj 291 646 vline~;
#X msg 291 615 \$1 \, \$2 \$3;
#X msg 291 534 0;
#X obj 291 565 pack f f f;
#X obj 430 534 / 44.1;
#X obj 291 730 *~;
#X obj 291 758 dac~;
#X obj 293 186 r snare-button-1;
#X obj 326 226 r end-snare-1;
#X obj 432 202 r end-snare-1;
#X obj 293 368 tabread4~ snare-1;
#X obj 311 395 r snare_vol;
#X obj 291 494 r snare-button-2;
#X obj 430 510 r end-snare-2;
#X obj 324 534 r end-snare-2;
#X obj 291 676 tabread4~ snare-2;
#X obj 309 702 r snare_vol;
#X obj 561 338 vline~;
#X msg 561 307 \$1 \, \$2 \$3;
#X msg 561 226 0;
#X obj 561 257 pack f f f;
#X obj 700 226 / 44.1;
#X obj 561 422 *~;
#X obj 561 450 dac~;
#X obj 559 646 vline~;
#X msg 559 615 \$1 \, \$2 \$3;
#X msg 559 534 0;
#X obj 559 565 pack f f f;
#X obj 698 534 / 44.1;
#X obj 559 730 *~;
#X obj 559 758 dac~;
#X obj 561 186 r hh-button-1;
#X obj 700 202 r end-hh-1;
#X obj 594 226 r end-hh-1;
#X obj 561 368 tabread4~ hh-1;
#X obj 579 395 r hh_vol;
#X obj 559 494 r hh-button-2;
#X obj 698 510 r end-hh-2;
#X obj 592 534 r end-hh-2;
#X obj 559 676 tabread4~ hh-2;
#X obj 577 702 r hh_vol;
#X obj 810 334 vline~;
#X msg 810 303 \$1 \, \$2 \$3;
#X msg 810 222 0;
#X obj 810 253 pack f f f;
#X obj 949 222 / 44.1;
#X obj 810 418 *~;
#X obj 810 446 dac~;
#X obj 808 642 vline~;
#X msg 808 611 \$1 \, \$2 \$3;
#X msg 808 530 0;
#X obj 808 561 pack f f f;
#X obj 947 530 / 44.1;
#X obj 808 726 *~;
#X obj 808 754 dac~;
#X obj 810 182 r crash-button-1;
#X obj 949 198 r end-crash-1;
#X obj 843 222 r end-crash-1;
#X obj 810 364 tabread4~ crash-1;
#X obj 828 391 r crash_vol;
#X obj 947 506 r end-crash-2;
#X obj 808 490 r crash-button-2;
#X obj 808 672 tabread4~ crash-2;
#X obj 826 698 r crash_vol;
#X obj 297 100 s snare_vol;
#X obj 400 100 s hh_vol;
#X obj 492 99 s crash_vol;
#X obj 841 530 r end-crash-2;
#X text 106 160 Kick 1 and 2;
#X text 354 157 Snare 1 and 2;
#X text 609 157 High Hat 1 and 2;
#X text 861 154 Crash 1 and 2;
#X text 195 8 setup default values for volume (to be adjusted later)
;
#X obj 801 101 s~ drums;
#X obj 82 455 s~ kick-1;
#X obj 75 762 s~ kick-2;
#X obj 341 450 s~ snare-1;
#X obj 341 758 s~ snare-2;
#X obj 612 452 s~ hh-1;
#X obj 605 759 s~ hh-2;
#X obj 856 446 s~ crash-1;
#X obj 854 754 s~ crash-2;
#X obj 664 38 r~ kick-1;
#X obj 665 62 r~ kick-2;
#X obj 754 38 r~ snare-1;
#X obj 755 61 r~ snare-2;
#X obj 851 39 r~ hh-1;
#X obj 851 65 r~ hh-2;
#X obj 921 41 r~ crash-1;
#X obj 921 64 r~ crash-2;
#X text 762 11 output to loop input;
#X msg 492 66 0.7;
#X msg 400 67 0.7;
#X msg 297 68 0.7;
#X msg 193 68 0.8;
#X connect 0 0 1 0;
#X connect 2 0 13 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X connect 7 0 5 2;
#X connect 8 0 10 0;
#X connect 8 0 10 1;
#X connect 8 0 111 0;
#X connect 9 0 4 0;
#X connect 11 0 5 1;
#X connect 12 0 7 0;
#X connect 13 0 8 0;
#X connect 14 0 24 0;
#X connect 15 0 14 0;
#X connect 16 0 17 0;
#X connect 17 0 15 0;
#X connect 18 0 17 2;
#X connect 19 0 20 0;
#X connect 19 0 20 1;
#X connect 19 0 112 0;
#X connect 21 0 16 0;
#X connect 22 0 18 0;
#X connect 23 0 17 1;
#X connect 24 0 19 0;
#X connect 25 0 19 1;
#X connect 27 0 128 0;
#X connect 27 0 129 0;
#X connect 27 0 130 0;
#X connect 27 0 131 0;
#X connect 28 0 8 1;
#X connect 30 0 47 0;
#X connect 31 0 30 0;
#X connect 32 0 33 0;
#X connect 33 0 31 0;
#X connect 34 0 33 2;
#X connect 35 0 36 0;
#X connect 35 0 36 1;
#X connect 35 0 113 0;
#X connect 37 0 52 0;
#X connect 38 0 37 0;
#X connect 39 0 40 0;
#X connect 40 0 38 0;
#X connect 41 0 40 2;
#X connect 42 0 43 0;
#X connect 42 0 43 1;
#X connect 42 0 114 0;
#X connect 44 0 32 0;
#X connect 45 0 33 1;
#X connect 46 0 34 0;
#X connect 47 0 35 0;
#X connect 48 0 35 1;
#X connect 49 0 39 0;
#X connect 50 0 41 0;
#X connect 51 0 40 1;
#X connect 52 0 42 0;
#X connect 53 0 42 1;
#X connect 54 0 71 0;
#X connect 55 0 54 0;
#X connect 56 0 57 0;
#X connect 57 0 55 0;
#X connect 58 0 57 2;
#X connect 59 0 60 0;
#X connect 59 0 60 1;
#X connect 59 0 115 0;
#X connect 61 0 76 0;
#X connect 62 0 61 0;
#X connect 63 0 64 0;
#X connect 64 0 62 0;
#X connect 65 0 64 2;
#X connect 66 0 67 0;
#X connect 66 0 67 1;
#X connect 66 0 116 0;
#X connect 68 0 56 0;
#X connect 69 0 58 0;
#X connect 70 0 57 1;
#X connect 71 0 59 0;
#X connect 72 0 59 1;
#X connect 73 0 63 0;
#X connect 74 0 65 0;
#X connect 75 0 64 1;
#X connect 76 0 66 0;
#X connect 77 0 66 1;
#X connect 78 0 95 0;
#X connect 79 0 78 0;
#X connect 80 0 81 0;
#X connect 81 0 79 0;
#X connect 82 0 81 2;
#X connect 83 0 84 0;
#X connect 83 0 84 1;
#X connect 83 0 117 0;
#X connect 85 0 99 0;
#X connect 86 0 85 0;
#X connect 87 0 88 0;
#X connect 88 0 86 0;
#X connect 89 0 88 2;
#X connect 90 0 91 0;
#X connect 90 0 91 1;
#X connect 90 0 118 0;
#X connect 92 0 80 0;
#X connect 93 0 82 0;
#X connect 94 0 81 1;
#X connect 95 0 83 0;
#X connect 96 0 83 1;
#X connect 97 0 89 0;
#X connect 98 0 87 0;
#X connect 99 0 90 0;
#X connect 100 0 90 1;
#X connect 104 0 88 1;
#X connect 119 0 110 0;
#X connect 120 0 110 0;
#X connect 121 0 110 0;
#X connect 122 0 110 0;
#X connect 123 0 110 0;
#X connect 124 0 110 0;
#X connect 125 0 110 0;
#X connect 126 0 110 0;
#X connect 128 0 103 0;
#X connect 129 0 102 0;
#X connect 130 0 101 0;
#X connect 131 0 26 0;
#X restore 382 255 pd drumbox;
#X text 461 255 drumbox logic;
#X msg 14 35 \; pd dsp \$1;
#X obj 14 9 tgl 15 0 empty dsp_status empty 17 7 0 10 -262144 -1 -1
1 1;
#X text 459 85 python input router and init values;
#X text 38 8 toggle sound;
#X obj 76 133 loop 1;
#X obj 150 133 loop 2;
#X obj 219 134 loop 3;
#X obj 290 134 loop 4;
#X obj 76 212 loop 5;
#X obj 150 212 loop 6;
#X obj 219 213 loop 7;
#X obj 290 213 loop 8;
#N canvas 622 297 725 480 init_loop 0;
#X obj 96 205 r lp-trig-1;
#X obj 86 182 r lp-trig-2;
#X obj 77 160 r lp-trig-3;
#X obj 64 137 r lp-trig-4;
#X obj 50 114 r lp-trig-5;
#X obj 36 93 r lp-trig-6;
#X obj 21 71 r lp-trig-7;
#X obj 6 50 r lp-trig-8;
#X obj 96 260 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 96 320 f;
#X obj 96 401 s press-one;
#X obj 192 401 s press-two;
#X obj 135 319 + 1;
#X obj 367 125 r press-one;
#X obj 367 178 timer;
#X obj 473 125 r press-two;
#X obj 367 236 s loop-time;
#X text 435 101 Timer;
#X obj 473 176 s play;
#X msg 135 289 0;
#X text 181 32 This is for the initial loop tempo. The function checks
the first and second press of the button and sends play if the second
push has been done.;
#X obj 235 263 loadbang;
#X text 9 421 first press on the button;
#X text 192 421 second press on the button;
#X obj 135 263 r clear-loops;
#X obj 96 360 sel 0 1 2;
#X obj 287 402 s press-three;
#X connect 0 0 8 0;
#X connect 1 0 8 0;
#X connect 2 0 8 0;
#X connect 3 0 8 0;
#X connect 4 0 8 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 12 0;
#X connect 9 0 25 0;
#X connect 12 0 9 1;
#X connect 13 0 14 0;
#X connect 14 0 16 0;
#X connect 15 0 14 1;
#X connect 15 0 18 0;
#X connect 19 0 9 1;
#X connect 21 0 19 0;
#X connect 24 0 19 0;
#X connect 25 0 10 0;
#X connect 25 1 11 0;
#X connect 25 2 26 0;
#X restore 382 117 pd init_loop;
#X obj 160 8 bng 15 250 50 0 empty clear-all empty 17 7 0 10 -262144
-1 -1;
#N canvas 23 487 450 300 clear-loops 0;
#X obj 25 84 s clear-1;
#X obj 25 111 s clear-2;
#X obj 116 84 s clear-3;
#X obj 116 111 s clear-4;
#X obj 201 84 s clear-5;
#X obj 201 111 s clear-6;
#X obj 280 84 s clear-7;
#X obj 280 111 s clear-8;
#X obj 101 42 inlet;
#X obj 101 158 s clear-loops;
#X connect 8 0 0 0;
#X connect 8 0 1 0;
#X connect 8 0 2 0;
#X connect 8 0 3 0;
#X connect 8 0 4 0;
#X connect 8 0 5 0;
#X connect 8 0 6 0;
#X connect 8 0 7 0;
#X connect 8 0 9 0;
#X restore 160 30 pd clear-loops;
#N canvas 21 166 400 413 loop_player 0;
#N canvas 89 221 484 474 combine_loops 0;
#X obj 19 43 loop_output 1;
#X obj 21 69 loop_output 2;
#X obj 21 94 loop_output 3;
#X obj 22 121 loop_output 4;
#X obj 22 147 loop_output 5;
#X obj 24 171 loop_output 6;
#X obj 26 197 loop_output 7;
#X obj 27 220 loop_output 8;
#X obj 135 297 *~;
#X obj 135 439 dac~;
#X text 18 296 main loop sound;
#X text 16 13 volume control and master volume setting;
#X obj 209 110 *~;
#X text 17 27 LEFT: Main output of loop \, RIGHT: Fade out part of
the loop;
#X obj 209 141 dac~;
#X obj 166 410 *~;
#X text 173 304 reverb;
#X obj 211 410 *~;
#X obj 229 361 loadbang;
#X obj 166 326 rev2~ 100 50 3000 50;
#X msg 229 386 0.2;
#X text 244 111 if loop position is 0: fade-out;
#X msg 153 273 1;
#X obj 153 250 loadbang;
#X obj 227 64 loadbang;
#X msg 227 87 1;
#X connect 0 0 8 0;
#X connect 0 1 12 0;
#X connect 1 0 8 0;
#X connect 1 1 12 0;
#X connect 2 0 8 0;
#X connect 2 1 12 0;
#X connect 3 0 8 0;
#X connect 3 1 12 0;
#X connect 4 0 8 0;
#X connect 4 1 12 0;
#X connect 5 0 8 0;
#X connect 5 1 12 0;
#X connect 6 0 8 0;
#X connect 6 1 12 0;
#X connect 7 0 8 0;
#X connect 7 1 12 0;
#X connect 8 0 9 0;
#X connect 8 0 9 1;
#X connect 8 0 19 0;
#X connect 12 0 14 0;
#X connect 12 0 14 1;
#X connect 15 0 9 0;
#X connect 17 0 9 1;
#X connect 18 0 20 0;
#X connect 19 0 15 0;
#X connect 19 1 17 0;
#X connect 20 0 15 1;
#X connect 20 0 17 1;
#X connect 22 0 8 1;
#X connect 23 0 22 0;
#X connect 24 0 25 0;
#X connect 25 0 12 1;
#X restore 19 78 pd combine_loops;
#X text 20 57 Play loops:;
#X obj 225 38 r loop-time;
#X obj 225 86 s sample-rate;
#X obj 15 130 r play;
#X obj 225 61 * 44.1;
#X obj 65 226 metro;
#X msg 15 155 1;
#X msg 65 155 0;
#X obj 65 251 f;
#X obj 105 251 + 1;
#X obj 65 310 mod;
#X obj 97 202 /;
#X text 63 107 metronome;
#X text 223 17 loop time to samples;
#X obj 65 130 r clear-loops;
#X obj 65 337 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144 -1
-1 5;
#X msg 97 310 number \$1;
#X obj 65 363 s counter;
#X obj 83 280 r signature;
#X obj 115 178 r signature;
#X obj 97 155 r loop-time;
#X obj 225 164 r loop-time;
#X text 223 126 transform loop time;
#X text 223 142 to decent timed bpm;
#X obj 225 192 / 500;
#X obj 225 240 + 0.5;
#X obj 225 264 int;
#X text 268 192 each 1/2 second;
#X obj 225 365 s signature;
#X obj 225 316 min 16;
#X obj 225 217 / 8;
#X text 256 217 devisable by 8;
#X obj 225 290 * 8;
#X obj 225 339 max 4;
#X connect 2 0 5 0;
#X connect 4 0 7 0;
#X connect 5 0 3 0;
#X connect 6 0 9 0;
#X connect 7 0 6 0;
#X connect 8 0 6 0;
#X connect 8 0 9 1;
#X connect 9 0 10 0;
#X connect 9 0 11 0;
#X connect 10 0 9 1;
#X connect 11 0 16 0;
#X connect 12 0 6 1;
#X connect 15 0 8 0;
#X connect 16 0 18 0;
#X connect 17 0 16 0;
#X connect 19 0 11 1;
#X connect 19 0 17 0;
#X connect 20 0 12 1;
#X connect 21 0 12 0;
#X connect 22 0 25 0;
#X connect 25 0 31 0;
#X connect 26 0 27 0;
#X connect 27 0 33 0;
#X connect 30 0 34 0;
#X connect 31 0 26 0;
#X connect 33 0 30 0;
#X connect 34 0 29 0;
#X restore 382 146 pd loop_player;
#X obj 127 103 tgl 15 0 empty mute-1 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 198 103 tgl 15 0 empty mute-2 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 269 103 tgl 15 0 empty mute-3 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 341 105 tgl 15 0 empty mute-4 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 126 183 tgl 15 0 empty mute-5 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 199 184 tgl 15 0 empty mute-6 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 268 184 tgl 15 0 empty mute-7 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 341 184 tgl 15 0 empty mute-8 empty 17 7 0 10 -4032 -1 -1 0
1;
#X obj 127 124 tgl 15 0 empty rec-loop-1 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 199 125 tgl 15 0 empty rec-loop-2 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 269 125 tgl 15 0 empty rec-loop-3 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 341 126 tgl 15 0 empty rec-loop-4 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 126 204 tgl 15 0 empty rec-loop-5 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 199 204 tgl 15 0 empty rec-loop-6 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 269 204 tgl 15 0 empty rec-loop-7 empty 17 7 0 10 -4034 -1 -1
0 1;
#X obj 341 205 tgl 15 0 empty rec-loop-8 empty 17 7 0 10 -4034 -1 -1
0 1;
#N canvas 720 25 633 448 send_msg 0;
#X obj 220 147 r counter;
#X obj 24 51 loadbang;
#X obj 24 390 netsend;
#X floatatom 24 413 5 0 0 0 - - -;
#X msg 24 84 connect 127.0.0.1 4000;
#X msg 42 142 disconnect;
#X obj 433 52 r start-rec;
#X obj 433 76 t f;
#X obj 433 159 r stop-rec;
#X obj 433 241 r wait-rec;
#X obj 433 264 t f;
#X obj 97 52 r connect;
#X obj 42 114 r disconnect;
#X obj 433 349 r mute-rec;
#X obj 221 53 r clear-rec;
#X obj 221 76 t f;
#X text 25 8 send status messages to python and initiate the connection
to the socket;
#X msg 221 100 send status|clear_rec|\$1|;
#X msg 433 100 send status|start_rec|\$1|;
#X msg 433 287 send status|wait_rec|\$1|;
#X msg 433 376 send status|mute_rec|\$1|\$2|;
#X text 432 333 1: mute status 2: loop nr;
#X obj 295 148 r signature;
#X obj 220 173 pack f f;
#X msg 220 201 send counter|\$1|\$2|;
#X obj 220 251 r start-overdub;
#X obj 220 274 t f;
#X obj 433 399 s msg;
#X obj 42 361 r msg;
#X obj 221 123 s msg;
#X obj 220 224 s msg;
#X obj 433 123 s msg;
#X obj 433 206 s msg;
#X obj 433 310 s msg;
#X obj 220 320 s msg;
#X text 216 236 ----------;
#X text 218 134 ----------;
#X text 430 134 ----------;
#X text 431 227 ----------;
#X text 217 334 ----------;
#X obj 218 373 t f;
#X obj 218 419 s msg;
#X obj 218 350 r stop-overdub;
#X msg 220 297 send status|start_overdub|\$1|;
#X msg 218 396 send status|stop_overdub|\$1|;
#X msg 433 182 send status|stop_rec|\$1|\$2|;
#X connect 0 0 23 0;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X connect 6 0 7 0;
#X connect 7 0 18 0;
#X connect 8 0 45 0;
#X connect 9 0 10 0;
#X connect 10 0 19 0;
#X connect 11 0 4 0;
#X connect 12 0 5 0;
#X connect 13 0 20 0;
#X connect 14 0 15 0;
#X connect 15 0 17 0;
#X connect 17 0 29 0;
#X connect 18 0 31 0;
#X connect 19 0 33 0;
#X connect 20 0 27 0;
#X connect 22 0 23 1;
#X connect 23 0 24 0;
#X connect 24 0 30 0;
#X connect 25 0 26 0;
#X connect 26 0 43 0;
#X connect 28 0 2 0;
#X connect 40 0 44 0;
#X connect 42 0 40 0;
#X connect 43 0 34 0;
#X connect 44 0 41 0;
#X connect 45 0 32 0;
#X restore 381 174 pd send_msg;
#X text 475 116 initial loop settings;
#X text 492 145 playing loops and metronome;
#X text 470 174 sending messages to Python;
#N canvas 507 86 450 300 audio_input 1;
#X obj 79 196 s~ audio;
#X obj 28 47 adc~;
#X obj 28 134 *~;
#X obj 46 85 loadbang;
#X text 23 18 The audio input from the soundcard;
#X text 133 148 volume;
#X obj 28 172 dac~;
#X obj 79 171 *~;
#X msg 97 148 1;
#X obj 117 85 r audio_input_toggle;
#X obj 46 112 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
#X connect 2 0 6 1;
#X connect 2 0 7 0;
#X connect 3 0 8 0;
#X connect 3 0 10 0;
#X connect 7 0 0 0;
#X connect 8 0 7 1;
#X connect 9 0 10 0;
#X connect 10 0 2 1;
#X restore 381 282 pd audio_input;
#X text 494 282 audio input (soundcard);
#X connect 28 0 27 0;
#X connect 40 0 41 0;