Old 01-28-2019, 09:07 PM   #1
orbiterred
Human being with feelings
 
Join Date: Apr 2017
Posts: 127
Default Script to make a specific effect (Console 1) offline project wide?

tl/dr: I need to toggle a specific effect online/offline FX on every track in a project.

Hey all,

Before I dive too deep...

My Console 1 will only work with 1 project open at a time (verified with Softube support) and Reaper crashes as soon as I try and open a new project in another tab using the Console 1 VST.

This is a major pain as I like to work 3 or 4 projects at a time and it's basically impossible with this bug.

A work around I thought of was to have a script tied to a keyboard command that would take all instances of Console 1 to offline in the current project before i switch to the next (and I would need another script to bring that projects console 1 back online).

I tested it with a few small projects and taking one projects console 1s offline before you open another works no problem, no crashes.

I didn't see anything in the repository on a quick check, but before I try to figure out how to script it I was just wondering if it's possible?

Any pointers appreciated as well!

Thanks
orbiterred is offline   Reply With Quote
Old 01-28-2019, 10:59 PM   #2
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 547
Default

Assuming that all your console 1 inserts are on fx slot 1 ?
SWS Extension needs to be installed.

Custom action --

Track: Select all tracks
SWS/S&M: Toggle FX 1 online/offline for selected tracks
__________________
I've been imitated so well I've heard people copy my mistakes. - Jimi Hendrix
J Reverb is offline   Reply With Quote
Old 01-29-2019, 05:53 AM   #3
orbiterred
Human being with feelings
 
Join Date: Apr 2017
Posts: 127
Default

Unfortunately they aren't.

Often times I'll have convolution/IR loaders and stuff as slot 1 then Console 1.

Thought about it some more last night, I could definitely just take everything offline as well which there probably is an action for. But just wondering if only taking the console 1 off line would speed up the process each time.
orbiterred is offline   Reply With Quote
Old 01-30-2019, 01:03 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 13,740
Default

Lokasenna has a lua that let's you toggle by fx slot number and track

I use it a lot to control VSTi's...

you run it and set it up and then save and it will create a new instance of itself just for the specific track and fx slot number you set up.

Now if you have a zillion tracks, it might be a tedious to do but for just a few it would do the trick.

We have it set up for a midi player to toggle the VSTi with the high C note [108]
the only prob I'd imagine ahead of time is having one hot key to toggle them all.... but I'd try this:

make all the saved scripts you need for a given project but don't give them hot keys....
then put them all into one custom action and give that a hot key

PS OK just tested that custom action method and it works fine
not sure this will work but I'd try it
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain

Last edited by hopi; 01-30-2019 at 03:37 PM.
hopi is online now   Reply With Quote
Old 01-30-2019, 07:58 PM   #5
orbiterred
Human being with feelings
 
Join Date: Apr 2017
Posts: 127
Default

VST3: Console 1 (Softube)

Shows as Console 1 in the track insert section

Few screenshots:

http://prntscr.com/mejl3y

http://prntscr.com/mejl7a
orbiterred is offline   Reply With Quote
Old 01-31-2019, 07:22 AM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,281
Default

Code:
  ref_name = 'VST3: Console 1 (Softube)'
  out_state = 0
  --------------------------------------------------------------------
  function OfflinePlugin(ref_name, out_state)
    reaper.Undo_BeginBlock()
    for i =1, reaper.CountTracks(0) do 
      local tr = reaper.GetTrack(0,i-1)
      for fx = reaper.TrackFX_GetCount( tr ), 1, -1 do 
        local retval, fxname = reaper.TrackFX_GetFXName( tr, fx-1, '' )
        if fxname == ref_name then reaper.TrackFX_SetOffline( tr, fx-1,math.abs(1-out_state) ) end
      end
    end
    reaper.Undo_EndBlock('Offline Console 1', 0)
  end
  
  OfflinePlugin(ref_name, out_state)

out_state = 1 for set online
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 01-31-2019, 04:54 PM   #7
orbiterred
Human being with feelings
 
Join Date: Apr 2017
Posts: 127
Default

Unreal! I've come across the legend of mpl's coding while researching things over the years with Reaper, this is so cool!

Can I buy you a beer or something man??

Quote:
Originally Posted by mpl View Post
Code:
  ref_name = 'VST3: Console 1 (Softube)'
  out_state = 0
  --------------------------------------------------------------------
  function OfflinePlugin(ref_name, out_state)
    reaper.Undo_BeginBlock()
    for i =1, reaper.CountTracks(0) do 
      local tr = reaper.GetTrack(0,i-1)
      for fx = reaper.TrackFX_GetCount( tr ), 1, -1 do 
        local retval, fxname = reaper.TrackFX_GetFXName( tr, fx-1, '' )
        if fxname == ref_name then reaper.TrackFX_SetOffline( tr, fx-1,math.abs(1-out_state) ) end
      end
    end
    reaper.Undo_EndBlock('Offline Console 1', 0)
  end
  
  OfflinePlugin(ref_name, out_state)

out_state = 1 for set online
orbiterred is offline   Reply With Quote
Old 02-05-2019, 05:00 PM   #8
orbiterred
Human being with feelings
 
Join Date: Apr 2017
Posts: 127
Default

Just wanted to say thanks again. Code works perfectly, such a major help!
orbiterred is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.