That looks like a bug. I hazard a guess that import does not remove the existing default envelope (two points: 0dB at start and end) and adds new events to the list.
Yes - I just did a fresh import and here’s how those particular clips looked when first imported:-
You can see 2 x parallel lines after the keyframes so maybe all that’ll be needed is for @agfline to deal with that 2nd default entry? Hopefully we’ve provided enough info for him to fix this once he’s some time available…
I think that Robin is right, default 0dB are also inserted at the beginning of each region. When regions come with offset volume at the beginning and end (non-0dB values) things get very funky.
Crossfades come very good through apparently though, nice job @agfline. This is already better than Cubase AAF imports in my experience, where I think crossfades don’t even show.
Robin - what would be the preferred way for Adrien to deal with this? e.g. if he needs to create a node but there’s already a default node at the relevant time, can he (or we?) simply give that node a new value? Or maybe there’s some option to delete any default envelope before adding his own nodes? (i.e. are either of those already achievable with the existing code?)
After reading through the code this morning, I’ve a few more thoughts on this (sorry if it’s all a bit longwinded…)
IIUC the AAF importer (gtk2_ardour/ardour_ui_aaf.cc) creates a region gain line using this code in function ‘set_region_gain()’ :-
for (unsigned int i = 0; i < level->pts_cnt; ++i) {
al->fast_simple_add (timepos_t (aafRationalToFloat (level->time[i]) * region->length ().samples ()), aafRationalToFloat (level->value[i]));
}
But ‘ControlList::fast_simple_add()’ only ever adds things at the end, so there’s a note to say that any values added must already be pre-sorted. So might it be the case that the values in the above ‘for’ loop weren’t sorted correctly?
OR ALTERNATIVELY…
Regardless of whether the values were pre-sorted, ‘Evoral::ControlList::fast_simple_add()’ always seems to insert a new event at end of any existing ones. So is there some better function to call here? i.e. some function that would insert events at a specified position? And ideally it’d check to see if there’s already an existing event there (and if so, just re-assign it with the updated value…)
OR ALTERNATIVELY (if easier)
Is there some function that’ll delete all existing entries in one go - i.e. so that @agfline could delete the default envelope before starting to add his own entries?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

