Patrice Colet skrev:
...
You could replace [!- 1] by [* -1]_[+ 1] ...
Also, you obviously know the usage of trapezoid~ as it is in action right in your patch. Can you please tell me if you know of any resources describing the usage for each of the in&outlets?
in attached other test, I've illustrated inlets/outlet
I am assuming it is documented in the Max/MSP manual. The latest I could find online was for version 4.5 and did not contain notes on trapezoid~ (and actually pong~ too...)
I don't know yet about pong~...
Hi, here are some more ways to do it. mvh/Stef
#N canvas 40 55 1049 371 10; #N canvas 255 52 1029 720 crossfade 0; #X obj 242 638 outlet~; #X obj 416 378 trapezoid~ 0.2 0.8; #X obj 241 596 *~; #X obj 75 620 *~; #X obj 76 295 inlet~; #X obj 75 374 *~ 0; #X obj 241 360 *~ 0; #X obj 74 396 tabread4~ 1-n; #X obj 96 343 r $0-size-in-samples; #X obj 240 388 tabread4~ 2-n; #X obj 416 346 wrap~; #X obj 439 304 sig~; #X obj 415 247 phasor~; #X obj 415 31 r $0-size-in-hz; #X obj 454 222 r resync; #X obj 415 202 * 1; #X floatatom 430 139 5 0 0 0 - - -; #X obj 430 110 pow -1; #X floatatom 430 86 5 0 0 0 - - -; #X msg 522 264 1 $1; #X obj 522 290 -; #X obj 522 221 inlet; #X floatatom 440 286 5 0 0 0 - - -; #X obj 565 222 inlet; #X obj 369 321 sig~ 1; #X obj 430 166 t b f; #X msg 489 105 ; resync 0; #X obj 522 346 line~; #X obj 469 346 line~; #X obj 418 540 cos~; #X obj 417 491 *~ 0.5; #X obj 90 573 *~ -1; #X obj 382 468 *~; #X obj 430 429 == 0; #X obj 481 407 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X text 510 409 0 equal amplitude x-fade; #X text 510 428 1 linear x-fade; #X obj 91 596 +~ 1; #X obj 418 566 *~; #X obj 90 538 +~; #X obj 418 516 +~ 0.75; #X connect 1 0 32 0; #X connect 1 0 30 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 9 0; #X connect 7 0 3 0; #X connect 8 0 5 1; #X connect 8 0 6 1; #X connect 9 0 2 0; #X connect 10 0 1 0; #X connect 11 0 10 0; #X connect 12 0 10 0; #X connect 13 0 15 0; #X connect 14 0 12 1; #X connect 15 0 12 0; #X connect 16 0 25 0; #X connect 17 0 16 0; #X connect 18 0 17 0; #X connect 19 0 20 0; #X connect 20 0 27 0; #X connect 21 0 19 0; #X connect 21 0 28 0; #X connect 22 0 11 0; #X connect 23 0 22 0; #X connect 24 0 10 0; #X connect 25 0 15 0; #X connect 25 1 15 1; #X connect 27 0 1 2; #X connect 28 0 1 1; #X connect 29 0 38 0; #X connect 30 0 40 0; #X connect 31 0 37 0; #X connect 32 0 39 0; #X connect 33 0 32 1; #X connect 34 0 33 0; #X connect 34 0 38 1; #X connect 37 0 3 1; #X connect 38 0 39 0; #X connect 39 0 31 0; #X connect 39 0 2 1; #X connect 40 0 29 0; #X restore 528 230 pd crossfade; #X obj 529 139 phasor~; #X floatatom 529 97 5 0 0 0 - - -; #X obj 132 195 table 1-n; #X obj 197 195 table 2-n; #X obj 529 322 dac~; #X obj 130 75 openpanel; #X obj 130 138 soundfiler; #X obj 130 44 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 130 165 s $0-size-in-samples; #X obj 130 222 r $0-size-in-samples; #X floatatom 562 207 5 0 0 0 - - -; #X text 102 17 load a sound first; #X msg 130 243 ; trapez resize $1 ; phasor resize $1 ;; #N canvas 0 0 450 300 size-in-ms 0; #X obj 189 129 r $0-size-in-samples; #X obj 329 156 samplerate~; #X obj 235 192 expr $f1/($f2/1000); #X obj 340 126 loadbang; #X obj 398 124 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 228 252 s $0-size-in-ms; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 5 0; #X connect 3 0 1 0; #X connect 4 0 1 0; #X restore 132 291 pd size-in-ms; #X msg 11 45 ; pd dsp 1; #X obj 11 21 loadbang; #X obj 529 286 *~ 0.5; #X floatatom 558 265 5 0 1 0 - - -; #X obj 289 142 openpanel; #X obj 289 90 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X msg 130 106 read -resize $1 1-n 2-n; #N canvas 0 0 458 308 metro 0; #X obj 145 133 metro 1000; #N canvas 0 0 450 300 size-in-ms 0; #X obj 228 252 outlet; #X obj 248 224 r $0-size-in-ms; #X connect 1 0 0 0; #X restore 198 88 pd size-in-ms; #X obj 143 180 s $0-startloop; #X obj 141 90 inlet; #X connect 0 0 2 0; #X connect 1 0 0 1; #X connect 3 0 0 0; #X restore 12 114 pd metro; #N canvas 162 310 454 304 size-in-hz 0; #X obj 189 129 r $0-size-in-samples; #X obj 329 156 samplerate~; #X obj 340 126 loadbang; #X obj 398 124 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 235 192 expr $f2/$f1; #X obj 228 252 s $0-size-in-hz; #X connect 0 0 4 0; #X connect 1 0 4 1; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X restore 131 311 pd size-in-hz; #X obj 529 43 r $0-size-in-hz; #X obj 289 205 soundfiler; #X obj 12 92 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1 ; #X text 216 32 crossfaded sound (not resized); #X text 232 49 choose one with same length; #X text 247 66 for avoiding pitching; #X msg 289 174 read $1 2-n; #X msg 597 136 0.25; #X msg 637 136 0.5; #X msg 673 135 0.75; #X obj 573 112 r resync; #X floatatom 792 216 5 0 0 0 - - -; #X msg 827 145 0.25; #X msg 867 145 0.5; #X msg 903 144 0.75; #X text 600 206 crossfade point: 0-1; #X text 830 215 phase of crossfade point: 0-1; #X msg 648 42 ; resync 0; #X connect 0 0 17 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 6 0 21 0; #X connect 7 0 9 0; #X connect 8 0 6 0; #X connect 10 0 13 0; #X connect 11 0 0 1; #X connect 16 0 15 0; #X connect 17 0 5 0; #X connect 17 0 5 1; #X connect 18 0 17 1; #X connect 19 0 30 0; #X connect 20 0 19 0; #X connect 21 0 7 0; #X connect 24 0 2 0; #X connect 26 0 22 0; #X connect 30 0 25 0; #X connect 31 0 11 0; #X connect 32 0 11 0; #X connect 33 0 11 0; #X connect 34 0 1 1; #X connect 35 0 0 2; #X connect 36 0 35 0; #X connect 37 0 35 0; #X connect 38 0 35 0;