-
Notifications
You must be signed in to change notification settings - Fork 0
/
sampler.looper.pd
159 lines (159 loc) · 4.32 KB
/
sampler.looper.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
#N canvas 188 22 818 810 10;
#X obj 468 460 soundfiler;
#X obj 468 360 openpanel;
#X obj 468 338 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 138 517 tabread4~ sample;
#X msg 89 201 type 0;
#X msg 89 229 type 1;
#X msg 88 176 44100;
#X text 502 336 <- load a sample;
#X text 33 689 <looptype> is 0 for a forward loop (default) and 1 for
a pingpong loop.;
#X text 35 728 Playback speed is in samples/sec - send a float or signal
to the left inlet.;
#X obj 136 309 susloop~ 4000 12000;
#X text 32 629 When the left inlet gets a bang \, the phase output
will start at <startpos> (defaults to 0) \, continue until it reaches
<loopend> \, and then start looping between <loopstart> and <loopend>.
;
#X obj 474 157 hsl 200 15 0 1 0 0 \$0-loop_start empty loop_start 10
8 0 8 -195568 -33289 -33289 0 0;
#X obj 474 176 hsl 200 15 0 1 0 0 \$0-loop_end empty loop_end 10 8
0 8 -233017 -1 -1 0 0;
#X obj 474 193 hsl 200 15 0 1 0 0 \$0-start empty start 10 8 0 8 -262144
-1 -1 1700 0;
#X obj 198 459 line~;
#X msg 197 435 0;
#X obj 197 353 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 223 413 prepend set;
#X msg 224 433 1018 1020;
#X obj 222 392 pack;
#X floatatom 137 131 5 0 0 0 - - -;
#X obj 137 151 mtof;
#X obj 658 306 samplerate~;
#N canvas 76 173 450 300 changeinput 0;
#X obj 105 279 outlet;
#X obj 104 126 vradio 15 1 0 2 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X text 130 127 susloop;
#X text 130 142 playonce;
#X obj 104 165 route 0 1;
#X msg 71 199 1;
#X msg 101 199 0;
#X msg 134 199 1;
#X msg 164 199 0;
#X msg 86 245 0 \$1;
#X msg 146 248 1 \$1;
#X connect 1 0 4 0;
#X connect 4 0 5 0;
#X connect 4 0 6 0;
#X connect 4 1 7 0;
#X connect 4 1 8 0;
#X connect 5 0 9 0;
#X connect 6 0 10 0;
#X connect 7 0 10 0;
#X connect 8 0 9 0;
#X connect 9 0 0 0;
#X connect 10 0 0 0;
#X coords 0 -1 1 1 85 60 1 100 100;
#X restore 23 335 pd changeinput;
#X obj 138 495 mixer~ 2;
#X obj 468 286 route bang;
#X obj 658 285 loadbang;
#X obj 470 598 v \$0-filesize;
#X floatatom 470 618 10 0 0 0 - - -;
#X obj 470 580 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 469 510 v \$0-filesize;
#X floatatom 556 617 5 0 0 0 - - -;
#X obj 556 580 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 529 405 f \$0;
#X obj 468 436 sprintf read -resize %s %d-sample;
#X obj 468 384 t s b;
#N canvas 709 152 450 300 loopparam 0;
#X obj 123 232 outlet;
#X obj 147 104 v \$0-filesize;
#X obj 123 84 t f b;
#X obj 117 152 expr int($f2 * $f1);
#X obj 122 52 r \$0-loop_start;
#X connect 1 0 3 1;
#X connect 2 0 3 0;
#X connect 2 1 1 0;
#X connect 3 0 0 0;
#X connect 4 0 2 0;
#X restore 174 233 pd loopparam;
#N canvas 709 152 450 300 loopparam 0;
#X obj 123 232 outlet;
#X obj 147 104 v \$0-filesize;
#X obj 123 84 t f b;
#X obj 117 152 expr int($f2 * $f1);
#X obj 123 51 r \$0-loop_end;
#X connect 1 0 3 1;
#X connect 2 0 3 0;
#X connect 2 1 1 0;
#X connect 3 0 0 0;
#X connect 4 0 2 0;
#X restore 203 256 pd loopparam;
#N canvas 709 152 450 300 loopparam 0;
#X obj 123 232 outlet;
#X obj 147 104 v \$0-filesize;
#X obj 123 84 t f b;
#X obj 117 152 expr int($f2 * $f1);
#X obj 122 52 r \$0-start;
#X connect 1 0 3 1;
#X connect 2 0 3 0;
#X connect 2 1 1 0;
#X connect 3 0 0 0;
#X connect 4 0 2 0;
#X restore 246 282 pd loopparam;
#X obj 222 357 expr $f1 - 2 \; $f1 * 1000 / samplerate;
#X obj 556 598 v samplerate;
#X obj 658 327 v samplerate;
#X obj 222 338 v \$0-filesize;
#X obj 468 488 t b f;
#X obj 137 175 expr samplerate / 261.626 * $f1;
#X obj 470 133 table \$0-sample;
#X obj 468 259 inlet;
#X obj 138 549 outlet~;
#X connect 0 0 44 0;
#X connect 1 0 36 0;
#X connect 2 0 1 0;
#X connect 3 0 48 0;
#X connect 4 0 10 0;
#X connect 5 0 10 0;
#X connect 6 0 10 0;
#X connect 10 0 25 0;
#X connect 15 0 25 1;
#X connect 16 0 15 0;
#X connect 17 0 16 0;
#X connect 17 0 19 0;
#X connect 18 0 19 0;
#X connect 19 0 15 0;
#X connect 20 0 18 0;
#X connect 21 0 22 0;
#X connect 22 0 45 0;
#X connect 23 0 42 0;
#X connect 24 0 25 0;
#X connect 25 0 3 0;
#X connect 26 0 2 0;
#X connect 27 0 23 0;
#X connect 28 0 29 0;
#X connect 30 0 28 0;
#X connect 33 0 41 0;
#X connect 34 0 35 1;
#X connect 35 0 0 0;
#X connect 36 0 35 0;
#X connect 36 1 34 0;
#X connect 37 0 10 1;
#X connect 38 0 10 2;
#X connect 39 0 10 3;
#X connect 40 0 20 0;
#X connect 40 1 20 1;
#X connect 41 0 32 0;
#X connect 43 0 40 0;
#X connect 44 0 43 0;
#X connect 44 1 31 0;
#X connect 45 0 10 0;