Ardour XML AutomationList.@interpolation-style vs AutomationList.event


(Sylvain Leroux) #1

Hi,

I’m trying to reverse engineer the Ardour XML file format.
In Region>FadeIn>AutomationList, I understand the event data describe the curve shape for the FadeIn. But isn’t that redundant with the attribute interpolation-style=“Curved” of the AutomationList element?

The corresponding XML code is pretty long so I put it in a gist instead of posting it here directly:


(Robin Gareus) #2

In older versions of Ardour, one could customize (draw) the fade-shape. interpolation-style=“Curved” means that the data is already on a curve and to be linearly interpolated.

Keep in mind that Ardour’s XML format is ad-hoc – C++ class instance state – and subject to change (in a backward compatible manner). It is Ardour specific and not an interchange format which can be validated.


(Sylvain Leroux) #3

Hi x42,
Thank you for the reply

Keep in mind that Ardour's XML format is ad-hoc -- C++ class instance state -- and subject to change (in a backward compatible manner). It is Ardour specific and not an interchange format which can be validated.
Indeed I am aware of that. My goal is to find a way to imports edits from the Lightworks video editor into Ardour. At some point, I considered using a Lua script as a more future-proof solution, but I changed my mind and switched back to edit the Ardour session file at XML level. I start with a template Ardour project files, and I try to touch as little thing as I can to add the new elements corresponding to the dit I import in the hope I will not break anything. This is still somewhat fragile, but I wasn't able to find a more robust solution.
In older versions of Ardour, one could customize (draw) the fade-shape. interpolation-style="Curved" means that the data is already on a curve and to be linearly interpolated.
Thanks for having clarified that.

If I may follow up this thread with a new question, I’m currently struggling with Regions now:

      <Region name="jg-032316-sfx-footsteps-casual-shoes-on-rocks.3" muted="0" opaque="1" locked="0" video-locked="0"
          automatic="0" whole-file="0" import="0" external="1" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0"
          position-locked="0" valid-transients="0"
          start="138880" length="27971" position="288172" sync-position="90112"
          beat="12.007166666666667" 
          ancestral-start="0" ancestral-length="0" stretch="1" shift="1" positional-lock-style="AudioTime" layering-index="1" 
          envelope-active="0" default-fade-in="0" default-fade-out="0" fade-in-active="1" fade-out-active="1" scale-amplitude="1" 
          id="4320" type="audio" first-edit="nothing" source-0="4247" source-1="4249" master-source-0="4247" 
          master-source-1="4249" channels="2">
...

In this pretty long list of attributes:

  • In which unit are expressed the "start", "length", "position" and "sync-position" attributes?
  • What is the "sync-position"?
  • What is the meaning of the "beat" floating-point number attribute? (it may be obvious, but I'm more familiar with video editing rather than music production)

(Paul Davis) #4

Currently, all those positions are in samples. Start defines the offset of the region in the source (files), Position defines the first sample of the region on the timeline.

Sync position is a specific point in a region that can be used when aligning regions to each other or some other point on the timeline. By default, it is zero, which means the start of the region.

Beats are a measure of musical time. Typically quarter-notes.

In Ardour 6.0, the units will all change entirely.


(Sylvain Leroux) #5

Hi Paul,
Thank you for all these explanations.

Beats are a measure of musical time. Typically quarter-notes.
If I modify the "start", "length" or "position" of a region, am I supposed to adjust the "beat" attribute to ensure consistency?
In Ardour 6.0, the units will all change entirely.
Do you have more details to share? Or maybe a pointer to the relevant doc?

(Paul Davis) #6

The “beats” value is intended to refer to the same point on the timeline as “position”.

There are no docs on what is happening in 6.0, and it is very unlikely there ever will be. We have a tiny development team (maybe 2.5 people), and it rarely seems appropriate to document designs that evolve rapidly over months of work. The key point is that all timeline positions in 6.0 are represented by a value in 1 of three time domains (audio, beats, bars+beats). That might even expand to four time domains. They will no longer be all audio. However, unannotated values will continue to be assumed to be samples (i.e. audio domain).


(Alex W Mitchell) #7

Out of interest @paul, what would be the 4th time domain? Video Frames?


(Sylvain Leroux) #8

“The “beats” value is intended to refer to the same point on the timeline as “position”.”
Ok, Paul. Thank you. I will try to ensure it will remain like that when modifying the Region by hand.


(Paul Davis) #9

Yes, possibly video. But no actual plans for this right now. We may also change the audio domain from samples to what we call superclock, to make it independent of sample rate.


(Sylvain Leroux) #10
to make it independent of sample rate
This would be interesting when working with exchange format using timecodes or fractional seconds to define region limits. For example, when converting in batch from FCP5 XML to Ardour XML, either I have to assume all media have the same sample rate as the project, or I need to have access to each individual media file to know its sample rate.