[PD] Re: size of loaded audio to array

derek holzer derek at x-i.net
Mon Apr 12 22:07:04 CEST 2004


derek holzer wrote:
 > Another memory-related question:
 >
 > When I load an audio file to an array, the array resizes to a certain
 > length and loads the audio in mono. Does this mean that only the samples
 > which are in the array are stored RAM, or is the whole file kept in RAM?

Ahhhh.... just found this!!!!!  read on...

Subject: Re: [PD] the max size of array?
Date: Mon, 7 Apr 2003 09:02:00 +0200
From: Thomas Grill <t.grill at gmx.net>
Thomas Grill wrote:

 > For your wav file: Don't forget that a 16 bit file will be blown up to
 > double size (32 bits) and will then take up 304 MB. It depends on 
your RAM
 > size if that can be handled.

It would seem that the file takes up twice as much room even when only 
one track is being used? The story gets stranger and stranger!

So how much RAM does a 3 minute, stereo, 16-bit file @ 44100 Hz actually 
take up when loaded into a single-channel, 1323000-element [30 sec @ 
44100 Hz] array? Seems like a simple math question, but I feel like I 
don't have all the factors figured in yet... [Bonus question: would it 
make a difference if PD were using 48 Khz?]

 > Don't use a graphical array! The graphical
 > representation can't handle this large arrays properly.

Which array should I use then? I haven't seen a non-graphical array 
object... Usually, I just hide it in a subpatch for that "non-graphical" 
approach. Can you point me in the right direction?

d.




-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 149:
"Take a break"




More information about the Pd-list mailing list