chris@531: #N canvas 826 561 694 734 10; chris@531: #X obj 40 660 dac~ 1 2; robert@464: #X text 33 22 Karplus Strong; robert@464: #X text 33 32 ==============; chris@531: #X obj 40 613 vd~ \$0-wg1; chris@531: #X obj 120 635 lop~ 1000; chris@531: #X obj 120 679 s~ \$0-fb1; chris@531: #X obj 40 286 hip~ 100; chris@531: #X obj 105 345 r~ \$0-fb1; chris@531: #X obj 40 368 delwrite~ \$0-wg1 100; chris@531: #X obj 40 538 *~; chris@531: #X obj 40 560 *~ 10; chris@531: #X text 135 286 <<< centre (i.e. DC block) signal with high-pass filter robert@464: ; chris@531: #X text 126 492 <<< use potentiometer or fader on second analog in robert@464: ; chris@531: #X text 37 190 EXCITATION INPUT:; chris@531: #X text 37 418 DELAY PERIOD:; chris@531: #X text 214 655 <<< and decay here [0-0.9999]; chris@531: #X text 155 307 <<< thresholding to remove any consistent noise in chris@531: the excitation signal; chris@531: #X obj 40 234 adc~ 1; chris@531: #X obj 40 466 sig~ 1; chris@531: #X obj 40 515 -~; chris@531: #X obj 55 491 adc~ 3; chris@531: #X obj 40 582 +~ 2; chris@531: #X text 214 635 <<< set damping here [100-20000]; chris@531: #X obj 120 657 *~ 0.99; chris@531: #X text 126 573 <<< period range between 2-12ms; chris@531: #X text 151 505 to set period (or 'length of string'); chris@531: #X text 36 55 This is an example of simple 'Karplus Strong' synthesis chris@531: ; chris@531: #X text 36 69 which produces a sound resembling a plucked string by chris@531: ; chris@531: #X text 36 84 feeding the filtered output of a delay line back into chris@531: ; chris@531: #X text 36 98 itself. Here we use the left audio input as an excitation chris@531: ; chris@531: #X text 36 112 mechanism for the string. Try connecting a piezo to chris@531: bela's; chris@531: #X text 36 126 audio input and tapping against it. The first analog chris@531: input; chris@531: #X text 36 140 sets the length of the string.; chris@531: #X text 485 15 ............................; chris@531: #X text 485 25 . ____ ._____ _ .......___ .; chris@531: #X text 485 35 .| __ )| ____| |....../ _ |.; chris@531: #X text 485 55 .| |_) | |___| |___ / ___ |.; chris@531: #X text 485 65 .|____/|_____|_____/_/..._|.io; chris@531: #X text 485 75 ............................; chris@531: #X text 485 45 .| __ || __|.| |...../ _| |.; chris@531: #X obj 40 307 gate-xfer 0.1; chris@531: #X text 116 234 <<< use piezo or microphone on left audio channel; chris@531: #X text 140 248 (you can even try hooking up an accelerometer...); chris@531: #X text 37 200 ----------------; chris@531: #X text 37 429 ------------; robert@464: #X connect 3 0 4 0; chris@531: #X connect 3 0 0 0; chris@531: #X connect 3 0 0 1; chris@531: #X connect 4 0 23 0; chris@531: #X connect 6 0 40 0; robert@464: #X connect 7 0 8 0; robert@464: #X connect 9 0 10 0; chris@531: #X connect 10 0 21 0; chris@531: #X connect 17 0 6 0; chris@531: #X connect 18 0 19 0; chris@531: #X connect 19 0 9 1; chris@531: #X connect 19 0 9 0; chris@531: #X connect 20 0 19 1; chris@531: #X connect 21 0 3 0; chris@531: #X connect 23 0 5 0; chris@531: #X connect 40 0 8 0;