Files
midigrid/MidiGrid_PlayBarOnly.lua
T

13 lines
507 B
Lua
Raw Normal View History

2026-08-14 20:04:20 +02:00
--[[
MIDI Grid: play only the bar the cursor is in, stopping at the bar line.
The stop is carried out by the preview daemon rather than here, because an
action script must exit immediately -- one that stayed alive waiting for the
bar to end would trigger REAPER's "already running" prompt on the next press.
]]
local dir = ({ reaper.get_action_context() })[2]:match("@?(.*[\\/])")
local G = dofile(dir .. "midigrid_lib.lua")
local bar = G.playFromBar(true)
G.say("Playing bar " .. bar .. " only")