[PD] help on random samplePlayer

Thomas Grill t.grill at gmx.net
Thu Jun 6 17:27:44 CEST 2002


Hi Frank, hi Andre,

> > I see there is some need for an xgroove~ improvement. I will see what i
> can
> > do to achieve an interpolated position change. This is not too easy, but
> > i'll try to tackle it.

Here's a solution to non-clicking position changes (for xgroove~ and
others).
It seems that the only reasonable (and straightforward) way is to fade out,
change the position and fade in again.
I decided not to implement it into the external as it is fairly easy to
implement as a pd patch.

Here is the abstraction ramp.pd. It takes a float as argument which is the
fade time in milliseconds. You can send all messages for xgroove~ through
it, it will recognize the pos message and output a ramp to the left outlet~,
all messages are output unchanged to the right outlet.

#N canvas 79 120 560 482 12;
#X obj 85 248 line~;
#X obj 88 124 delay \$1;
#X obj 120 151 pack 0 \$1;
#X obj 85 177 pack 1 \$1;
#X obj 84 307 outlet~;
#X obj 139 61 route pos;
#X obj 88 98 t b b f;
#X obj 207 307 outlet;
#X msg 186 268 pos \$1;
#X obj 186 241 f;
#X obj 139 31 inlet;
#X obj 18 35 loadbang;
#X obj 17 69 1;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 1 0 9 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 5 0 6 0;
#X connect 5 1 7 0;
#X connect 6 0 1 0;
#X connect 6 1 2 0;
#X connect 6 2 9 1;
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 5 0;
#X connect 11 0 12 0;
#X connect 12 0 0 0;


And here, for reference the modified xgroove~ help patch:


