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.
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.
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?
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.