Automating M4L builds?
An open question for M4L makers: Has anyone done anything to automate (at least partly) the build and distribution process of a M4L device? For me, it still involves manual steps that I'd like to avoid (by some Apple scripting magic maybe?)
1. clean out all those pesky unfrozen externals and subpatches that Live scatters everywhere on the system and that can possibly be picked up with the new build
2. open a new Live set, add the source device
3. freeze and save to the distribution dir
4. package the distribution dir
Thanks for any hints!
Are you specifically looking for automating the creation of the .alp stuff in Ableton, or workflows generally?
I mostly avoid step (1) by doing all my M4L development in Max, rather than launching via Max for Live. I feel like this gives much more transparency to which version of various files I'm using, which is useful for more complex projects. Also it (historically anyway) felt much more stable.
As part of this, I also set my "Default Folder for Max for Live Device Projects" to a folder in /tmp. ("Macintosh HD:/private/tmp/Max for Live Devices"). That way I know it gets purged regularly and only stuff I've very explicitly developed as part of my libraries/projects stays on my system.
So I basically just work with "Projects" in Max rather than freezing/unfreezing devices, until they're ready for testing / export.
Then, when ready to distribute...
2) I wrote a Python script** which clones a Project into /tmp with a new name. (I made an additional AppleScript utility which wraps the call to this script so I can avoid using Terminal for it and just drag-and-drop).
3) Then I open that cloned project in Max and select "Manage Project" > "Consolidate" to pull in the latest files all together inside that project. This way my original project doesn't keep copies of shared library/package code inside it, and the clone will get the latest versions when it is Consolidated.
4) File > Export Max for Live Device
**This script is also more aggressive/better at getting included JS files like jspainterfiles, .svg references and stuff like that than Max is.