I tested this in LUA. It was also tested in EEL here:
https://forum.cockos.com/showpost.ph...3&postcount=12
Code:
boolean retval, string programName = reaper.EnumTrackMIDIProgramNames(integer track, integer programNumber, string programName)
returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated
Still returns false, even if the track contains a vst with programs that are passed to reaper, and appear in the dropdown menu.
Other problems with method:
1.Takes a track number instead of a track, unlike all other similar methods.
2.Does not allow to specify an FX slot. Is it supposed to offer presets from multiple VSTs in one big list indiscriminately?
Sample Code:
Code:
-- Console Message
function Msg(g)
reaper.ShowConsoleMsg(tostring(g).."\n")
end
--track = reaper.GetSelectedTrack(0,0)
--method needs a track number, not a track?
local _, track, _, fx_id = reaper.GetFocusedFX()
programNumber = 0 -- First index
Msg('track = '..track)
retval = true -- Start loop
while retval
do
retval, programName = reaper.EnumTrackMIDIProgramNames( track, programNumber, '' )
programNumber = programNumber + 1
if retval then
Msg(programNumber..programName)
else Msg('retval is false') --always returns false
end