Add play-current-bar-only
Ctrl+Alt+Space plays the cursor's bar and stops at the next bar line, so the same bar can be fired repeatedly while nudging a note without reaching for stop. Alt+Space keeps its play-onwards behaviour. The stop is performed by the preview daemon rather than the action script: a script that stayed alive waiting for the bar to end would bring back REAPER's "already running" prompt on the next press, which is the problem the daemon exists to avoid. Stopping transport can move the edit cursor depending on preferences, and the edit cursor is the grid cursor, so the daemon restores it. A short arming window covers the gap between requesting playback and the transport reporting as playing, so the pending stop is not cancelled instantly.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--[[
|
||||
MIDI Grid: play from the start of the bar the cursor is in.
|
||||
MIDI Grid: play from the start of the bar the cursor is in, and keep going.
|
||||
|
||||
Deliberately works whether or not grid mode is on -- it is a listening aid,
|
||||
not an editing action, and it is just as useful while navigating with OSARA
|
||||
@@ -8,5 +8,5 @@
|
||||
local dir = ({ reaper.get_action_context() })[2]:match("@?(.*[\\/])")
|
||||
local G = dofile(dir .. "midigrid_lib.lua")
|
||||
|
||||
local bar = G.playFromBar()
|
||||
local bar = G.playFromBar(false)
|
||||
G.say("Playing from bar " .. bar)
|
||||
|
||||
Reference in New Issue
Block a user