Decoding ALS file format

Share your favorite Ableton Live tips, tricks, and techniques.
pottering
Posts: 1807
Joined: Sat Dec 06, 2014 4:41 am

Re: Decoding ALS file format

Post by pottering » Tue Mar 09, 2021 10:55 pm

shabo wrote:
Sun Mar 07, 2021 3:25 pm
Hey guys!

I've been working on a little project to help me port my projects to a new machine by updating sample references. Basically I'm writing a Python script that:

1. Decodes an ALS file
2. Finds all external sample references
3. Copies these files to the project folder
3. Updates the references in the XML file
4. Encodes the XML file and saves as ALS

I've successfully implemented step 1-3, but the last one wont work as Live sees the encoded file as corrupted. Does anyone here have an idea of how to solve this? I'm using the default python xml library along with the gzip library.
In Step 4, note that you don't need to gzip the file again, Live reads the uncompressed XML file just adding the .als file extension.

Having said that, Live can already collect all the files for all the different Sets (.als) saved inside a single Project (folder) at once with the Manage Project option (separate from Manage Set).

https://www.ableton.com/en/manual/manag ... rnal-files
♥♥♥

shabo
Posts: 3
Joined: Sun Mar 07, 2021 3:18 pm

Re: Decoding ALS file format

Post by shabo » Wed Mar 10, 2021 12:25 pm

pottering wrote:
Tue Mar 09, 2021 10:55 pm
In Step 4, note that you don't need to gzip the file again, Live reads the uncompressed XML file just adding the .als file extension.

Having said that, Live can already collect all the files for all the different Sets (.als) saved inside a single Project (folder) at once with the Manage Project option (separate from Manage Set).

https://www.ableton.com/en/manual/manag ... rnal-files
Great tips, thanks for this!

kmoseni
Posts: 2
Joined: Fri Apr 01, 2022 7:51 pm

Re: Decoding ALS file format

Post by kmoseni » Fri Apr 01, 2022 8:36 pm

shabo wrote:
Wed Mar 10, 2021 12:25 pm
pottering wrote:
Tue Mar 09, 2021 10:55 pm
In Step 4, note that you don't need to gzip the file again, Live reads the uncompressed XML file just adding the .als file extension.

Having said that, Live can already collect all the files for all the different Sets (.als) saved inside a single Project (folder) at once with the Manage Project option (separate from Manage Set).

https://www.ableton.com/en/manual/manag ... rnal-files
Great tips, thanks for this!
I'm using Live 10 on macOS and I haven't had success with renaming the .xml back to .als. Ableton still tells me the file is corrupt. Am I missing something here?

TWW+TW
Posts: 8
Joined: Fri May 08, 2020 7:21 pm

Re: Decoding ALS file format

Post by TWW+TW » Thu Jun 09, 2022 4:32 am

Need similar hellp. I was given my project in an XML and have do idea how to import it into ABLETON. thanks cy

Tarekith
Posts: 19074
Joined: Fri Jan 07, 2005 11:46 pm
Contact:

Re: Decoding ALS file format

Post by Tarekith » Thu Jun 09, 2022 2:14 pm

Ableton doesn’t support XML import.

rdan76
Posts: 33
Joined: Sun Jan 10, 2021 1:07 am

Re: Decoding ALS file format

Post by rdan76 » Wed Feb 22, 2023 5:24 pm

Hey all! This thread came to my attention because I'm interested in finding a more efficient way to document my mixdown-settings.

Sometimes when I finish a mix that turns out really well, I like to document all my mixdown settings in a form which exists outside of Ableton. I do this because data stored only within the proprietary formats used by audio-recording software is always at hazard of being lost. Anytime there's a software update, anytime you update plugins, anytime you change PCs, there's always the very real risk that settings in old mixes might not be preserved. I have many old mixes, at this point, which I can technically still open -- but all the plugin-settings are wiped, because even if I still have copies of those plugins, these projects used older 32-bit versions of those plugs which won't work on my current system. And so, unless I'd notated the settings for those mixes somewhere, I no longer have any record of what I did in those mixes.

So I'm in the habit of documenting any mixes which turn out particularly well, by taking a whole lot of screenshots and making a lot of notes in plain-text files. The upside to this is that these file-formats don't rely on proprietary software to open; 20 years from now, I should still be able to take a look at these records and recall what I did on these mixes. The downside is that it takes hours to document a mix in this fashion, and it's no fun at all.

So I was happy to learn that the Ableton ALS file is really just a gzipped XML file. That means, in theory, I could finally stop documenting my mixes in this way. Since all project settings and values are recorded in the ALS file, and the ALS can be extracted into the widely-accessible XML format, then IN THEORY I should just be able to make a copy of my ALS, extract it to XML, and bam, documentation done.

