reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
455 stars 85 forks source link

BR_GetMouseCursorContext_MIDI() - add Notation lane #1082

Closed nofishonfriday closed 5 years ago

nofishonfriday commented 5 years ago

Reminder. https://forum.cockos.com/showpost.php?p=2079929&postcount=2

Test script:

function msg(m)
  return reaper.ShowConsoleMsg(tostring(m) .. "\n")
end

lastDetailsOut = -1

function GetMouseCursorDetails()

  windowOut, segmentOut, detailsOut = reaper.BR_GetMouseCursorContext()

  if lastDetailsOut ~= detailsOut then
    retval, inlineEditor, noteRow, ccLane, ccLaneVal, ccLaneId = reaper.BR_GetMouseCursorContext_MIDI()

    msg("cc lane: " .. ccLane) -- should be 0x208 (520) for 'Notation Events' lane 
    msg("\n")
  end

  lastDetailsOut = detailsOut
  reaper.defer(GetMouseCursorDetails)
end

GetMouseCursorDetails()

This currently results in '-1' for the Notation events lane.

nofishonfriday commented 5 years ago

added in v2.10.0