View Issue Details

IDProjectCategoryView StatusLast Update
0010279ardourbugspublic2026-04-13 03:15
ReporterDopplerNyquist Assigned Tox42  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformDebian GNUOSLinuxOS Version13
Product Version9.2 
Summary0010279: new_midi_track() does not work via lua script
DescriptionTesting some combinations of parameters never creates a new track, the scripting window always returns an error.

I was not able to map all the attempted parameter combinations. But I realized that even when entering the required types listed in the Binding Class Reference, there is always a type error in #6, #7, etc. And in some cases, while trying to figure out whether there is an error in the order of the parameters, Ardour simply crashes and closes.

Ardour 9.2 official build.
Steps To ReproduceOpen Window > Scripting.

Try something that looks like it:

function factory ()
    return function ()
        Session:new_midi_track(x,x,x,x,x,x,x,x,x)
    end
end

TagsNo tags attached.

Activities

x42

2026-04-13 02:27

administrator   ~0030217

Search the example scripts. e.g.

https://github.com/Ardour/ardour/blob/master/share/scripts/_rgh_midi_track_trick.lua#L62-L69

  Session:new_midi_track(
    ARDOUR.ChanCount(ARDOUR.DataType ("midi"), 1),
    ARDOUR.ChanCount(ARDOUR.DataType ("midi"), 1),
    true,
    ARDOUR.PluginInfo(), nil,
    ARDOUR.RouteGroup(),
    1, "MIDI Track",
    ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal, true)

DopplerNyquist

2026-04-13 03:15

reporter   ~0030218

Sorry for opening a new issue. But I really couldn’t find this example anywhere. Now I’ve finally been able to adapt the script that creates the drum tracks to my case, where I make the drums in MIDI. Thank you very much.

Issue History

Date Modified Username Field Change
2026-04-13 02:13 DopplerNyquist New Issue
2026-04-13 02:27 x42 Note Added: 0030217
2026-04-13 02:28 x42 Assigned To => x42
2026-04-13 02:28 x42 Status new => resolved
2026-04-13 02:28 x42 Resolution open => no change required
2026-04-13 03:15 DopplerNyquist Note Added: 0030218