max javascript complete reference?


    Jul 05 2015 | 1:21 pm
    I'd like to know if there's something like the Live Object Model for javascripting in max? For example, a document that lists all available commands for this.patcher like newdefault, getnamed, connect etc.? At the moment I'm finding that I just have to piece together things that I find in different places and I don't know where everybody gets their information (besides the sparse and fairly specific tutorials and "usage" patchers available in the help menu).
    If there's no such thing available, can somebody at least tell me if I can change an object through this.patcher? Like if I have a [pack] can I change it to a [pak] without having to do this.patcher.remove and then this.patcher.newdefault like they do in the documentation?
    Thanks

    • Jul 05 2015 | 1:48 pm
      The Javascript documentation in the ref files are pretty complete, but not in one document as the LOM. I.e. there is one document listing and linking to all Max specific JS objects, and one with globally available methods. Regarding you question: You can't "change" a Max object in a patcher. It's not a functionality of Max. If you change an object using the GUI internally Max will remove the old object and create a new one. You'll have to use this.patcher.remove()/.newdefault().
    • Jul 05 2015 | 2:21 pm
      Ok thanks.
      In terms of "changing" an object I guess even if Max technically deletes and recreates an object when you change it in the GUI it still maintains all the same connections that are still valid with the new object inlets and outlets, this is what I am looking to do. If it's not possible I guess I just have to name all the objects that my changed objects need to be connected to and make all the connections again in js?
    • Jul 05 2015 | 2:41 pm
      yupp! ;)