annotate projects/libpd/rubberDuckie/_main.pd @ 322:dde921ea256b Doxy prerelease

libpd and heavy examples added
author Robert Jack <robert.h.jack@gmail.com>
date Mon, 30 May 2016 12:47:17 +0100
parents
children
rev   line source
robert@322 1 #N canvas 275 573 442 207 10;
robert@322 2 #X obj 39 149 dac~ 1 2;
robert@322 3 #X text 218 143 ---------------------------------;
robert@322 4 #X text 218 133 @krighxz / BELA / heavy / 12/2015;
robert@322 5 #X text 242 152 beaglert.cc / enzienaudio.com;
robert@322 6 #X text 35 32 Rubber Duckie;
robert@322 7 #X text 35 42 =============;
robert@322 8 #N canvas 325 86 823 605 duckie 0;
robert@322 9 #X obj 186 510 *~;
robert@322 10 #X obj 306 517 *~;
robert@322 11 #X obj 372 468 noise~;
robert@322 12 #X obj 372 492 bp~ 3000 10;
robert@322 13 #X obj 366 162 abs~;
robert@322 14 #X obj 509 158 sig~ 0;
robert@322 15 #X obj 467 371 +~;
robert@322 16 #X obj 411 210 -~ 0.55;
robert@322 17 #X obj 411 231 /~ 0.2;
robert@322 18 #X obj 411 252 clip~ 0 1;
robert@322 19 #X obj 411 282 *~;
robert@322 20 #X obj 411 308 *~ 1000;
robert@322 21 #X obj 366 334 +~;
robert@322 22 #X obj 366 308 +~ 800;
robert@322 23 #X obj 186 536 *~ 0.2;
robert@322 24 #X obj 366 282 *~ 800;
robert@322 25 #N canvas 568 775 135 226 <~ 0;
robert@322 26 #X obj 20 -43 -~;
robert@322 27 #X obj 20 27 +~ 1e-37;
robert@322 28 #X obj 20 6 clip~ -1e-37 0;
robert@322 29 #X obj 20 -88 inlet~;
robert@322 30 #X obj 64 -87 inlet~;
robert@322 31 #X obj 20 -64 max~;
robert@322 32 #X obj 20 -19 *~ -1;
robert@322 33 #X obj 20 79 outlet~;
robert@322 34 #X obj 20 48 *~ 1e+37;
robert@322 35 #X connect 0 0 6 0;
robert@322 36 #X connect 1 0 8 0;
robert@322 37 #X connect 2 0 1 0;
robert@322 38 #X connect 3 0 5 0;
robert@322 39 #X connect 4 0 0 1;
robert@322 40 #X connect 4 0 5 1;
robert@322 41 #X connect 5 0 0 0;
robert@322 42 #X connect 6 0 2 0;
robert@322 43 #X connect 8 0 7 0;
robert@322 44 #X restore 186 367 pd <~ 0;
robert@322 45 #N canvas 568 775 135 226 <~ 0;
robert@322 46 #X obj 20 -43 -~;
robert@322 47 #X obj 20 27 +~ 1e-37;
robert@322 48 #X obj 20 6 clip~ -1e-37 0;
robert@322 49 #X obj 20 -88 inlet~;
robert@322 50 #X obj 64 -87 inlet~;
robert@322 51 #X obj 20 -64 max~;
robert@322 52 #X obj 20 -19 *~ -1;
robert@322 53 #X obj 20 79 outlet~;
robert@322 54 #X obj 20 48 *~ 1e+37;
robert@322 55 #X connect 0 0 6 0;
robert@322 56 #X connect 1 0 8 0;
robert@322 57 #X connect 2 0 1 0;
robert@322 58 #X connect 3 0 5 0;
robert@322 59 #X connect 4 0 0 1;
robert@322 60 #X connect 4 0 5 1;
robert@322 61 #X connect 5 0 0 0;
robert@322 62 #X connect 6 0 2 0;
robert@322 63 #X connect 8 0 7 0;
robert@322 64 #X restore 482 181 pd <~;
robert@322 65 #X obj 186 428 *~;
robert@322 66 #X obj 225 345 sig~ 1;
robert@322 67 #X obj 186 394 lop~ 10;
robert@322 68 #X text 524 393 << band-limited pulse;
robert@322 69 #X text 10 367 reed stops when overblown >>;
robert@322 70 #X obj 186 460 *~;
robert@322 71 #X obj 186 480 *~;
robert@322 72 #X text 25 470 exp amplitude response >>;
robert@322 73 #X text 537 238 << detune frequency on change of direction;
robert@322 74 #X obj 482 236 *~ -300;
robert@322 75 #X obj 306 485 *~;
robert@322 76 #X obj 306 449 *~ 0.1;
robert@322 77 #X text 448 493 << noise simulates non-oscillating airflow when overblown
robert@322 78 ;
robert@322 79 #X obj 186 561 outlet~;
robert@322 80 #N canvas 58 1286 407 525 pulse 0;
robert@322 81 #X obj 83 340 *~;
robert@322 82 #X obj 83 366 *~;
robert@322 83 #X obj 31 366 sig~ 1;
robert@322 84 #X obj 52 419 /~;
robert@322 85 #X obj 67 393 +~;
robert@322 86 #X text 116 366 X^2;
robert@322 87 #X text 97 396 1+X^2;
robert@322 88 #X text 84 421 1/(1+X^2);
robert@322 89 #X obj 83 317 osc~;
robert@322 90 #X obj 167 320 clip~ 0 999999;
robert@322 91 #X obj 52 483 outlet~;
robert@322 92 #X text 271 218 << tweak all this;
robert@322 93 #X text 25 14 based on F04.waveshaping.pulse.pd;
robert@322 94 #X obj 83 84 /~ 2;
robert@322 95 #X obj 167 148 -~;
robert@322 96 #X obj 167 170 /~ 127;
robert@322 97 #X obj 52 452 hip~ 5;
robert@322 98 #X obj 167 202 *~;
robert@322 99 #X obj 167 232 *~;
robert@322 100 #X obj 167 262 *~;
robert@322 101 #X obj 167 294 *~ 1000;
robert@322 102 #X obj 118 125 sig~ 139;
robert@322 103 #X obj 83 58 inlet~;
robert@322 104 #N canvas 331 1377 215 174 _ftom 0;
robert@322 105 #X obj -482 -776 tabread4~ _ftom;
robert@322 106 #X obj -482 -818 /~ 10000;
robert@322 107 #X obj -482 -797 *~ 256;
robert@322 108 #N canvas 0 23 450 278 (subpatch) 0;
robert@322 109 #X array _ftom 256 float 3;
robert@322 110 #A 0 0 27.0762 39.0762 46.0958 51.0762 54.9394 58.0958 60.7645 63.0762
robert@322 111 65.1153 66.9394 68.5894 70.0958 71.4815 72.7645 73.9589 75.0762 76.1258
robert@322 112 77.1153 78.0514 78.9394 79.784 80.5894 81.359 82.0958 82.8025 83.4815
robert@322 113 84.1349 84.7645 85.372 85.9589 86.5266 87.0762 87.609 88.1258 88.6276
robert@322 114 89.1153 89.5897 90.0514 90.5011 90.9394 91.3669 91.784 92.1914 92.5894
robert@322 115 92.9785 93.359 93.7313 94.0958 94.4528 94.8025 95.1453 95.4815 95.8113
robert@322 116 96.1349 96.4525 96.7645 97.0709 97.372 97.6679 97.9589 98.2451 98.5266
robert@322 117 98.8036 99.0762 99.3446 99.609 99.8693 100.126 100.379 100.628 100.873
robert@322 118 101.115 101.354 101.59 101.822 102.051 102.278 102.501 102.722 102.939
robert@322 119 103.154 103.367 103.577 103.784 103.989 104.191 104.392 104.589 104.785
robert@322 120 104.978 105.17 105.359 105.546 105.731 105.914 106.096 106.275 106.453
robert@322 121 106.629 106.803 106.975 107.145 107.314 107.482 107.647 107.811 107.974
robert@322 122 108.135 108.294 108.453 108.609 108.764 108.918 109.071 109.222 109.372
robert@322 123 109.521 109.668 109.814 109.959 110.103 110.245 110.386 110.527 110.666
robert@322 124 110.804 110.94 111.076 111.211 111.345 111.477 111.609 111.74 111.869
robert@322 125 111.998 112.126 112.253 112.379 112.504 112.628 112.751 112.873 112.995
robert@322 126 113.115 113.235 113.354 113.472 113.59 113.706 113.822 113.937 114.051
robert@322 127 114.165 114.278 114.39 114.501 114.612 114.722 114.831 114.939 115.047
robert@322 128 115.154 115.261 115.367 115.472 115.577 115.681 115.784 115.887 115.989
robert@322 129 116.09 116.191 116.292 116.392 116.491 116.589 116.688 116.785 116.882
robert@322 130 116.978 117.074 117.17 117.265 117.359 117.453 117.546 117.639 117.731
robert@322 131 117.823 117.915 118.005 118.096 118.186 118.275 118.364 118.453 118.541
robert@322 132 118.629 118.716 118.803 118.889 118.975 119.06 119.145 119.23 119.314
robert@322 133 119.398 119.482 119.565 119.647 119.729 119.811 119.893 119.974 120.055
robert@322 134 120.135 120.215 120.294 120.374 120.453 120.531 120.609 120.687 120.764
robert@322 135 120.842 120.918 120.995 121.071 121.147 121.222 121.297 121.372 121.446
robert@322 136 121.521 121.594 121.668 121.741 121.814 121.887 121.959 122.031 122.103
robert@322 137 122.174 122.245 122.316 122.386 122.457 122.527 122.596 122.666 122.735
robert@322 138 122.804 122.872 122.94 123.008;
robert@322 139 #X coords 0 127 256 -12 50 50 1 0 0;
robert@322 140 #X restore -546 -793 graph;
robert@322 141 #X obj -482 -838 clip~ 0 10000;
robert@322 142 #X obj -482 -858 inlet~;
robert@322 143 #X obj -482 -755 outlet~;
robert@322 144 #X text -567 -722 shoddy temp replacement for ftom~;
robert@322 145 #X connect 0 0 6 0;
robert@322 146 #X connect 1 0 2 0;
robert@322 147 #X connect 2 0 0 0;
robert@322 148 #X connect 4 0 1 0;
robert@322 149 #X connect 5 0 4 0;
robert@322 150 #X restore 182 125 pd _ftom;
robert@322 151 #X connect 0 0 1 0;
robert@322 152 #X connect 0 0 1 1;
robert@322 153 #X connect 1 0 4 1;
robert@322 154 #X connect 2 0 3 0;
robert@322 155 #X connect 2 0 4 0;
robert@322 156 #X connect 3 0 16 0;
robert@322 157 #X connect 4 0 3 1;
robert@322 158 #X connect 8 0 0 0;
robert@322 159 #X connect 9 0 0 1;
robert@322 160 #X connect 13 0 8 0;
robert@322 161 #X connect 13 0 23 0;
robert@322 162 #X connect 14 0 15 0;
robert@322 163 #X connect 15 0 17 0;
robert@322 164 #X connect 15 0 17 1;
robert@322 165 #X connect 16 0 10 0;
robert@322 166 #X connect 17 0 18 0;
robert@322 167 #X connect 17 0 18 1;
robert@322 168 #X connect 18 0 19 0;
robert@322 169 #X connect 18 0 19 1;
robert@322 170 #X connect 19 0 20 0;
robert@322 171 #X connect 20 0 9 0;
robert@322 172 #X connect 21 0 14 0;
robert@322 173 #X connect 22 0 13 0;
robert@322 174 #X connect 23 0 14 1;
robert@322 175 #X restore 467 394 pd pulse;
robert@322 176 #X obj 366 105 inlet~;
robert@322 177 #X text 295 104 airflow >>;
robert@322 178 #X text 218 118 ('squeeze pressure');
robert@322 179 #X text 13 20 Sound model of a rubber duckie toy;
robert@322 180 #X text 14 51 Hint: use the differential of a continuous signal as
robert@322 181 input for a realistic response;
robert@322 182 #X text 13 29 ==================================;
robert@322 183 #X obj 366 133 lop~ 0.5;
robert@322 184 #X text 423 132 << airflow resistance;
robert@322 185 #X connect 0 0 14 0;
robert@322 186 #X connect 1 0 14 0;
robert@322 187 #X connect 2 0 3 0;
robert@322 188 #X connect 3 0 1 1;
robert@322 189 #X connect 4 0 7 0;
robert@322 190 #X connect 4 0 15 0;
robert@322 191 #X connect 4 0 29 0;
robert@322 192 #X connect 4 0 18 1;
robert@322 193 #X connect 4 0 16 0;
robert@322 194 #X connect 5 0 17 1;
robert@322 195 #X connect 6 0 32 0;
robert@322 196 #X connect 7 0 8 0;
robert@322 197 #X connect 8 0 9 0;
robert@322 198 #X connect 9 0 10 0;
robert@322 199 #X connect 9 0 10 1;
robert@322 200 #X connect 10 0 11 0;
robert@322 201 #X connect 11 0 12 1;
robert@322 202 #X connect 12 0 6 0;
robert@322 203 #X connect 13 0 12 0;
robert@322 204 #X connect 14 0 31 0;
robert@322 205 #X connect 15 0 13 0;
robert@322 206 #X connect 16 0 20 0;
robert@322 207 #X connect 17 0 27 0;
robert@322 208 #X connect 18 0 23 0;
robert@322 209 #X connect 18 0 23 1;
robert@322 210 #X connect 19 0 16 1;
robert@322 211 #X connect 20 0 18 0;
robert@322 212 #X connect 23 0 24 1;
robert@322 213 #X connect 23 0 24 0;
robert@322 214 #X connect 24 0 0 0;
robert@322 215 #X connect 27 0 6 1;
robert@322 216 #X connect 28 0 1 0;
robert@322 217 #X connect 29 0 28 1;
robert@322 218 #X connect 29 0 28 0;
robert@322 219 #X connect 32 0 0 1;
robert@322 220 #X connect 33 0 39 0;
robert@322 221 #X connect 39 0 4 0;
robert@322 222 #X connect 39 0 17 0;
robert@322 223 #X restore 39 127 pd duckie;
robert@322 224 #X obj 39 77 adc~ 10;
robert@322 225 #N canvas 0 22 504 229 differential 0;
robert@322 226 #X obj 27 80 rzero~ 1;
robert@322 227 #X obj 72 57 sig~ 1;
robert@322 228 #X obj 27 152 *~ 44100;
robert@322 229 #X obj 72 131 samplerate~;
robert@322 230 #X obj 72 110 loadbang;
robert@322 231 #X obj 27 25 inlet~;
robert@322 232 #X obj 27 190 outlet~;
robert@322 233 #X text 84 83 y[n] = x[n] - x[n-1];
robert@322 234 #X text 121 57 <<< heavy currently requires signal input to set coefficient
robert@322 235 ;
robert@322 236 #X text 91 151 <<< multiply by samplerate to get velocity;
robert@322 237 #X connect 0 0 2 0;
robert@322 238 #X connect 1 0 0 1;
robert@322 239 #X connect 2 0 6 0;
robert@322 240 #X connect 3 0 2 1;
robert@322 241 #X connect 4 0 3 0;
robert@322 242 #X connect 5 0 0 0;
robert@322 243 #X restore 39 101 pd differential;
robert@322 244 #X connect 6 0 0 0;
robert@322 245 #X connect 6 0 0 1;
robert@322 246 #X connect 7 0 8 0;
robert@322 247 #X connect 8 0 6 0;