comparison examples/08-PureData/karplusStrong/_main.pd @ 464:8fcfbfb32aa0 prerelease

Examples reorder with subdirectories. Added header to each project. Moved Doxygen to bottom of render.cpp.
author Robert Jack <robert.h.jack@gmail.com>
date Mon, 20 Jun 2016 16:20:38 +0100
parents
children ddb86944e138
comparison
equal deleted inserted replaced
463:c47709e8b5c9 464:8fcfbfb32aa0
1 #N canvas 440 516 715 490 10;
2 #X obj 38 370 dac~ 1 2;
3 #X text 470 442 ---------------------------------;
4 #X text 470 432 @krighxz / BELA / heavy / 12/2015;
5 #X text 494 451 beaglert.cc / enzienaudio.com;
6 #X text 33 22 Karplus Strong;
7 #X text 33 32 ==============;
8 #X obj 38 323 vd~ \$0-wg1;
9 #X obj 118 345 lop~ 1000;
10 #X obj 118 367 *~ 0.99;
11 #X obj 118 389 s~ \$0-fb1;
12 #X obj 38 94 adc~ 3;
13 #X obj 38 116 hip~ 100;
14 #X obj 98 176 r~ \$0-fb1;
15 #X obj 38 198 delwrite~ \$0-wg1 100;
16 #X obj 38 268 *~;
17 #X obj 38 290 *~ 10;
18 #X text 99 116 <<< centre (i.e. DC block) signal with high-pass filter
19 ;
20 #X text 100 94 <<< use accelerometer \, piezo or FSR on first analog
21 in;
22 #X text 105 245 <<< use potentiometer or fader on second analog in
23 ;
24 #X text 100 75 EXCITATION INPUT:;
25 #X text 100 225 DELAY PERIOD:;
26 #X text 182 365 <<< and decay here [0-0.9999];
27 #X text 182 345 <<< set damping here [~100-20000];
28 #N canvas 335 566 461 274 gate 0;
29 #N canvas 0 22 450 278 (subpatch) 0;
30 #X array \$0-xfer 1024 float 3;
31 #A 0 0 -0.808242 -0.804734 -0.801234 -0.797741 -0.794256 -0.790778
32 -0.787309 -0.783846 -0.780392 -0.776945 -0.773506 -0.770074 -0.76665
33 -0.763233 -0.759824 -0.756423 -0.75303 -0.749644 -0.746266 -0.742895
34 -0.739532 -0.736176 -0.732829 -0.729488 -0.726156 -0.722831 -0.719514
35 -0.716204 -0.712902 -0.709608 -0.706321 -0.703042 -0.69977 -0.696507
36 -0.69325 -0.690002 -0.686761 -0.683527 -0.680302 -0.677084 -0.673873
37 -0.67067 -0.667475 -0.664288 -0.661108 -0.657935 -0.654771 -0.651614
38 -0.648464 -0.645323 -0.642188 -0.639062 -0.635943 -0.632832 -0.629728
39 -0.626632 -0.623544 -0.620463 -0.61739 -0.614324 -0.611266 -0.608216
40 -0.605174 -0.602139 -0.599111 -0.596092 -0.59308 -0.590075 -0.587078
41 -0.584089 -0.581107 -0.578134 -0.575167 -0.572209 -0.569257 -0.566314
42 -0.563378 -0.56045 -0.55753 -0.554617 -0.551711 -0.548814 -0.545924
43 -0.543041 -0.540167 -0.537299 -0.53444 -0.531588 -0.528744 -0.525907
44 -0.523078 -0.520257 -0.517443 -0.514637 -0.511839 -0.509048 -0.506265
45 -0.503489 -0.500721 -0.497961 -0.495208 -0.492463 -0.489726 -0.486996
46 -0.484274 -0.481559 -0.478852 -0.476153 -0.473461 -0.470777 -0.468101
47 -0.465432 -0.462771 -0.460117 -0.457472 -0.454833 -0.452203 -0.44958
48 -0.446964 -0.444357 -0.441757 -0.439164 -0.436579 -0.434002 -0.431432
49 -0.42887 -0.426316 -0.42377 -0.42123 -0.418699 -0.416175 -0.413659
50 -0.41115 -0.40865 -0.406156 -0.403671 -0.401193 -0.398722 -0.396259
51 -0.393804 -0.391357 -0.388917 -0.386485 -0.38406 -0.381643 -0.379234
52 -0.376832 -0.374438 -0.372051 -0.369673 -0.367301 -0.364938 -0.362582
53 -0.360233 -0.357893 -0.35556 -0.353234 -0.350916 -0.348606 -0.346304
54 -0.344009 -0.341721 -0.339442 -0.33717 -0.334905 -0.332649 -0.330399
55 -0.328158 -0.325924 -0.323698 -0.321479 -0.319268 -0.317065 -0.314869
56 -0.312681 -0.3105 -0.308328 -0.306162 -0.304005 -0.301855 -0.299713
57 -0.297578 -0.295451 -0.293331 -0.291219 -0.289115 -0.287019 -0.28493
58 -0.282848 -0.280775 -0.278709 -0.27665 -0.2746 -0.272556 -0.270521
59 -0.268493 -0.266473 -0.26446 -0.262455 -0.260458 -0.258468 -0.256486
60 -0.254511 -0.252545 -0.250585 -0.248634 -0.24669 -0.244753 -0.242825
61 -0.240904 -0.23899 -0.237084 -0.235186 -0.233296 -0.231413 -0.229537
62 -0.22767 -0.22581 -0.223957 -0.222112 -0.220275 -0.218446 -0.216624
63 -0.21481 -0.213003 -0.211204 -0.209413 -0.207629 -0.205853 -0.204084
64 -0.202323 -0.20057 -0.198824 -0.197086 -0.195356 -0.193633 -0.191918
65 -0.190211 -0.188511 -0.186819 -0.185134 -0.183457 -0.181788 -0.180126
66 -0.178472 -0.176826 -0.175187 -0.173556 -0.171932 -0.170316 -0.168708
67 -0.167108 -0.165515 -0.163929 -0.162351 -0.160781 -0.159219 -0.157664
68 -0.156117 -0.154577 -0.153045 -0.151521 -0.150004 -0.148495 -0.146993
69 -0.1455 -0.144013 -0.142535 -0.141064 -0.139601 -0.138145 -0.136697
70 -0.135256 -0.133824 -0.132398 -0.130981 -0.129571 -0.128169 -0.126774
71 -0.125387 -0.124008 -0.122636 -0.121272 -0.119915 -0.118566 -0.117225
72 -0.115891 -0.114565 -0.113247 -0.111936 -0.110633 -0.109338 -0.10805
73 -0.10677 -0.105497 -0.104232 -0.102975 -0.101725 -0.100483 -0.0992487
74 -0.0980219 -0.0968027 -0.0955911 -0.0943872 -0.0931909 -0.0920023 -0.0908212
75 -0.0896478 -0.0884821 -0.0873239 -0.0861734 -0.0850305 -0.0838953 -0.0827676
76 -0.0816476 -0.0805353 -0.0794305 -0.0783334 -0.077244 -0.0761621 -0.0750879
77 -0.0740213 -0.0729623 -0.071911 -0.0708673 -0.0698312 -0.0688028 -0.067782
78 -0.0667688 -0.0657632 -0.0647653 -0.063775 -0.0627924 -0.0618173 -0.0608499
79 -0.0598901 -0.058938 -0.0579935 -0.0570566 -0.0561273 -0.0552057 -0.0542917
80 -0.0533853 -0.0524866 -0.0515955 -0.050712 -0.0498361 -0.0489679 -0.0481073
81 -0.0472543 -0.046409 -0.0455713 -0.0447412 -0.0439188 -0.0431039 -0.0422968
82 -0.0414972 -0.0407053 -0.039921 -0.0391443 -0.0383752 -0.0376138 -0.03686
83 -0.0361139 -0.0353754 -0.0346445 -0.0339212 -0.0332056 -0.0324976 -0.0317972
84 -0.0311044 -0.0304193 -0.0297418 -0.029072 -0.0284097 -0.0277551 -0.0271082
85 -0.0264688 -0.0258371 -0.025213 -0.0245966 -0.0239877 -0.0233865 -0.022793
86 -0.022207 -0.0216287 -0.021058 -0.020495 -0.0199396 -0.0193918 -0.0188516
87 -0.0183191 -0.0177942 -0.0172769 -0.0167673 -0.0162653 -0.0157709 -0.0152841
88 -0.014805 -0.0143335 -0.0138696 -0.0134134 -0.0129648 -0.0125238 -0.0120905
89 -0.0116647 -0.0112466 -0.0108362 -0.0104333 -0.0100381 -0.00965057
90 -0.00927063 -0.00889832 -0.00853363 -0.00817657 -0.00782715 -0.00748535
91 -0.00715118 -0.00682465 -0.00650574 -0.00619446 -0.00589081 -0.00559479
92 -0.0053064 -0.00502563 -0.0047525 -0.004487 -0.00422913 -0.00397888
93 -0.00373627 -0.00350128 -0.00327393 -0.0030542 -0.0028421 -0.00263763
94 -0.0024408 -0.00225159 -0.00207001 -0.00189606 -0.00172974 -0.00157104
95 -0.00141998 -0.00127655 -0.00114075 -0.00101257 -0.000892029 -0.000779114
96 -0.000673828 -0.000576172 -0.000486145 -0.000403747 -0.000328979 -0.000261841
97 -0.000202332 -0.000150452 -0.000106201 -6.95801e-05 -4.05884e-05 -1.92261e-05
98 -5.49316e-06 0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0
99 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0
100 -0 -0 -0 -0 -0 -0 -0 -0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.49316e-06
102 1.92261e-05 4.05884e-05 6.95801e-05 0.000106201 0.000150452 0.000202332
103 0.000261841 0.000328979 0.000403747 0.000486145 0.000576172 0.000673828
104 0.000779114 0.000892029 0.00101257 0.00114075 0.00127655 0.00141998
105 0.00157104 0.00172974 0.00189606 0.00207001 0.00225159 0.0024408 0.00263763
106 0.0028421 0.0030542 0.00327393 0.00350128 0.00373627 0.00397888 0.00422913
107 0.004487 0.0047525 0.00502563 0.0053064 0.00559479 0.00589081 0.00619446
108 0.00650574 0.00682465 0.00715118 0.00748535 0.00782715 0.00817657 0.00853363
109 0.00889832 0.00927063 0.00965057 0.0100381 0.0104333 0.0108362 0.0112466
110 0.0116647 0.0120905 0.0125238 0.0129648 0.0134134 0.0138696 0.0143335
111 0.014805 0.0152841 0.0157709 0.0162653 0.0167673 0.0172769 0.0177942
112 0.0183191 0.0188516 0.0193918 0.0199396 0.020495 0.021058 0.0216287
113 0.022207 0.022793 0.0233865 0.0239877 0.0245966 0.025213 0.0258371
114 0.0264688 0.0271082 0.0277551 0.0284097 0.029072 0.0297418 0.0304193
115 0.0311044 0.0317972 0.0324976 0.0332056 0.0339212 0.0346445 0.0353754
116 0.0361139 0.03686 0.0376138 0.0383752 0.0391443 0.039921 0.0407053
117 0.0414972 0.0422968 0.0431039 0.0439188 0.0447412 0.0455713 0.046409
118 0.0472543 0.0481073 0.0489679 0.0498361 0.050712 0.0515955 0.0524866
119 0.0533853 0.0542917 0.0552057 0.0561273 0.0570566 0.0579935 0.058938
120 0.0598901 0.0608499 0.0618173 0.0627924 0.063775 0.0647653 0.0657632
121 0.0667688 0.067782 0.0688028 0.0698312 0.0708673 0.071911 0.0729623
122 0.0740213 0.0750879 0.0761621 0.077244 0.0783334 0.0794305 0.0805353
123 0.0816476 0.0827676 0.0838953 0.0850305 0.0861734 0.0873239 0.0884821
124 0.0896478 0.0908212 0.0920023 0.0931909 0.0943872 0.0955911 0.0968027
125 0.0980219 0.0992487 0.100483 0.101725 0.102975 0.104232 0.105497 0.10677
126 0.10805 0.109338 0.110633 0.111936 0.113247 0.114565 0.115891 0.117225
127 0.118566 0.119915 0.121272 0.122636 0.124008 0.125387 0.126774 0.128169
128 0.129571 0.130981 0.132398 0.133824 0.135256 0.136697 0.138145 0.139601
129 0.141064 0.142535 0.144013 0.1455 0.146993 0.148495 0.150004 0.151521
130 0.153045 0.154577 0.156117 0.157664 0.159219 0.160781 0.162351 0.163929
131 0.165515 0.167108 0.168708 0.170316 0.171932 0.173556 0.175187 0.176826
132 0.178472 0.180126 0.181788 0.183457 0.185134 0.186819 0.188511 0.190211
133 0.191918 0.193633 0.195356 0.197086 0.198824 0.20057 0.202323 0.204084
134 0.205853 0.207629 0.209413 0.211204 0.213003 0.21481 0.216624 0.218446
135 0.220275 0.222112 0.223957 0.22581 0.22767 0.229537 0.231413 0.233296
136 0.235186 0.237084 0.23899 0.240904 0.242825 0.244753 0.24669 0.248634
137 0.250585 0.252545 0.254511 0.256486 0.258468 0.260458 0.262455 0.26446
138 0.266473 0.268493 0.270521 0.272556 0.2746 0.27665 0.278709 0.280775
139 0.282848 0.28493 0.287019 0.289115 0.291219 0.293331 0.295451 0.297578
140 0.299713 0.301855 0.304005 0.306162 0.308328 0.3105 0.312681 0.314869
141 0.317065 0.319268 0.321479 0.323698 0.325924 0.328158 0.330399 0.332649
142 0.334905 0.33717 0.339442 0.341721 0.344009 0.346304 0.348606 0.350916
143 0.353234 0.35556 0.357893 0.360233 0.362582 0.364938 0.367301 0.369673
144 0.372051 0.374438 0.376832 0.379234 0.381643 0.38406 0.386485 0.388917
145 0.391357 0.393804 0.396259 0.398722 0.401193 0.403671 0.406156 0.40865
146 0.41115 0.413659 0.416175 0.418699 0.42123 0.42377 0.426316 0.42887
147 0.431432 0.434002 0.436579 0.439164 0.441757 0.444357 0.446964 0.44958
148 0.452203 0.454833 0.457472 0.460117 0.462771 0.465432 0.468101 0.470777
149 0.473461 0.476153 0.478852 0.481559 0.484274 0.486996 0.489726 0.492463
150 0.495208 0.497961 0.500721 0.503489 0.506265 0.509048 0.511839 0.514637
151 0.517443 0.520257 0.523078 0.525907 0.528744 0.531588 0.53444 0.537299
152 0.540167 0.543041 0.545924 0.548814 0.551711 0.554617 0.55753 0.56045
153 0.563378 0.566314 0.569257 0.572209 0.575167 0.578134 0.581107 0.584089
154 0.587078 0.590075 0.59308 0.596092 0.599111 0.602139 0.605174 0.608216
155 0.611266 0.614324 0.61739 0.620463 0.623544 0.626632 0.629728 0.632832
156 0.635943 0.639062 0.642188 0.645323 0.648464 0.651614 0.654771 0.657935
157 0.661108 0.664288 0.667475 0.67067 0.673873 0.677084 0.680302 0.683527
158 0.686761 0.690002 0.69325 0.696507 0.69977 0.703042 0.706321 0.709608
159 0.712902 0.716204 0.719514 0.722831;
160 #A 1000 0.726156 0.729488 0.732829 0.736176 0.739532 0.742895 0.746266
161 0.749644 0.75303 0.756423 0.759824 0.763233 0.76665 0.770074 0.773506
162 0.776945 0.780392 0.783846 0.787309 0.790778 0.794256 0.797741 0.801234
163 0.804734;
164 #X coords 0 1 1023 -1 200 200 1 0 0;
165 #X restore 230 34 graph;
166 #X obj 25 27 inlet~;
167 #X obj 25 49 clip~ -1 1;
168 #X obj 25 71 *~ 512;
169 #X obj 25 93 +~ 512;
170 #X obj 25 115 tabread4~ \$0-xfer;
171 #X obj 25 137 outlet~;
172 #N canvas 0 22 334 332 generate-xfer 0;
173 #X obj 8 290 tabwrite \$0-xfer;
174 #X obj 8 109 / 1024;
175 #X obj 8 129 * 2;
176 #X obj 8 149 - 1;
177 #X obj 8 169 moses 0;
178 #X obj 8 191 + 0.1;
179 #X obj 8 213 clip -1 0;
180 #X obj 68 191 - 0.1;
181 #X obj 68 213 clip 0 1;
182 #X obj 101 16 inlet threshold;
183 #X obj 101 78 count 1024;
184 #X obj 128 58 s \$0-thresh;
185 #X obj 95 169 r \$0-thresh;
186 #X obj 101 38 t b f;
187 #X obj 68 236 *;
188 #X obj 8 236 *;
189 #X obj 8 258 * -1;
190 #X text 140 203 <<< deadzone;
191 #X text 140 253 <<< smooth by taking exponent;
192 #X connect 1 0 2 0;
193 #X connect 2 0 3 0;
194 #X connect 3 0 4 0;
195 #X connect 4 0 5 0;
196 #X connect 4 1 7 0;
197 #X connect 5 0 6 0;
198 #X connect 6 0 15 0;
199 #X connect 6 0 15 1;
200 #X connect 7 0 8 0;
201 #X connect 8 0 14 0;
202 #X connect 8 0 14 1;
203 #X connect 9 0 13 0;
204 #X connect 10 0 0 1;
205 #X connect 10 0 1 0;
206 #X connect 12 0 5 1;
207 #X connect 12 0 7 1;
208 #X connect 13 0 10 0;
209 #X connect 13 1 11 0;
210 #X connect 14 0 0 0;
211 #X connect 15 0 16 0;
212 #X connect 16 0 0 0;
213 #X restore 26 217 pd generate-xfer;
214 #X text 58 196 <<< threshold;
215 #X obj 26 173 loadbang;
216 #X msg 26 195 0.1;
217 #X connect 1 0 2 0;
218 #X connect 2 0 3 0;
219 #X connect 3 0 4 0;
220 #X connect 4 0 5 0;
221 #X connect 5 0 6 0;
222 #X connect 9 0 10 0;
223 #X connect 10 0 7 0;
224 #X restore 38 137 pd gate;
225 #X obj 38 246 adc~ 10;
226 #X text 98 137 <<< thresholding to remove any consistent noise in the
227 excitation signal;
228 #X connect 6 0 7 0;
229 #X connect 6 0 0 0;
230 #X connect 6 0 0 1;
231 #X connect 7 0 8 0;
232 #X connect 8 0 9 0;
233 #X connect 10 0 11 0;
234 #X connect 11 0 23 0;
235 #X connect 12 0 13 0;
236 #X connect 14 0 15 0;
237 #X connect 15 0 6 0;
238 #X connect 23 0 13 0;
239 #X connect 24 0 14 0;
240 #X connect 24 0 14 1;