Files

19 lines
601 B
Lua
Raw Permalink Normal View History

-- MIDI Grid: cursor left one cell (pass-through when grid mode is off)
local dir = ({ reaper.get_action_context() })[2]:match("@?(.*[\\/])")
local G = dofile(dir .. "midigrid_lib.lua")
if not G.isActive() then G.passThrough("_OSARA_PREVCHORD") return end
local hwnd, take, err = G.editor()
if not take then G.say(err) return end
local _, _, idx = G.cell(take)
if idx <= 0 then G.say("start") return end
G.gotoCell(take, idx - 1)
local content = G.cellContentText(take)
G.say(G.cellPosText(take) .. ", " .. content)
local ppqA, ppqB = G.cellPPQ(take)
G.preview(G.pitchesInCell(take, ppqA, ppqB))