Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 01-17-2019, 08:15 PM   #1
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default API:reaper.EnumTrackMIDIProgramNames always returns false

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
__________________
eric moon
Very Stable Genius
https://gogolab.com/

Last edited by woodslanding; 01-17-2019 at 08:51 PM.
woodslanding is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.