mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Update tomsloop script for A6 - Thanks to Tom Brand
This commit is contained in:
parent
ccefc64418
commit
279faad75c
1 changed files with 6 additions and 8 deletions
|
|
@ -1,19 +1,16 @@
|
||||||
ardour { ["type"] = "EditorAction", name = "Tom's Loop",
|
ardour { ["type"] = "EditorAction", name = "Tom's Loop",
|
||||||
license = "MIT",
|
license = "MIT",
|
||||||
author = "Ardour Team",
|
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()
|
-- main method, every custom (i.e. non-ardour) method must be defined *inside* factory()
|
||||||
function factory (params) return function ()
|
function factory (params) return function ()
|
||||||
|
|
||||||
-- when this script is called as an action, the output will be printed to the ardour log window
|
-- when this script is called as an action, the output will be printed to the ardour log window
|
||||||
function print_help()
|
function print_help()
|
||||||
|
printf("See source for help.")
|
||||||
|
---[[
|
||||||
print("")
|
print("")
|
||||||
print("---------------------------------------------------------------------")
|
print("---------------------------------------------------------------------")
|
||||||
print("")
|
print("")
|
||||||
|
|
@ -160,11 +157,12 @@ function factory (params) return function ()
|
||||||
print("See also: Lua Action Bounce+Replace Regions")
|
print("See also: Lua Action Bounce+Replace Regions")
|
||||||
print("")
|
print("")
|
||||||
print("")
|
print("")
|
||||||
|
--]]
|
||||||
end -- print_help()
|
end -- print_help()
|
||||||
|
|
||||||
-- get options
|
-- get options
|
||||||
local p = params or {}
|
local p = params or {}
|
||||||
local n_paste = tonumber (p["times"] or 1)
|
local n_paste = 1
|
||||||
assert (n_paste > 0)
|
assert (n_paste > 0)
|
||||||
|
|
||||||
local proc = ARDOUR.LuaAPI.nil_proc () -- bounce w/o processing
|
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
|
--advance playhead so it's just after the newly added regions
|
||||||
if n_regions_created > 0 then
|
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
|
end
|
||||||
|
|
||||||
-- all done, commit the combined Undo Operation
|
-- all done, commit the combined Undo Operation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue