Analysing a folder of sounds in Max without merging them in a single buffer?

Hello,

I want to use a regressor to organize some samples. However I want the regressor to provide me with the name of the sample chosen when using fluid.plotter.

So, I was wondering if there’s a way in Max to deal with a folder containing samples without merging the samples into a single buffer.

Otherwise, I suppose I’ll have to modify fluid.concataudiofiles to store all the filenames and find a way to retrieve the name anytime some segment is chosen within the buffer. :thinking:

There definitely is! In Max you can load all your samples in a polybuffer, and then dump its content and process each ‘buffer’ individually by driving the @source of your batch processing.

Does that help a bit?

1 Like

Great! Thanks @tremblap !

At first I thought one could encode the name of the polybuffer into @source, but it doesn’t function. Then I’ve tried to list the individual buffers within the polybuffer, either with commas or spaces, it doesn’t function neither.

Does it mean I want to iterate through all my buffers? Then, will the output be in a common dataset on in individual ones?

The format for the individual buffer~s of a polybuffer~ uses a period polybuffername.number (counting from 1)

I know that, but can I analyze several files, put the fragments into a regressor and know which file a fragment is related to when it is returned by the regressor (when scanning with a fluid.plotter for instance) ? I suppose I should add the filename to each set of data entered into the regressor post-normalization?

this is it: you need to know what comes from where. there are many ways to do that, but one is to use the identifier (a symbol) to ‘encode’ where the data is coming from. then when you get your result you will decode from it what to playback.

for instance, a dataset with polybufer SOUND could have 3 points with those ids

“1 0”
“2 0”
“2 5000”

in which I have decided that the first value is the plybuffer subbuffer and the second is the offset in the said buffer, which allows me to have more than one slice per buffer.

this is very powerful, as you can code the way you want what you need.

Oh, I see, sorry. Here’s a very simple example of what @tremblap mentions below, just using source buffer names for dataset IDs. These ID’s would be preserved if you then call predict on the regressor with this dataset. Hopefully it’s clear enough to see how you could add extra metadata to the ID, like slice points and suchlike.


----------begin_max5_patcher----------
1210.3ocyY0siahCF85jmBKTuLKEa.Czqpzt2rOCqphbBNILBLHayrY1pNO6
q+ARxzIIXRXZ5HMAAwweemy2O9Xy2mOyaU8dpvC7Ev+.lM66ymMy7H8Cl0c+
LuJx90kDgYXdqqqpnLo2B62Io6klmSXjxWDT.krdGXU6lMTNnfAjsbV+XaHx
06JXaWxoqkVahRQ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