Files
midigrid/MidiGrid_Right.lua
Talon 8fd6f947ed Accessible grid-based MIDI entry mode for REAPER
Keyboard- and speech-driven step entry for the MIDI editor, built for use
with OSARA. Arrows walk grid cells and scale degrees, Enter toggles notes,
and every position is spoken and auditioned.

Uses REAPER's own edit cursor and active_note_row rather than private cursor
state, so grid mode and OSARA editing stay in sync. Grid size comes from
MIDI_GetGrid(), so existing grid keybindings drive it. When grid mode is off,
every bound key forwards to its previous action.

Preview timing lives in a background daemon so the action scripts can exit
immediately -- a script still alive on the next keypress triggers REAPER's
"already running" prompt and breaks key repeat.
2026-08-14 18:13:45 +02:00

18 lines
559 B
Lua

-- MIDI Grid: cursor right 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_NEXTCHORD") return end
local hwnd, take, err = G.editor()
if not take then G.say(err) return end
local _, _, idx = G.cell(take)
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))