M4L Save contents of buffer~ object

Takuma Matsui's icon

Hello!

I'm working on a granular M4L patch, and I'm wondering if there's a way to save buffer~ contents in a Live set between closing and reopening the set. I know you can get the file patch and trigger that on load, but I was wondering if there's a more efficient/invisible way to do it.

Thank you!

11OLSEN's icon

Hi, you can't save a big amount of data into a Liveset. You can do some tricks to save a very (very )small buffer~ by putting the floats into a dict or coll. But you never know when the user saves the Set so any change needs to be immediately reflected in the dict or coll or whetever objects you have set to "Parameter Mode Enabled".
live.drop is a good choice to save the filepath of your saved buffer it will recall the path when device is loaded and it will handle the case when you "collect and save" the Set . (You can also use it without actually dropping the file onto it by using a "set" message)

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