Multisampler Stucture

Fabian Roos's icon

Hi, I'm relatively new to Max but used PD for quite some time. I'm about to build a multisampler (e.g. round robin on multiple velocity-layers), and be able to save my patches as presets. My first question in this is what would be the smartest way to handle the audio structure, can max save samples as tables and store these with the preset object? Or would it be better to have max make a new folder for every new "instrument" and record the sound files in there, is it easy to have max load multiple (like a lot of) samples with the preset object? General questions to know which direction to go when starting this project.

Roman Thilenius's icon

you would usually store a preset as textfile so that it can contain symbols (for the paths to the audio files) besides numbers (for parameter values)

loading many many files with objects like buffer at the same logical time works in theory, in practice you might run into trouble. but i think that is not different from PD, isnt it?

converting samples into data which can be contained right in the patch is generally not a good idea, i believe audio is often too big to do that.

the [preset] object doesnt do lists at all. i mostly use [coll] but also [text]. for huge amount of data which belong together (and which do NOT contain symbols, strings, or tables) you can also abuse the matrix object, where you can write single pixels 8in different modes between 2 and 64 bits) into a picture´s channels until you RAM is full and then export it as a single binary data file.

Roman Thilenius's icon

what i find interesting for round robin & co is to make a convention where you only name the folders, and then your sofware loads all samples in that folder into buffers. best solution if the number of samples is different for every set.

Fabian Roos's icon

Thanks for the suggestions! Loading a whole folder of samples seems like a great way to be flexible. Would you load them into buffers? How would you load an unknown amount of samples in buffers, is there a way to create and delete buffers on the fly?

Roman Thilenius's icon

yes, buffer object.

nope, i am afraid they have to be there before. in an optimal case, with maximum lenght set already.

you can also change their max length by checking the file in question with sfinfo~ before. (but not while or after loading the file)

since you need the poly~ object in a sampler or synth probably already for something else (voicing) it might be unlucky to use it for playing variations, too.

if your material is short stuff (of a known maximum length) and you have plenty of RAM, you might also want to write the variations all in one buffer, at sample positions 0, 100000, 200000, ... similar to a wavetable or recycle file.