2016-12-05 15:53:44 -05:00
|
|
|
ardour {
|
|
|
|
["type"] = "EditorAction",
|
|
|
|
name = "Create Drum Tracks",
|
|
|
|
author = "PSmith",
|
|
|
|
description = [[Creates 8 new tracks with representative names and colors.]]
|
|
|
|
}
|
|
|
|
|
2017-02-19 10:03:17 -05:00
|
|
|
function factory () return function ()
|
2016-12-05 15:53:44 -05:00
|
|
|
|
2017-02-19 10:03:17 -05:00
|
|
|
local names = {
|
|
|
|
"Kick",
|
|
|
|
"Snare",
|
|
|
|
"Hat",
|
|
|
|
"Fl Tom",
|
|
|
|
"OH L",
|
|
|
|
"OH R",
|
|
|
|
"Room 1",
|
|
|
|
"Room 2"
|
|
|
|
}
|
2016-12-05 15:53:44 -05:00
|
|
|
|
2017-02-19 10:03:17 -05:00
|
|
|
local color = 0xff8800ff --orange
|
2016-12-05 15:53:44 -05:00
|
|
|
|
|
|
|
local i = 1
|
|
|
|
while names[i] do
|
2017-02-19 10:03:17 -05:00
|
|
|
local tl = Session:new_audio_track (1, 2, nil, 1, names[i],
|
|
|
|
ARDOUR.PresentationInfo.max_order,
|
|
|
|
ARDOUR.TrackMode.Normal)
|
2016-12-05 15:53:44 -05:00
|
|
|
|
2017-02-19 10:03:17 -05:00
|
|
|
for track in tl:iter () do
|
|
|
|
track:presentation_info_ptr ():set_color (color)
|
2016-12-05 15:53:44 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
i = i + 1
|
|
|
|
end --foreach track
|
|
|
|
|
2017-02-19 10:03:17 -05:00
|
|
|
end end -- function factory
|