Skip to content

Commit

Permalink
use a single file rather than one per slot for Set solo for send X
Browse files Browse the repository at this point in the history
  • Loading branch information
cfillion committed Jun 4, 2017
1 parent 5a5431c commit 88197df
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 39 deletions.
6 changes: 0 additions & 6 deletions Tracks Properties/spk77_Set solo for send 1.lua

This file was deleted.

6 changes: 0 additions & 6 deletions Tracks Properties/spk77_Set solo for send 2.lua

This file was deleted.

6 changes: 0 additions & 6 deletions Tracks Properties/spk77_Set solo for send 3.lua

This file was deleted.

6 changes: 0 additions & 6 deletions Tracks Properties/spk77_Set solo for send 4.lua

This file was deleted.

6 changes: 0 additions & 6 deletions Tracks Properties/spk77_Set solo for send 5.lua

This file was deleted.

24 changes: 15 additions & 9 deletions Tracks Properties/spk77_Set solo for send X.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
-- @version 0.1
-- @version 0.1.1
-- @author spk77
-- @changelog
-- + initial release
-- ReaPack packaging enhancement by cfillion (no other code change).
-- @description Set solo for send X
-- @about
-- # Set solo for send X
--
-- Sets solo for send X (by muting all other sends on the track). This works on selected tracks.
--
-- @metapackage
-- @provides
-- [nomain] .
-- [main] spk77_Set solo for send 1.lua
-- [main] spk77_Set solo for send 2.lua
-- [main] spk77_Set solo for send 3.lua
-- [main] spk77_Set solo for send 4.lua
-- [main] spk77_Set solo for send 5.lua
-- [main] . > spk77_Set solo for send 1.lua
-- [main] . > spk77_Set solo for send 2.lua
-- [main] . > spk77_Set solo for send 3.lua
-- [main] . > spk77_Set solo for send 4.lua
-- [main] . > spk77_Set solo for send 5.lua

function solo_send(send_index)
local tr_count = reaper.CountSelectedTracks(0)
Expand Down Expand Up @@ -49,3 +48,10 @@ function solo_send(send_index)
end
reaper.Undo_EndBlock("Set solo for send", -1)
end

local slot = tonumber(({reaper.get_action_context()})[2]:match("send (%d+).lua"))
if slot then
solo_send(slot - 1)
else
error("could not extract send ID from filename")
end

0 comments on commit 88197df

Please sign in to comment.