24 lines
1018 B
Lua
24 lines
1018 B
Lua
-- dump_params.lua : enumerate soothe2 FX params (name, raw, formatted) to file
|
|
local out = io.open("/tmp/opencode/fxparams.txt", "w")
|
|
local tr = reaper.GetTrack(0, 0)
|
|
if tr == nil then
|
|
out:write("NO TRACK\n"); out:close(); return
|
|
end
|
|
local nfx = reaper.TrackFX_GetCount(tr)
|
|
out:write(string.format("nfx=%d\n", nfx))
|
|
for fxi = 0, nfx - 1 do
|
|
local rv, fxname = reaper.TrackFX_GetFXName(tr, fxi, "")
|
|
out:write(string.format("FX %d: %s\n", fxi, fxname))
|
|
local np = reaper.TrackFX_GetNumParams(tr, fxi)
|
|
for p = 0, np - 1 do
|
|
local _, pname = reaper.TrackFX_GetParamName(tr, fxi, p, "")
|
|
local val, minv, maxv = reaper.TrackFX_GetParam(tr, fxi, p)
|
|
local _, fmt = reaper.TrackFX_GetFormattedParamValue(tr, fxi, p, "")
|
|
out:write(string.format("%d\t%s\traw=%.6f\t[%.3f..%.3f]\tfmt=%s\n", p, pname, val, minv, maxv, fmt))
|
|
end
|
|
end
|
|
out:close()
|
|
local t0 = reaper.time_precise()
|
|
while reaper.time_precise() - t0 < 2 do reaper.defer(function() end) end
|
|
reaper.Main_OnCommand(40004, 0) -- File: Quit REAPER
|