[PD] Good Time Stretching patches/advice?

Derek Kwan derek.x.kwan at gmail.com
Fri Apr 22 04:11:54 CEST 2016


On Apr 21, S.E.P. wrote:
> Hey Derek (and list)
> 
> Thanks for the clarification. I put together a test patch for your
> fgraintstr~ (tesuto.pd) and tested it with the attached .wav file (you need
> to click on the "read" message). It would seem it works without inputting
> any values into the left inlet, which is tantamount to a freeze, I
> assume...?
> 
> I'm not sure what a good grain rate is... maybe in the 20s or 30s. In
> general, it sounds a bit fuzzy and electronic and the harmonic spectrum is
> very unstable... but I'm probably doing something wrong. Any more tips?
> 

Hey, 

I've attached a patch for you to test out. It sounds fine with smaller
soundfiles, but kinda gets unstable with larger soundfiles due to the
heaviness of the abstraction...I wrote the abstraction originally for a
piece that I ported from supercollider that live-stretches a kalimba to
something like 100 times it's original length so I didn't have to use
super long soundfiles. I also had the grainrate around 5 ms so that
means grains at length 5*32  = 160 ms. Also I didn't do any
normalization in these abstractions (but in my external version I do) so
note in the test patch I've attached I multiply the outputs of the
fgrainstr abstractions by 0.25. Note that fgrainstr2 doesn't do any
transposition, but it deals better with longer sound files due to
indexing and float precision. 

If you know how to compile stuff, you can also check out my external
version that's also on my github page in the dxkpure repository. That
whole thing is sort of in a pre-release stage because I haven't figured
out the build process quite yet and my main machine runs ubuntu so I can
only provide externals built for linux so far... I've kind of moved my
efforts from making abstractions to making externals in interests of
efficiency...

Derek

=====================
Derek Kwan
www.derekxkwan.com
-------------- next part --------------
#N canvas 293 330 747 610 10;
#X obj 165 126 soundfiler;
#X obj 169 358 dac~ 1 2;
#X obj 177 62 openpanel;
#X obj 183 36 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 519 76 vsl 15 128 0.01 1 0 0 empty empty rate 0 -9 0 10 -262144
-1 -1 12700 1;
#X floatatom 508 217 5 0 0 0 - - -, f 5;
#X obj 183 326 *~ 0;
#X obj 189 228 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 571 78 vsl 15 128 -12 12 0 0 empty empty transposition 0 -9
0 10 -262144 -1 -1 6350 1;
#X floatatom 560 217 5 0 0 0 - - -, f 5;
#X msg 569 40 0;
#X msg 512 36 1;
#X obj 533 13 loadbang;
#X obj 329 26 loadbang;
#X obj 83 227 table test1;
#N canvas 1 59 912 532 phreadabstract 0;
#X obj 336 28 inlet;
#X obj 467 28 inlet;
#X obj 336 50 t b f;
#X obj 242 126 samplerate~;
#X obj 296 187 /;
#X obj 293 297 phasor~;
#X obj 296 228 * 1;
#X obj 350 172 t b f;
#X obj 293 341 outlet~;
#X text 385 28 sample size;
#X text 508 27 rate;
#X text 34 17 PHASREAD~: sample indexer abstraction;
#X obj 577 31 inlet;
#X text 614 32 phase;
#X text 30 75 in1: sample size;
#X text 28 94 in2: rate;
#X text 29 114 in3: phase;
#X text 28 154 DEREK KWAN \, 2016;
#X text 36 35 using phasor~;
#X obj 293 319 *~ 1;
#X connect 0 0 2 0;
#X connect 1 0 7 0;
#X connect 2 0 3 0;
#X connect 2 1 4 1;
#X connect 2 1 19 1;
#X connect 3 0 4 0;
#X connect 4 0 6 0;
#X connect 5 0 19 0;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X connect 7 1 6 1;
#X connect 12 0 5 1;
#X connect 19 0 8 0;
#X restore 205 190 pd phreadabstract;
#X obj 172 244 fgrainstr2~ test1 10;
#X obj 347 247 fgrainstr~ test1 10;
#X text 393 223 SOUND ON/OFF;
#X obj 325 309 *~ 0;
#X obj 377 225 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 214 225 SOUND ON/OFF;
#X msg 158 91 read -resize -maxsize 4e+06 \$1 test1;
#X obj 151 292 *~ 0.25;
#X obj 363 274 *~ 0.25;
#X text 48 26 Derek Kwan \, 2016;
#X text 47 42 fgrainstrtest;
#X connect 0 0 15 0;
#X connect 2 0 22 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 4 0 15 1;
#X connect 6 0 1 0;
#X connect 6 0 1 1;
#X connect 7 0 6 1;
#X connect 8 0 9 0;
#X connect 8 0 17 2;
#X connect 10 0 8 0;
#X connect 11 0 4 0;
#X connect 12 0 11 0;
#X connect 12 0 10 0;
#X connect 13 0 11 0;
#X connect 15 0 16 0;
#X connect 15 0 17 0;
#X connect 16 0 23 0;
#X connect 17 0 24 0;
#X connect 19 0 1 0;
#X connect 19 0 1 1;
#X connect 20 0 19 1;
#X connect 22 0 0 0;
#X connect 23 0 6 0;
#X connect 24 0 19 0;


More information about the Pd-list mailing list