From 4863f06a2f5d1ee37ef5754d9681a3fefd60a99d Mon Sep 17 00:00:00 2001 From: Grayson Solis <109297237+grayson-solis@users.noreply.github.com> Date: Tue, 27 Jan 2026 12:29:41 -0500 Subject: [PATCH] Deleting my Scripts --- ...graysonsolis_List FX parameter indices.lua | 52 ------- ...Toggle ReaPitch shift (cents) envelope.lua | 96 ------------- ...Add JS Humanizer to top of track chain.lua | 23 --- ...sonsolis_Make renderable track regions.lua | 131 ------------------ 4 files changed, 302 deletions(-) delete mode 100644 Development/graysonsolis_List FX parameter indices.lua delete mode 100644 Envelopes/graysonsolis_Toggle ReaPitch shift (cents) envelope.lua delete mode 100644 FX/graysonsolis_Add JS Humanizer to top of track chain.lua delete mode 100644 Regions/graysonsolis_Make renderable track regions.lua diff --git a/Development/graysonsolis_List FX parameter indices.lua b/Development/graysonsolis_List FX parameter indices.lua deleted file mode 100644 index 0ae574a2e..000000000 --- a/Development/graysonsolis_List FX parameter indices.lua +++ /dev/null @@ -1,52 +0,0 @@ --- @description List FX parameter indices --- @author Grayson Solis --- @version 1.0 --- @about --- Prints each FX on the first selected track along with all of its parameter indices. --- --- Directions: --- 1) Select a track in REAPER. --- 2) Run this script. --- 3) Open the ReaScript Console (View → Show Console) to see the output. - -local track = reaper.GetSelectedTrack(0, 0) -if not track then - reaper.ShowMessageBox( - "Error: No track selected.\nPlease select a track and run again.", - "No Track Selected", - 0 - ) - return -end - -reaper.ClearConsole() -local _, trackName = reaper.GetTrackName(track, "") -reaper.ShowConsoleMsg("FX parameter indices for track: " .. trackName .. "\n\n") - -local fxCount = reaper.TrackFX_GetCount(track) -if fxCount == 0 then - reaper.ShowConsoleMsg(" (No FX found on this track.)\n") - return -end - -for fx_idx = 0, fxCount - 1 do - local _, fxName = reaper.TrackFX_GetFXName(track, fx_idx, "") - fxName = fxName or "(Unknown FX name)" - reaper.ShowConsoleMsg(string.format("FX #%d: \"%s\"\n", fx_idx, fxName)) - - local paramCount = reaper.TrackFX_GetNumParams(track, fx_idx) - if paramCount == 0 then - reaper.ShowConsoleMsg(" (No parameters for this FX)\n\n") - else - for param_idx = 0, paramCount - 1 do - local _, paramName = reaper.TrackFX_GetParamName(track, fx_idx, param_idx, "") - paramName = paramName or "(Unknown param name)" - reaper.ShowConsoleMsg( - string.format(" Param %d → \"%s\"\n", param_idx, paramName) - ) - end - reaper.ShowConsoleMsg("\n") - end -end - -reaper.ShowConsoleMsg("→ End of list.\n") diff --git a/Envelopes/graysonsolis_Toggle ReaPitch shift (cents) envelope.lua b/Envelopes/graysonsolis_Toggle ReaPitch shift (cents) envelope.lua deleted file mode 100644 index 4339786be..000000000 --- a/Envelopes/graysonsolis_Toggle ReaPitch shift (cents) envelope.lua +++ /dev/null @@ -1,96 +0,0 @@ --- @description Toggle ReaPitch shift (cents) envelope --- @author Grayson Solis --- @version 1.0 --- @about --- Toggles Shift (cents) envelope lane for ReaPitch on selected track. Adds ReaPitch if missing. Similar to the "volume" or "pan" default track envelopes. --- The parameter used can be toggled by editing the lines below! - -reaper.PreventUIRefresh(1) -reaper.Undo_BeginBlock() - -local track = reaper.GetSelectedTrack(0, 0) -if not track then - reaper.PreventUIRefresh(0) - return -end - -local before = reaper.TrackFX_GetCount(track) - -local fx_idx = reaper.TrackFX_AddByName(track, "ReaPitch (Cockos)", false, 0) -if fx_idx < 0 then - fx_idx = reaper.TrackFX_AddByName(track, "ReaPitch (Cockos)", false, 1) -end -if fx_idx < 0 then - reaper.ShowMessageBox("Could not add/find ReaPitch.", "Error", 0) - reaper.PreventUIRefresh(0) - return -end - -reaper.TrackFX_Show(track, fx_idx, 2) - -local added = (reaper.TrackFX_GetCount(track) > before) - ---[[ - -CUSTOMIZATION TIP -To select a different ReaPitch parameter envelope, change the value -of the `param` variable below to one of the following: - - 0: Wet - 1: Dry - 2: Enabled - 3: Shift (full range) - 4: Shift (cents) <-- current default - 5: Shift (semitones) - 6: Shift (oct) - 7: Formant adjust (full range) - 8: Formant adjust (cents) - 9: Formant adjust (semitones) - 10: Volume - 11: Pan - 12: Bypass - 13: Wet - 14: Delta - - For example, to toggle the envelope for "Shift (semitones)", set: - - local param = 5 - ---]] - -local param = 3 -- Shift (cents) YOU CAN CHANGE THIS!!!! - -local env = reaper.GetFXEnvelope(track, fx_idx, param, true) -if not env then - reaper.ShowMessageBox("Failed to access envelope.", "Error", 0) - reaper.PreventUIRefresh(0) - return -end - -local ok, chunk = reaper.GetEnvelopeStateChunk(env, "", false) -if not ok then - reaper.ShowMessageBox("Failed to read envelope.", "Error", 0) - reaper.PreventUIRefresh(0) - return -end - - -local show -if added then - show = true -else - local v1,v2,v3 = chunk:match("VIS (%d+) (%d+) (%d+)") - show = not (v1 == "1" and v2 == "1" and v3 == "1") -end - -chunk = chunk - :gsub("ACT %d+", "ACT " .. (show and 1 or 0)) - :gsub("VIS %d+ %d+ %d+", "VIS " .. (show and "1 1 1" or "0 0 0")) - :gsub("ARM %d+", "ARM " .. (show and 1 or 0)) - :gsub("DEFSHAPE %d+", "DEFSHAPE 0") - -reaper.SetEnvelopeStateChunk(env, chunk, false) -reaper.TrackList_AdjustWindows(false) -reaper.UpdateArrange() -reaper.Undo_EndBlock("Toggle ReaPitch shift (cents) envelope (default height)", 0) -reaper.PreventUIRefresh(0) diff --git a/FX/graysonsolis_Add JS Humanizer to top of track chain.lua b/FX/graysonsolis_Add JS Humanizer to top of track chain.lua deleted file mode 100644 index 1cb6af0cd..000000000 --- a/FX/graysonsolis_Add JS Humanizer to top of track chain.lua +++ /dev/null @@ -1,23 +0,0 @@ --- @description Add JS Humanizer to top of track chain --- @author Grayson Solis --- @version 1.0 --- @about Inserts the built-in JS humanizer at slot 1 on the selected track’s FX chain. --- @website https://graysonsolis.com --- @donations https://paypal.me/GrayTunes?country.x=US&locale.x=en_US - -local tr = reaper.GetSelectedTrack(0, 0) -if not tr then return end - -reaper.Undo_BeginBlock() - -- add the JS humanizer to the TRACK FX chain (recFX = false), always at end (pos = -1) - local fx = reaper.TrackFX_AddByName( - tr, - "JS: MIDI Velocity and Timing Humanizer", - false, -- false = normal FX chain (not Input FX) - -1 -- -1 = always add new instance at end - ) - if fx >= 0 then - -- move it into slot 0 (top of chain), shifting others down - reaper.TrackFX_CopyToTrack(tr, fx, tr, 0, true) - end -reaper.Undo_EndBlock("Add JS MIDI Velocity and Timing Humanizer to top", -1) diff --git a/Regions/graysonsolis_Make renderable track regions.lua b/Regions/graysonsolis_Make renderable track regions.lua deleted file mode 100644 index f23b7f60b..000000000 --- a/Regions/graysonsolis_Make renderable track regions.lua +++ /dev/null @@ -1,131 +0,0 @@ --- @description Make renderable track regions --- @author Grayson Solis --- @version 1.0 --- @about --- - For each selected track, it creates one or more time regions for rendering --- --- 1) Skip any selected track that is muted or inside a muted folder. --- 2) Delete any old regions named after that track (e.g. “Guitar”, “Guitar_1”, etc.). --- 3) Gather all unmuted items on the track and on its child tracks (e.g. your Drum folder ➔ Kick, Snare). --- 4) Sort those items by their start times and group any that overlap into stacks. --- 5) For each stack, make a new region from the earliest start to the latest end: --- – Name it “TrackName”, “TrackName_1”, “TrackName_2”… --- – Color it to match the track --- – Set it so that when you render that region, only this track is output --- --- - Example: --- - If you select “Vocal” and it has 3 takes overlapping, you’ll get: --- Region “Vocal” (first take), then “Vocal_1” (second stack), etc. - -function delete_existing_regions_for_track(track_name) - local i = 0 - while i < reaper.CountProjectMarkers(0) do - local retval, isrgn, pos, rgnend, name, markrgnindexnumber = reaper.EnumProjectMarkers(i) - if isrgn and name:match("^" .. track_name:gsub("[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1") .. "(_?%d*)$") then - reaper.DeleteProjectMarker(0, markrgnindexnumber, true) - else - i = i + 1 - end - end -end - -local function isActuallyMuted(tr) - while tr do - if reaper.GetMediaTrackInfo_Value(tr, "B_MUTE") == 1 then - return true - end - tr = reaper.GetParentTrack(tr) - end - return false -end - -function process_track(track) - if isActuallyMuted(track) then - return - end - - local retval, parent_name = reaper.GetTrackName(track, "") - parent_name = parent_name:gsub("<.->", "") -- removes any <…> substring - delete_existing_regions_for_track(parent_name) - - local track_color = reaper.GetTrackColor(track) - - local all_items = {} - - for i = 0, reaper.CountTrackMediaItems(track) - 1 do - local item = reaper.GetTrackMediaItem(track, i) - if reaper.GetMediaItemInfo_Value(item, "B_MUTE") ~= 1 then - table.insert(all_items, item) - end - end - - local track_idx = reaper.GetMediaTrackInfo_Value(track, "IP_TRACKNUMBER") - for i = track_idx, reaper.CountTracks(0) - 1 do - local child = reaper.GetTrack(0, i) - if reaper.GetTrackDepth(child) <= reaper.GetTrackDepth(track) then break end - if not isActuallyMuted(child) then - for j = 0, reaper.CountTrackMediaItems(child) - 1 do - local item = reaper.GetTrackMediaItem(child, j) - if reaper.GetMediaItemInfo_Value(item, "B_MUTE") ~= 1 then - table.insert(all_items, item) - end - end - end - end - - table.sort(all_items, function(a, b) - return reaper.GetMediaItemInfo_Value(a, "D_POSITION") - < reaper.GetMediaItemInfo_Value(b, "D_POSITION") - end) - - local stacks = {} - local current_stack = {} - local current_end = 0 - - for _, item in ipairs(all_items) do - local start_pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") - local end_pos = start_pos + reaper.GetMediaItemInfo_Value(item, "D_LENGTH") - if start_pos > current_end then - if #current_stack > 0 then - table.insert(stacks, current_stack) - current_stack = {} - end - current_end = end_pos - else - current_end = math.max(current_end, end_pos) - end - table.insert(current_stack, item) - end - if #current_stack > 0 then table.insert(stacks, current_stack) end - - local valid_count = 0 - for _, stack in ipairs(stacks) do - local stack_start = math.huge - local stack_end = 0 - - for _, item in ipairs(stack) do - local pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") - local len = reaper.GetMediaItemInfo_Value(item, "D_LENGTH") - stack_start = math.min(stack_start, pos) - stack_end = math.max(stack_end, pos + len) - end - - if stack_start < stack_end then - local region_name = parent_name - if valid_count > 0 then - region_name = region_name .. "_" .. valid_count - end - valid_count = valid_count + 1 - - local region_id = reaper.AddProjectMarker(0, true, stack_start, stack_end, region_name, -1) - reaper.SetProjectMarker3(0, region_id, true, stack_start, stack_end, region_name, track_color) - reaper.SetRegionRenderMatrix(0, region_id, track, 1) - end - end -end - -local count_sel = reaper.CountSelectedTracks(0) -for i = 0, count_sel - 1 do - local tr = reaper.GetSelectedTrack(0, i) - process_track(tr) -end