Let me just make a simple GUI for changing time but for now just edit the script and set the time you want (in seconds)
Code:
local time = 2 -- TIME OFFSET (seconds)
local off_cur,store_cur
function main()
local state = reaper.GetPlayState() -- GET TRANSPORT STATE
local cur_pos = reaper.GetCursorPosition() -- GET EDIT CURSOR POSITION
if state == 0 then -- IF STOPED
if last_state ~= nil then -- IF PREVIOUS STATE WAS PLAY OR RECORD
reaper.SetEditCurPos(store_cur,1, 1 ) -- RESTORE ORIGINAL EDIT CURSOR POSITION
last_state = nil -- RESET LAST TRANSPORT STATE
store_cur = nil -- RESET STORED EDIT CURSOR POSITION
else -- IF PLAY OR RECORD
store_cur = cur_pos -- STORE ORIGINAL EDIT CURSOR POSITION
off_cur = cur_pos - time -- OFFSET CURSOR
end
end
if state ~= 0 and off_cur then
reaper.SetEditCurPos( off_cur,1, 1 ) -- MOVE CURSOR WITH OFFSET
last_state = state -- SAVE LAST TRANSPORT STATE (PLAY OR RECORD)
off_cur = nil
end
reaper.defer(main)
end
main()
test away
@EpicSound not yet working in recording mode (not sure if it can but I'm working on it)