Hi all,
It appears pd has at least several soundfile info objects (like wavinfo) but AFAICT none of them do it all. Can someone please enlighten me whether the previous statement is indeed true and if so which object is the most complete of the bunch.
Finally, it would be great to know what formats does the array support for loading and what formats do each of the soundfile info objects support.
Many thanks!
Next,
Ico
Hi Ico
It's been while since was I asking myself the same question. IIRC, [iemlib/soundfile_info] is far superior to [ext13/wavinfo]. The latter assumes a fixed header structure for wav file while many wav files may have quite different headers. [soundfile_info] deals with far more kinds of (valid!), but had troubles once with so-called broadcast wav files, but I think after I reported the issue it got fixed.
Actually, I only tested with wav files. [soundfile_info] claims support for AIFF files, too, but I haven't used/tested it. [wavinfo] supports only wav files, from what I can tell.
The sad part about this is that [readsf~ ] and [soundfiler] from Pd already have the ability to parse sound file headers, but they do not report anything. I haven't checked if they share code, but [soundfile_info] and [wavinfo] are totally separate implementations. I'd trust the built-in implementation the most as I never had any issue to load a PCM-encoded wav file with [readsf~] or [soundfiler]. [soundfile_info] is second, [wavinfo] is clearly the loser.
In my personal Pd utopia, I could create a [readsf~ 16] and it would allow me to load sound files with a channel count between 1 and 16. When loading the file, it would report all the info [soundfile_info] reports, including the number of channels. Then I wouldn't have to open each sound file twice, once for checking its properties and a second time for playing it, and I could with sound files with previously unknown number of channels in a much more dynamic way.
Roman
On Don, 2014-07-31 at 14:48 -0400, Ivica Bukvic wrote:
Hi all,
It appears pd has at least several soundfile info objects (like wavinfo) but AFAICT none of them do it all. Can someone please enlighten me whether the previous statement is indeed true and if so which object is the most complete of the bunch.
Finally, it would be great to know what formats does the array support for loading and what formats do each of the soundfile info objects support.
Many thanks!
Next,
Ico
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Garray only directly supports reading an ascii file containing a list of floating point values (can't remember the exact syntax, but that's essentially what it is).
[soundfile] will load up a garray with a wav or aiff.
I'm not sure about external objects.
As far as a soundfile object that does it all, it's a little tricky because not all audio files share the same set of attributes. It makes the API unnecessarily complex if you have to output not only whether an audio file is variable bit-rate or not (for example), but also whether that attribute exists for the type of file you are querying.
-Jonathan
On Thursday, July 31, 2014 2:52 PM, Ivica Bukvic ico@vt.edu wrote:
Hi all, It appears pd has at least several soundfile info objects (like wavinfo) but AFAICT none of them do it all. Can someone please enlighten me whether the previous statement is indeed true and if so which object is the most complete of the bunch. Finally, it would be great to know what formats does the array support for loading and what formats do each of the soundfile info objects support. Many thanks! Next, Ico _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list