how to view or decompile .adg ableton preset file with a text editor

i want to figure out what goes on in here so i can batch generate my own presets.  namely convert the whole native instuments library into the ableton database on mac.

 

But if i try to open it up in a text editor i have no way of reading it.  do you have any ideas on how we could do this?

 

i tried to put a massive vst in a group with the afex preset, and saved it as a .adg

its unreadable in textedit though.  i think this would be an excellent way of achieving better vst integration for those using push.

6 followers

queglay 1 year ago | 0 comments

3 answers

  • [stm] Ableton staff
    contribution
    103 answers
    111 votes received
    3 votes

    Hi,

    While this is certainly not a supported feature, I'd like to let you know that the reason you cannot read the .adg files in a text editor is that they are compressed files in XML format. Hope this helps in further experimentation.

    1 year ago | 1 comment
  • sjeijk
    contribution
    1 answer
    1 vote received
    1 vote

    1 year ago | 0 comments
  • chaircrusher
    contribution
    9 answers
    24 votes received
    1 vote

    This is a simple Python program that will open up an ADG file and load it into a Python xml ElementTree, then dump out the resulting XML to a new file ADG file.

    While Python does some minor rearranging of the top level Ableton tag's attributes, otherwise the input and output of this program is the same, leading me to believe that Ableton Live internally uses a similar Python method for generating ADG files.

    In the case of auto-generating a bunch of ADG files, if you don't want to get into the intricacies of generating an XML file using the XML library, you could create a couple of patches by hand and see what changed between them; you could then just work directly on the XML as a string.
     
    # example for rudimentary access to Ableton ADG files
    #
    import sys
    import gzip
    import xml.etree.ElementTree as ElementTree
     
    if len(sys.argv) < 3:
        print 'Missing filename arguments'
        exit(1)
     
    presetfile = gzip.open(sys.argv[1], 'rb')
    presetxml = presetfile.read()
    presetfile.close()
     
    root = ElementTree.fromstring(presetxml)
    # you could at this point use the python ElementTree
    # API to modify the patch file.
    xmlstring = ElementTree.tostring(root,encoding="UTF-8",method="xml")
     
    outputfile = gzip.open(sys.argv[2], 'wb')
    outputfile.write(xmlstring)
    outputfile.close()
     
    6 days ago | 0 comments

You need to be logged in, have a Live license, and have a username set in your account to be able to answer questions.

Answers is a new product and we'd like to hear your wishes, problems or ideas.