-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_missing_automation_points.lua
More file actions
43 lines (30 loc) · 1.2 KB
/
Copy pathadd_missing_automation_points.lua
File metadata and controls
43 lines (30 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
start_track = 0
end_track = start_track+31
-- plugin param 1-6
plugin_name = "Seamless Client"
-- get project length (in s)
current_project, _ = reaper.EnumProjects(-1)
n_tracks = reaper.CountTracks(current_project)
reaper.ShowConsoleMsg("n_tracks: "..tostring(n_tracks).."\n")
-- iterate over all relevant track indices
for track_idx = 0,n_tracks-1 do
local track = reaper.GetTrack(0, track_idx)
local _, track_name = reaper.GetTrackName(track)
reaper.ShowConsoleMsg("\ntrack: "..track_name.."\n")
-- get index of seamless client, if no plugin just skip track
local plugin_idx = reaper.TrackFX_AddByName(track, plugin_name, false, 0)
if plugin_idx == -1 then
reaper.ShowConsoleMsg("\tno plugin on track\n")
goto continue
end
-- enable envelopes for all parameters
for i = 0, 5 do
-- opening the envelope is apparently enough
local new_env = reaper.GetFXEnvelope(track, plugin_idx, i , true)
-- this is just for fun and for checking
local val, _, _ = reaper.TrackFX_GetParam(track, plugin_idx, i)
local _, param_name_new = reaper.GetEnvelopeName(new_env)
reaper.ShowConsoleMsg("\t".. param_name_new ..": " .. tostring(val) .."\n")
end
::continue::
end