I'm trying to figure out what value to send to my jsfx to change a parameter.
I ran some code to figure out what it is looking for:
Code:
local _,tk,fx,param = reaper.GetLastTouchedFX()
local mtk = reaper.GetTrack(0,tk)
local val,min,max = reaper.TrackFX_GetParam(mtk,fx, param)
reaper.ShowConsoleMsg("fx = "..fx..", parameter = "..param..", val = "..val.."max = "..max..", min = "..min..";\n")
when I change the parameter through all positions, I get this:
Code:
fx = 1, parameter = 11, val = 1.0max = 2.0, min = 0.0;
fx = 1, parameter = 11, val = 1.0max = 2.0, min = 0.0;
fx = 1, parameter = 11, val = 1.0max = 2.0, min = 0.0;
fx = 1, parameter = 11, val = 1.0max = 2.0, min = 0.0;
here's the jsfx line for the parameter:
Code:
slider20:s_mpeSrc=1<0,3,1{Normal,MPE,Dual,NONE}>Controller Type
I was just trying to figure out whether it was looking for a value in the range 0 to 3, 1 to 4, or 0 to 1. But I'm not getting either. Nor is the value changing.
Nor is
reaper.TrackFX_SetParamNormalized
or
reaper.TrackFX_SetParam
changing the value, where I fill it in from the values determined from the above readout. Of course, I'm just guessing what value to send the parameter, but nothing has done anything yet: