Fluid.concataudiofiles + playlist~

Hey

I love creating corpus from many sound files that are located in different places on my HD.
My sound files are often pretty big (f.e field recording…) and I only want to use some small parts of them.
So I have to prepare my sounds :
open the files in Reaper, select the parts I need, create a mixdown and save it in a temporary folder before feeding them to fluid.concataudiofiles.
and if I want to create a new corpus with a different set of sounds, I have to create a new temp folder, and copy files, …
This is the kind of workflow I hate :face_vomiting:

So I had the idea to use max playlist~ which does all the job nicely : import files from everywhere, and select some portions of each file.

Here is a modified version of fluid.concataudiofiles that accepts as input a dict coming from playlist~.
I also added a @mono attribute, because most of the time, I need to create a monophonic buffer~ and I don’t like wasting my ram !
It seems to work pretty well, so I share it ; might be useful to some other lazy maxer like me :wink:

fluid.concataudiofiles-playlist.maxpat (103.7 KB)
fluid.concataudiofiles-playlist.maxhelp.maxpat (12.3 KB)

(BTW : this forum accepts .maxpat files… but no .maxhelp , so I had to rename the file .maxhelp.maxpat :-s

2 Likes

I realised just after posting this that if I use the same file several times in the playlist, with different selections, it doesn’t work, because the sound file name is used as index in the internal dict.
(and in the dict that is returned by fluid.concataudiofiles )
I will work on it and post a new version soon :slight_smile:

I updated the files in the first post :
now the same file can bu used multiple times in the playlist.
The dict returned by fluid.concataudiofiles-playlist when it loads a playlist is slightly different :
the index is a unique id, and there’s a nested key ‘filePath’ .
So this dict is not compatible with the one returned by the original abstraction.