Fluid.concataudiofiles - use file boundaries as slice points

I am working through the Building a 2D Corpus Explorer tutorial in Max. For my own project I would like to use a directory of files, so the fluid.concataudiofiles object works great. However, in the next stage, I would like to generate slice points for the concatenated buffer that correspond to the original audio file boundaries. Is there a workflow to do this?

In part 5 of the video tutorial series after a single buffer is generated from the audio files, the slicing is still based on fluid.bufonsetslice~. My issue is that each file may have multiple transients and I don’t want the contents of a single source file to be split up.

I presume that this is a pretty easy thing to do. I am not sure if this is, as James points out in the videos, a Flucoma problem or a Max problem. The input files are WAV files. Let me know if there is a recommended workflow or if this is unclear.

Hi, and welcome!

The output of fluid.concataudiofiles is a dict that contains the information you need. You could do something like this to get the boundary for each file:

Optionally, you may not want the redundant 0 at the beginning, or the final number (the length of the buffer, essentially), so you could also chop those off with zl. If you need the numbers in a buffer~ you could then use fluid.list2buf

Thank you so much for this. Apologies for not reading the help file. I did hover over the outlet, which only says “(bang) when done” so I didn’t think it provided any info.

:face_with_open_eyes_and_hand_over_mouth: whoops – we’ll fix that…