-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjk_combfilter0~.pd
135 lines (135 loc) · 5.16 KB
/
jk_combfilter0~.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
#N canvas 206 71 777 729 12;
#X obj 259 277 r~ delayFeedback;
#N canvas 741 109 450 300 write_delay 0;
#X obj 73 103 +~;
#X obj 54 208 outlet~;
#X obj 54 26 inlet~;
#X obj 162 24 inlet~;
#X obj 73 147 delwrite~ combfilter 10000;
#X connect 0 0 4 0;
#X connect 2 0 0 0;
#X connect 2 0 1 0;
#X connect 3 0 0 1;
#X restore 165 304 pd write_delay;
#X obj 253 358 s~ delayFeedback;
#N canvas 761 135 468 405 read_delay 0;
#X obj 172 20 *~;
#X obj 238 -22 / 100;
#X obj 172 -148 / 44.1;
#X obj 142 72 +~;
#X obj -43 -173 inlet~;
#X obj 172 -182 inlet;
#X obj 142 151 outlet~;
#X obj 208 87 outlet~;
#X obj 172 -115 delread~ combfilter;
#X obj 238 -59 inlet;
#X connect 0 0 3 1;
#X connect 0 0 7 0;
#X connect 1 0 0 1;
#X connect 2 0 8 0;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X connect 8 0 0 0;
#X connect 9 0 1 0;
#X restore 166 331 pd read_delay;
#N canvas 136 59 691 619 why_use_subpatches_here? 0;
#X text 55 10 Execution order • Much of the time \, the actual execution
order of pd audio rate objects need not concern us. • It is important
to remember that audio processing is done in blocks: these are audio
vectors (buffers): the default block size is 64 samples. Ordinarily
\, objects do not process audio on a sample by sample basis. pd ensures
that the order of execution is such \, that an audio rate objects’s
output block is not calculated \, until all the inputs for the same
block have been computed first. • However \, when working with delays
\, order does become important \, as we are relying on the past values
of samples. • It is important to write to the delay line before it
is read. • If the delay line is read before it is written to \, the
minimum delay it is possible to have is one audio block (e.g. 64 samples
or ca. 1.45 msecs at 44.1kHz sampling rate). This is \, of course \,
not a problem for long delays \, but for designing patches that use
shorter delays \, such as flangers and comb filters \, this becomes
a problematic limit. • One useful method of ensuring the correct
execution order is to put delay writers and delay readers in separate
subpatches. The order in which subpatches are connected \, guarantees
their order of execution. As long as the output of the delay line writer
is attached to the input of the delay line reader \, then the delay
line will always be written to before it is read.;
#X restore -37 203 pd why_use_subpatches_here?;
#X text 77 -22 WARNING! Be careful when wearing headphones and working
with live input. Keep the feedback value well under 98%;
#X obj 166 399 outlet~;
#X obj 195 153 cnv 15 226 94 empty cn_scnd Combfilter 57 12 0 14 -99865
-241291 0;
#X obj 200 162 vu 15 80 empty empty -1 -8 0 10 -66577 -99865 1 0;
#X obj 223 229 bng 15 250 50 0 \$0-reset empty Reset 20 8 0 12 -258113
-4034 -4034;
#X obj 226 203 hsl 128 15 0 98 0 0 empty cmbf_feedback feedback(%)
35 8 0 10 -204800 -1 -1 8700 1;
#X obj 226 184 hsl 128 15 0 1000 0 0 empty cmbf_delay delay(samples)
25 8 0 10 -261682 -1 -1 12200 1;
#X obj 119 87 spigot~;
#X obj 199 125 pvu~;
#X obj 293 229 tgl 15 0 \$0-activate empty Active 20 8 0 12 -262144
-1 -4034 1 1;
#X obj 65 136 s~ \$0-bypass;
#X obj 363 184 nbx 5 14 0 1000 0 0 transpose_ui empty empty 0 -8 0
10 -262144 -1 -1 960.63 256;
#X obj 363 203 nbx 5 14 0 98 0 0 window_ui empty empty 0 -8 0 10 -262144
-1 -1 67.1339 256;
#X obj 119 24 inlet~;
#X obj 460 198 loadbang;
#X msg 460 249 \; cmbf_delay 0 \; cmbf_feedback 0;
#X obj 69 358 r~ \$0-bypass;
#X obj 472 223 r \$0-reset;
#X text 287 34 Switch off Activate toggle in order to bypass the effect
and save CPU cycles.;
#X text 287 78 Reset will restore the effect to its defaupt values.
;
#X text 287 110 Based on lab example;
#X obj -60 458 cnv 15 720 250 empty empty empty 20 12 0 14 -233017
-66577 0;
#X text 19 661 docs based on the MAX/MSP reference (c) cycling'74;
#X text 18 675 ___________________________________________________
;
#X floatatom 179 535 5 0 0 0 - - -;
#X floatatom 221 548 5 0 0 0 - - -;
#X floatatom 263 571 5 0 0 0 - - -;
#X floatatom 306 597 5 0 0 0 - - -;
#X msg 20 586 clear;
#X text -17 564 clear buffer;
#X msg 57 524 10 0.4 0.7;
#X text 227 524 D = delay time;
#X text 265 548 a = input (pre delay) amplitude coefficient;
#X text 311 572 b = input (post delay) amplitude coefficient;
#X text 351 598 c = outnput amplitude coefficient;
#X text 62 505 D a b;
#X text 208 498 D \, a \, b \, c inlets support signals aswell;
#X obj 136 622 comb~ 100 0.2 0.2 0.3 0.9;
#X text 100 456 this part was not used. Tried to experiment with comb~
object \, but it produced undesirable effect.;
#X obj 165 53 r \$0-activate;
#X connect 0 0 1 1;
#X connect 1 0 3 0;
#X connect 3 0 6 0;
#X connect 3 1 2 0;
#X connect 10 0 17 0;
#X connect 11 0 16 0;
#X connect 12 0 15 0;
#X connect 12 1 13 0;
#X connect 12 1 1 0;
#X connect 13 0 8 0;
#X connect 16 0 3 1;
#X connect 17 0 3 2;
#X connect 18 0 12 0;
#X connect 19 0 20 0;
#X connect 21 0 6 0;
#X connect 22 0 20 0;
#X connect 29 0 42 1;
#X connect 30 0 42 2;
#X connect 31 0 42 3;
#X connect 32 0 42 4;
#X connect 33 0 42 0;
#X connect 35 0 42 0;
#X connect 44 0 12 1;
#X coords 0 -1 1 1 232 100 1 192 150;