diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-05 14:53:44 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-06 15:34:08 -0600 |
commit | 6e2dfe65bfd85501e7daea25569512bf51711566 (patch) | |
tree | deacd76fa2083cb4d7c7fb4c1edbdd4faf589922 /scripts/create_drum_tracks.lua | |
parent | fb257f1ed17bb5239793cbe81503a32366a92b5c (diff) |
create_drum_tracks lua script by Phillip Smith
Diffstat (limited to 'scripts/create_drum_tracks.lua')
-rw-r--r-- | scripts/create_drum_tracks.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/create_drum_tracks.lua b/scripts/create_drum_tracks.lua new file mode 100644 index 0000000000..0ade66a60d --- /dev/null +++ b/scripts/create_drum_tracks.lua @@ -0,0 +1,41 @@ +
+ardour {
+ ["type"] = "EditorAction",
+ name = "Create Drum Tracks",
+ author = "PSmith",
+ description = [[Creates 8 new tracks with representative names and colors.]]
+}
+
+names = {
+"Kick",
+"Snare",
+"Hat",
+"Fl Tom",
+"OH L",
+"OH R",
+"Room 1",
+"Room 2"
+}
+
+color = 0xff8800ff --orange
+
+
+function factory (params)
+ return function ()
+
+ local i = 1
+ while names[i] do
+ Session:new_audio_track(1,2,RouteGroup,1,names[i],i,ARDOUR.TrackMode.Normal)
+
+ track = Session:route_by_name(names[i])
+ if (not track:isnil()) then
+ trkinfo = track:presentation_info_ptr ()
+ trkinfo:set_color (color)
+ end
+
+ i = i + 1
+ end --foreach track
+
+ end --function
+
+end --factory
|