View Issue Details
|ID||Category||Date Submitted||Last Update|
|0008115||bugs||2020-05-15 14:57||2020-05-28 22:13|
|Platform||Some Other Linux||OS||Some Other Linux||OS Version||unknown|
|Fixed in Version|
|Summary||0008115: Lua: adding an event to an automation list creates unwanted events|
|Description||Every time that I try to add an event (using ARDOUR:AutomationList's add method in Lua) at time x to an automation list that already contains events later in time (> x), actually three events are created at time x:|
1) an event having the value provided to add (as expected)
2) an event having the same value as the event following in the automation list
3) an event having the same value as the event preceeding in the automation list (or the initial value of the automation list).
This behaviour is prevalent regardless of the value provided for parameters three and four of the add method (with_guards, with_initials).
The expected behaviour if false is provided for parameters three and four is that only a single event point is added.
|Steps To Reproduce||Create a new MIDI track in Ardour using instrument "a-Fluid Synth".|
Create a MIDI region. Add a duplicate of the MIDI region.
Add at least one processor automation event for the first parameter of a-Fluid Synth (Output Level) in the second region.
Select the first MIDI region, and run the Lua script attached to this report which will add a new event at the beginning of the first region having value -36.
In my expectation the following statement in the given script is supposed to produce only a single event point in the automation list:
al:add(region:position() - region:start(), -36, false, false)
Instead three event points are created as described above.
automation_issue.lua (950 bytes)
As it turns out the Lua method editor_add() of Evoral:ControlList leads to the desired result, i.e. no unwanted extranous event points.
Now, I see two things that should be looked into:
1.) The add() method seems to create guard points although with_guards was set to false.
2.) Documentation / explanation of editor_add() is missing in the Lua Bindings Class Reference in the Ardour manual.
ControlList::add () is indeed intended to write automation in realtime. There is an explicit case: `/* if the transport is stopped, add guard points */` (and also various checks if there's ongoing write-pass).
So using editor_add() seems indeed appropriate for your case.
Documentation is created from doxygen (libs/evoral/evoral/ControlList.h) and sadly a lot of methods are not documented :(
||https://github.com/Ardour/ardour/pull/515 clarifies the documentation.|
|2020-05-15 14:57||daniel.appelt||New Issue|
|2020-05-15 14:57||daniel.appelt||Tag Attached: automation|
|2020-05-15 14:57||daniel.appelt||Tag Attached: Lua|
|2020-05-15 14:57||daniel.appelt||File Added: automation_issue.lua|
|2020-05-17 13:17||daniel.appelt||Note Added: 0024178|
|2020-05-17 13:30||x42||Note Added: 0024179|
|2020-05-28 22:13||daniel.appelt||Status||new => closed|
|2020-05-28 22:13||daniel.appelt||Resolution||open => fixed|
|2020-05-28 22:13||daniel.appelt||Note Added: 0024296|