[PD] [sfinfo~]

oliver oliver at klingt.org
Fri Jan 28 21:02:58 CET 2022


Miller Puckette via Pd-list wrote:
> Excellent - nothing to do then.  My favorite kind of dolist.


Well, not quite ...

Lucas' method of using [soundfiler] to get a (really long) soundfile's 
length still loads the complete file into RAM, as it would into an 
array. (i'm talking a 60 minute long audio file here)

This has 3 drawbacks:

1.) audio dropout while loading, depending on the file's length
2.) can use huge amounts of RAM
3.) takes much longer than [soundfile_info]

attached is an example patch that illustrates both approaches.

(use the same long soundfile for each method to see what i mean)



then again: since i use IEMLIB regularly it's not that much of a hassle. 
it's just not plain vanilla, that's all ...


best

oliver
-------------- next part --------------
#N canvas 806 80 350 355 10;
#X declare -stdlib iemlib;
#X obj 47 227 soundfiler;
#X msg 196 205 read \$1;
#X obj 196 161 openpanel;
#X obj 196 138 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 19 16 declare -stdlib iemlib;
#X obj 196 229 soundfile_info;
#X obj 47 248 print A;
#X obj 196 250 print B;
#X obj 196 182 t s b;
#X obj 281 14 osc~ 440;
#X obj 281 35 *~ 0.2;
#X obj 269 92 dac~;
#X msg 47 205 read \$1;
#X obj 47 161 openpanel;
#X obj 47 139 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 47 182 t s b;
#X text 45 104 select a long soundfile;
#X obj 74 297 realtime;
#X msg 119 276 bang;
#X floatatom 74 318 0 0 0 0 - - -;
#X obj 223 297 realtime;
#X msg 268 276 bang;
#X floatatom 223 318 0 0 0 0 - - -;
#X obj 281 67 *~ 0;
#X obj 253 37 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 68 137 A: ARRAY METHOD;
#X text 214 137 A: WITH IEMLIB;
#X text 195 15 also note audio drop-out, f 11;
#X connect 0 0 6 0;
#X connect 0 0 18 0;
#X connect 1 0 5 0;
#X connect 2 0 8 0;
#X connect 3 0 2 0;
#X connect 5 0 7 0;
#X connect 5 0 21 0;
#X connect 8 0 1 0;
#X connect 8 1 20 0;
#X connect 9 0 10 0;
#X connect 10 0 23 0;
#X connect 12 0 0 0;
#X connect 13 0 15 0;
#X connect 14 0 13 0;
#X connect 15 0 12 0;
#X connect 15 1 17 0;
#X connect 17 0 19 0;
#X connect 18 0 17 1;
#X connect 20 0 22 0;
#X connect 21 0 20 1;
#X connect 23 0 11 0;
#X connect 23 0 11 1;
#X connect 24 0 23 1;


More information about the Pd-list mailing list