Hi,
(using Pd version 0.41.4-extended on Gentoo Linux (pd-overlay))
I am trying to read a short soundfile (wav/aiff) from disc into an array and then play the data of the array into a [dac~]. In the meanwhile to sounds like "something" but itt has nothing to do with the original file, which plays well via mplayer, vlc etc.
#> file oneshot.wav
gives me
oneshot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 22050 Hz
#> file oneshot.aiff
gives me
oneshot.aiff: IFF data, AIFF audio
Only reading the file via the last "raw" command fills the array with anything else then nulls. Both top commands seem to do nothing at all.
I copied the stuff from different help entries.
Attached you will find the according patch.
What did I wrong with this?
Thank you very much in advance for any help! mcc
Hi,
Pd says your wav file is at 22050 Hz? Maybe your Pd session is at the default rate (44100 if i m not mistaken), that's why it doesn't sound like it should. Your patch looks fine to me, I mean it should work.
Pierre
2010/3/11 meino.cramer@gmx.de
Hi,
(using Pd version 0.41.4-extended on Gentoo Linux (pd-overlay))
I am trying to read a short soundfile (wav/aiff) from disc into an array and then play the data of the array into a [dac~]. In the meanwhile to sounds like "something" but itt has nothing to do with the original file, which plays well via mplayer, vlc etc.
#> file oneshot.wav
gives me
oneshot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 22050 Hz
#> file oneshot.aiff
gives me
oneshot.aiff: IFF data, AIFF audio
Only reading the file via the last "raw" command fills the array with anything else then nulls. Both top commands seem to do nothing at all.
I copied the stuff from different help entries.
Attached you will find the according patch.
What did I wrong with this?
Thank you very much in advance for any help! mcc
-- 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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
if I am not mistaken, the fil will be played at the double speed half duration. dont forget to check samplerates, pd doesn't convert samplerates automagically as audio players :D
2010/3/11 Pierre Massat pimassat@gmail.com
Hi,
Pd says your wav file is at 22050 Hz? Maybe your Pd session is at the default rate (44100 if i m not mistaken), that's why it doesn't sound like it should. Your patch looks fine to me, I mean it should work.
Pierre
2010/3/11 meino.cramer@gmx.de
Hi,
(using Pd version 0.41.4-extended on Gentoo Linux (pd-overlay))
I am trying to read a short soundfile (wav/aiff) from disc into an array and then play the data of the array into a [dac~]. In the meanwhile to sounds like "something" but itt has nothing to do with the original file, which plays well via mplayer, vlc etc.
#> file oneshot.wav
gives me
oneshot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 22050 Hz
#> file oneshot.aiff
gives me
oneshot.aiff: IFF data, AIFF audio
Only reading the file via the last "raw" command fills the array with anything else then nulls. Both top commands seem to do nothing at all.
I copied the stuff from different help entries.
Attached you will find the according patch.
What did I wrong with this?
Thank you very much in advance for any help! mcc
-- 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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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)?
Best regards, mcc
Pierre Massat pimassat@gmail.com [10-03-11 18:04]:
Hi,
Pd says your wav file is at 22050 Hz? Maybe your Pd session is at the default rate (44100 if i m not mistaken), that's why it doesn't sound like it should. Your patch looks fine to me, I mean it should work.
Pierre
2010/3/11 meino.cramer@gmx.de
Hi,
(using Pd version 0.41.4-extended on Gentoo Linux (pd-overlay))
I am trying to read a short soundfile (wav/aiff) from disc into an array and then play the data of the array into a [dac~]. In the meanwhile to sounds like "something" but itt has nothing to do with the original file, which plays well via mplayer, vlc etc.
#> file oneshot.wav
gives me
oneshot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 22050 Hz
#> file oneshot.aiff
gives me
oneshot.aiff: IFF data, AIFF audio
Only reading the file via the last "raw" command fills the array with anything else then nulls. Both top commands seem to do nothing at all.
I copied the stuff from different help entries.
Attached you will find the according patch.
What did I wrong with this?
Thank you very much in advance for any help! mcc
-- 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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Look into Media -> Audio Settings... , and change the sample rate to 22050.
Pierre
2010/3/11 meino.cramer@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)?
Best regards, mcc
Pierre Massat pimassat@gmail.com [10-03-11 18:04]:
Hi,
Pd says your wav file is at 22050 Hz? Maybe your Pd session is at the default rate (44100 if i m not mistaken), that's why it doesn't sound
like
it should. Your patch looks fine to me, I mean it should work.
Pierre
2010/3/11 meino.cramer@gmx.de
Hi,
(using Pd version 0.41.4-extended on Gentoo Linux (pd-overlay))
I am trying to read a short soundfile (wav/aiff) from disc into an array and then play the data of the array into a [dac~]. In the meanwhile to sounds like "something" but itt has nothing to do with the original file, which plays well via mplayer, vlc etc.
#> file oneshot.wav
gives me
oneshot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM,
16
bit, stereo 22050 Hz
#> file oneshot.aiff
gives me
oneshot.aiff: IFF data, AIFF audio
Only reading the file via the last "raw" command fills the array with anything else then nulls. Both top commands seem to do nothing at all.
I copied the stuff from different help entries.
Attached you will find the according patch.
What did I wrong with this?
Thank you very much in advance for any help! mcc
-- 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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@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.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Look into Media -> Audio Settings... , and change the sample rate to 22050.
Pierre
2010/3/11 <meino.cramer@gmx.de mailto:meino.cramer@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.
Hi Lorenzo,
sorry for answering your posting that late...I was very busy last time and have no chance to pure data :) at all.
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"....
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).
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?
Have a nice weekend! Best regards! mcc
Lorenzo lsutton@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@gmx.de mailto:meino.cramer@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi meino,
meino.cramer@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
Lorenzolsutton@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@gmx.demailto:meino.cramer@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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@libero.it [10-03-19 16:00]:
Hi meino,
meino.cramer@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
Lorenzolsutton@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@gmx.demailto:meino.cramer@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@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list