On Thursday 12 August 2010 01:01:57 Andrew C wrote:
> Hey list,
> 
> Any simple forumla/rough guide to calculating how many KB each sample head
> will take up in RAM?

That depends on the compile time parameter CONFIG_PRELOAD_SAMPLES, which by 
default is 32768 sample points (which equals 743ms if the samples have a rate 
of 44.1kHz). You can change that value if you like. So for one mono sample 
this would be

32768 (CONFIG_PRELOAD_SAMPLES) * 2 (16 bit sample) = 64kB

for a stereo sample you have to double it, thus it would be 128kB per stereo 
sample.

For the total RAM usage of one instrument you have to check which samples are 
referenced by the instrument (since the sampler will only buffer the samples 
which are actually used by the requested instrument and ignore all unused 
samples) and multiply it with that value. And of course, if samples are shared 
among intruments, the respective samples will only be cached once.

CU
Christian

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to