But nothing in life is that easy.

Upon looking through the extracted XML from one of my recent project-files, I noticed that all the numerical values are stored within the XML using some kind of floating-point math. (Well, I'm calling it floating-point math, but all I really know for sure is that these are numbers in a decimal notation with several places behind the decimal; that reads like floating-point to me, but that description might be technically incorrect.) I guess Ableton must apply some kind of mathematical transformation, at runtime, in order to change these saved values into what I see in the program.

Having those numbers in the form in which they're stored in the XML does me no good at all.

Does anyone know how those numbers get transformed by Ableton into the actual values presented in the program? Frustratingly, I imagine there might be many different transformations applied, depending on what the value represents -- for instance, I would imagine that the value representing the panning of a track would have one kind of mathematical transformation applied, while the value representing volume would have another. And I imagine many of these transformations might be logarithmic functions, given how dB is a logarithmic scale.

Has anyone figured any of this stuff out? Is anyone aware of a reference somewhere?

Rivanni
Posts: 416
Joined: Sat Nov 26, 2016 12:30 pm

Re: Decoding ALS file format

Post by Rivanni » Sat Feb 25, 2023 2:59 pm

The values stored are internal values, which are different for each control.
Without knowing what the internal values stand for, you'll never figure out the value presented in the program.

Take, for example, the cutoff frequency of Autofilter. The device shows the value in Hz but uses a range of 20 to 135 internally. Setting the cutoff to 986 Hz results in the following:

Code: Select all

<Cutoff>
	<LomId Value="0" />
	<Manual Value="82.9761887" />
	<MidiControllerRange>
		<Min Value="20" />
		<Max Value="135" />
With the manual value, you can calculate the relative position of the dial but not the value that is presented in the program.

Panning has a more understandable range of -1 to 1, so a pan of 30R gives you:

Code: Select all

<Pan>
	<LomId Value="0" />
	<Manual Value="0.60" />
	<MidiControllerRange>
		<Min Value="-1" />
		<Max Value="1" />
Here too, you need to know how the internal value translates into human-readable form.

rdan76
Posts: 33
Joined: Sun Jan 10, 2021 1:07 am

Re: Decoding ALS file format

Post by rdan76 » Sat Feb 25, 2023 11:52 pm

Rivanni, thanks for helping to clarify the problem. The issues you speak of were on my mind, but you explained them in a way which is much clearer than I was able to do. Also, you brought a bit of vocabulary to the problem which helps to identify the difference between the two sets of numbers: The idea of the "internal value" (recorded within the XML) versus the "human-readable" value (presented within the program). That doesn't get me closer to a solution, but it always helps to clarify the problem. Also, you "get" the problem I am describing, and I appreciate that.

Alas, this approach to reverse-engineering mixdown details from the project XML might be too daunting for me to figure out. I am, unfortunately, not a mathematician, and I haven't the faintest idea how to even begin figuring out what formulas Ableton uses to transform various internal values to their human-readable counterparts. You are right -- the process would begin by understanding what "range" the human-readable values can occupy, and it would also help to know what "unit of measurement" they represent. For any values presented in dB, it's likely that the transformation formula is a logarithmic function, because dB is a logarithmic scale. But while I know that, it's not like I know what to do with that information. I can generate various values in Ableton and see what the internal numbers change to -- but figuring out the equations by which those transformations happen is just probably beyond me.

So, as interesting as I find this question, and as helpful as it would be to develop a plugin or script which can export a report of various mixdown settings, I'm afraid this all looks too daunting to me. And yet, the questions do still linger in my mind. I do work in the field of education, and so I do know some folks who teach physics and various other maths. Perhaps those people can shed some insight; I'll ask around. I'll post follow-ups if I anything else useful comes to light.

zenluiz
Posts: 15
Joined: Thu Dec 14, 2017 1:33 am

Re: Decoding ALS file format

Post by zenluiz » Fri Oct 20, 2023 8:13 pm

Hi guys,
I came to this topic by luck and now I'd like to leave here the link to a project I have been working on for quite some time already.

It's called ALS Tools and you can find more details here: https://github.com/luizen/als-tools

LoopInfinitum
Posts: 4
Joined: Mon Apr 08, 2024 8:33 pm

Re: Decoding ALS file format

Post by LoopInfinitum » Mon Apr 08, 2024 8:34 pm

Just came up with a hack for this:
https://www.youtube.com/watch?v=mulwc2U11o8

Post Reply