Hey there,
i run into some repeating click tasks lately and wondered if/how i can automate that process.
task 1
snap selected regions to grid, then close gaps
so getting the selected regions should do with
local sel = Editor:get_selection ()
local sel_regions = sel.regions:regionlist()
and for processing each region i’d do
for r in sel_regions:iter() do
but then for the actual task, i’m a little overwhelmed from the Lua Bindings Class Reference.
Is there a method that executes commands from the menu?
I guess the snap part could be done with
r.set_snap_to_grid() = true
but for the close gaps part i’m lost.
task 1 +
As you may guess i intend to speed up my editing here. The process ist
- rhythm ferret
- snap to grid
- close gaps
I wondered if i could do a dialog-box with a button for each part and to enter the parameter settings. The Menu itself should be less of a problem, but again i must know how to start the functions out of Lua and to forward the setting parameters.
task 2
create X numbers of audio-tracks with same i/o settings
There i suppose i have to use the AudioTrack object but my research focused more on task 1 for now to be honest.
Sidenote
Coming from a non OOP background AND being a Lua noob, my question is very basic and tends to sound like “write that script so i don’t have to.” That’s not my intention. I’m happy to be just pointed into some general direction, if possible.