View Single Post
Old 01-13-2019, 06:20 AM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I think that function is only meant for use with a virtual instrument plugin that is first in the track's FX chain.

There is a painful way to enumerate the preset names of any effect that involves going through all the presets one by one (making the plugin load the preset, which can take a considerable time) and then getting the name of the current preset.

edit : code to do it that way :

Code:
local track = reaper.GetTrack(0,0)
local fxindex = 2
local retval, numberOfPresets = reaper.TrackFX_GetPresetIndex(track, fxindex)
for i=0,numberOfPresets-1 do
  reaper.TrackFX_SetPresetByIndex(track, fxindex, i)
  local retval, presetname = reaper.TrackFX_GetPreset(track, fxindex, "")
  reaper.ShowConsoleMsg(presetname.."\n") 
end
This is certainly not optimal, not only because it needs to change the actual preset in the plugin as many times as there are presets, but it also of course leaves the plugin's state at the last available preset.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 01-13-2019 at 07:16 AM.
Xenakios is offline   Reply With Quote