summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-11-28 00:54:30 +0100
committerRobin Gareus <robin@gareus.org>2019-11-28 00:54:30 +0100
commit279faad75c8c3dbbeac52ce98753872f5f792b48 (patch)
tree75015dfce2751e4b6e8c1f311beb7484164981c1 /scripts
parentccefc644181837892051bc6b8b448d60b5aec28c (diff)
Update tomsloop script for A6 - Thanks to Tom Brand
Diffstat (limited to 'scripts')
-rw-r--r--scripts/tomsloop.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/tomsloop.lua b/scripts/tomsloop.lua
index 83ed782b7b..afd50c8c7e 100644
--- a/scripts/tomsloop.lua
+++ b/scripts/tomsloop.lua
@@ -1,19 +1,16 @@
ardour { ["type"] = "EditorAction", name = "Tom's Loop",
license = "MIT",
author = "Ardour Team",
- description = [[Bounce the loop-range of all non muted audio tracks, paste N times at playhead]]
+ description = [[Bounce the loop-range of all non muted audio tracks, paste at playhead]]
}
--- for minimal configuration in dialogue
-function action_params ()
- return { ["times"] = { title = "Number of copies to add", default = "1"}, }
-end
-
-- main method, every custom (i.e. non-ardour) method must be defined *inside* factory()
function factory (params) return function ()
-- when this script is called as an action, the output will be printed to the ardour log window
function print_help()
+ printf("See source for help.")
+---[[
print("")
print("---------------------------------------------------------------------")
print("")
@@ -160,11 +157,12 @@ function factory (params) return function ()
print("See also: Lua Action Bounce+Replace Regions")
print("")
print("")
+--]]
end -- print_help()
-- get options
local p = params or {}
- local n_paste = tonumber (p["times"] or 1)
+ local n_paste = 1
assert (n_paste > 0)
local proc = ARDOUR.LuaAPI.nil_proc () -- bounce w/o processing
@@ -263,7 +261,7 @@ function factory (params) return function ()
--advance playhead so it's just after the newly added regions
if n_regions_created > 0 then
- Session:request_locate((playhead + loop:length() * n_paste),false)
+ Session:request_locate((playhead + loop:length() * n_paste),false,5) --TRS_UI
end
-- all done, commit the combined Undo Operation