1

I'm attempting to parse an Ableton Live Project in Python to get the positions of clips in the arrangement view (as per http://crooked-hideout.blogspot.com/2012/01/ableton-live-set-is-gzipped-xml-ruby.html, Ableton Live project files are just gzipped XML).

However, clip positions are stored in beats, not seconds - and the project I'm working on is a long mix with plenty of master tempo automation, so I'm having troubles figuring out how to convert a beats position into a time position - anyone tried this before? Any genius ideas?

Thanks :)

  • 1
    This is handled well by the python 'dawtool' https://github.com/offlinemark/dawtool -- Mark gave a great presentation about this exact topic at Audio Developer Conference 2020 last week which should be on youtube soon. Not as linear as the poster below suggests, because there is time quantization between the bpm changing points. Unless _you_ are Mark and you already know this... ;) – JohnH Nov 21 '20 at 23:35
  • 1
    Haha, I'm not Mark and this is a great lead, thank you so much @JohnH! I actually attended the ADC and missed that talk, I'll make sure to check it out on YT. – Themushroomsound Nov 23 '20 at 09:15
  • To be precise, the talk was primarily on converting beats from a savefile to time, including handling tempo automation.... the project itself isn't using it for clips, rather instead for time markers, but the key algorithm for 'convert beats to time' is in there. – JohnH Nov 23 '20 at 18:54

1 Answers1

-1

I would say it is a matter of counting the duration of every beat until the launch of the clip.

Say we have:

  • 1.1 Tempo at 120 BPM
  • 2.1 Clip 1 launch
  • 4.1 Tempo to 180 BPM
  • 6.1 Clip 2 launch

The calculation would be:

  • Clip 1 launch: 1 x 4 x 60/120 = 2 seconds
  • Clip 2 launch: 2 x 4 x 60/180 + 3 x 4 x 60/120 = 8.66 seconds
Mattijs
  • 1,909
  • 3
  • 19
  • 28