Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blacklist = {'master', 'amp attack'}
- function isBlacklisted(name)
- blacklisted = false
- for i, item in pairs(blacklist) do
- if name:lower():find(item) ~= nil then
- blacklisted = true
- end
- end
- return blacklisted
- end
- retval, tracknum, fx, paramnum = reaper.GetLastTouchedFX()
- if retval then
- track = reaper.GetTrack(0, tracknum-1)
- numparams = reaper.TrackFX_GetNumParams(track, fx)
- for param = 0, numparams-3 do
- r, name = reaper.TrackFX_GetParamName(track, fx, param, "")
- if r then
- if not isBlacklisted(name) then
- reaper.TrackFX_SetParam(track, fx, param, math.random())
- end
- else
- reaper.TrackFX_SetParam(track, fx, param, math.random())
- end
- end
- else
- reaper.ShowMessageBox("Please touch any parameter of the target FX.", "Error", 0)
- end
Advertisement
Add Comment
Please, Sign In to add comment