Creating a polyphonic multisampler - are buffer~ and multibuffer~ the best option?

Alinae Louis's icon

Hi,

I want to code a polyphonic multisampler in RNBO. I entend to have 6 voices of polyphony and 1 audio file per key/note (C, C#, D and so on). So basically around 80 audio files per preset.

So far, my first idea was to work with buffer~ and multibuffer~ but it seems to be a bad idea because:
- that would mean 80 or more buffers.

- it would be quite complex to make them read another 80 .wav every time I change the preset.

Is there some other object that would work and be more practical to upload new .wav everytime I change of preset?

BTW, I added polyphony to the RNBO patch, no problem. But then I thought that it would be stupid that every voice has to load the 80 buffers so I reduced polyphony to 0, put the buffers in the top patch and made a subpatch containing the multibuffer~ and added polyphony. At this point, the multibuffer doesn't read the buffer (in the top patch) anymore. Do you know why?

Alex Norman's icon

I'm not 100% sure why multibuffer doesn't work in a subpatcher but it looks like changing buffers isn't exactly a thing that you'd want to do per note, there is some allocation that happens as a result of changing the index in multibuffer.

It seems like there should be a better approach but, you could render a single sound file with all your samples in it (per preset), and then simply use offsets to get to the spot that you care about?

Alinae Louis's icon

Oh! I thought about this once, and for some reason, I gave up on that idea, but I think now it could be the best way!