blob: 81a713b892284045e6924b2150e920a476c108a7 (
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
181
182
183
184
185
|
#N canvas 97 42 601 612 12;
#X obj 72 411 mtof;
#X floatatom 72 388 5 0 0 0 - #0-pit -;
#X obj 41 542 output~;
#X obj 41 457 lop~;
#X obj 42 354 noise~;
#X text 124 387 <-- cutoff (pitch units);
#X text 135 434 <-- cutoff (Hertz);
#X floatatom 72 436 5 0 0 0 - - -;
#X text 348 582 updated for Pd version 0.39;
#X text 88 459 low-pass filter;
#X obj 130 535 tabwrite~ H01-graph;
#X obj 130 510 metro 250;
#X obj 130 490 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X text 148 487 graphing on/off;
#N canvas 0 0 450 300 graph2 0;
#X array H01-graph 882 float 3;
#A 0 -0.107788 -0.0695636 -0.0991016 -0.104581 -0.0683972 -0.0547128
-0.0857414 -0.0731684 -0.0892636 -0.115914 -0.0935128 -0.0572466 -0.0387586
-0.0429956 -0.03826 -0.0628797 -0.0383263 -0.0720175 -0.0923909 -0.0707558
-0.0792164 -0.102187 -0.0888189 -0.119908 -0.083863 -0.0677126 -0.0554309
-0.044719 -0.0248649 -0.0482707 -0.0692472 -0.103905 -0.101273 -0.117807
-0.100956 -0.0905779 -0.0676211 -0.0299763 -0.0190183 0.00623894 -0.000664497
0.0291359 0.0310484 0.0412564 0.0375735 0.0676889 0.0348717 0.00747152
0.0416666 0.0529021 0.0418099 0.0405759 0.0303367 -0.00428127 0.0140712
-0.0111072 0.0243947 -0.0104408 -0.0142505 -0.0287291 -0.0119835 0.00876151
-0.0281321 -0.0325635 -0.0618363 -0.0379124 -0.0447592 -0.0507954 -0.0403398
-0.0277581 -0.00226383 0.000989536 -0.0323217 -0.0164512 -0.0156964
-0.0436928 -0.045223 -0.0706908 -0.0382667 -0.00177098 0.0290649 0.0149072
0.0483574 0.0453535 0.0100187 -0.00270613 0.0298578 0.0470317 0.0301263
0.0478455 0.0134859 0.0488288 0.0766369 0.0916206 0.11869 0.0944563
0.102745 0.086215 0.0845207 0.0662227 0.0609466 0.0952278 0.0771313
0.103073 0.101067 0.0915918 0.100309 0.0651311 0.0553397 0.0623315
0.050316 0.0844677 0.0996978 0.0715106 0.084598 0.0947672 0.115172
0.134093 0.118854 0.106047 0.120693 0.0961966 0.0571329 0.0854602 0.084371
0.0538877 0.0744577 0.0563968 0.0753962 0.0748331 0.0605493 0.0795627
0.0600295 0.0432455 0.0582205 0.0920203 0.0640656 0.0253824 -0.008527
-0.0243436 -0.0588714 -0.0239946 0.00784105 0.0119875 0.0161209 0.00780566
0.00216991 -0.0288565 -0.0521791 -0.0658445 -0.0868191 -0.0673713 -0.0889776
-0.0546807 -0.0256506 -0.0375237 -0.0118962 -0.0477717 -0.0384217 -0.0385089
-0.0696784 -0.098759 -0.121121 -0.127174 -0.157189 -0.121443 -0.0989412
-0.0615983 -0.0711882 -0.0760313 -0.0566161 -0.056104 -0.0875121 -0.0734271
-0.037525 -0.0681574 -0.0689616 -0.0900591 -0.0574559 -0.04051 -0.0333117
-0.0260634 -0.0202531 -0.0302473 -0.0346772 -0.052936 -0.0798849 -0.0780231
-0.111591 -0.112165 -0.129226 -0.11253 -0.138539 -0.122338 -0.138645
-0.132606 -0.112523 -0.139122 -0.169654 -0.132431 -0.136376 -0.130106
-0.110972 -0.113595 -0.131592 -0.141568 -0.108734 -0.075847 -0.0711363
-0.0525791 -0.0216604 -0.0196736 -0.0186081 -0.0186695 -0.00602199
0.0257979 0.0132076 0.0225488 0.00748564 0.0165994 0.00166184 -0.00116405
0.0028765 0.01807 0.0157059 0.0473739 0.0708991 0.0862786 0.0650413
0.038138 0.015989 0.0521245 0.0605891 0.0431341 0.00429233 0.028138
0.00477928 0.00181729 -0.028107 -0.0360127 -0.00712468 -0.0312668 -0.0523252
-0.0479352 -0.0513783 -0.0250772 -0.0142933 -0.047864 -0.0252179 -0.0219197
0.0153334 0.0518051 0.082624 0.0535017 0.0535462 0.0506847 0.0717359
0.0774448 0.0591473 0.0602611 0.0708395 0.0654832 0.0261038 0.0107588
0.00770543 0.0203729 0.033363 0.029335 0.0483838 0.0607855 0.0245724
0.0550305 0.0593506 0.0753188 0.081294 0.096557 0.117197 0.105438 0.111979
0.0953627 0.0978146 0.084516 0.0952146 0.117297 0.0851524 0.0863281
0.049295 0.0757788 0.0866482 0.0738062 0.0984422 0.0885168 0.116305
0.0949217 0.0562471 0.0898681 0.0643755 0.0681146 0.0863296 0.0516047
0.0595782 0.0605373 0.0295923 0.0568693 0.0749412 0.0804035 0.108818
0.0786603 0.0506026 0.0129134 0.0381891 0.0305477 0.0364073 0.0411764
0.0721042 0.0629199 0.03039 0.0474877 0.0100055 0.0283331 0.0424028
0.0700528 0.0932837 0.116089 0.146493 0.171112 0.198628 0.1636 0.135356
0.164266 0.144544 0.132615 0.128501 0.129495 0.141165 0.145633 0.141941
0.170706 0.193988 0.204823 0.228202 0.219125 0.204054 0.227319 0.231326
0.230171 0.204664 0.230591 0.189557 0.202459 0.184563 0.212896 0.202201
0.221436 0.214395 0.195221 0.209657 0.214416 0.202139 0.222888 0.237836
0.245874 0.22457 0.194835 0.159835 0.142986 0.120742 0.119331 0.147719
0.17693 0.157802 0.153323 0.151851 0.155677 0.148854 0.139333 0.145233
0.166518 0.140436 0.150237 0.126701 0.135908 0.166416 0.15391 0.152768
0.181048 0.149057 0.136385 0.1213 0.144767 0.113465 0.0980506 0.0852771
0.106682 0.130461 0.10524 0.0793894 0.07123 0.0447812 0.0792345 0.0479509
0.0700904 0.0308896 0.0279068 0.0312166 0.010152 -0.00943106 0.0010242
-0.00752998 0.0143407 0.0027725 0.033508 0.0621824 0.0643498 0.0827609
0.113321 0.11629 0.139206 0.101752 0.0988734 0.107286 0.128068 0.14154
0.148363 0.124029 0.0968996 0.127442 0.100244 0.0940884 0.0805303 0.103963
0.0874826 0.0588413 0.0720198 0.0853478 0.0902383 0.0788942 0.0475014
0.0707652 0.0384297 0.0538394 0.0763012 0.0483987 0.0713554 0.0473328
0.0415702 0.0532321 0.0475937 0.0208587 0.0030926 0.00438177 -0.0204396
-0.00825569 0.0180096 0.0456204 0.0765333 0.0938012 0.110089 0.115665
0.13934 0.144259 0.155082 0.164549 0.192087 0.159342 0.176142 0.149727
0.174968 0.170935 0.134127 0.123663 0.11653 0.113447 0.102327 0.0764594
0.0887578 0.079355 0.0692447 0.0727442 0.0913222 0.115159 0.137636
0.154978 0.176904 0.156243 0.13039 0.104399 0.0853428 0.0666318 0.0615526
0.0907602 0.0502914 0.0434091 0.00788628 -0.0191843 -0.0395026 -0.0596938
-0.0723036 -0.0806951 -0.0861116 -0.0864571 -0.0488058 -0.0711986 -0.0797166
-0.0688114 -0.0318625 -0.0673463 -0.0444878 -0.0250519 -0.024727 -0.0310858
-0.00561093 -0.0207001 -0.0340927 -0.0551734 -0.0817888 -0.0705976
-0.0835859 -0.0866976 -0.0565736 -0.0797509 -0.0968247 -0.0655236 -0.0760219
-0.0670947 -0.0342146 -0.0274503 -0.0263804 -0.0317333 -0.039663 -0.0119034
-0.046866 -0.0359958 -0.0318836 -0.0499625 -0.0574402 -0.029796 0.0028338
-0.0262898 -0.041154 -0.0473188 -0.0255545 -0.058172 -0.0601881 -0.0914168
-0.102286 -0.135733 -0.13837 -0.13175 -0.139201 -0.160906 -0.136196
-0.11435 -0.073056 -0.0694626 -0.0599314 -0.0349573 -0.00661064 -0.0128436
-0.0368892 -0.00783622 -0.0285016 -0.0257515 -0.000656539 0.000578916
0.00997914 0.0309158 0.00448781 -0.0276183 -0.00975017 -0.0431335 -0.0420573
-0.0318631 -0.0461821 -0.0493957 -0.0468264 -0.0278063 -0.0239267 -0.0240269
-0.0446192 -0.0791041 -0.0634024 -0.0949552 -0.122094 -0.130089 -0.110653
-0.07832 -0.0717672 -0.0448359 -0.0454325 -0.075843 -0.0655465 -0.0499949
-0.0848139 -0.107986 -0.0831531 -0.0721088 -0.103859 -0.0650817 -0.0753315
-0.0991717 -0.072808 -0.0810555 -0.0679525 -0.0566175 -0.0827188 -0.0822597
-0.0497494 -0.0154982 -0.00131288 0.0318942 -0.00235687 -0.0344436
-0.0249813 -0.00212817 0.0348011 0.0207401 0.00218581 -0.0346692 -0.000621661
-0.0106329 -0.0261485 0.00856931 -0.0171581 0.0152674 0.0466481 0.0456615
0.0728295 0.0601254 0.0639082 0.0949887 0.09166 0.118261 0.120631 0.120818
0.150657 0.154468 0.134964 0.0965974 0.0907992 0.069314 0.0611587 0.0707784
0.0627047 0.0717109 0.0659585 0.0296832 0.0352495 0.00141861 0.010894
0.0426848 0.0419218 0.0141017 0.0413311 0.037778 0.0154291 0.0312945
0.00510286 -0.00271059 -0.0291284 -0.045397 -0.0762688 -0.0445058 -0.057707
-0.0779557 -0.0735523 -0.0922772 -0.0727918 -0.0429784 -0.00911861
-0.0379944 -0.0658339 -0.0784915 -0.0792981 -0.0453014 -0.0197867 -0.00123178
0.000799734 -0.00204599 0.0349492 0.0623098 0.0770006 0.0882193 0.0484045
0.0760622 0.0945022 0.0567368 0.0286078 0.00189384 0.0315546 0.0374527
0.0395075 0.0591211 0.0415475 0.0732162 0.0588977 0.0850963 0.0465228
0.0698241 0.0407602 0.0431113 0.0065717 0.00936337 0.0222241 0.0327647
0.0270807 -0.0111891 0.0063837 -0.0086459 -0.0364951 -0.0200965 -0.0318325
-0.0576028 -0.0557316 -0.0675803 -0.0887475 -0.0980934 -0.0881446 -0.117229
-0.125822 -0.13378 -0.142539 -0.108397 -0.13497 -0.138471 -0.164523
-0.174647 -0.18636 -0.157472 -0.148646 -0.108121 -0.104372 -0.0695942
-0.0542974 -0.0701001 -0.100999 -0.0658883 -0.0947834 -0.113894 -0.0981114
-0.108426 -0.100378 -0.102227 -0.0818266 -0.103135 -0.0720306 -0.0440222
-0.0219618 -0.0453231 -0.019184 0.0157131 -0.013545 -0.0248696 -0.0166098
-0.0489199 -0.0269982 -0.0224125 -0.0413912 -0.0728588 -0.0586017 -0.0349842
-0.0338855 -0.0588961 -0.0928709 -0.11376 -0.0790886 -0.100094 -0.126293
-0.10676 -0.136216 -0.109541 -0.136053 -0.112742 -0.136117 -0.146529
-0.156998 -0.163319 -0.137112 -0.146644 -0.138866 -0.159482 -0.185248
-0.206002 -0.16925 -0.178855 -0.140085 -0.105426 -0.095303 -0.0736452
-0.066341 -0.0689736 -0.0914969 -0.0725721 -0.0824288 -0.049098 -0.0139474
-0.00957104 0.0134051 -0.0091349 0.00555033 0.0117049 -0.0230348 -0.0545547
-0.050228 -0.0431037 -0.0668625 -0.029803 -0.0551605 -0.0175891 -0.0435808
-0.0240586 -0.0455508 -0.00746894 0.0213663 0.0569028 0.0190693 0.000740271
0.000412262 -0.0233437 -0.0205415 -0.0240432 0.00448952 0.00916993
0.00155166 -0.00567939 -0.00725616 0.0138388 0.0162082 -0.00138934
-0.0077004 -0.0261998 -0.0100701 -0.0337348 -0.0154704 -0.0291058 -0.0299364
-0.00924212 0.0247502 -0.0060416 -0.0118114 -0.0158459 0.0158545 -0.00827235
-0.00602365 -0.0132283 0.0105079 0.0432025 0.0698796 0.0576105 0.0538253
0.066991 0.0715161 0.0405482 0.0741857 0.0802094 0.113967 0.126283
0.111464 0.0926309 0.0545991 0.0568134 0.0770984 0.0533353 0.0142316
-0.0181225 0.00490977 0.0275315 0.0202685 0.00414232 0.0273551 0.0158572
-0.00476758 -0.0362654 -0.0701252 -0.0547324 -0.0708724 -0.0970369
-0.099428 -0.102544 -0.0736354 -0.0556618 -0.0863601;
#X coords 0 1 882 -1 200 140 1;
#X restore 384 386 graph;
#X text 408 528 --- 0.02 sec ---;
#X text 28 30 This and the following patches show how to use filters
in Pd \, starting with the simplest one: the one-pole low-pass filter.
Here we test it with an input of white noise. The lop~ object does
the filtering. Its left inlet takes an audio signal to be filtered
\, and its right inlet takes messages to set its cutoff frequency in
Hertz.;
#X text 26 129 The lop~ object is normalized to pass DC (the lowest
frequency) with a gain of one. Higher frequencies are progressively
more and more attenuated. The lower the cutoff frequency \, the lower
the total power of the filtered noise. If you graph the output you'll
see that the waveform gets smoother (and smaller overall) as the cutoff
frequency is lowered.;
#X text 28 243 At the cutoff frequency the gain is about -3 dB \, and
above that the gain drops a further 6 dB per octave. (Sometimes one
uses the word "rolloff" instead of "cutoff" to emphasize the gradual
way the gain drops off with frequency.);
#X text 108 353 white noise \, test signal;
#X text 185 6 ONE-POLE LOW-PASS FILTER;
#N canvas 0 0 450 300 loadbang 0;
#X obj 85 16 loadbang;
#X obj 85 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 85 59 f \$0;
#X text 18 179 boxes.;
#X text 16 161 This subpatch loads initial values in number;
#X msg 84 83 \; \$1-pit 60;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X restore 129 582 pd loadbang;
#X connect 0 0 7 0;
#X connect 1 0 0 0;
#X connect 3 0 2 0;
#X connect 3 0 2 1;
#X connect 3 0 10 0;
#X connect 4 0 3 0;
#X connect 7 0 3 1;
#X connect 11 0 10 0;
#X connect 12 0 11 0;
|