View Issue Details

IDProjectCategoryView StatusLast Update
0008064ardourbugspublic2020-04-28 18:32
ReporterMMP404 Assigned Tox42  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDebian OSLinuxOS VersionDebian 10.2
Product Version6.0-pre1 
Summary0008064: MIDI mapped action will not execute any Lua scripts in 6.0.rc1.108
DescriptionMy custom lua scripts are not being executed via MIDI mapping in Ardour 6.0.rc1.108. These execute properly in Ardour version 5.12.0-3.
Steps To ReproduceBind a script action in your midi map file like : <Binding channel="1" pgm="7" action="Editor/script-action-1"/>
where pgm=N is the button on your control surface.

Edit->Lua Scripts->Script Manager to set action to an existing script in your scripts folder ( /home/u/.config/ardour6/ui_scripts )

Press the button on your control surface / MIDI keyboard, and see if the script gets executed.
Additional InformationI'm doing side-by-side testing of both versions to verify, with same MIDI.map file and Lua script file copied to the proper RC1 folders.
The proper midi_map file is assigned in Edit->Preferences->Control Surfaces->General MIDI.
 
Mapped in my midi_map file as :

  <Binding channel="1" pgm="7" action="Editor/script-action-1"/>

Other mappings in the file are working as expected with transport actions ( action="Transport/GotoEnd"/> ), and track muting ( uri="/route/mute 1").

Midi Tracer window shows same 3 raw MIDI messages, for the same single button press, arriving as expected, and are the same for 5.12 and 6.0.rc1.108.

           Controller chn 1 20 00
           Controller chn 1 00 00
             Program Change chn 1 07


A simple lua script ( Log.lua ) was used for testing. It contains only one statement ( print(" Log.lua script ran") ), and is verified to run from within the Ardour UI Script editor and from the Script Manager.
TagsLua, midi_map, script

Activities

x42

2020-04-28 03:59

administrator   ~0023979

Various APIs have changed, most notably "frame" was replaced with "sample" for all audio-times (frame is now reserved for video-frame).
There are also a few other API changes. Most v5 scripts won't run in ardour 6 as-is.

If you post the script I can have a look.

MMP404

2020-04-28 10:19

reporter   ~0023980

The only problem is the midi map won't execute them.
With all due respect, It's not a problem with script API syntax.
As I explained carefully in the initial bug report additional information -
All of my existing lua scripts are verified to run perfectly in Ardour 6RC, when run from within the UI Script editor and from the Script Manager.
The only problem is the midi map won't execute them.

Here is my bare-bones test script.... Log.lua It runs perfectly from the 6.0 RC Script Manager.
---- show message dialog
----
ardour { ["type"] = "EditorAction",
    name = "Log",
    license = "GPL",
    author = "MMP",
    desription = [[write message to log]]
}


function factory ()
    return function ()
        print("MMP Log.lua script ran")
        return
    end
end

Thanks.

x42

2020-04-28 16:33

administrator   ~0023984

OK, sorry I was confused.

replace "Editor/script-action-1" with "LuaAction/script-action-1", and after 6.0-rc1-130 change it to "LuaAction/script-1"
That should make it work, again.

MMP404

2020-04-28 18:30

reporter   ~0023988

Excellent! Resolved.
I verified the fix on 6.0.rc1.108 by updating the binding syntax in midi map file.
I understand the binding syntax will continue to change in future builds.
Thanks.

MMP404

2020-04-28 18:32

reporter   ~0023989

Modified binding syntax in midi map file replacing "Editor/script-action-1"
with "LuaAction/script-action-1",

and after 6.0-rc1-130 will change it to "LuaAction/script-1"



Issue History

Date Modified Username Field Change
2020-04-28 02:05 MMP404 New Issue
2020-04-28 02:06 MMP404 Tag Attached: Lua
2020-04-28 02:07 MMP404 Tag Attached: script
2020-04-28 02:07 MMP404 Tag Attached: midi_map
2020-04-28 03:59 x42 Note Added: 0023979
2020-04-28 10:19 MMP404 Note Added: 0023980
2020-04-28 16:33 x42 Note Added: 0023984
2020-04-28 16:34 x42 Assigned To => x42
2020-04-28 16:34 x42 Status new => feedback
2020-04-28 18:30 MMP404 Note Added: 0023988
2020-04-28 18:30 MMP404 Status feedback => assigned
2020-04-28 18:32 MMP404 Status assigned => closed
2020-04-28 18:32 MMP404 Resolution open => fixed
2020-04-28 18:32 MMP404 Note Added: 0023989