Add whole-take time shifting

Ctrl+Shift+Left/Right move every note in the take by one grid cell, for
clips that landed off the beat.

Since the whole take moves together, notes cannot collide with each other;
the hazard is the item boundary. Notes pushed past either end stop sounding
but are not deleted, so the operation is reversible -- shifting back restores
them. The plain keys still refuse when that would happen and report the count,
because a clip that has silently lost its first bar is a bad thing to discover
later. Ctrl+Alt+Shift forces it and names the consequence.

Positions are converted through QN rather than offset in raw ticks, so shifts
stay musically correct across tempo changes.
This commit is contained in:
2026-08-14 18:46:33 +02:00
parent 542f59e0db
commit 51dff21e85
7 changed files with 130 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
-- MIDI Grid: shift all notes one cell right even if some leave the item
local dir = ({ reaper.get_action_context() })[2]:match("@?(.*[\\/])")
local G = dofile(dir .. "midigrid_lib.lua")
if not G.isActive() then return end
G.runShift(1, true)