Save buffer contents with Live set or registered in Live project?
I am writing a recording and sequencing device and would love to find a way to save the recorded audio data in my buffer~ objects along with the Ableton Live set. If this is not possible, is there a way to save the data as an audio file within the project, so that the set and project are aware of them when using the "Manage Files" dialog? I want to avoid the samples being lost when there are changes to the Live set.
I save the buffer audio using a write message that includes the folder address. Something like,
"write" + "Macintosh HD:/Users/mikeF/Documents/Samples/MaxLoops/loop1.aiff"
Then I read it using the same address with a "read" message. The process can be somewhat automated if you use objects like "opendialog" to get the folder path, "combine" to create .aiff names, and "sprintf" to format it".
It also doesn’t hurt to have a simple "write" and "read" message attached to the buffer, to save things manually, if the above method is not working.
I guess I should save them in the live project’s samples folder, but how to get the full path of that folder from max? And then I wonder what the correct way to save the file path in the live set is?
This is one way to do it.
----------begin_max5_patcher---------- 1362.3oc0Z0zaiaCD8r8uBBAr2bkE+TRKVTfTrGZOjSE8TSQgrMsM2JK5pOx lrK1+6kjRxVIwVVVlVN8PDfnTDe7My7lYH82GOxYl7IdlC3if+DLZz2GOZjY H8.iptejylnmlGGkYdMm4xMa3I4NSJeVN+oby3eB7HOUr745GrMJe9ZQxp+N kOOubBB7BbQDFM.MAfCQtzI.H0y0aB.otB9qp+ykxj7Lw235+IHR83pgSWMS Oj2tQDKLyrb1W9IFpddSJ1HRh44FzBa7ISh1X9jN2kJhh2AyTdlZ4DkKjIMf Jzi.2gUBjnAoW0kc.UMUxh754xSO3OFOVeYxERleMUjyA+bKbIDS07Ggg0nh F35q.KBZCpDZWpTydHJl3Gpv4fyjJDs.juVjA1vyxhVwA4RvrhkK4osxuH7d PyLfFF5YQR1yxjLNTiQFz6JwuUr2Q7Tev49n4hjbY1Zvu94ON8Ox3oYS2H9G 9zOKmWnsLYSuuHNWbOegH5tYJnHSZLBvCRl96xjUvowR416biDKW9fS8zUB9 7m2xKWtNN6VZGJ1HjXhc0VpJiGkBM1P+iY2ftzPJLv+slJZ3AMUniZp.+VdT rX9IrXLlQ.jFfcY3PH6jVMnEiJ9DXoHlCTb2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CjnapFCD+P6BdFNU9t3NOb0HzIIidx MkE.Gsc6ipFCp9jFfn5u3KxT8srIlaEIk2Z58yIk+nn98olQhRUE9mqp5uHs rD7mXDmw544Gi+OPC5OiR -----------end_max5_patcher-----------
- This reply was modified 6 months by mike fonte.
I think what I’m looking for is a way to do this automatically so it happens behind the scenes. I want to be able to record into ~buffer, save the live set, close Live, then re-open the live set and have the contents of the ~buffer objects all automatically loaded and ready to go.
Since buffer~ is only going to store what you tell it to store (by reading and writing) there is no way I know of to do that "automatically".
Patrickkidd, would you mind opening the patch I posted for you? Some feedback would be nice.
I opened your patch before my first reply, and thank you for posting it.
By "automatic" or "programatic" I mean without user interaction. Your patch shows how to get a file or folder path from an interactive dialog, and then how to format the resulting output into a filename. I am looking for a way to do this *programmatically*, which means without user interaction. That would require a function from the max for live api that returns the path of the current live set file, so you can then calculate the full path of where to store the audio file.
To be perfectly clear, the goal is to save the live set from Live’s "Save" menu function and have the max patch to save the contents of the ~buffer into a file as well (probably by a some kind of save event from the live api) by calculating the path relative to the live set file’s path, and sending the ~buffer object a "write" message with the *programmatically* calculated path as an argument.
This is not a question about ~buffer as much as it is a question about the Max For Live API and how to get a string containing the full or relative path to the live set on disk *without* user interaction.
You are welcome, I appreciate your response!
Did you see this post about the live set path?
Also, I was looking in the LOM for a "save event" or a "savebang" and could not find anything.
If that functionality doesn’t exist, then some user interaction may be required.