sebpiq / WebPd

Run your Pure Data patches on the web.
GNU Lesser General Public License v3.0
935 stars 88 forks source link

Bug with abstractions #104

Closed sebpiq closed 8 years ago

sebpiq commented 8 years ago

See attached patches :

Abstraction looper-abs :

#N canvas 49 102 1317 686 10;
#X obj 516 222 soundfiler;
#X obj 535 71 f \$0;
#X floatatom 516 247 10 0 0 0 - - -;
#X obj 516 423 table \$0-SAMPLE 100;
#X obj 516 398 s \$0-SAMPCOUNT;
#X obj 706 353 samplerate~;
#X obj 664 377 /;
#X obj 706 312 loadbang;
#X obj 706 334 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 664 399 * 1000;
#X obj 664 422 s \$0-SAMPDUR;
#X obj 571 71 fields/preferred-format;
#X obj 134 232 tabread~ \$0-SAMPLE;
#X obj 85 135 triangle~ 1;
#X obj 168 135 r \$0-SAMPCOUNT;
#X obj 84 159 +~ 1;
#X obj 168 159 * 0.5;
#X obj 135 207 *~ 1;
#X obj 85 97 /;
#X obj 85 49 t b f;
#X msg 85 73 1;
#X obj 85 0 r \$0-SAMPDUR;
#X text 217 156 +1 to bring triangle between [0 \, 2] \; *0.5 to bring
it back to [0 \, 1];
#X obj 607 247 pack f s;
#X msg 607 269 \$1 \$2;
#X obj 85 24 * 0.002;
#X text 137 24 2 because we read back and forth and 0.001 because milliseconds
;
#X obj 134 261 outlet~;
#X obj 516 99 pack s f s;
#X msg 516 127 read -resize \$1.\$3 \$2-SAMPLE;
#X obj 516 45 t s b b;
#X obj 516 0 inlet;
#X obj 607 290 print loop-loaded;
#X connect 0 0 2 0;
#X connect 0 0 23 0;
#X connect 1 0 28 1;
#X connect 2 0 4 0;
#X connect 2 0 6 0;
#X connect 5 0 6 1;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 8 0 5 0;
#X connect 9 0 10 0;
#X connect 11 0 23 1;
#X connect 11 0 28 2;
#X connect 12 0 27 0;
#X connect 13 0 15 0;
#X connect 14 0 16 0;
#X connect 15 0 17 0;
#X connect 16 0 17 1;
#X connect 17 0 12 0;
#X connect 18 0 13 0;
#X connect 19 0 20 0;
#X connect 19 1 18 1;
#X connect 20 0 18 0;
#X connect 21 0 25 0;
#X connect 23 0 24 0;
#X connect 24 0 32 0;
#X connect 25 0 19 0;
#X connect 28 0 29 0;
#X connect 29 0 0 0;
#X connect 30 0 28 0;
#X connect 30 1 1 0;
#X connect 30 2 11 0;
#X connect 31 0 30 0;

Root patch :

#N canvas 49 97 1317 686 10;
#X obj 24 179 outlet~;
#X obj 25 107 looper-abs;
#X obj 25 -11 loadbang;
#X obj 44 22 random 2;
#X obj 45 145 *~;
#X msg 25 79 /assets/samples/voice2TunedE;
#X connect 1 0 4 0;
#X connect 1 0 0 0;
#X connect 2 0 5 0;
#X connect 2 0 3 0;
#X connect 5 0 1 0;