From d35d62a4990b2216a21c2c971004ac1a81d89b0a Mon Sep 17 00:00:00 2001 From: ColeMizeStudios Date: Fri, 14 Aug 2026 11:29:42 +0700 Subject: [PATCH] Release Toggle repeat and color loop point v1.0 --- ...ize_Toggle repeat and color loop point.lua | 10 ++++ ...ge loop color yellow and toggle repeat.lua | 47 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 Time Selection/colemize_Toggle repeat and color loop point.lua create mode 100644 Time Selection/colemize_Toggle repeat and color loop point/Change loop color yellow and toggle repeat.lua diff --git a/Time Selection/colemize_Toggle repeat and color loop point.lua b/Time Selection/colemize_Toggle repeat and color loop point.lua new file mode 100644 index 000000000..0f6549252 --- /dev/null +++ b/Time Selection/colemize_Toggle repeat and color loop point.lua @@ -0,0 +1,10 @@ +-- @description Toggle repeat and color loop point +-- @author Cole Mize +-- @version 1.0 +-- @metapackage +-- @provides [main] colemize_Toggle repeat and color loop point/Change loop color yellow and toggle repeat.lua +-- @about +-- #Cole Mize +-- +-- This script will toggle Repeat and color your Loop Point so that it's more obvious when Repeat is engaged. + diff --git a/Time Selection/colemize_Toggle repeat and color loop point/Change loop color yellow and toggle repeat.lua b/Time Selection/colemize_Toggle repeat and color loop point/Change loop color yellow and toggle repeat.lua new file mode 100644 index 000000000..a0e4cedfb --- /dev/null +++ b/Time Selection/colemize_Toggle repeat and color loop point/Change loop color yellow and toggle repeat.lua @@ -0,0 +1,47 @@ +-- @noindex + +--[[ + Cole Mize Studios + REAPER Script: Toggle Repeat + Loop-Point Timeline Background + Created by: Cole Mize + Version: 1.0 + + Description: + Toggles REAPER's Repeat function and changes the loop-point + timeline background color based on the Repeat state. + + Repeat ON = Yellow/Orange (255, 194, 30) + Repeat OFF = White (255, 255, 255) +--]] + +local REPEAT_COMMAND = 1068 + +-- Toggle REAPER Repeat +reaper.Main_OnCommand(REPEAT_COMMAND, 0) + +-- Get the NEW repeat state +local repeat_state = reaper.GetToggleCommandState(REPEAT_COMMAND) + +local r, g, b + +if repeat_state == 1 then + -- Repeat ON = Yellow/Orange + r = 255 + g = 194 + b = 30 +else + -- Repeat OFF = White + r = 255 + g = 255 + b = 255 +end + +-- Convert RGB to REAPER native color +local color = reaper.ColorToNative(r, g, b) + +-- Timeline background (in loop points) +reaper.SetThemeColor("col_tl_bgsel2", color, 0) + +-- Refresh REAPER +reaper.UpdateArrange() +reaper.UpdateTimeline()