View Issue Details

IDProjectCategoryView StatusLast Update
0008278ardourbugspublic2020-06-30 13:13
Reporterlaex Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformUbuntuOSLinuxOS Version(any)
Product VersionMixbus 6.x 
Summary0008278: Editor Hook: LuaSignal.RegionPropertyChanged reports region-state from before they changed, when moved to different track
DescriptionWhen having an Editor Hook on LuaSignal.RegionPropertyChanged, the regions' attributes from before the property change are reported, when the region is moved to another track!
Steps To ReproduceOne would expect this very simple Editor hook script to print the name and position of (a) region(s) that got moved, wouldn't one?:

<script>
ardour {
    ["type"] = "EditorHook",
    name = "test",
    license = "MIT",
    author = "test",
    description = [[hook - test]]
}

function signals ()
    s = LuaSignal.Set()
    s:add (
        {
            [LuaSignal.RegionPropertyChanged] = true
        }
    )
    return s
end

function factory () return function ()

    local sel = Editor:get_selection ()

    for r in sel.regions:regionlist ():iter () do
        print ("Selected Region: ", r:name ())
        print ("...... position: ", r:position ())
    end

end end
</script>

Try moving a region to another track: The name and position of the region are still the values it had on the old track... Moving it a second time within the new track (or e.g. modifying the fade in or out length) prints the then correct values...!
Additional InformationAlso: When a region is moved to another track, the LuaSignal/script is fired twice for some reason (reporting the outdated values)...!
Output e.g. (outdated values from the track the region was on before):
2020-06-30T14:57:33 [INFO]: LuaInstance: Selected Region: Audio 3-1.1
2020-06-30T14:57:33 [INFO]: LuaInstance: ...... position: 646290
2020-06-30T14:57:33 [INFO]: LuaInstance: Selected Region: Audio 3-1.1
2020-06-30T14:57:33 [INFO]: LuaInstance: ...... position: 646290

When two regions are selected and moved to new tracks at once, this (outdated values from before the move) is printed:
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 4-4.6
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 750500
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 3-3.1
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 1096004
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 4-4.6
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 750500
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 3-3.1
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 1096004
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 3-3.1
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 1096004
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 3-3.1
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 1096004
2020-06-30T15:02:47 [INFO]: LuaInstance: Selected Region: Audio 3-3.1
2020-06-30T15:02:47 [INFO]: LuaInstance: ...... position: 1096004

Now try selecting e.g. three regions (on one ore multiple tracks, doesn't matter) and moving them to different track(s) at once and see what happens - the signal/script is fired multiple times and reports e.g. (all outdated values the regions had before the move):
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 6-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 7-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 6-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 7-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 7-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 7-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 7-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716
2020-06-30T15:05:12 [INFO]: LuaInstance: Selected Region: Audio 8-4.1
2020-06-30T15:05:12 [INFO]: LuaInstance: ...... position: 1635716

>>> Shouldn't e.g. the last example only report three regions, with their new name and new position from the actual new tracks they have been moved to...?
Tags6.0

Activities

laex

2020-06-30 13:13

reporter   ~0024530

SORRY, IT'S NOT MIXBUS, IT'S ARDOUR 6 !!! (cannot change value anymore, sorry)

Issue History

Date Modified Username Field Change
2020-06-30 13:11 laex New Issue
2020-06-30 13:12 laex Tag Attached: 6.0
2020-06-30 13:13 laex Note Added: 0024530