#N canvas 380 123 971 566 12; #X obj 295 139 tabwrite~ \$0-noise; #X obj 126 431 tabread4~ \$0-noise; #X obj 126 358 phasor~ 1; #X floatatom 203 390 4 0 0 0 - - -; #X obj 126 392 *~; #X obj 203 358 expr sr / $f1; #X obj 295 111 noise~; #X obj 29 169 cnv 15 398 98 empty empty empty 20 12 0 14 -233017 -66577 0; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-noise 44100 float 0; #X coords 0 1 44099 -1 400 100 1 0 0; #X restore 28 169 graph; #X obj 607 276 v sr; #X msg 491 320 0 \$1; #X obj 491 347 tabplay~ \$0-noise, f 8; #X obj 477 280 expr sr / $f1 \; 1000 / $f1; #X text 516 252 Freq; #X floatatom 572 324 5 0 0 0 - - -; #X text 551 323 ms; #X obj 722 335 noise~; #X obj 742 377 *~; #X text 784 231 Freq; #X obj 817 258 expr 1000 / $f1; #X text 797 283 ms; #X msg 817 230 110; #X obj 203 313 nbx 5 16 -1e+37 1e+37 0 0 empty freq empty 0 -8 0 11 -228856 -1 -1 60 256; #X obj 126 473 out~; #X obj 535 436 out~; #X obj 742 441 out~; #X obj 263 111 lb; #X text 132 311 Frequency; #X text 240 390 Period in samples; #X obj 607 253 sr~; #X obj 288 433 initmess \; freq 60; #X text 20 14 The Karplus Strong technique repeats a noise periodically \, which forces a pitch into the signal even in this case. To test it \, let's populate an array with noise and read from it with [phasor~] at a certain frequency (which also defines a period to read from the buffer).; #X obj 477 200 tempo 60 100 -on; #X floatatom 477 252 5 0 0 0 - - -; #X text 473 40 Now [tabplay~] plays a grain whose period in samples depends on a frequency and sends it to a feedback delay line with the same period as the delay time. This grain gets then looped and a feedback parameter sets the decay time.; #X obj 817 201 tempo 60 100 -on; #X obj 817 284 display 6; #X obj 777 324 t b f; #X obj 777 349 timed.gate~; #X obj 742 406 fbdelay~ 10 0.98 -gain; #X obj 535 391 fbdelay~ 25 0.98 -gain, f 11; #X text 628 332 feedback; #X msg 609 355 0.995; #X msg 656 355 0.98; #X msg 578 355 0.8; #X text 474 110 But instead of working with a fixed buffer \, we can work with a live noise input. There are subtle differences because the same grain doesn't get repeated anymore \, which makes it more dynamic. See both below.; #X obj 477 225 rand.i 50 500; #X connect 1 0 23 0; #X connect 1 0 23 1; #X connect 2 0 4 0; #X connect 3 0 4 1; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 0 0; #X connect 10 0 11 0; #X connect 11 0 40 0; #X connect 12 0 10 0; #X connect 12 1 14 0; #X connect 14 0 40 1; #X connect 16 0 17 0; #X connect 17 0 39 0; #X connect 19 0 36 0; #X connect 21 0 19 0; #X connect 22 0 5 0; #X connect 22 0 2 0; #X connect 26 0 0 0; #X connect 29 0 9 0; #X connect 32 0 46 0; #X connect 33 0 12 0; #X connect 35 0 21 0; #X connect 36 0 37 0; #X connect 36 0 39 1; #X connect 37 0 38 0; #X connect 37 1 38 1; #X connect 38 0 17 1; #X connect 39 0 25 1; #X connect 39 0 25 0; #X connect 40 0 24 1; #X connect 40 0 24 0; #X connect 42 0 40 2; #X connect 43 0 40 2; #X connect 44 0 40 2; #X connect 46 0 33 0;