[PD] writing soundfiles (was Re: (no subject))
batuhan at batuhanbozkurt.com
Tue Sep 11 21:22:31 CEST 2007
martin.peach at sympatico.ca wrote:
> Batuhan Bozkurt wrote:
>>> David Schaffer wrote:
>>>> Does anyone know the size limit of a 44.1k stereo wav file that
>>>> "soundfiler" can handle? So far, I haven't been able to write more than
>>>> 36562276 samples to a table (which represents 829 seconds of sound if I
>>>> get it right). What can I do in order to be able to read larger files?
>> You should be able to load fairly large files to tables with the -resize
>> option combined with -maxsize option. But there is obviously a limit. I
>> remember being able to load more than 1 hours of 441.k "mono" files
>> through soundfiler.
>> So sending
>> [read -resize -maxsize 99999999 soundfile.wav(
>> to soundfiler object should work. obviously there is a limit to that
>> maxsize sample length, and I'm not really sure about the number(and what
>> limits it), but this limit may have something to do with your memory
>> limits set in /etc/security/limits.conf if you are on linux but its just
>> a guess.
> 16777215 ,aka (2^24) - 1, is the last sequential integer that can be accurately represented by a 32-bit float, the kind used in pd, so the 99999999 in the message, which pd processes as a 32-bit float, would probably end up as another value. (Some larger integers can be accurately represented but they are separated by increasingly large runs of unrepresentable integers).
> Perhaps you could split the file into several smaller tables?
Yes Martin, you are right. The purpose of 99999999 number there was to
make the maxsize as big as possible(one more digit and soundfiler was
returning an error message afair). But I think I can load files that are
bigger than 16777215 samples long(which makes approx. 6.3 minutes of
44.1kHz mono file). I'll check tonight and report.
More information about the Pd-list