move new_playlist Lua script from mixbus and add some garbage collection
authorNikolaus Gullotta <nikolaus.gullotta@gmail.com>
Tue, 17 Jul 2018 20:16:04 +0000 (15:16 -0500)
committerNikolaus Gullotta <nikolaus.gullotta@gmail.com>
Tue, 17 Jul 2018 20:16:04 +0000 (15:16 -0500)
scripts/new_playlist.lua [new file with mode: 0644]
scripts/reset_mixer.lua
scripts/store_recall_mixer.lua
scripts/track_organizer.lua

diff --git a/scripts/new_playlist.lua b/scripts/new_playlist.lua
new file mode 100644 (file)
index 0000000..54563cd
--- /dev/null
@@ -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
index d4e0521b268ca33dee1efd752c39167e7fae0ea2..9b165f6af1959f31d8821885d82fc51d63d9b6d1 100644 (file)
@@ -82,4 +82,5 @@ function factory() return function()
                end\r
        end\r
        ::end_script::\r
+       collectgarbage()\r
 end end\r
index f3c39275cb5b39ceb4d5e5fa79ef4ea2cb675460..f92d80ab01500f1f1bdbd4864034f11f9c295836 100644 (file)
@@ -403,5 +403,5 @@ function factory() return function()
                        end
                end
        end
-
+collectgarbage()
 end end
index 007b1363563e1260aff010e1753c9cc033a7e02f..e4d9765bed69b1d14e028b8f66ebc169b5efb572 100644 (file)
@@ -101,6 +101,6 @@ function factory () return function ()
            end
        end
    end
-
        ::script_end::
+       collectgarbage()
 end end