Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
there's [soundfile_info) as well, iemlib
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
there's [soundfile_info) as well, iemlib
In fact... And here's an 'unpacked' version of the help ;)
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I'm not sure about the number of channels, however there is a slightly round-about way to get the number of samples from a file. Write to an array using [soundfiler] with the -resize flag. Then use [arraysize] to find the size of the array. Et voila, the number of samples in your file. Hope that helps
From: reduzierer@yahoo.de To: pd-list@iem.at Date: Thu, 28 Jan 2010 23:30:53 +0100 Subject: [PD] acquiring information about wav files
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Got a cool Hotmail story? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/
Hello,
Ok here is my Chi-squre calculator.
Here in pseudo-rng version (0 to 255)
Do you know any objects that could help to optimize this patch?
I don't figure out why "print 1" is desynchronised.
Doesn't matter at the end because the chi-square value is output each 100 draws.
Best,
Cosmin
_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/
On Thu, 2010-01-28 at 22:59 +0000, Andrew Faraday wrote:
I'm not sure about the number of channels, however there is a slightly round-about way to get the number of samples from a file.
Write to an array using [soundfiler] with the -resize flag. Then use [arraysize] to find the size of the array. Et voila, the number of samples in your file.
Hehe, when using this approach, one could load a file into n arrays and then check, which arrays are completely zero in order to estimate the number of channels (very expensive).
The goal is actually being able to seek in very large files, while reading directly from disk. Having to read the whole files and even more write them to memory would be way too slow and too expensive.
Anyway, thanks for the suggestion.
Roman
Just for the record - soundfiler outputs the number of samples directly, so there's no need for [arraysize] in this kind of situation. It's not mentioned directly in the help file, but that number box connected to soundfiler's output reports the number of samples.
On Thu, Jan 28, 2010 at 2:59 PM, Andrew Faraday jbturgid@hotmail.com wrote:
I'm not sure about the number of channels, however there is a slightly round-about way to get the number of samples from a file. Write to an array using [soundfiler] with the -resize flag. Then use [arraysize] to find the size of the array. Et voila, the number of samples in your file. Hope that helps
From: reduzierer@yahoo.de To: pd-list@iem.at Date: Thu, 28 Jan 2010 23:30:53 +0100 Subject: [PD] acquiring information about wav files
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Got a cool Hotmail story? Tell us now _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Yeah, but only of the part that you write into the table, which means you have to read the whole file from disk before you know the number of frames (and you need a huge array, when reading a huge file).
Roman
On Fri, 2010-01-29 at 11:00 -0800, William Brent wrote:
Just for the record - soundfiler outputs the number of samples directly, so there's no need for [arraysize] in this kind of situation. It's not mentioned directly in the help file, but that number box connected to soundfiler's output reports the number of samples.
On Thu, Jan 28, 2010 at 2:59 PM, Andrew Faraday jbturgid@hotmail.com wrote:
I'm not sure about the number of channels, however there is a slightly round-about way to get the number of samples from a file. Write to an array using [soundfiler] with the -resize flag. Then use [arraysize] to find the size of the array. Et voila, the number of samples in your file. Hope that helps
From: reduzierer@yahoo.de To: pd-list@iem.at Date: Thu, 28 Jan 2010 23:30:53 +0100 Subject: [PD] acquiring information about wav files
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Got a cool Hotmail story? Tell us now _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I use with the [shell] (to get tags under Ubuntu) : totem-video-indexer audio_file_path
For example : $ totem-video-indexer '/home/jack/Musique/[1999] SYR4 - Goodbye 20th century disc 1/Disc 1/1-01 - edges.mp3' TOTEM_INFO_TITLE=Edges TOTEM_INFO_ARTIST=Sonic Youth TOTEM_INFO_YEAR=1999 TOTEM_INFO_ALBUM=SYR4: Goodbye Twentieth Century [Disc 1] TOTEM_INFO_DURATION=963 TOTEM_INFO_TRACK_NUMBER=1 TOTEM_INFO_HAS_VIDEO=False TOTEM_INFO_HAS_AUDIO=True TOTEM_INFO_AUDIO_BITRATE=192 TOTEM_INFO_AUDIO_CODEC=MPEG 1 Audio, Layer 3 (MP3) TOTEM_INFO_AUDIO_SAMPLE_RATE=44100 TOTEM_INFO_AUDIO_CHANNELS=Stéréo
With a grep and [symbol] + [s2l =] + [unpack s s], you should get what you are looking for (i am not sure that it works with all files). ++
Jack
Le jeudi 28 janvier 2010 à 23:30 +0100, Roman Haefeli a écrit :
Hi all
I am looking for a way to get information about WAV files in Pd, specifically the number of channels and the number of frames. I know [wavinfo], but it does not seem to work on windows ("error: could not read WAV-header" with any file I could find) and on linux it seems to read only a subset of WAV formats. It does not read from widely used broadcast format WAV files. The target platform is windows AND linux anyway in this case, so I need a portable solution.
The most troubling fact is, that some Pd-vanilla classes ([soundfiler], [readsf~]) actually do retrieve the information I need, they read both, the number of frames and the number of channels correctly, with all pcm encoded wav files I tried, but - what a pity - they don't expose this information to the patch level.
Hopefully I am overseeing the obvious here. Hints are very welcome.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list