Today I bring you a little tip useful when we need to work with a RAM limited-computer (a laptop for example) but we at the same time we want to work with heavy size libraries.
As I mentioned before, the way that Kontakt and others samples work in real time is loading part of the sound material in RAM (generally the attack of the notes) and the rest are loaded directly from the hard drive while the attack is being played. In this way, the system is able, with minimum latency, to ‘play’ the MIDI events and play samples.
This is defined in Kontakt as “Direct from Disk” (DFD) operation. If you have the complete version of Kontakt and you open a orchestral library you can check the configuration and see that this mode is enable (you can even choose another mode and load all the instrument in RAM but I don’t recommend it because it consumes RAM memory fast). For this reason, it’s very recommendable to use SSD memory to store heavy size libraries in order to have enough data rate to avoid bottleneck when we are working with a lot of tracks.
But…. what happens with RAM? The RAM size is very important if we are working with many instances of instrument because, even if DFD is enable and almost is loaded directly from hard drive, there’s a lot of data to be loaded in RAM in order to be able to play every MIDI event in any time.
And.. How much data would be loeaded in RAM? There is no concrete answer. It depends of the library. The Libraries with more microphone positions load more than the others (it is neccesary to load data from every note, every dynamic range for each microphone position. The type of instrument also has influence, the instruments with true legate sampled needs more because it needs to load data from each interval between each pair of possible notes. On the other hand, it also depends of how the library has been scripted.
For this reason we need enough RAM in our computer to be able to work with many instances of instruments. If we are working with a laptop or a computer with limited RAM there are two possibilities. The first one is to render the MIDI tracks to audio tracks while we are working and remove the Kontakt instances. With this method we lose the possibility of modify notes or dynamics. The second option is to use the purge command of Kontakt to optimize the use of RAM.
This command free all the RAM memory of the instance. After it, if we play MIDI events Kontatk will load into the RAM only the minimum data needed to play what’s written.
This is better explained with an example. This is one project mine of a orchestral piece of two minutes of duration.
It’s not a big project, it’s only a typical orchestral configuration without non-orchestral instruments neither soloist instruments. The use of layering is minimum. The libraries are not really heavy, maybe the Cinematic Studio Strings are the instruments that consume more RAM. The project takes 22Gb of RAM. If I check a Kontakt instance I can see the RAM that an instruments loads.
In this case, the first violins of Cinematic Studio Strings take 0.77Gb of RAM and it is a lot. This is due the way of these strings have been programed with an instance of instrument for all the articulations sampled and all the microphone positions. But, at the end, we don’t need all of this for each composition. In that case we can purge and optimize RAM as I told before.
If you want to purge, then click the little arrow next to Purge option and select Purge all samples. Although it sounds terrible there is nothing to fear.
After do it, it’s possible to check that the 0.77 Gb of RAM has been released.
If I play now the entire project for the first time, I’ll notice some discrepancies of sounds (silences, jumps in the volume). This is normal because Kontakt is looking from the disk the attack samples and loading it to RAM. But the difference is that now Kontakt only loads in RAM the samples needed to play what is written in MIDI track. Kontakt won’t load the articulations, microphones positions, dynamics and notes that aren’t being used.
After play the project one time, I can replay it without any problem of silences of volumes because Kontakt already has the minimum required data in RAM. If I check the Kontakt instance again I can see that it only needs 48 Mb of RAM memory. From 770 Mb to 48 Mb it’s a great save, isn’t it?
If we do the same with each instance we can reduce the RAM considerably and play the project without problems in RAM-limited computers.
It can be also useful to reduce the loading times when we open big templates.
I hope you like the tip.
Author: Pablo del Campo