Skip to content

Commit

Permalink
release two new scripts: (reset stereo width) and (remove hardware ou…
Browse files Browse the repository at this point in the history
…tputs)
  • Loading branch information
cfillion committed Mar 22, 2017
1 parent 7e7e8d3 commit cd773a2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- @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

local self = ({reaper.get_action_context()})[2]: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.Undo_BeginBlock()

for ti=0, seltracks-1 do
local track = reaper.GetSelectedTrack(0, 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- @description Reset stereo width of selected tracks to 100%
-- @version 1.0
-- @author cfillion
-- @website http://forum.cockos.com/showthread.php?t=189761
-- @donation https://www.paypal.me/cfillion

local self = ({reaper.get_action_context()})[2]:match('([^/\\_]+).lua$')
local UNDO_STATE_TRACKCFG = 1

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

reaper.Undo_BeginBlock()

for i=0, seltracks-1 do
local track = reaper.GetSelectedTrack(0, i)
reaper.SetMediaTrackInfo_Value(track, 'D_WIDTH', 1)
end

reaper.Undo_EndBlock(self, UNDO_STATE_TRACKCFG)

0 comments on commit cd773a2

Please sign in to comment.