blob: fca63bb92d04736931aa8261b753dcd47262a445 (
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
|
#N canvas 113 57 1004 644 12;
#X msg 409 9 \; pd dsp 1;
#X msg 495 10 \; pd dsp 0;
#X text 430 40 ON;
#X text 511 41 OFF;
#X graph graph1 0 -1.02 44100 1.02 631 140 831 10;
#X array sample-table 44103 float 0;
#X pop;
#X obj 586 483 loadbang;
#X floatatom 60 462 0 0 0;
#N canvas 159 26 495 266 output 0;
#X obj 338 160 t b;
#X obj 338 110 f;
#X obj 338 60 inlet;
#X text 344 29 mute;
#X obj 338 185 f;
#X msg 425 178 0;
#X msg 338 85 bang;
#X obj 338 135 moses 1;
#X obj 425 153 t b f;
#X obj 397 117 moses 1;
#X obj 83 148 dbtorms;
#X obj 397 92 r master-lvl;
#X obj 83 42 r master-lvl;
#X obj 338 210 s master-lvl;
#X obj 22 181 inlet~;
#X obj 199 41 inlet;
#X text 199 18 level;
#X obj 199 100 s master-lvl;
#X msg 96 65 set \$1;
#X obj 96 89 outlet;
#X msg 214 64 \; pd dsp 1;
#X obj 83 194 line~;
#X obj 22 212 *~;
#X obj 22 241 dac~;
#X obj 83 171 pack 0 50;
#X text 20 158 audio;
#X text 93 110 show level;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 4 0 13 0;
#X connect 5 0 13 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 7 1 8 0;
#X connect 8 0 5 0;
#X connect 9 1 4 1;
#X connect 10 0 24 0;
#X connect 11 0 1 1;
#X connect 11 0 9 0;
#X connect 12 0 10 0;
#X connect 12 0 18 0;
#X connect 14 0 22 0;
#X connect 15 0 17 0;
#X connect 15 0 20 0;
#X connect 18 0 19 0;
#X connect 21 0 22 1;
#X connect 22 0 23 0;
#X connect 22 0 23 1;
#X connect 24 0 21 0;
#X restore 31 490 pd output;
#X msg 89 462 MUTE;
#X text 124 455 <-- output amplitude;
#X obj 31 430 hip~ 5;
#X obj 47 381 tabread4~ sample-table;
#X floatatom 46 50 0 0 0;
#X text 85 49 <-- frequency (Hz.);
#X floatatom 165 122 0 0 0;
#X obj 164 145 * 441;
#X obj 46 220 +~ 1;
#X obj 46 74 phasor~ 0;
#X msg 151 262 bang;
#X text 204 121 <-- chunk size (100ths of a second);
#X obj 580 379 adc~ 1;
#X obj 580 403 hip~ 5;
#X obj 580 453 tabwrite~ sample-table;
#X msg 595 426 bang;
#X text 627 425 <-- click here to record your own sample;
#X text 695 497 v-- re-read the original sample;
#X graph graph2 0 0 44100 44100 633 309 833 179;
#X array table-index 44100 float 0;
#X pop;
#X obj 151 354 tabwrite~ table-index;
#X obj 31 406 *~;
#N canvas 160 476 591 415 envelope 0;
#X obj 81 68 -~ 0.5;
#X obj 83 276 clip~ -0.5 0.5;
#X obj 83 254 *~ 1;
#X obj 127 227 moses 1;
#X msg 96 227 1;
#X obj 83 301 cos~;
#X obj 81 93 wrap~;
#X obj 81 122 -~ 0.5;
#X obj 83 349 *~ -0.5;
#X obj 83 324 -~ 1;
#X floatatom 127 195 0 0 0;
#X text 135 65 subtracting 0.5 and wrapping produces a sawtooth wave
180 degrees out of phase from the original.;
#X text 130 116 as before we subtract 1/2 again to center the sawtooth
from -1/2 to 1/2.;
#X text 177 195 <-- sharpness (at least 1);
#X obj 81 42 inlet~;
#X obj 83 379 outlet~;
#X obj 127 173 inlet;
#X connect 0 0 6 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 1 2 1;
#X connect 4 0 2 1;
#X connect 5 0 9 0;
#X connect 6 0 7 0;
#X connect 7 0 2 0;
#X connect 8 0 15 0;
#X connect 9 0 8 0;
#X connect 10 0 3 0;
#X connect 14 0 0 0;
#X connect 16 0 10 0;
#X restore 30 102 pd envelope;
#X floatatom 149 84 0 0 0;
#X text 183 83 <-- envelope sharpness;
#X obj 65 308 line~;
#X obj 65 260 * 441;
#X floatatom 150 238 0 0 0;
#X obj 65 284 pack 0 100;
#X text 185 237 <-- read point in 100ths of a second;
#X obj 47 356 +~;
#X text 191 262 <-- graph table index;
#X obj 65 332 samphold~;
#X text 26 522 This example differs from the previous one in having
samphold~ objects which allow the chunk size and especially the read
point to change only at points where the phase wraps around. This removes
signal discontinuities (when the chunk size changes) and doppler shift
for changing read point.;
#X obj 99 195 samphold~;
#X obj 164 170 sig~;
#X obj 47 196 *~;
#X text 229 192 explicitly to use samphold~...;
#X text 200 173 <-- you often have to convert to audio;
#X text 643 315 ----- 1 second ------;
#X text 631 144 ---- 44103 samples ---;
#X msg 586 570 \; graph2 ylabel 48000 0 44100;
#X text 739 621 updated for Pd version 0.33;
#X msg 646 519 read ../sound/voice.wav sample-table;
#X obj 646 543 soundfiler;
#X text 21 8 SLIDING STABLE LOOPS WITHOUT DOPPLER SHIFT;
#X connect 5 0 48 0;
#X connect 5 0 50 0;
#X connect 6 0 7 1;
#X connect 7 0 6 0;
#X connect 8 0 7 2;
#X connect 10 0 7 0;
#X connect 11 0 28 1;
#X connect 12 0 17 0;
#X connect 14 0 15 0;
#X connect 15 0 42 0;
#X connect 16 0 37 0;
#X connect 17 0 29 0;
#X connect 17 0 39 1;
#X connect 17 0 41 1;
#X connect 17 0 43 0;
#X connect 18 0 27 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 23 0 22 0;
#X connect 28 0 10 0;
#X connect 29 0 28 0;
#X connect 30 0 29 1;
#X connect 32 0 39 0;
#X connect 33 0 35 0;
#X connect 34 0 33 0;
#X connect 35 0 32 0;
#X connect 37 0 27 0;
#X connect 37 0 11 0;
#X connect 39 0 37 1;
#X connect 41 0 43 1;
#X connect 42 0 41 0;
#X connect 43 0 16 0;
#X connect 50 0 51 0;
|