Derek Holzer wrote:
Hi Roman,
and thanks. I implemented it in my patch, but it doesn't seem to work right. The looping isn't seamless, in fact there's a "hiccup" at the point where the loop wraps around. In my previous version, I had another function to calculate the offset and start point, so what would work better for me is the the original concept, of an audio [mod~] which would only wrap around the end point of the table.
like this?
mfg.asdr IOhannes
#N canvas 509 102 698 619 10; #X obj 338 88 table sample; #X obj 47 95 soundfiler; #X floatatom 47 112 0 0 0 0 - - -; #X text 158 116 lenght in samples; #X obj 46 387 dac~; #X obj 46 357 tabread4~ sample; #X msg 14 91 bang; #N canvas 578 50 639 478 tabreader 0; #X obj 142 451 outlet~; #X obj 93 40 inlet looplength[samples]; #X obj 142 295 *~ 44100; #X obj 141 130 t f b; #X obj 166 148 samplerate~; #X obj 141 163 /; #X obj 141 98 t f f; #X msg 141 183 1 $1; #X obj 141 259 phasor~ 1; #X obj 141 200 /; #X obj 143 369 /~ 44100; #X obj 143 406 *~ 44100; #X obj 143 387 wrap~; #X obj 186 352 t f f; #X obj 142 278 *~ 1; #X obj 237 189 t b f; #X obj 143 312 +~ 0; #X obj 93 59 route filelength length offset speed bang; #X msg 285 82 0; #X obj 141 236 * 1; #X connect 1 0 17 0; #X connect 2 0 16 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 5 1; #X connect 5 0 7 0; #X connect 6 0 3 0; #X connect 6 1 2 1; #X connect 7 0 9 0; #X connect 8 0 14 0; #X connect 9 0 19 0; #X connect 10 0 12 0; #X connect 11 0 0 0; #X connect 12 0 11 0; #X connect 13 0 10 1; #X connect 13 1 11 1; #X connect 14 0 2 0; #X connect 15 0 19 0; #X connect 15 1 19 1; #X connect 16 0 10 0; #X connect 17 0 13 0; #X connect 17 1 6 0; #X connect 17 2 16 1; #X connect 17 3 15 0; #X connect 17 4 18 0; #X connect 18 0 8 1; #X connect 19 0 8 0; #X restore 47 339 pd tabreader; #X msg 152 327 speed $1; #X floatatom 156 303 5 0 0 0 - - -; #X msg 258 236 offset $1; #X floatatom 343 263 5 0 0 0 - - -; #X msg 263 191 length 62079; #X msg 66 253 bang; #X floatatom 343 295 0 0 0 0 - - -; #X msg 47 78 read -resize $1 sample; #X msg 54 29 bang; #X symbolatom 96 27 10 0 0 0 - - -; #X msg 256 210 length 220500; #X msg 393 277 bang; #X obj 46 60 symbol zexy.wav; #X obj 182 36 openpanel; #X obj 181 9 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 100 254 restart loop; #X obj 343 278 * 44100; #X text 348 212 loop length; #X text 328 239 loop offset; #X msg 47 145 filelength $1 , offset 0 , length $1; #X connect 1 0 2 0; #X connect 2 0 27 0; #X connect 5 0 4 0; #X connect 5 0 4 1; #X connect 6 0 2 0; #X connect 7 0 5 0; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 7 0; #X connect 11 0 24 0; #X connect 12 0 7 0; #X connect 13 0 7 0; #X connect 14 0 10 0; #X connect 15 0 1 0; #X connect 16 0 20 0; #X connect 17 0 20 0; #X connect 18 0 7 0; #X connect 19 0 14 0; #X connect 20 0 15 0; #X connect 21 0 20 0; #X connect 22 0 21 0; #X connect 24 0 14 0; #X connect 27 0 7 0;