Last active
May 14, 2018 19:48
-
-
Save junebash/d10f160a8836ab4e6573bb22ddfba825 to your computer and use it in GitHub Desktop.
Play back at half-time REAPER script
This file contains 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
--[[ | |
toggle transport playrate between 0.5 and 1.0; | |
sets master transport playback rate to 0.5 | |
if currently at 0.5, sets to 1.0 | |
by Jon Bash (@jonbash, www.jonbash.com) | |
]]-- | |
playrate = reaper.Master_GetPlayRateAtTime(0) | |
function playback_halftime() | |
if (playrate == 0.5) then | |
-- reaper.Master_NormalizePlayRate(number playrate, boolean isnormalized) | |
-- reaper.Master_NormalizePlayRate(1, false) | |
-- reaper.CSurf_OnPlayRateChange(number playrate) | |
reaper.CSurf_OnPlayRateChange(1) | |
else | |
reaper.CSurf_OnPlayRateChange(0.5) | |
end | |
end | |
function main() | |
playback_halftime() | |
end | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment