amxd build process
Is there a way to build amxd devices as part of an automated process?
It would be useful to at least have a command line tool that takes in a .maxproj and outputs an .amxd.
That would be indeed very helpful! With older version of Max it was possible, by opening amxd files outside Ableton in the normal Max editor, and saving them (sending Ctrl-S with a scripting host) - this automatically freezed the device.
Now since 7.3.3 or so, it is all manual work: open ableton, drag in device, open editor, freeze, save, again open Ableton, check if device works ...
We release a set of amxd files which share a lot of patches. This new release process prevents us from providing quick customizations or bugfixes to our customers. Nobody likes to spend his or her time that way.
I'm trying to make a tool that generates amxd devices that act as proxies for other systems over OSC (mostly TouchDesigner stuff at the moment). So I have a module in TD that does some video processing and it has some parameters and then generate a m4l device that has the same parameters so it can take advantage of Live's MIDI mapping and sequencing capabilities. But since it isn't possible to dynamically add/remove m4l parameters after a device has been loaded, it would need to be done beforehand. I already have tools for generating a structured schema for the TD modules, so it would be really helpful to be able to just include a step in the conversion process to generate patches and build m4l devices out of them.
nice. I didn't fully understand the big picture behind the idea, but it looks like you know what you're doing... You can manipulate maxpat files with a JSON parser. If you basically make an empty amxd, and just put your code into a bpatcher? If it is just a small change like a parameter name, the risk of that method might be bearable. That way you could maybe add the parameter you need. If you can live with a MAX version < 7.3, you even could use the scripting host trick to automatically generate the amxd. Admittedly quite dirty, it depends on your project if you could live with that.
The plan is to generate maxpat files, and then build those into amxd devices.
Any Max technique to generate things at runtime within m4l won't work, because live only recognizes parameters that exist when the device is first instantiated. That rules out max scripting, javascript, bpatchers, all sorts of other options.
So I think the only option would be the scripting trick with <7.3.
Given that this functionality already exists within the Max editing environment, it would seem to be relatively simple to provide some proper means of automating it, even if it's just an external executable file that can be run with a maxpat/maxproj passed into it.