[PD] Playing soundfile via array

meino.cramer at gmx.de meino.cramer at gmx.de
Fri Mar 19 17:23:34 CET 2010


Hi Lorenzo,

thanks for your fast reply ! :)
And thanks for the testpatch!!! :)))

...again the same behaviour,,,
PD says: "succesfully loaded" and the array remains empty.

Would it be possible to send me a short wav file via private
email from which you know, that it works? That way I could decide
whether my sound file is to blame or my pd-extended installation
has a porblem...

By the way: The "boxes" you used in the both patches (sorry...neither
English is my mothers tongue nor am I a pd-guru...I am the opposite of
it ;) ) ...are they contents of pd-vanilla or extension which I only
will find in pd-extended???

Thanks a lot in advance! :)
Have a nice weekend!
Best regards,
Meino


Lorenzo <lsutton at libero.it> [10-03-19 16:00]:
> Hi meino,
> 
> meino.cramer at gmx.de wrote:
> >Hi Lorenzo,
> >
> >sorry for answering your posting that late...I was very busy last time
> >and have no chance to pure data :) at all.
> >   
> No problem I know what you mean ;)
> >Thank you very much for the patch!
> >I tried it. The console say, that the
> >sound file was successfully loaded. And
> >the patch stated to have found 5379 samples, but
> >when I click to see the array1's contents,
> >I only notice a flat line and clicking to
> >hear the audio produces the "Sound of Silence"....
> >   
> That is strange because if the output of [soundfiler] is the number of 
> samples then if should have loaded the file (I think)... This seems 
> stupid but are you sure an array1 wasn't already present (it's like the 
> most famous array name in the help files :)
> >MPlayer (I am using pd extended on Linux) has no problems
> >to play the file, so I think it is ok...
> >
> >"Wavinfo" is not known by my installation of Pure Data
> >(Gentoo Linux, pd-overlay).
> >   
> I think wavinfo is only in pd extended
> >Since the only thing, the console's output displays is
> >a "Success Warning" ;) I am a little like being
> >in the middle of nowhere...
> >
> >What can I try next?
> >   
> Not sure... Waht happns with the attached test patch? Can you see the 
> file in the table?
> >Have a nice weekend!
> >Best regards!
> >mcc
> >
> >   
> You too.
> Lorenzo
> 
> >Lorenzo<lsutton at libero.it>  [10-03-15 13:34]:
> >   
> >>     
> >>>Look into Media ->  Audio Settings... , and change the sample rate 
> >>>to
> >>>22050.
> >>>
> >>>Pierre
> >>>
> >>>2010/3/11<meino.cramer at gmx.de<mailto:meino.cramer at gmx.de>>
> >>>
> >>>    Hi,
> >>>
> >>>    thanks to you all for help!
> >>>
> >>>    ...how can I change the default samplerate?
> >>>
> >>>    I found [samplerate~ ] but there is no help file
> >>>    for it (it least with my installation on Gentoo)?
> >>>
> >>>       
> >>In this case the samplerate of the file is important. You could use
> >>[tabread4~] with a [line~] after calculating the needed length for 
> >>the
> >>[line~]
> >>
> >>Have a look at the attached patch for an idea..
> >>
> >>all the best,
> >>Lorenzo.
> >>     
> >   
> >>#N canvas 92 93 691 480 10;
> >>#X obj 62 34 soundfiler;
> >>#X obj -74 400 tabread4~ array1;
> >>#X obj -158 290 f;
> >>#X obj -74 374 line~;
> >>#X obj -84 455 dac~;
> >>#X obj 47 284 f;
> >>#X floatatom 185 62 10 0 0 0 - - -;
> >>#X text 177 40 total samples;
> >>#X obj -143 156 /;
> >>#X obj -143 101 t f b;
> >>#X text -255 143 length in seconds;
> >>#X text -253 131 needed;
> >>#X obj -74 311 pack f f;
> >>#X obj -246 256 t b b;
> >>#X obj -246 231 bng 20 250 50 0 empty empty empty 17 7 0 10 -261682
> >>-1 -1;
> >>#X msg 62 8 read -resize ./test.wav array1;
> >>#X msg -113 27 22050;
> >>#X msg -70 27 44100;
> >>#X msg -23 27 48000;
> >>#X msg -244 398 \; pd dsp \$1;
> >>#X obj -244 366 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1
> >>1 1;
> >>#X msg -74 341 0 \, \$2 \$1;
> >>#X obj 113 181 table array1;
> >>#X obj -143 188 * 1000;
> >>#X floatatom -126 214 10 0 0 0 - - -;
> >>#X text 188 181<- click to see array;
> >>#X obj -128 125 f;
> >>#X obj -70 5 loadbang;
> >>#X obj -260 85 wavinfo;
> >>#X text -295 83 with;
> >>#X text -295 46 (*) you could also get;
> >>#X text -296 63 this automatically;
> >>#X obj 259 7 cnv 15 120 20 empty empty empty 20 12 0 14 -257985 
> >>-66577
> >>0;
> >>#X obj -288 3 cnv 15 120 20 empty empty empty 20 12 0 14 -257985 
> >>-66577
> >>0;
> >>#X obj -285 207 cnv 15 120 20 empty empty empty 20 12 0 14 -257985
> >>-66577 0;
> >>#X text -281 207 play entire array;
> >>#X text -287 4 chose files's sample rate first (*);
> >>#X text 259 7<- then read file;
> >>#X obj -223 366 cnv 15 120 20 empty empty empty 20 12 0 14 -257985
> >>-66577 0;
> >>#X text -220 368 dsp on/off;
> >>#X text -93 179 you need milliseconds;
> >>#X text -94 194 for [line~];
> >>#X connect 0 0 6 0;
> >>#X connect 0 0 5 1;
> >>#X connect 0 0 9 0;
> >>#X connect 1 0 4 0;
> >>#X connect 1 0 4 1;
> >>#X connect 2 0 12 0;
> >>#X connect 3 0 1 0;
> >>#X connect 5 0 12 1;
> >>#X connect 8 0 23 0;
> >>#X connect 9 0 8 0;
> >>#X connect 9 1 26 0;
> >>#X connect 12 0 21 0;
> >>#X connect 13 0 2 0;
> >>#X connect 13 1 5 0;
> >>#X connect 14 0 13 0;
> >>#X connect 15 0 0 0;
> >>#X connect 16 0 26 1;
> >>#X connect 17 0 26 1;
> >>#X connect 18 0 26 1;
> >>#X connect 20 0 19 0;
> >>#X connect 21 0 3 0;
> >>#X connect 23 0 24 0;
> >>#X connect 23 0 2 1;
> >>#X connect 26 0 8 1;
> >>#X connect 27 0 17 0;
> >>     
> >   
> >>_______________________________________________
> >>Pd-list at iem.at mailing list
> >>UNSUBSCRIBE and account-management ->  
> >>http://lists.puredata.info/listinfo/pd-list
> >>     
> >

> #N canvas 426 275 450 300 10;
> #X obj 57 43 soundfiler;
> #X obj 57 96 table array123;
> #X msg 57 17 read -resize ./test.wav array123;
> #X floatatom 57 67 10 0 0 0 - - -;
> #X connect 0 0 3 0;
> #X connect 2 0 0 0;

> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


-- 
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.





More information about the Pd-list mailing list