Adjusting sample start position in one sample affects another

  • I just found that changing the sample start position in one sampler in a container affects another in the same container - both samplers are sharing the same samples so I think this has something to do with it. Basically in my release sampler I want to use the same samples as my sustain sampler but have them play back from near the end of the samples only.

    alt text

  • Nice catch. This is the disadvantage of sharing references of samples vs. duplicating them.
    I'll need to add explicit support for this which is not totally trivial so maybe you should look for a workaround until then.

  • I'll just make some extra release samples, shouldn't use too much RAM. I noticed this also affects purging, if the release samples are purged then so are the sustain.

  • Yes, that's right. If you're interested in the gory details: there are two types of sampler sounds (I'll call them by their C++ class name): StreamingSamplerSound and ModulatorSamplerSound. The first type is the more low level sample and just handles the streaming / purging. The latter is one abstraction layer above and contains a reference to a StreamingSamplerSound (or even multiple references for multimic samplers) and all properties (volume, MIDI mapping, etc).

    The global sample pool is a list of StreamingSamplerSound. If you load a sample into the sampler it checks the pool if it already exists and then just copies the reference. However this means that all streaming related properties are shared among the ModulatorSamplerSounds:

    • purge state
    • sample start / end
    • loop points

  • That makes sense, I can see how it will be a little tricky to solve

Log in to reply