summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-07-17 15:16:04 -0500
committerNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-07-17 15:16:04 -0500
commitfa17364977030616072a0e5f35c9c024f5bf1899 (patch)
tree4b59e7f209f41cdc6a631fc9841a02773c0f638a /scripts
parenta54a501ad693b28dbbe1cff4faea0799706a17a4 (diff)
move new_playlist Lua script from mixbus and add some garbage collection
Diffstat (limited to 'scripts')
-rw-r--r--scripts/new_playlist.lua17
-rw-r--r--scripts/reset_mixer.lua1
-rw-r--r--scripts/store_recall_mixer.lua2
-rw-r--r--scripts/track_organizer.lua2
4 files changed, 20 insertions, 2 deletions
diff --git a/scripts/new_playlist.lua b/scripts/new_playlist.lua
new file mode 100644
index 0000000000..54563cd6a5
--- /dev/null
+++ b/scripts/new_playlist.lua
@@ -0,0 +1,17 @@
+ardour {
+ ["type"] = "EditorAction",
+ name = "New Playlist",
+ license = "MIT",
+ author = "Ardour Lua Taskforce",
+ description = [[Prompts and builds a new playlist for every track in the session.]]
+}
+
+function factory () return function ()
+
+ for r in Session:get_tracks():iter() do
+ local rtav = Editor:rtav_from_route(r) -- lookup RTAV
+ Editor:new_playlists(rtav:to_timeaxisview())
+ end
+
+collectgarbage()
+end end
diff --git a/scripts/reset_mixer.lua b/scripts/reset_mixer.lua
index d4e0521b26..9b165f6af1 100644
--- a/scripts/reset_mixer.lua
+++ b/scripts/reset_mixer.lua
@@ -82,4 +82,5 @@ function factory() return function()
end
end
::end_script::
+ collectgarbage()
end end
diff --git a/scripts/store_recall_mixer.lua b/scripts/store_recall_mixer.lua
index f3c39275cb..f92d80ab01 100644
--- a/scripts/store_recall_mixer.lua
+++ b/scripts/store_recall_mixer.lua
@@ -403,5 +403,5 @@ function factory() return function()
end
end
end
-
+collectgarbage()
end end
diff --git a/scripts/track_organizer.lua b/scripts/track_organizer.lua
index 007b136356..e4d9765bed 100644
--- a/scripts/track_organizer.lua
+++ b/scripts/track_organizer.lua
@@ -101,6 +101,6 @@ function factory () return function ()
end
end
end
-
::script_end::
+ collectgarbage()
end end