Created
July 28, 2025 22:40
-
-
Save eropple/5f4c59a8a90b7c82771763b6edcd64b0 to your computer and use it in GitHub Desktop.
REAPER script for toggling playrate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- @description Master playrate - toggle between 1 and 2 | |
-- @version 1.1 | |
-- @author [email protected] | |
-- @changelog | |
-- + Modified to toggle between 1x and 2x speed | |
-- + Any other rate resets to 1x | |
local r = reaper | |
local rate = r.Master_GetPlayRate() | |
r.Undo_BeginBlock() | |
if rate == 1 then | |
-- Currently at normal speed, switch to 2x | |
r.CSurf_OnPlayRateChange(2) | |
elseif rate == 2 then | |
-- Currently at 2x speed, switch back to 1x | |
r.CSurf_OnPlayRateChange(1) | |
else | |
-- Any other rate, reset to 1x (normal speed) | |
r.CSurf_OnPlayRateChange(1) | |
end | |
r.Undo_EndBlock('Toggle master playrate (1x/2x)', 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment