How to have multiple groups refer to the same sample

lahatte
lahatte Member Posts: 108 Member
edited October 2024 in Scripting Workshop

I have 5 groups that all use the same sample, but different regions of the sample. The sample file is about 22kb in size, but when I load the nki file Kontakt shows the memory usage is 310 kb.

If I purge all and then just activate one group the used memory size is reported is about 62 kb. 62 * 5 = 310

I thought that if the same sample was used there would be no added memory usage. I can only assume that each group must have it's own RAM address, thus the sample is in RAM 5 times?

What's going on there?

Comments

  • stephen24
    stephen24 Member Posts: 429 Pro
    edited October 2023

    DFD.

    (22kb of 16 bit 44100Hz stereo gives you about 1/8 second)

  • lahatte
    lahatte Member Posts: 108 Member

    Sorry, I meant 21,000kb. All those numbers in my original post should be multiplied by 1000. Doh!

    Anyway, the question remains as to why five groups use 5 times the memory for the same sample.

  • stephen24
    stephen24 Member Posts: 429 Pro
    edited October 2023

    Tell us more about your sample - information from Wave Editor. (Duration, bit depth, sample rate, mono/stereo, Sample start, Sample mod). Are you using DFD (Source Module)?

    DFD loads only part of the sample, how much depends on some of these values.

  • medusa
    medusa Member Posts: 98 Helper

    Because you said you are using different regions of the same sample.

  • lahatte
    lahatte Member Posts: 108 Member

    The point is that the total size of the sample file is about 22Mb. But in Kontakt if all of the 5 sections of the sample get selected to play at some point then the total memory usage is 310Mb.

    So.... what is Kontakt doing with the sample? Is it loading the same sample 5 times? It seems like it. I thought it would only need to load it once, then use what is pointed to by sample start values.

  • Renton McGregor
    Renton McGregor Member Posts: 5 Member

    I recommend testing your theory. I believe you can duplicate zones, so duplicated from C-1 to C8 across 8 groups and see what happens. Remember that nki memory is more than just your sample size. It's a big app with memory required to track what you load into it. With very long samples or at high spec you might have a better chance to see the multipliers in effect vs the housekeeping needs.

This discussion has been closed.
Back To Top