[ext13/wavinfo]
or more complicated for the fun, with [mrpeach/binfile] and
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
it's attached ^^
Colet Patrice
----- Mail original -----
> De: "Rick T" <[email protected]>
> À: "PD List" <[email protected]>
> Envoyé: Jeudi 4 Octobre 2012 00:26:15
> Objet: [PD] getting sample rate of file loaded into an array
>
>
> Greetings All
>
> I load a wavefile into an array using openpanel but how can I go
> about getting the sample rate of the wav file?
>
> I'm trying to load the sample rate data into an expr object
> Example: expr (sample rate) / f$1
>
> Aloha
> Rick
>
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
#N canvas 1231 538 450 300 10;
#N canvas 0 0 948 727 fileinfo 1;
#X obj 172 151 mrpeach/binfile;
#X obj 172 131 until;
#X obj 172 193 f;
#X obj 201 192 + 1;
#X obj 172 215 pack;
#X msg 209 172 0;
#X obj 172 170 t b a;
#X msg 172 110 37;
#X obj 172 89 t b a b;
#X text 259 46 grab wave info into file header;
#X obj 171 48 inlet;
#X obj 84 508 outlet;
#X msg 171 69 read \$1;
#X obj 123 377 *;
#X obj 203 403 *;
#X obj 203 463 /;
#X obj 203 443 f;
#X obj 203 423 t b a;
#X obj 111 358 / 8;
#X obj 84 339 t a a;
#X obj 209 270 * 256;
#X obj 209 289 +;
#X obj 191 337 +;
#X obj 190 311 * 65536;
#X obj 191 357 t a a;
#X obj 267 334 * 1.67772e+007;
#X obj 267 353 +;
#X obj 282 314 +;
#X obj 282 295 * 65536;
#X obj 300 254 * 256;
#X obj 300 274 +;
#X obj 138 358 t a a;
#X obj 172 234 route 34 26 25 24 22 7 6 5 4;
#X obj 84 487 pack f f f f f;
#X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 1;
#X connect 4 0 32 0;
#X connect 5 0 2 1;
#X connect 6 0 2 0;
#X connect 6 1 4 1;
#X connect 7 0 1 0;
#X connect 8 0 7 0;
#X connect 8 1 0 0;
#X connect 8 2 5 0;
#X connect 10 0 12 0;
#X connect 12 0 8 0;
#X connect 13 0 14 0;
#X connect 14 0 17 0;
#X connect 15 0 33 3;
#X connect 16 0 15 0;
#X connect 17 0 16 0;
#X connect 17 1 15 1;
#X connect 18 0 13 0;
#X connect 19 0 33 0;
#X connect 19 1 18 0;
#X connect 20 0 21 0;
#X connect 21 0 22 1;
#X connect 22 0 24 0;
#X connect 23 0 22 0;
#X connect 24 0 33 1;
#X connect 24 1 14 1;
#X connect 25 0 26 0;
#X connect 26 0 16 1;
#X connect 26 0 33 4;
#X connect 27 0 26 1;
#X connect 28 0 27 0;
#X connect 29 0 30 0;
#X connect 30 0 27 1;
#X connect 31 0 13 1;
#X connect 31 1 33 2;
#X connect 32 0 19 0;
#X connect 32 1 23 0;
#X connect 32 2 20 0;
#X connect 32 3 21 1;
#X connect 32 4 31 0;
#X connect 32 5 25 0;
#X connect 32 6 28 0;
#X connect 32 7 29 0;
#X connect 32 8 30 1;
#X connect 33 0 11 0;
#X restore 147 48 pd fileinfo;
#X obj 147 29 openpanel;
#X obj 147 10 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 147 189 5 0 0 0 - - -;
#X floatatom 170 162 5 0 0 0 - - -;
#X floatatom 193 134 5 0 0 0 - - -;
#X floatatom 216 111 5 0 0 0 - - -;
#X text 181 190 bitrate;
#X text 204 161 samplerate;
#X text 227 136 number of channels;
#X text 252 111 size in seconds;
#X obj 147 67 unpack f f f f f;
#X floatatom 240 88 5 0 0 0 - - -;
#X text 276 88 size in samples;
#X connect 0 0 11 0;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 11 0 3 0;
#X connect 11 1 4 0;
#X connect 11 2 5 0;
#X connect 11 3 6 0;
#X connect 11 4 12 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list