#N canvas 92 110 827 546 12;
#X obj 257 106 hsl 128 15 0.001 3 1 1 empty empty empty 20 8 0 8 -225271
-1 -1 1100 1;
#X floatatom 256 127 8 0 0;
#X floatatom 289 180 8 0 0;
#X floatatom 364 180 8 0 0;
#X floatatom 287 240 8 0 0;
#X floatatom 362 240 8 0 0;
#X obj 295 286 loadbang;
#X obj 294 312 metro 30;
#X obj 270 337 snapshot~;
#X floatatom 270 361 8 0 0;
#X msg 309 30 loop \$1;
#X obj 159 27 bng 15 250 50 0 empty empty empty 20 8 0 8 -258699 -1
-1;
#X msg 158 47 stop;
#X graph graph7 0 -1 299 1 521 223 821 23;
#X array buf 300 float 1;
#A 0 -0.29 -0.14 -0.06 -0.035 -0.01 -0.01 0.0214286 0.0428571 0.0642857
0.0857143 0.107143 0.128571 0.15 0.16 0.17 0.123333 0.136667 0.15 0.163333
0.176667 0.19 0.215 0.24 0.265 0.29 0.315 0.34 0.365 0.39 0.385 0.38
0.354 0.328 0.302 0.276 0.25 0.29 0.32 0.35 0.38 0.463333 0.546667
0.63 0.68 0.87 0.874 0.878 0.882 0.886 0.89 0.878333 0.866667 0.855
0.843333 0.831667 0.82 0.808333 0.796667 0.785 0.773333 0.761667 0.75
0.735 0.72 0.705 0.69 0.675 0.66 0.645 0.63 0.62 0.56 0.535 0.51 0.485
0.46 0.4325 0.405 0.3775 0.35 0.685 0.66 0.639167 0.618333 0.5975 0.576667
0.555833 0.535 0.514167 0.493333 0.57 0.63 0.67 0.71 0.75 0.765 0.78
0.78 0.73 0.68 0.62 0.56 0.57 0.58 0.598571 0.617143 0.635714 0.654286
0.672857 0.691429 0.71 0.72 0.7 0.64 0.58 0.57 0.603333 0.636667 0.67
0.62 0.45 0.38 0.38 0.38 0.39 0.4 0.41 0.394 0.378 0.362 0.346 0.33
0.2925 0.255 0.2175 0.18 0.17 0.17 0.146 0.122 0.098 0.074 0.05 0.0183333
-0.0133333 -0.045 -0.0766667 -0.108333 -0.14 -0.156667 -0.173333 -0.19
-0.195 -0.2 -0.206667 -0.213333 -0.28 -0.31 -0.34 0.08 0.035 -0.01
-0.072 -0.134 -0.196 -0.258 -0.32 -0.35 -0.38 -0.41 -0.39 -0.333333
-0.276667 -0.22 -0.2 -0.18 -0.16 -0.18 -0.221667 -0.263333 -0.305 -0.346667
-0.388333 -0.43 -0.475 -0.52 -0.565 -0.62 -0.586 -0.552 -0.518 -0.484
-0.45 -0.428 -0.406 -0.384 -0.362 -0.34 -0.376667 -0.413333 -0.45 -0.482857
-0.515714 -0.548571 -0.581429 -0.614286 -0.647143 -0.68 -0.71 -0.74
-0.72 -0.7 -0.68 -0.66 -0.64 -0.615 -0.59 -0.565 -0.54 -0.515 -0.49
-0.465 -0.44 -0.45 -0.46 -0.48625 -0.5125 -0.53875 -0.565 -0.59125
-0.6175 -0.64375 -0.67 -0.696667 -0.723333 -0.75 -0.733333 -0.716667
-0.7 -0.68 -0.66 -0.64 -0.62 -0.6 -0.58 -0.56 -0.58 -0.608 -0.636 -0.664
-0.692 -0.72 -0.7 -0.68 -0.66 -0.626667 -0.593333 -0.56 -0.575 -0.59
-0.6125 -0.635 -0.6575 -0.68 -0.67 -0.65125 -0.6325 -0.61375 -0.595
-0.57625 -0.5575 -0.53875 -0.52 -0.51 -0.5425 -0.5 -0.425 -0.35 -0.27
-0.256 -0.242 -0.228 -0.214 -0.2 -0.19 -0.18 -0.17 -0.16 -0.15 -0.14
-0.13 -0.12 -0.11 -0.0933333 -0.0766667 -0.06 -0.0433333 -0.0266667
-0.01 0.1;
#X pop;
#X obj 145 408 dac~;
#X msg 157 86 reset;
#X text 304 160 min/max points;
#X text 303 258 min/max points;
#X text 343 361 position;
#X text 181 24 start;
#X text 198 45 stop;
#X msg 156 113 help;
#X text 415 100 speed;
#X text 336 120 (float or signal);
#X obj 658 340 table buf2;
#X floatatom 521 355 8 0 0;
#X obj 521 328 soundfiler;
#X msg 158 172 set buf2;
#X msg 157 144 set buf;
#X msg 310 59 interp \$1;
#X msg 522 301 read -resize d:/snd/frank0.wav buf2;
#X msg 254 180 all;
#X obj 212 209 xgroove~ buf;
#X text 370 30 looping mode;
#X text 388 60 interpolation;
#X floatatom 253 29 5 0 0;
#X floatatom 253 59 5 0 0;
#X msg 45 161 pos 100;
#X msg 60 190 pos 200;
#X obj 154 316 *~;
#X obj 47 233 ramp 10;
#X connect 0 0 1 0;
#X connect 1 0 32 0;
#X connect 2 0 32 1;
#X connect 3 0 32 2;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 10 0 32 0;
#X connect 11 0 32 0;
#X connect 12 0 32 0;
#X connect 15 0 32 0;
#X connect 21 0 32 0;
#X connect 26 0 25 0;
#X connect 27 0 32 0;
#X connect 28 0 32 0;
#X connect 29 0 32 0;
#X connect 30 0 26 0;
#X connect 31 0 32 0;
#X connect 32 0 39 1;
#X connect 32 1 8 0;
#X connect 32 2 4 0;
#X connect 32 3 5 0;
#X connect 35 0 10 0;
#X connect 36 0 29 0;
#X connect 37 0 40 0;
#X connect 38 0 40 0;
#X connect 39 0 14 0;
#X connect 39 0 14 1;
#X connect 40 0 39 0;
#X connect 40 1 32 0;





More information about the Pd-list mailing list