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