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