blob: e7aee0cdfc4e1b7bbb3f9bb4944300bc03bcd6db (
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
|
#N canvas 11 3 930 640 12;
#X msg 306 14 \; pd dsp 1;
#X msg 391 14 \; pd dsp 0;
#X text 327 45 ON;
#X text 408 45 OFF;
#X floatatom 75 275 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 46 303 pd output;
#X msg 114 273 MUTE;
#X text 148 272 <-- output amplitude;
#X obj 46 239 hip~ 5;
#X text 102 240 high pass filter to cut DC;
#X graph graph1 0 -1.02 44103 1.02 594 172 794 42;
#X array sample-table 44104 float 0;
#X pop;
#X obj 46 207 tabread4~ sample-table;
#X obj 46 172 line~;
#X obj 46 123 * 441;
#X floatatom 46 69 0 0 0;
#X obj 46 147 pack 0 100;
#X text 102 13 SCRATCH MACHINE;
#X text 81 70 <-- read point in 100ths of a second;
#X text 103 123 convert to SAMPLES (441 samples in 0.01 sec);
#X obj 414 257 loadbang;
#X text 248 195 read from the table;
#X text 239 213 (the input is the index in samples);
#X text 23 516 For more on reading and writing soundfiles to tables
\, setting their lengths \, etc \, see "arrays" in the "control examples"
series.;
#X text 20 385 This patch introduces the "tabread4~" object \, which
reads audio samples out of a floating-point array \, often called a
"sample table." The input is the index of the sample to read \, counting
from zero. The output is calculated using 4-point cubic interpolation
\, which is adequate for most purposes. Because of the interpolation
scheme \, tabread4~'s input cannot be less than one or greater than
the table length minus two.;
#X text 22 565 Fanatics take note: if you want really high-fidelity
sampling \, use a high-quality resampling program to up-sample your
soundfile to 88200 to drastically reduce interpolation error.;
#X text 600 195 (one second plus three extra;
#X text 602 214 for 4-point interpolation);
#X text 407 330 message to read a soundfile into the table (automatically
sent when you load this patch by the "loadbang" object.);
#X text 93 172 convert smoothly to audio signal;
#X text 93 84 (range is 0-100.) YOU ONLY HEAR OUTPUT;
#X text 94 100 WHEN THIS IS 0-100 AND ACTIVELY CHANGING.;
#X text 605 611 updated for Pd version 0.33;
#X text 593 173 --- 44103 samples ---;
#X msg 414 281 read ../sound/voice.wav sample-table;
#X obj 414 306 soundfiler;
#X connect 4 0 5 1;
#X connect 5 0 4 0;
#X connect 6 0 5 2;
#X connect 8 0 5 0;
#X connect 11 0 8 0;
#X connect 12 0 11 0;
#X connect 13 0 15 0;
#X connect 14 0 13 0;
#X connect 15 0 12 0;
#X connect 19 0 33 0;
#X connect 33 0 34 0;
|