View Single Post
Old 03-02-2021, 10:34 AM   #2414
Kr3eM
Human being with feelings
 
Kr3eM's Avatar
 
Join Date: Apr 2019
Posts: 231
Default

Quote:
Originally Posted by Loulou92 View Post
Hello !

I try to spare my CPU a little bit & I notice that the monitoring fx take a lot of resources here. I wish I could create cycle actions to put some of the monitoring FX offline/online. Currently we can bypass and unbypass in the action list.

"Set monitoring FX number n offline"

"Set monitoring FX number n online"

Any input appreciated !!
xxxxxxxxxxxxxxxxx

I made some minor changes to Edgemeal's script, try this and see if it works...

EDIT: However, not sure if it makes that much difference than bypass in regards to save CPU, but perhaps there are certain plugins that will.

Code:
-- Toggle FX # offline for Monitor FX
-- Copy this script file and rename the FX # for,
-- the FX slot number you want to toggle offline.
-- For example,
-- Toggle FX 3 offline for Monitor FX.lua
-- Toggle FX 4 offline for Monitor FX.lua
-- Toggle FX 5 offline for Monitor FX.lua
-- etc, etc...

local name = ({reaper.get_action_context()})[2]:match("([^/\\_]+).lua$")
local fxIndex = tonumber(name:match("FX (%d+)"))
local track = reaper.GetMasterTrack()
local cnt = reaper.TrackFX_GetRecCount(track)
if fxIndex <= cnt then
  fxIndex = (0x1000000 + (fxIndex-1))
   local enabled = reaper.TrackFX_GetOffline(track, fxIndex, 1)
  reaper.TrackFX_SetOffline(track, fxIndex, not enabled)
  -- set toolbar highlight
  local self = ({reaper.get_action_context()})[4]
  if enabled then  
    reaper.SetToggleCommandState(1, self, 1)
  else
    reaper.SetToggleCommandState(1, self, 0)
  end
end
reaper.defer(function () end)

Last edited by Kr3eM; 03-02-2021 at 10:42 AM.
Kr3eM is offline   Reply With Quote