Audio freezes when sample kits are swapped

Hey, I’m working with the following chain in Orac 2:

Audio In → Sampler → Granular Effect

As soon as I switch a kit inside my sampler, audio that’s currently running (and doesn’t rely on the samples) freezes until the new kit is fully loaded. This can take up to a few seconds depending on the kit size.

This affects the audio in signal as well as “re-sampled” grains that are detached from the actual samples and run inside the separate effect patch.

Is there a way to load kits inside the sampler without affecting audio in and effect patch signal?

Attached is a picture of the patches that manage kit loading inside the sampler.

Thank you!

Unfortunately I don’t believe there is anything you can do about that as far as I know :frowning_face: The sound you’re hearing is the sample loading up into memory and because Pure Data is a single thread process, it freezes all audio until the table gets resized and the data gets put into it. It could probably be reduced if you use smaller samples however

1 Like

I see. This info already helps changing the direction for a solution, thanks. :slight_smile:

I’m wondering if I could just load all samples from all kits before the performance starts (and obviously wait a while for it to be ready).
And therefore change the code from actually loading the right samples to just “pointing” at them.

Do you know if Organelle M is able to load ~1GB in form of ~100 wav samples without problems like lagging, drop-outs etc once it’s all loaded?

I do believe that could work! There MAY be the need to code in some kind of ‘reload’ function into whatever sampler you’re using because I don’t know if your samples will reload when opening presets. I don’t know if that’s really necessary but if you run into problems, its worth considering but that is definitely the direction I would go in

1 Like

Great, that’s good to know! I’ll give it a shot. :slight_smile:

It freezes because it’s pulling samples from the sd-card storage (which is too slow for the task), but the Organelle M has 1GB RAM so you should be able to load the desired samples on memory when the patch loads the first time.

Not sure about how much memory you can fill before compromising performance, I haven’t messed with samples too much yet, but I might have to start! :slightly_smiling_face:

1 Like

A quick update on the situation:

All samples now load from one large kit once the sampler is opened. This takes up to 2 minutes but works totally fine afterwards.
An additional control lets me assign the right samples to buttons in groups of 12 (one octave).
I also added a kit switch control that changes between THE kit and a dummy kit so that I can “re-load” the samples at any time inside the patch if needed.

Thanks again for your help! :slight_smile:

1 Like

Awesome! Glad to hear you got it to work! Are you just using Sampler24?