Page 1 of 1

Reading the contents from .asd files?

Posted: Wed Feb 29, 2012 7:36 pm
by vitamin-e
Hey all,

I'll cut right to the chase and ask: What knowledge can you lend me about how ableton stores clip data in .asd files?

Here's the back-story:
I use Live to DJ and I'm writing a little software program to help keep my tracks organized. I'm not writing it in max, but this seemed the only appropriate place to post this.

I have a whole library of pre-warped, scale key labeled tracks, but all of the information I want about them (warp marker locations to calculate bpm, and the clip name which contains the key) is held within the .asd files.
Now I don't expect for anyone to just jump out and point me to a pre-written library that parses a .asd file and pulls out a (hashref / object / multidimensional array, or whatever your language calls this) of the contained information, but hopefully someone knows how to turn these into something workable.

Are these files just some complex data structure that Live serialized with a proprietary format (as opposed to JSON or XML)? Maybe they can be read with a hex editor or something?

Thanks in advance for any help you can give me on this topic!

Re: Reading the contents from .asd files?

Posted: Wed Feb 29, 2012 8:05 pm
by theophilus
think they were just gzip'd xml files. didn't find it in a quick search but more details are around here somewhere.

Re: Reading the contents from .asd files?

Posted: Thu Mar 01, 2012 2:51 am
by vitamin-e
I believe I've found what you're referring to. It looks like this method only works on the .als files (that save a live set.) I tried renaming a .asd file to .gz and running it through gunzip at no avail, but I'm going to try parsing the .als file that contains all of the clips, in hopes that it will contain the clip data.

Will update this thread if I find anything usable.

Re: Reading the contents from .asd files?

Posted: Thu Mar 01, 2012 3:37 am
by vitamin-e
If anyone was wondering, here is the article that @theophilus was referring to http://crooked-hideout.blogspot.com/201 ... -ruby.html

I followed the same steps in the article and sure enough I was pleasantly surprised to find these magic numbers:

<WarpMarker SecTime="0.0514158961551219248" BeatTime="0" />
<WarpMarker SecTime="403.17032739998518" BeatTime="860" />
<WarpMarker SecTime="403.18497576917838" BeatTime="860.03125" />

With some common sense and a little tinkering, I was able to determine what these numbers describe:
SecTime = the exact time in the clip at which the warp marker exists
BeatTime = the number of beats from the beginning of the clip at which the warp marker exists

I'm no mathematician, but with some simple subtraction and division I should be able to determine the BPM between any two warp markers just like Ableton does.
Will keep you guys posted!

Re: Reading the contents from .asd files?

Posted: Thu Mar 01, 2012 3:56 am
by vitamin-e
I was entirely correct! All I had to do was pick two warp markers and find:

number of beats between the two markers
(ie. the "beats" in beats per minute)

and divide it by

time difference in seconds between the two markers, divided by 60 to turn it into minutes
(ie. the "per minute" in beats per minute)

Working example, written in javascript, here:
http://jsfiddle.net/cKP6G/1/

Now if only I could figure out how to get this information out of the .asd file....

Re: Reading the contents from .asd files?

Posted: Thu Mar 01, 2012 9:31 am
by pid