mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Fix Lua script auto-connect new tracks
Since c16ab3a248 Session::new_audio_track has an optional parameter
to auto-connect inputs. Lua scripts don't have a default parameter,
so bool input_auto_connect was assumed false and inputs left
unconnected.
This commit is contained in:
parent
696096fcbd
commit
656cd9c8a7
4 changed files with 4 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ function factory (p)
|
||||||
chan_out = channels;
|
chan_out = channels;
|
||||||
end
|
end
|
||||||
|
|
||||||
local tl = Session:new_audio_track (channels, chan_out, group, how_many, name, insert_at, mode)
|
local tl = Session:new_audio_track (channels, chan_out, group, how_many, name, insert_at, mode, true)
|
||||||
|
|
||||||
if strict_io then
|
if strict_io then
|
||||||
for t in tl:iter() do
|
for t in tl:iter() do
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ function factory (params) return function ()
|
||||||
if channels ~= 2 then goto next end
|
if channels ~= 2 then goto next end
|
||||||
|
|
||||||
-- create 2 new tracks (using the name of the original track)(
|
-- create 2 new tracks (using the name of the original track)(
|
||||||
local newtracks = Session:new_audio_track (2, 2, nil, 2, t:name(), ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal)
|
local newtracks = Session:new_audio_track (2, 2, nil, 2, t:name(), ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal, true)
|
||||||
assert (newtracks:size() == 2)
|
assert (newtracks:size() == 2)
|
||||||
|
|
||||||
for r in playlist:region_list ():iter () do
|
for r in playlist:region_list ():iter () do
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ function factory () return function ()
|
||||||
while names[i] do
|
while names[i] do
|
||||||
local tl = Session:new_audio_track (1, 2, nil, 1, names[i],
|
local tl = Session:new_audio_track (1, 2, nil, 1, names[i],
|
||||||
ARDOUR.PresentationInfo.max_order,
|
ARDOUR.PresentationInfo.max_order,
|
||||||
ARDOUR.TrackMode.Normal)
|
ARDOUR.TrackMode.Normal, true)
|
||||||
|
|
||||||
for track in tl:iter () do
|
for track in tl:iter () do
|
||||||
track:presentation_info_ptr ():set_color (color)
|
track:presentation_info_ptr ():set_color (color)
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ function factory () return function ()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- create tracks
|
-- create tracks
|
||||||
local tl = Session:new_audio_track (1, 2, nil, rv['tracks'], "", ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal)
|
local tl = Session:new_audio_track (1, 2, nil, rv['tracks'], "", ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal, true)
|
||||||
-- and optionally record-arm them
|
-- and optionally record-arm them
|
||||||
if rv['recarm'] then
|
if rv['recarm'] then
|
||||||
for track in tl:iter() do
|
for track in tl:iter() do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue