From ae6b5d89ea93b95c2990895077cf5e8f0bba9ad9 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 2 Feb 2004 11:28:02 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r1301, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=1302 --- pd/doc/3.audio.examples/G01.delay.pd | 48 +++++ pd/doc/3.audio.examples/G02.delay.loop.pd | 247 ++++------------------ pd/doc/3.audio.examples/G03.delay.variable.pd | 178 ++++++---------- pd/doc/3.audio.examples/G04.control.blocksize.pd | 79 +++++++ pd/doc/3.audio.examples/G05.execution.order.pd | 79 +++++++ pd/doc/3.audio.examples/G06.octave.doubler.pd | 114 ++++++++++ pd/doc/3.audio.examples/G07.shaker.pd | 80 +++++++ pd/doc/3.audio.examples/G08.reverb.pd | 253 +++++++++++++++++++++++ pd/doc/3.audio.examples/G09.pitchshift.pd | 162 +++++++++++++++ pd/doc/3.audio.examples/K06.triangle.pd | 169 +++++++++++++++ 10 files changed, 1086 insertions(+), 323 deletions(-) create mode 100644 pd/doc/3.audio.examples/G01.delay.pd create mode 100644 pd/doc/3.audio.examples/G04.control.blocksize.pd create mode 100644 pd/doc/3.audio.examples/G05.execution.order.pd create mode 100644 pd/doc/3.audio.examples/G06.octave.doubler.pd create mode 100644 pd/doc/3.audio.examples/G07.shaker.pd create mode 100644 pd/doc/3.audio.examples/G08.reverb.pd create mode 100644 pd/doc/3.audio.examples/G09.pitchshift.pd create mode 100644 pd/doc/3.audio.examples/K06.triangle.pd (limited to 'pd/doc/3.audio.examples') diff --git a/pd/doc/3.audio.examples/G01.delay.pd b/pd/doc/3.audio.examples/G01.delay.pd new file mode 100644 index 00000000..6b03ed12 --- /dev/null +++ b/pd/doc/3.audio.examples/G01.delay.pd @@ -0,0 +1,48 @@ +#N canvas 19 35 777 377 12; +#X text 103 7 DELAYS; +#X text 248 79 The delwrite~ object creates the delay line \; you give +it a name and a size in milliseconds. Each delwrite~ should have a +different name.; +#N canvas 0 0 548 248 sample 0; +#N canvas 0 0 450 300 graph1 0; +#X array G01-tab 61079 float 0; +#X coords 0 1 61078 -1 200 140 1; +#X restore 100 20 graph; +#X obj 61 176 loadbang; +#X obj 60 221 soundfiler; +#X msg 61 199 read -resize ../sound/voice.wav G01-tab; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X restore 253 337 pd sample; +#X floatatom 38 196 4 0 999 0 - - -; +#X text 81 195 <-- delay time; +#X text 46 230 read from delay line; +#X obj 38 249 delread~ delay1; +#X obj 14 87 tabplay~ G01-tab; +#X obj 14 63 metro 1000; +#X obj 14 39 loadbang; +#X text 40 146 write to delay line; +#X obj 16 303 output~; +#X obj 15 275 +~; +#X obj 24 165 delwrite~ delay1 1000; +#X text 499 348 updated for Pd version 0.37-1; +#X text 248 24 You can delay a signal using the delwrite~ and delread~ +objects. In this example \, a sample loops continuously and is added +to a delayed copy of itself.; +#X text 247 215 The delread~ object always delays the signal an integer +number of samples and does no interpolation.; +#X text 28 107 test signal to delay; +#X text 248 130 Delread~'s arguments are the name of a delwrite (of +which there should be exactly one) and an optional delay time in milliseconds +between 0 and the length of the delay line. Each delwrite~ may have +as many delread~s as you wish \, which can then function as multiple +delay taps.; +#X text 114 209 (msec); +#X connect 3 0 6 0; +#X connect 6 0 12 1; +#X connect 7 0 12 0; +#X connect 7 0 13 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 12 0 11 0; +#X connect 12 0 11 1; diff --git a/pd/doc/3.audio.examples/G02.delay.loop.pd b/pd/doc/3.audio.examples/G02.delay.loop.pd index 71b35253..ba355b7c 100644 --- a/pd/doc/3.audio.examples/G02.delay.loop.pd +++ b/pd/doc/3.audio.examples/G02.delay.loop.pd @@ -1,213 +1,44 @@ -#N canvas 22 1 630 601 12; -#X text 309 531 updated for Pd version 0.26; -#X floatatom 58 505 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 29 533 pd output; -#X msg 87 505 MUTE; -#X text 126 504 <-- output amplitude; -#X obj 29 476 hip~ 5; -#X obj 29 297 -~; -#X obj 29 273 *~ 3; -#X obj 66 279 *~ 2; -#X floatatom 29 177 0 0 0; -#X obj 29 249 clip~ 0 0.667; -#X obj 39 450 delwrite~ delay1 2000; -#X floatatom 45 353 0 0 0; -#X text 79 176 <-- pitch; -#X text 75 352 <-- delay time; -#X text 238 450 write to delay line; -#X text 226 378 read from delay line; -#X text 64 426 add the original and the delayed signal; -#X obj 29 201 mtof; -#X msg 135 238 1; -#X obj 29 321 *~; -#X obj 29 225 phasor~ 0; -#X obj 135 286 tabread4~ dbtorms; -#X obj 135 262 adsr 100 100 2000 0 2000; -#X obj 29 427 +~; -#X obj 45 377 delread~ delay1 160; -#X obj 45 401 *~ 0.7; -#X text 103 401 feedback gain; +#N canvas 130 225 601 527 12; +#X floatatom 36 197 5 -30 130 0 - - -; +#X floatatom 58 322 0 0 0 0 - - -; +#X text 88 196 <-- pitch; +#X text 88 321 <-- delay time; +#X text 287 420 write to delay line; +#X text 246 346 read from delay line; +#X text 72 393 add the original and the delayed signal; +#X obj 36 233 mtof; +#X msg 111 233 1; +#X obj 37 282 *~; +#X obj 37 394 +~; +#X obj 58 370 *~ 0.7; +#X text 116 370 feedback gain; #X text 57 9 DELAYS WITH FEEDBACK; #X text 33 39 You can feed the result of a delread~ module back into its own delwrite~ \, as long as you're careful about stability. For -delays below 30 msec \, you can frequently hear teh resonant pitch. +delays below 30 msec \, you can frequently hear the resonant pitch. For longer delay times you get the famous old delay loop effect.; -#X text 32 118 We've added an amplitude control here so that teh test +#X obj 111 281 *~; +#X obj 111 257 adsr 1 100 1000 0 1000; +#X obj 37 463 output~; +#X text 32 118 We've added an amplitude control here so that the test oscillator only speaks while you're dragging the pitch up and down. -Be sure to try the shift key.; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 334 483 pd conversion-tables; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 2 0; -#X connect 6 0 20 0; -#X connect 7 0 6 0; -#X connect 8 0 6 1; -#X connect 9 0 18 0; -#X connect 9 0 19 0; -#X connect 10 0 7 0; -#X connect 12 0 25 0; -#X connect 18 0 21 0; -#X connect 19 0 23 0; -#X connect 20 0 24 0; -#X connect 21 0 8 0; -#X connect 21 0 10 0; -#X connect 22 0 20 1; -#X connect 23 0 22 0; -#X connect 24 0 11 0; -#X connect 24 0 5 0; -#X connect 25 0 26 0; -#X connect 26 0 24 1; +Be sure to try shift-dragging on the pitch control.; +#X text 330 495 updated for Pd version 0.37-1; +#X obj 36 257 phasor~; +#X obj 58 346 delread~ G02-del 160; +#X obj 77 419 delwrite~ G02-del 2000; +#X connect 0 0 7 0; +#X connect 0 0 8 0; +#X connect 1 0 21 0; +#X connect 7 0 20 0; +#X connect 8 0 16 0; +#X connect 9 0 10 0; +#X connect 10 0 17 0; +#X connect 10 0 17 1; +#X connect 10 0 22 0; +#X connect 11 0 10 1; +#X connect 15 0 9 1; +#X connect 16 0 15 0; +#X connect 16 0 15 1; +#X connect 20 0 9 0; +#X connect 21 0 11 0; diff --git a/pd/doc/3.audio.examples/G03.delay.variable.pd b/pd/doc/3.audio.examples/G03.delay.variable.pd index bb16de95..c2ece553 100644 --- a/pd/doc/3.audio.examples/G03.delay.variable.pd +++ b/pd/doc/3.audio.examples/G03.delay.variable.pd @@ -1,105 +1,55 @@ -#N canvas 100 17 671 522 12; -#X obj 63 306 hip~ 10; -#X floatatom 331 222; -#X obj 331 270 line~; -#X obj 331 246 pack 0 100; -#X floatatom 256 192; -#X floatatom 442 297; -#X obj 442 369 line~; -#X obj 442 345 pack 0 100; -#X obj 442 321 * 0.01; -#X floatatom 143 167; -#X obj 143 238 line~; -#X obj 143 214 pack 0 100; -#X obj 63 258 *~; -#X obj 63 282 cos~; -#X floatatom 63 135; -#X obj 63 159 mtof; -#X obj 63 183 * 0.5; -#X obj 63 330 clip~ -0.2 0.2; -#X obj 143 190 * 0.01; -#X obj 426 444 delwrite~ delay1 1000; -#X obj 63 354 +~; -#X obj 426 396 *~; -#X obj 256 336 vd~ delay1; -#X obj 256 288 *~; -#X obj 256 216 / 100; -#X floatatom 93 419; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 64 447 pd output; -#X msg 122 419 MUTE; -#X text 161 418 <-- output amplitude; -#X obj 63 378 hip~ 5; -#X text 401 505 updated for Pd version 0.26; -#X obj 256 264 +~ 1; -#X obj 256 240 osc~ 0; -#X obj 256 312 +~ 1.46; -#X obj 426 420 clip~ -5 5; -#X text 43 35 This is a fuzzed FM generator going into a delay loop \, this time using a variable delay object (vd~). You can get several interesting effects this way. We have taken the precaution if clipping inside the loop to avoid instabilities. You can push the loop gain past 1 if you want \, it will just uscillate.; -#X text 184 165 <-- timbre; -#X text 96 136 <-- pitch; -#X text 300 192 <-- cycle frequency (hundredths); -#X text 361 222 <-- cycle depth (msec); -#X text 491 298 <-- feedback (hundredths); -#X text 86 9 VARIABLE DELAYS; -#X obj 63 207 osc~ 0; +#N canvas 100 17 660 504 12; +#X obj 33 305 hip~ 10; +#X floatatom 301 221 0 0 0 0 - - -; +#X obj 301 269 line~; +#X obj 301 245 pack 0 100; +#X floatatom 226 191 0 0 0 0 - - -; +#X floatatom 382 297 0 0 0 0 - - -; +#X obj 382 369 line~; +#X obj 382 345 pack 0 100; +#X obj 382 321 * 0.01; +#X floatatom 113 166 0 0 0 0 - - -; +#X obj 113 237 line~; +#X obj 113 213 pack 0 100; +#X obj 33 257 *~; +#X obj 33 281 cos~; +#X floatatom 33 134 0 0 0 0 - - -; +#X obj 33 158 mtof; +#X obj 33 182 * 0.5; +#X obj 33 329 clip~ -0.2 0.2; +#X obj 113 189 * 0.01; +#X obj 33 353 +~; +#X obj 361 395 *~; +#X obj 226 287 *~; +#X obj 226 215 / 100; +#X obj 33 377 hip~ 5; +#X obj 226 263 +~ 1; +#X obj 226 239 osc~ 0; +#X obj 226 311 +~ 1.46; +#X text 154 164 <-- timbre; +#X text 66 135 <-- pitch; +#X text 279 191 <-- cycle frequency (hundredths); +#X text 354 222 <-- cycle depth (msec); +#X text 431 298 <-- feedback (hundredths); +#X text 89 6 VARIABLE DELAYS; +#X obj 33 206 osc~ 0; +#X text 46 32 This is a fuzzed FM generator going into a delay loop +\, this time using a variable delay object (vd~). You can get several +interesting effects this way. We have taken the precaution of clipping +inside the loop to avoid instabilities. You can push the loop gain +past 1 if you want \, it will just oscillate.; +#X obj 32 409 output~; +#X obj 226 335 vd~ G03-del; +#X obj 361 443 delwrite~ G03-del 1000; +#X obj 361 419 clip~ -1 1; +#X text 387 481 updated for Pd version 0.37-1; #X connect 0 0 17 0; #X connect 1 0 3 0; -#X connect 2 0 23 1; +#X connect 2 0 21 1; #X connect 3 0 2 0; -#X connect 4 0 24 0; +#X connect 4 0 22 0; #X connect 5 0 8 0; -#X connect 6 0 21 1; +#X connect 6 0 20 1; #X connect 7 0 6 0; #X connect 8 0 7 0; #X connect 9 0 18 0; @@ -109,21 +59,19 @@ #X connect 13 0 0 0; #X connect 14 0 15 0; #X connect 15 0 16 0; -#X connect 16 0 42 0; -#X connect 17 0 20 0; +#X connect 16 0 33 0; +#X connect 17 0 19 0; #X connect 18 0 11 0; -#X connect 20 0 29 0; -#X connect 21 0 34 0; -#X connect 22 0 20 1; -#X connect 23 0 33 0; -#X connect 24 0 32 0; -#X connect 25 0 26 1; -#X connect 26 0 25 0; -#X connect 27 0 26 2; -#X connect 29 0 26 0; -#X connect 29 0 21 0; -#X connect 31 0 23 0; -#X connect 32 0 31 0; -#X connect 33 0 22 0; -#X connect 34 0 19 0; -#X connect 42 0 12 0; +#X connect 19 0 23 0; +#X connect 20 0 38 0; +#X connect 21 0 26 0; +#X connect 22 0 25 0; +#X connect 23 0 20 0; +#X connect 23 0 35 0; +#X connect 23 0 35 1; +#X connect 24 0 21 0; +#X connect 25 0 24 0; +#X connect 26 0 36 0; +#X connect 33 0 12 0; +#X connect 36 0 19 1; +#X connect 38 0 37 0; diff --git a/pd/doc/3.audio.examples/G04.control.blocksize.pd b/pd/doc/3.audio.examples/G04.control.blocksize.pd new file mode 100644 index 00000000..efae501a --- /dev/null +++ b/pd/doc/3.audio.examples/G04.control.blocksize.pd @@ -0,0 +1,79 @@ +#N canvas 100 17 637 513 12; +#N canvas 195 311 647 354 delay-writer 0; +#X obj 86 220 inlet~; +#X obj 86 326 outlet~; +#X obj 392 197 block~ 1; +#X obj 164 267 *~ 0.99; +#X obj 87 272 +~; +#X obj 165 221 inlet; +#X text 80 7 Because of the feedback \, the delwrite~ has to be computed +after the delread~. So we set the blocksize to 1 to minimize the resulting +delay.; +#X text 390 219 this object sets the; +#X text 389 236 block size for audio; +#X text 388 255 computations in this; +#X obj 165 244 delread~ G04-del; +#X obj 98 302 delwrite~ G04-del 1000; +#X text 79 183 incoming; +#X text 81 198 pulses; +#X text 165 182 delay; +#X text 166 197 time; +#X text 388 273 window. Must be a; +#X text 388 292 power of two.; +#X text 77 60 The smaller the blocksize the more expensive the computations +are \, so don't reduce it lower than you have to. Also \, it's a good +idea to isolate the portion of the patch that requires the smaller +block size \, and only run that portion that way. Here \, the pulses +that excite the delay line are computed outside this window \, and +the output level control as well.; +#X connect 0 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 4 0 11 0; +#X connect 5 0 10 0; +#X connect 10 0 3 0; +#X restore 153 420 pd delay-writer; +#X obj 283 384 expr 1000/$f1; +#X obj 283 358 mtof; +#X msg 153 355 1; +#X msg 192 355 0; +#X obj 153 254 metro 500; +#X obj 283 304 random 60; +#X obj 153 228 loadbang; +#X obj 283 330 + 30; +#X text 86 9 CONTROLLING DELAY WITH BLOCK~; +#X text 299 420 <-- here is the delay loop; +#X text 63 43 In situations where a delay read feeds back to a delay +write \, the minimum possible delay you can achieve is one block \, +which by default is 64 samples \, or 1.45 msec at 44100 Hz. You can +shorten the minimum delay by changing the block size. Do this in a +subpatch (open it to see how).; +#X obj 153 449 output~; +#X obj 153 387 vline~; +#X text 371 487 updated for Pd version 0.37-1; +#X text 61 124 Here we use this principle to make a harpisichord-like +sound by sending pulses into a recirculating delay line (which imitates +the travel of the wave up and down the harpsichord string.) This is +related to Karplus-Strong synthesis \, but the idea is probably much +older than their paper.; +#X text 33 328 this makes; +#X text 32 346 a rectangular; +#X text 31 384 long.; +#X text 409 366 length of delay line is; +#X text 410 384 1000/(frequency); +#X obj 192 329 del 1; +#X text 32 364 pulse 1 msec; +#X connect 0 0 12 0; +#X connect 0 0 12 1; +#X connect 1 0 0 1; +#X connect 2 0 1 0; +#X connect 3 0 13 0; +#X connect 4 0 13 0; +#X connect 5 0 3 0; +#X connect 5 0 6 0; +#X connect 5 0 21 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 2 0; +#X connect 13 0 0 0; +#X connect 21 0 4 0; diff --git a/pd/doc/3.audio.examples/G05.execution.order.pd b/pd/doc/3.audio.examples/G05.execution.order.pd new file mode 100644 index 00000000..d50c97a9 --- /dev/null +++ b/pd/doc/3.audio.examples/G05.execution.order.pd @@ -0,0 +1,79 @@ +#N canvas 100 17 683 605 12; +#X floatatom 424 290 0 0 100 0 - - -; +#X obj 59 404 +~; +#X text 86 9 ORDER OF EXECUTION OF DELWRITE~ AND DELREAD~/VD~; +#X text 42 29 If you're writing to and reading from a delay line \, +you have to get the write sorted before the read or else you'll never +get less than a block's delay. This patch compares a "wrong" flanger +with a "right" one:; +#X text 471 284 <-- delay in samples; +#X obj 94 490 *~; +#X obj 94 466 -~; +#N canvas 0 0 600 400 delay-writer 0; +#X obj 96 107 inlet~; +#X obj 96 180 outlet~; +#X obj 116 144 delwrite~ G05-d2 1000; +#X connect 0 0 1 0; +#X connect 0 0 2 0; +#X restore 283 403 pd delay-writer; +#N canvas 0 0 280 330 delay-reader 0; +#X obj 96 107 inlet~; +#X obj 89 267 outlet~; +#X obj 112 163 inlet~; +#X obj 89 237 +~; +#X obj 112 198 vd~ G05-d2; +#X connect 0 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 4 0 3 1; +#X restore 282 431 pd delay-reader; +#X obj 59 490 +~; +#X obj 424 313 / 44.1; +#X obj 59 534 output~; +#X obj 135 490 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 159 490 <-- off to hear left-hand side \; on to hear right +hand side.; +#X text 393 575 updated for Pd version 0.37-1; +#X obj 424 337 pack 0 30; +#N canvas 0 0 450 300 pulse 0; +#X obj 64 197 outlet~; +#X obj 63 93 phasor~ 50; +#X obj 63 119 *~ 100; +#X obj 63 144 clip~ 0.75 1.25; +#X obj 64 170 cos~; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X restore 60 302 pd pulse; +#X obj 81 354 delwrite~ G05-d1 1000; +#X obj 82 381 vd~ G05-d1; +#X obj 424 362 line~; +#X text 44 96 To get them to go off in the correct order \, put the +delread~ and vd~ objects in subpatches. The audio connections between +the subpatches force the "reader" to be sorted after the "writer". +DSP sorting in Pd follows the hierarchy of subpatches.; +#X text 43 175 To hear the difference scroll the delay time between +0 and 100 samples. The patch at left doesn't let you get below 64 samples +\, but the patch at right can go all the way down to one sample.; +#X text 45 241 You can use the same strategy to avoid picking up unwanted +64-sample delays in send~/receive~ and throw~/catch~ pairs.; +#X connect 0 0 10 0; +#X connect 1 0 6 1; +#X connect 1 0 9 0; +#X connect 5 0 9 1; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 6 0; +#X connect 9 0 11 0; +#X connect 9 0 11 1; +#X connect 10 0 15 0; +#X connect 12 0 5 1; +#X connect 15 0 19 0; +#X connect 16 0 1 0; +#X connect 16 0 7 0; +#X connect 16 0 17 0; +#X connect 18 0 1 1; +#X connect 19 0 8 1; +#X connect 19 0 18 0; diff --git a/pd/doc/3.audio.examples/G06.octave.doubler.pd b/pd/doc/3.audio.examples/G06.octave.doubler.pd new file mode 100644 index 00000000..a95fe24e --- /dev/null +++ b/pd/doc/3.audio.examples/G06.octave.doubler.pd @@ -0,0 +1,114 @@ +#N canvas 110 17 775 614 12; +#X obj 463 303 loadbang; +#X obj 553 222 adc~ 1; +#X obj 463 358 soundfiler; +#X obj 31 394 output~; +#X obj 554 269 tabwrite~ E03-table; +#X msg 463 330 read ../sound/voice.wav E03-table; +#X obj 58 83 fiddle~ 2048; +#X obj 126 106 unpack; +#X obj 126 130 moses 1; +#X obj 199 108 mtof; +#N canvas 0 0 446 202 /SUBPATCH/ 0; +#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 100 20 inlet~; +#X obj 99 87 *~; +#X obj 98 159 outlet~; +#X text 381 181 corner; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X coords 0 0 100 100 40 18 1; +#X restore 77 329 pd; +#N canvas 0 0 446 202 /SUBPATCH/ 0; +#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 100 20 inlet~; +#X obj 99 87 *~; +#X obj 98 159 outlet~; +#X text 381 181 corner; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X coords 0 0 100 100 40 18 1; +#X restore 31 329 pd; +#N canvas 414 195 613 302 looper 0; +#N canvas 0 0 450 300 graph1 0; +#X array E03-table 44103 float 0; +#X coords 0 1.02 44103 -1.02 200 130 1; +#X restore 349 22 graph; +#X text 347 161 ---- 44103 samples ----; +#X obj 35 77 +~ 1; +#X obj 35 25 phasor~ 1; +#X obj 35 50 *~ 44100; +#X obj 35 106 tabread4~ E03-table; +#X obj 35 132 outlet~; +#X text 46 238 one-second sample reader loop. You can replace this +with an adc~ if you want to go live.; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X restore 31 30 pd looper; +#X text 547 309 re-read original sample; +#X obj 565 246 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 584 244 <-- record a sample; +#X text 152 314 on/off for original; +#X text 123 330 <--and processed sounds; +#X text 240 3 OCTAVE DOUBLING VIA VARIABLE COMB FILTER; +#X obj 31 367 +~; +#X obj 252 157 samplerate~; +#X obj 199 156 t f b; +#X obj 59 58 delwrite~ G06-del 100; +#X obj 79 234 delread~ G06-del; +#X obj 101 282 vd~ G06-del; +#X obj 78 306 +~; +#X obj 230 210 +; +#X obj 199 131 expr 500/$f1; +#X obj 230 262 line~; +#X obj 230 239 pack 0 20; +#X text 243 108 fundamental frequency; +#X text 311 131 1/2 period \, in msec; +#X text 286 201 estimate fiddle~ delay; +#X text 491 592 updated for Pd version 0.37-1; +#X text 159 401 We already saw how to use ring modulation to alias +a pitched sound down one octave. Here we do the reverse: filter out +all odd harmonics using a variable-delay comb filter tuned one octave +above the incoming sound. We use two taps into the delay line. The +fixed one (delread~) adjusts for the delayed output of fiddle~. The +variable one (vd~) adds to this an additional delay equal to 1/2 the +measured period of the incoming sound. THese two are added. Odd harmonics +are 180 degrees out of phase at the two taps and cancel. Even harmonics +get through - so the sound goes up an octave \, without denaturing +the timbre as a speed-up would.; +#X obj 252 183 expr 2048000/$f1; +#X text 288 216 as one window (in msec); +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 5 0 2 0; +#X connect 6 2 7 0; +#X connect 7 0 8 0; +#X connect 8 1 9 0; +#X connect 9 0 27 0; +#X connect 10 0 19 1; +#X connect 11 0 19 0; +#X connect 12 0 6 0; +#X connect 12 0 11 0; +#X connect 12 0 22 0; +#X connect 14 0 4 0; +#X connect 19 0 3 0; +#X connect 19 0 3 1; +#X connect 20 0 35 0; +#X connect 21 0 26 0; +#X connect 21 1 20 0; +#X connect 23 0 25 0; +#X connect 24 0 25 1; +#X connect 25 0 10 0; +#X connect 26 0 29 0; +#X connect 27 0 21 0; +#X connect 28 0 24 0; +#X connect 29 0 28 0; +#X connect 35 0 26 1; +#X connect 35 0 23 0; diff --git a/pd/doc/3.audio.examples/G07.shaker.pd b/pd/doc/3.audio.examples/G07.shaker.pd new file mode 100644 index 00000000..1da97e8e --- /dev/null +++ b/pd/doc/3.audio.examples/G07.shaker.pd @@ -0,0 +1,80 @@ +#N canvas 159 89 808 531 12; +#X obj 21 438 output~; +#X obj 21 411 +~; +#X obj 33 192 delwrite~ G07-del 30; +#X obj 99 391 line~; +#X obj 63 391 *~; +#X obj 93 335 line~; +#X obj 57 335 *~; +#X obj 80 281 line~; +#X obj 44 281 *~; +#X obj 58 221 line~; +#X obj 22 221 *~; +#X text 51 8 THE "SHAKER"; +#X obj 279 86 + 1; +#X obj 279 109 mod 4; +#X obj 244 83 f; +#X obj 284 160 random 1000; +#X obj 244 135 t f b; +#X obj 244 37 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X floatatom 347 34 5 10 1000 0 - - -; +#X obj 244 242 route 0 1 2 3; +#X obj 44 255 delread~ G07-del 30; +#X obj 23 165 phasor~ 80; +#X obj 57 309 delread~ G07-del 17; +#X obj 63 365 delread~ G07-del 11; +#X obj 347 59 * 4; +#X obj 284 187 expr 2 * $f1/1000 - 0.7; +#X floatatom 23 142 5 30 1000 0 - - -; +#X obj 244 58 metro 50; +#X obj 244 218 pack 0 0 200; +#X text 23 118 frequency; +#X text 225 17 on/off; +#X text 344 13 time constant (msec); +#X text 536 511 updated for Pd version 0.37-1; +#X text 266 306 This is a time-varying comb filter \, combining four +delayed copies of the input signal. The amplitude of each delayed copy +varies randomly between -0.7 and +1.3. Each time the metronome goes +off \, one of the four delay's gains is changed in sequence. The change +occurs over the next four ticks of the metronome (so \, if the metronome +ticks every 50 msec \, each message to a line~ has a second argument +of 200.); +#X text 268 424 Any collection of four gains for the four delayed copies +of the signal (including the original) defines some sort of irregular +comb filter. The peaks and valleys of the comb filter shift constantly +as the gains change to new \, random values.; +#X connect 1 0 0 0; +#X connect 1 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 1 1; +#X connect 5 0 6 1; +#X connect 6 0 1 1; +#X connect 7 0 8 1; +#X connect 8 0 1 1; +#X connect 9 0 10 1; +#X connect 10 0 1 0; +#X connect 12 0 13 0; +#X connect 13 0 14 1; +#X connect 14 0 12 0; +#X connect 14 0 16 0; +#X connect 15 0 25 0; +#X connect 16 0 28 0; +#X connect 16 1 15 0; +#X connect 17 0 27 0; +#X connect 18 0 24 0; +#X connect 18 0 27 1; +#X connect 19 0 9 0; +#X connect 19 1 7 0; +#X connect 19 2 5 0; +#X connect 19 3 3 0; +#X connect 20 0 8 0; +#X connect 21 0 2 0; +#X connect 21 0 10 0; +#X connect 22 0 6 0; +#X connect 23 0 4 0; +#X connect 24 0 28 2; +#X connect 25 0 28 1; +#X connect 26 0 21 0; +#X connect 27 0 14 0; +#X connect 28 0 19 0; diff --git a/pd/doc/3.audio.examples/G08.reverb.pd b/pd/doc/3.audio.examples/G08.reverb.pd new file mode 100644 index 00000000..09941436 --- /dev/null +++ b/pd/doc/3.audio.examples/G08.reverb.pd @@ -0,0 +1,253 @@ +#N canvas 390 121 616 352 12; +#N canvas 0 0 499 321 test-input 0; +#X obj 75 253 outlet~; +#X obj 74 201 -~; +#X obj 74 177 *~ 3; +#X obj 111 183 *~ 2; +#X floatatom 74 81 0 0 0 0 - - -; +#X obj 74 153 clip~ 0 0.667; +#X text 124 80 <-- pitch; +#X obj 74 105 mtof; +#X msg 195 142 1; +#X obj 74 225 *~; +#X obj 74 129 phasor~ 0; +#X obj 195 190 tabread4~ dbtorms; +#X obj 195 166 adsr 100 100 2000 0 2000; +#X obj 73 54 inlet; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 260 101 pd conversion-tables; +#X connect 1 0 9 0; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 7 0; +#X connect 4 0 8 0; +#X connect 5 0 2 0; +#X connect 7 0 10 0; +#X connect 8 0 12 0; +#X connect 9 0 0 0; +#X connect 10 0 3 0; +#X connect 10 0 5 0; +#X connect 11 0 9 1; +#X connect 12 0 11 0; +#X connect 13 0 4 0; +#X restore 39 114 pd test-input; +#X text 135 6 REVERBERATOR; +#X floatatom 39 87 0 10 130 0 - - -; +#X text 76 87 <-- pitch; +#N canvas 96 169 958 610 reverb 0; +#X obj 13 19 inlet~; +#X obj 13 43 reverb-echo echo-del1 5.43216; +#X obj 277 215 +~; +#X obj 319 215 +~; +#X obj 67 276 outlet~; +#X obj 137 276 outlet~; +#X obj 238 334 +~; +#X obj 347 335 +~; +#X obj 280 334 -~; +#X obj 387 334 -~; +#X obj 237 390 +~; +#X obj 281 391 +~; +#X obj 325 392 -~; +#X obj 364 392 -~; +#X obj 324 474 *~ 0; +#X obj 282 473 *~ 0; +#X obj 237 472 *~ 0; +#X obj 365 475 *~ 0; +#X obj 632 365 inlet; +#X obj 632 437 / 200; +#X obj 632 389 min 100; +#X obj 632 412 max 0; +#X obj 238 583 delwrite~ loop-del1 60; +#X obj 283 561 delwrite~ loop-del2 71.9345; +#X obj 364 515 delwrite~ loop-del4 95.945; +#X obj 298 154 delread~ loop-del1 60; +#X obj 340 179 delread~ loop-del2 71.9345; +#X obj 408 233 delread~ loop-del4 95.945; +#X obj 386 208 delread~ loop-del3 86.7545; +#X obj 325 538 delwrite~ loop-del3 86.7545; +#X obj 13 67 reverb-echo echo-del2 8.45346; +#X obj 13 91 reverb-echo echo-del3 13.4367; +#X obj 13 115 reverb-echo echo-del4 21.5463; +#X obj 13 139 reverb-echo echo-del5 34.3876; +#X obj 13 163 reverb-echo echo-del6 55.5437; +#X text 286 42 "early echo" generators \, which also increase echo +density. Open one to see what they do.; +#X text 300 115 Get the outputs of the recirculating delays. Add the +inputs to two of them.; +#X text 420 313 Do a power-conserving mix of them in pairs. First combine +(1 \, 2) and (3 \, 4)...; +#X text 402 385 ...then (1 \, 3) and (2 \, 4); +#X text 446 469 The two mixing stages have a combined gain of 2 \, +so the recirculation gain is limited to 0.5.; +#X text 586 542 Put the signals back into the; +#X text 584 557 recirculating delays.; +#X text 29 296 Tap outputs from here.; +#X text 708 381 0 to 100 to control reverb; +#X text 719 396 time.; +#X text 691 364 feedback gain on a scale of; +#X connect 0 0 1 0; +#X connect 1 0 30 0; +#X connect 1 1 30 1; +#X connect 2 0 4 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 3 0 6 1; +#X connect 3 0 8 1; +#X connect 6 0 10 0; +#X connect 6 0 12 0; +#X connect 7 0 12 1; +#X connect 7 0 10 1; +#X connect 8 0 11 0; +#X connect 8 0 13 0; +#X connect 9 0 11 1; +#X connect 9 0 13 1; +#X connect 10 0 16 0; +#X connect 11 0 15 0; +#X connect 12 0 14 0; +#X connect 13 0 17 0; +#X connect 14 0 29 0; +#X connect 15 0 23 0; +#X connect 16 0 22 0; +#X connect 17 0 24 0; +#X connect 18 0 20 0; +#X connect 19 0 17 1; +#X connect 19 0 16 1; +#X connect 19 0 15 1; +#X connect 19 0 14 1; +#X connect 20 0 21 0; +#X connect 21 0 19 0; +#X connect 25 0 2 1; +#X connect 26 0 3 1; +#X connect 27 0 7 1; +#X connect 27 0 9 1; +#X connect 28 0 7 0; +#X connect 28 0 9 0; +#X connect 30 0 31 0; +#X connect 30 1 31 1; +#X connect 31 0 32 0; +#X connect 31 1 32 1; +#X connect 32 0 33 0; +#X connect 32 1 33 1; +#X connect 33 0 34 0; +#X connect 33 1 34 1; +#X connect 34 0 2 0; +#X connect 34 1 3 0; +#X restore 58 179 pd reverb; +#X floatatom 134 155 0 0 100 0 - - -; +#X text 169 155 <-- feedback (100 maximum); +#X obj 38 206 output~; +#X text 342 317 updated for Pd version 0.37-1; +#X text 149 180 <-- open to see how it works; +#X text 34 269 Many improvements are possible. Much better reverberators +can be found in the "extras" library.; +#X text 29 30 Here is a simple recirculating reverberator. "Feedback" +should be between 0 and 100 - if 100 \, the reverberation lasts forever. +; +#X connect 0 0 4 0; +#X connect 0 0 7 0; +#X connect 2 0 0 0; +#X connect 4 0 7 0; +#X connect 4 1 7 1; +#X connect 5 0 4 1; diff --git a/pd/doc/3.audio.examples/G09.pitchshift.pd b/pd/doc/3.audio.examples/G09.pitchshift.pd new file mode 100644 index 00000000..f0122b1b --- /dev/null +++ b/pd/doc/3.audio.examples/G09.pitchshift.pd @@ -0,0 +1,162 @@ +#N canvas 93 36 964 554 12; +#X floatatom 19 87 0 0 0 0 - - -; +#X obj 82 358 *~; +#X obj 205 295 line~; +#X floatatom 237 112 0 0 0 0 - - -; +#X text 68 9 PITCH SHIFTER; +#X obj 205 269 pack 0 200; +#X obj 237 86 r window; +#X obj 19 61 r transpose; +#X obj 19 143 exp; +#X floatatom 19 169 6 0 0 0 - - -; +#X obj 19 259 /; +#X obj 146 189 * 0.001; +#X obj 314 365 line~; +#X obj 314 340 pack 0 200; +#X floatatom 314 289 0 0 0 0 - - -; +#X obj 314 263 r delay; +#X obj 82 384 +~; +#X obj 19 410 cos~; +#X obj 19 437 *~; +#X obj 19 466 +~; +#X obj 106 317 wrap~; +#X obj 251 360 *~; +#X obj 251 393 +~; +#X obj 188 420 cos~; +#X obj 188 447 *~; +#X msg 492 56 \; transpose 0 \; window 100 \; delay 0; +#X obj 492 30 loadbang; +#X obj 264 42 delwrite~ delay1 5000; +#X obj 146 216 t b f; +#X floatatom 19 285 6 0 0 0 - - -; +#X obj 106 290 +~ 0.5; +#X obj 19 358 -~ 0.5; +#X obj 19 384 *~ 0.5; +#X obj 188 359 -~ 0.5; +#X obj 188 392 *~ 0.5; +#X obj 19 196 - 1; +#X obj 19 117 * 0.05776; +#X obj 19 222 * -1; +#X text 53 86 <-- transposition; +#X text 96 99 (halftones); +#X text 82 163 speed; +#X text 81 177 change; +#X text 281 111 <--window (msec); +#X text 54 252 tape head; +#N canvas 0 0 612 637 test-input 0; +#N canvas 0 0 450 300 graph1 0; +#X array array1 155948 float 0; +#X coords 0 1 155947 -1 200 150 1; +#X restore 150 141 graph; +#X obj 139 518 tabread4~ array1; +#X obj 139 333 r totsamps; +#X obj 139 413 /; +#X obj 139 465 *~ 0; +#X obj 139 439 phasor~ 0; +#X obj 139 492 +~ 1; +#X msg 139 386 44100; +#X obj 139 360 t b f; +#X obj 182 469 r totsamps; +#X text 153 538 sample loop for; +#X text 153 555 test signal; +#X obj 162 30 loadbang; +#X obj 139 590 outlet~; +#X obj 393 169 r readfile; +#X obj 393 199 symbol; +#X msg 392 228 read -resize \$1 array1; +#X obj 392 256 soundfiler; +#X obj 392 284 s totsamps; +#X msg 161 64 \; readfile ../sound/bell.aiff; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 3 0; +#X connect 8 0 7 0; +#X connect 8 1 3 1; +#X connect 9 0 4 1; +#X connect 12 0 19 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X restore 264 11 pd test-input; +#X text 425 153 This is a classic rotating-tape-head style pitch shifter +using the vd~ variable delay object. Ther are two moving tape heads +\, each of which is loudest at the middle of its trajectory \, and +enveloped out at the moment it has to jump back (or forward) to start +another scratch. Most of the brain work is in computing how fast the +tape heads have to move to get the desired transposition.; +#X text 425 272 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 423 362 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 422 454 The cos~ objects compute the fadein and fadeout of +the two delay line outputs. They each traverse the positive half of +the cosine waveform (phase -0.25 to +0.25) over the time the phase +goes from one end to the other.; +#X obj 19 493 output~; +#X obj 19 316 phasor~; +#X text 689 534 updated for Pd version 0.37-1; +#X obj 314 316 max 1.5; +#X text 317 222 delay; +#X text 314 240 (msec); +#X obj 237 139 max 1; +#X text 55 265 rotation freq; +#X obj 82 410 vd~ G09-del; +#X obj 251 422 vd~ G09-del; +#X connect 0 0 36 0; +#X connect 1 0 16 0; +#X connect 2 0 1 1; +#X connect 2 0 21 1; +#X connect 3 0 55 0; +#X connect 5 0 2 0; +#X connect 6 0 3 0; +#X connect 7 0 0 0; +#X connect 8 0 9 0; +#X connect 9 0 35 0; +#X connect 10 0 29 0; +#X connect 11 0 28 0; +#X connect 12 0 16 1; +#X connect 12 0 22 1; +#X connect 13 0 12 0; +#X connect 14 0 52 0; +#X connect 15 0 14 0; +#X connect 16 0 57 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 49 0; +#X connect 19 0 49 1; +#X connect 20 0 21 0; +#X connect 20 0 33 0; +#X connect 21 0 22 0; +#X connect 22 0 58 0; +#X connect 23 0 24 0; +#X connect 24 0 19 1; +#X connect 26 0 25 0; +#X connect 28 0 10 0; +#X connect 28 1 10 1; +#X connect 29 0 50 0; +#X connect 30 0 20 0; +#X connect 31 0 32 0; +#X connect 32 0 17 0; +#X connect 33 0 34 0; +#X connect 34 0 23 0; +#X connect 35 0 37 0; +#X connect 36 0 8 0; +#X connect 37 0 10 0; +#X connect 44 0 27 0; +#X connect 50 0 1 0; +#X connect 50 0 31 0; +#X connect 50 0 30 0; +#X connect 52 0 13 0; +#X connect 55 0 11 0; +#X connect 55 0 5 0; +#X connect 57 0 18 1; +#X connect 58 0 24 1; diff --git a/pd/doc/3.audio.examples/K06.triangle.pd b/pd/doc/3.audio.examples/K06.triangle.pd new file mode 100644 index 00000000..ce8ac916 --- /dev/null +++ b/pd/doc/3.audio.examples/K06.triangle.pd @@ -0,0 +1,169 @@ +#N canvas 80 114 729 584 12; +#X obj 33 482 hip~ 5; +#X text 92 12 DELAYS; +#X obj 33 341 -~; +#X obj 30 241 tabread4~ mtof; +#X obj 33 317 *~ 3; +#X obj 74 318 *~ 2; +#X obj 49 266 phasor~; +#X floatatom 81 215 0 0 0 0 - - -; +#X obj 33 293 clip~ 0 0.667; +#X obj 30 190 line~; +#X obj 30 165 pack 0 1000; +#X obj 30 70 metro 1000; +#X obj 30 94 random 200; +#X obj 30 118 - 100; +#X obj 30 142 * 0.001; +#X obj 33 453 +~; +#X obj 44 374 delwrite~ delay1 2000; +#X floatatom 49 401 0 0 0 0 - - -; +#X obj 49 426 delread~ delay1 1000; +#X obj 30 47 loadbang; +#X text 210 37 You can delay a signal using the delwrite~ and delread~ +objects. In this example \, the pitch of the oscillator is varying +slightly so that the delayed signal is different from the straight +signal.; +#X text 212 99 delread always delays the signal an integer number of +samples and does no interpolation.; +#X text 211 137 The delwrite~ object creates the delay line \; you +give it a name and a size in milliseconds. Each delwrite~ should have +a different name.; +#X text 209 184 Delread~'s arguments are the name of a delwrite (of +which there should be exactly one) and a delay time in milliseconds +between 0 and the length of the delay line. Each delwrite~ may have +as many delread~s as you wish \, which function as multiple delay taps. +; +#X obj 30 215 +~ 60; +#X text 115 216 <-- pitch; +#X text 83 401 <-- delay time; +#X text 65 342 asymmetric triangle wave; +#X text 236 372 write to delay line; +#X text 232 425 read from delay line; +#X text 64 454 add the original and the delayed signal; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080 ; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 449 418 pd conversion-tables; +#X text 427 536 updated for Pd version 0.35; +#X obj 33 510 output~; +#X connect 0 0 33 0; +#X connect 0 0 33 1; +#X connect 2 0 15 0; +#X connect 2 0 16 0; +#X connect 3 0 6 0; +#X connect 4 0 2 0; +#X connect 5 0 2 1; +#X connect 6 0 5 0; +#X connect 6 0 8 0; +#X connect 7 0 24 1; +#X connect 8 0 4 0; +#X connect 9 0 24 0; +#X connect 10 0 9 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 14 0 10 0; +#X connect 15 0 0 0; +#X connect 17 0 18 0; +#X connect 18 0 15 1; +#X connect 19 0 11 0; +#X connect 24 0 3 0; -- cgit v1.2.1