#N canvas 679 364 1037 565 12; #X text 25 456 Use start < end for reverse playback!; #X obj 29 194 dac~; #X msg 29 106 bang; #X text 25 373 Arg4: speed(float >0) \, default: 1; #X text 26 391 Arg5: amp(0-100dB) \, default: 100; #X text 26 411 Arg6: fadeIn time(sec) \, default: 0; #X text 26 431 Arg7: fadeOut time(sec) \, default: 0; #X obj 29 165 lecteur~ myOne; #X text 26 294 Arg1: memoire name (REQUIRED!); #X obj 112 196 bng 15 250 50 0 empty empty end_reached 17 7 0 10 -262144 -1 -1; #X text 25 354 Arg3: end position (sec) or 'end' \, default: end; #X text 25 336 Arg2: start position (sec) \, default: 0; #X text 26 69 Simple use:; #X text 24 275 [lecteur~] has up to seven arguments:; #X text 25 315 Optional:; #X obj 398 399 dac~; #X msg 397 91 bang; #X msg 414 148 stop; #X text 435 90 or; #X msg 403 115 start; #X obj 604 403 bng 15 250 50 0 empty empty end_reached 17 7 0 10 -262144 -1 -1; #X obj 535 425 bng 15 250 50 0 empty empty fadeOut_start 17 7 0 10 -262144 -1 -1; #N canvas 355 192 802 404 crossfadeExample 0; #X obj 17 375 dac~; #X obj 81 378 bng 15 250 50 0 empty empty fadeOut_starts 17 7 0 10 -262144 -1 -1; #X obj 225 211 / 100; #X obj 18 106 t b b b, f 30; #X obj 18 197 / 100; #X obj 121 194 / 100; #X obj 18 271 pack f f f; #X obj 420 367 dac~; #X obj 509 367 bng 15 250 50 0 empty empty fadeOut_starts 17 7 0 10 -262144 -1 -1; #X obj 639 225 / 100; #X obj 446 106 t b b b, f 28; #X obj 446 182 / 100; #X obj 542 182 / 100; #X obj 446 261 pack f f f; #X obj 225 164 + 30; #X obj 639 179 + 30; #X obj 225 138 random 170; #X obj 639 153 random 170; #X obj 18 228 * 5; #X obj 121 228 * 5; #X obj 446 218 * 5; #X obj 542 217 * 5; #X text 19 24 Audio Ping Pong; #X text 168 23 Crossfading playback between two lecteur~ with some randomized paramters and stereo panorama.; #X obj 18 78 bng 15 250 50 0 empty empty <-start 17 7 0 10 -262144 -1 -1; #X msg 272 304 stop; #X obj 18 345 lecteur~ myOne; #X obj 446 335 lecteur~ myOne; #X msg 18 299 myOne \$1 \$2 \$3 100 0.1 0.5; #X msg 446 289 myOne \$1 \$2 \$3 100 0.1 0.5; #X obj 446 157 + 15; #X obj 446 133 random 85; #X obj 542 157 + 15; #X obj 542 133 random 85; #X obj 18 138 random 85; #X obj 18 167 + 15; #X obj 121 164 + 15; #X obj 121 135 random 85; #X connect 1 0 10 0; #X connect 2 0 6 2; #X connect 3 0 34 0; #X connect 3 1 37 0; #X connect 3 2 16 0; #X connect 4 0 18 0; #X connect 5 0 19 0; #X connect 6 0 28 0; #X connect 8 0 3 0; #X connect 9 0 13 2; #X connect 10 0 31 0; #X connect 10 1 33 0; #X connect 10 2 17 0; #X connect 11 0 20 0; #X connect 12 0 21 0; #X connect 13 0 29 0; #X connect 14 0 2 0; #X connect 15 0 9 0; #X connect 16 0 14 0; #X connect 17 0 15 0; #X connect 18 0 6 0; #X connect 19 0 6 1; #X connect 20 0 13 0; #X connect 21 0 13 1; #X connect 24 0 3 0; #X connect 25 0 26 0; #X connect 25 0 27 0; #X connect 26 0 0 0; #X connect 26 2 1 0; #X connect 27 0 7 1; #X connect 27 2 8 0; #X connect 28 0 26 0; #X connect 29 0 27 0; #X connect 30 0 11 0; #X connect 31 0 30 0; #X connect 32 0 12 0; #X connect 33 0 32 0; #X connect 34 0 35 0; #X connect 35 0 4 0; #X connect 36 0 5 0; #X connect 37 0 36 0; #X restore 653 477 pd crossfadeExample; #X msg 425 319 myOne 5 1 2 100 0.3 1; #X text 449 104 Playback with parameters given by arguments.; #X text 396 67 Advanced use:; #X text 535 523 (c) 2018 Peter P. under the BSD license; #X obj 397 369 lecteur~ myOne 1 end 1 100 1 1; #X text 614 367 <-From 1 sec to end with 1 sec fade in and 1 sec fade out.; #X msg 39 134 stop; #X msg 431 180 fadeout; #X text 450 147 immediate stop with no fadeout; #X msg 438 206 fadeout 0.1; #X text 133 165 (see default parameters below); #X text 447 239 All seven values must be specified!; #X msg 438 267 myOne 2 5 0.5 100 0.1 2; #X text 486 180 fade out during time set by arguments or message \, then stop; #X text 821 524 Last updated 2019-12-24; #X floatatom 437 31 5 0 0 1 sec - -; #X floatatom 581 31 5 0 0 0 channels - -; #X text 536 442 You can use this bang to trigger a second lecteur~ reading from the same memoire for crossfaded loop playback. See:; #X obj 437 6 memoire myOne snd.wav; #X text 525 206 fadeout durng 100msec \, then stop; #X text 585 308 Play 'myOne' from 5 to 1 seconds (backwards) at double speed and 100dB. This will sound for two seconds due to double playback speed. While playing fade in 0.3 sec and out 1 sec; #X text 611 257 Play from 2 to 5 seconds at half speed and 100dB. It will sound for six seconds due to half speed. Fade in for 100 milliseconds and fade out for 2 seconds.; #X text 301 479 Mono files play via both audio outlets; #X text 14 8 [lecteur~] An abstraction to read audio from tables. Use together with the [memoire] abstraction --------------->; #X text 634 6 snd.wav has to be in the same folder as this patch.; #X connect 2 0 7 0; #X connect 7 0 1 0; #X connect 7 1 1 1; #X connect 7 3 9 0; #X connect 16 0 27 0; #X connect 17 0 27 0; #X connect 19 0 27 0; #X connect 23 0 27 0; #X connect 27 0 15 0; #X connect 27 1 15 1; #X connect 27 2 21 0; #X connect 27 3 20 0; #X connect 29 0 7 0; #X connect 30 0 27 0; #X connect 32 0 27 0; #X connect 35 0 27 0; #X connect 41 0 38 0; #X connect 41 1 39 0;