View Single Post
Old 11-13-2018, 03:21 PM   #157
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,669
Default

MPL, i made it work so that "Script: mpl_Export selected items to RS5k instances on selected track (drum mode).lua" doesn't ask for user input for which midi note to assign.

instead, it references a track which has a dummy JS whose 1 param is controlled by OSC to output the last hit midi note. your script looks at that value and uses that.

it works beautifully.

Code:
    -- get base pitch
      for i = 1, reaper.CountTracks(0) do
            inqtrack = reaper.GetTrack(0,i-1)
            _, tr_name = reaper.GetSetMediaTrackInfo_String( inqtrack, 'P_NAME', '', 0 )
            if tr_name:lower():find("inq") then
              val = reaper.TrackFX_GetParam(inqtrack, 0, 1)
              reaper.ShowConsoleMsg("[value] - ")
              reaper.ShowConsoleMsg(val)
              reaper.ShowConsoleMsg("\n")
              end
            end
      base_pitch = math.floor(tonumber(val))
i am using a similar OSC / getparam trick to have my launchpad light up pads corresponding to RS5K's "Note range start" param
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is online now   Reply With Quote