creating audio files out of slices of buffer~?

Tiago Morgado's icon

I have markers on a buffer~ created with a snapshot~ and a zl stream 2 and some more objects on a coll.. I need to record those slices into aiff and wav files in a specific location so that I can instantiate them at a certain point? how can I pick these portions of the buffer and save them.. I posted in this forum because I know there are more advanced guys here but if it is possible to do with js/mxj I would thank the solution, otherwise just script a bit

Max Patch
Copy patch and select New From Clipboard in Max.

here is the patch I am working on

luigialvarado's icon

THis this isn't working in mine! Is it supposed to make a sound>