Skip to content

Commit

Permalink
Release Remove hardware outputs of selected tracks v1.0.1 (#1381)
Browse files Browse the repository at this point in the history
Optimize processing in projects with high track counts
  • Loading branch information
cfillion authored May 4, 2024
1 parent b1feeff commit fded1af
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
-- @description Remove hardware outputs of selected tracks
-- @version 1.0
-- @author cfillion
-- @website http://forum.cockos.com/showthread.php?t=189761
-- @donation https://www.paypal.me/cfillion
-- @version 1.0.1
-- @changelog Optimize processing in projects with high track counts
-- @link http://forum.cockos.com/showthread.php?t=189761
-- @donation https://reapack.com/donate

local self = ({reaper.get_action_context()})[2]:match('([^/\\_]+).lua$')
local SCRIPT_NAME = select(2, reaper.get_action_context()):match('([^/\\_]+).lua$')
local UNDO_STATE_TRACKCFG = 1
local HARDWARE_OUT = 1 -- > 0

local seltracks = reaper.CountSelectedTracks()
if seltracks < 1 then return reaper.defer(function() end) end

reaper.PreventUIRefresh(1)
reaper.Undo_BeginBlock()

for ti=0, seltracks-1 do
local track = reaper.GetSelectedTrack(0, ti)
for si=0, reaper.GetTrackNumSends(track, HARDWARE_OUT)-1 do
for ti = 0, seltracks - 1 do
local track = reaper.GetSelectedTrack(nil, ti)
for si = 0, reaper.GetTrackNumSends(track, HARDWARE_OUT) - 1 do
reaper.RemoveTrackSend(track, HARDWARE_OUT, 0)
end
end

reaper.Undo_EndBlock(self, UNDO_STATE_TRACKCFG)
reaper.Undo_EndBlock(SCRIPT_NAME, UNDO_STATE_TRACKCFG)
reaper.PreventUIRefresh(-1)

0 comments on commit fded1af

Please sign in to comment.