Saturday, February 26, 2022

An Ableton Live Set is gzipped XML + a Ruby gem (2012)

Recently I started using git and github.com for version control of my Ableton Live Sets.  I pushed  these files to github to have backups and to be able to rollback to a previous version in case I got carried away on some ill-fated musical tangent.

But I was missing out on a one of the nicest features of git and github, diffs: I could not see the differences between two files or versions of my Live Sets.  Why?

Ableton's Live Set file is binary, not line based text.  I decided to reverse engineer the file:

  $ file Amy.als
  Amy.als: gzip compressed data, from Unix

Hmm.... Then, of course, I tried this:

  $ cp Amy.als Amy.gz
  $ gunzip Amy.gz 
  $ file Amy
  Amy: XML  document text

What!?

Reverse engineering done. Wait. Will Ableton Live read the file if I just gzip it and rename it?

  $ mv Amy.gz AmyTest.als
  $ open AmyTest.als

Poof! There it is. This was very nice of the Ableton developers. Thanks guys.  Now I can add and commit XML files to git and not binary.  It sucks to have to do this by hand for each Live Set each time I want to make a commit so I created the Ruby gem guard-live-set.

From the guard documentation: Guard is a command line tool to easily handle events on file system modifications.  My guard specialization just watches for any changes to a .als file and immediately creates a .als.xml version of it.  There you go, enjoy.

My hope is for more people to start committing their creations so that others can collaborate and then we can all benefit and improve from each other's creations.  I don't need to explain how successful open source software has been, why not open source music?  I'll throw in my Live-Set-github hat in with this: https://github.com/mgarriss/ugly.live.sets.

There is still a lot more work that needs to be done before true barrier free Live Set collaboration can be a reality.  First is the sharing of samples and plugins.  These are large files and not suitable for github.com.  Next we probably need some kind of .als lint program that could do more than indent; maybe it could keep things in a well defined order which would make the diffs cleaner.  An online friend is putting some thought into a Ruby gem for editing these .als files and I've agreed to contribute to that so stay tuned...



from Hacker News https://ift.tt/GXytDRv

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.