On rackspace load, how to execute once all plug-in bypass

Hi All…

I wish to bypass all guitar plugins on initial loading of the rackspace just the once.

Not sure how to accomplish this (Scripting Newbie).

Thank you…!!!

Just the once - meaning when you first open the gig file? Otherwise, the more info the better on what you’re trying to achieve.

Hi…

You are correct.

When I first open the gig file, I want all guitar plugins to be bypassed.

Thanks…!!!

Have you tried the ‘Initial value on gig load’ options in the widget settings (Value tab)?

If you had a widget for every plugin’s bypass, these options will allow you to set them all to always be bypassed when you open the gig. After that, you can change them to whatever you want.

1 Like

Hi…

Yep, tried that. Maybe something in my script that prevents that occurring. No idea TBH. :slight_smile:

Cheers.

Well I don’t see why you should use a GPScript for this. Why don’t you map a widget to the bypass parameter and save the gig with the plugin bypassed ?

If you want to talk about a GPScript please post it!

Hi There…

The premise of this gig file, is to have my NeuralDSP plugins loaded and via script associate them as required to a Media Player track (when selected). This works so far, albeit likely the long way…!!

The behaviour I see, is that on gig file load, most NeuralDSP plugins are enabled causing 100% CPU load. hence why I am trying to bypass the plugins on load until required.

Cheers…!!!


//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   Media_Player : PluginBlock
   OutputMixer : PluginBlock
   MIDI_Block : MidiInBlock
   
   Petrucci : PluginBlock
   Gojira : PluginBlock
   Soldano : PluginBlock
   Grano : PluginBlock
   Nolly : PluginBlock
   Plini : PluginBlock
   Nameless : PluginBlock
   Cali : PluginBlock
   Henson : PluginBlock
   Toneking : PluginBlock
   
   Label_1 : Widget
   Bypass_All : Widget
   
   Petrucci_1 : Widget
   Gojira_1 : Widget
   Soldano_1 : Widget
   Grano_1 : Widget
   Nolly_1 : Widget
   Plini_1 : Widget
   Nameless_1 : Widget
   Cali_1 : Widget
   Henson_1 : Widget
   TKing : Widget
   
   Track_Start_1 : Widget
   Track_Start_3 : Widget
   Track_Start_2 : Widget
   Track_Start_4 : Widget
   Track_Start_5 : Widget
   Track_Start_6 : Widget
   Track_Start_7 : Widget
   Track_Start_8 : Widget
//$</AutoDeclare>

// Bypass All NeuralDSP Plugins
// Track and Plugin Select Section

On ParameterValueChanged(parameterNumber : integer, parameterValue : double) from Media_Player

// Track 1 Uses Petrucci
    If parameterNumber == 9
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 0) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 0)
		    SendNow(MIDI_Block, MakeControlChangeMessage(20,127))
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            
            SetPluginBypassed(Toneking, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 1) 
            
            SetWidgetLabel(Label_1, "A Minor Blues : Petrucci")
    End
    
  // Track 2 Uses Gojira
    If parameterNumber == 10
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 0)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            SendNow(MIDI_Block, MakeControlChangeMessage(11,127))
            
            SetPluginBypassed(Toneking, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 1) 
            
            SetWidgetLabel(Label_1, "Hard Rock in A Minor")
    End  
    
   // Track 3 Uses Plini
    If parameterNumber == 11
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 0)
            SendNow(MIDI_Block, MakeControlChangeMessage(15,127))
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            
            SetPluginBypassed(Toneking, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 1) 
            
            SetWidgetLabel(Label_1, "Power Ballad in C Minor")
    End
    
    // Track 4 Uses Tone King
    If parameterNumber == 12
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            
            SetPluginBypassed(Toneking, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 0)
            
            SendNow(MIDI_Block, MakeControlChangeMessage(19,127))
            
            SetWidgetLabel(Label_1, "BB King A Minor Blues : Tone King")
    End
    
// Track 5 Uses Tone King
    If parameterNumber == 13
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            
            SetPluginBypassed(Toneking, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 0) 
            SendNow(MIDI_Block, MakeControlChangeMessage(49,127))
            
            SetWidgetLabel(Label_1, "12 Bar Blues in A Minor")
    End
    
  // Track 6 Uses Soldano
    If parameterNumber == 14
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 0)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            SendNow(MIDI_Block, MakeControlChangeMessage(12,127))
            
            SetPluginBypassed(Toneking, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 1) 
            
            SetWidgetLabel(Label_1, "Medium Hard Rock in A Minor")
    End  
    
   // Track 7 Uses Henson
    If parameterNumber == 15
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
		    SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 0)
            SendNow(MIDI_Block, MakeControlChangeMessage(38,127))
            
            SetPluginBypassed(Toneking, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 1) 
            
            SetWidgetLabel(Label_1, "80's Classic in C Major")
    End
    
    // Track 8 Uses Tone King
    If parameterNumber == 16
	    Then
		    SetPluginBypassed(Petrucci, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 3, 1)
            
            SetPluginBypassed(Gojira, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 10, 1)
            
            SetPluginBypassed(Soldano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 17, 1)
            
            SetPluginBypassed(Grano, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 24, 1)
            
            SetPluginBypassed(Nolly, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 31, 1)
            
            SetPluginBypassed(Plini, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 38, 1)
            
            SetPluginBypassed(Nameless, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 45, 1)
            
            SetPluginBypassed(Cali, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 52, 1)
            
            SetPluginBypassed(Henson, parameterValue == 1) // 0 = on 1 = off
            SetParameter(OutputMixer, 59, 1)
            
            SetPluginBypassed(Toneking, parameterValue == 0) // 0 = on 1 = off
            SetParameter(OutputMixer, 66, 0)
            
            SendNow(MIDI_Block, MakeControlChangeMessage(19,127))
            
            SetWidgetLabel(Label_1, "Rock Pop in C Major")
    End

End

I see 3 things you’re syncing up: Track Select + Mixer Channel + Plugin Bypass

From what I can see, you can achieve all of this just using widget groups. The set of widgets at the bottom have the value reversed, so instead of bypassing the plugin, the one selected is the only plugin active.

sync-track-mixer-bypass

@rank13 is probably correct that this can all be done with widget groups and I would encourage that approach.

That said, for purposes of people interested in improving their GP Script knowledge, you can replace those repetitive sections of code (182 lines in total not including spaces) can be greatly simplified (thereby eliminating potential errors) by writing the following 34 lines - starting where you added that Bypass All NeuralDSP Plugins comment

Note how the addition of an array of plugins and a single function simplifies significantly the On ParameterValueChanged callback

NB - I’ve compiled this but haven’t tested it since I’m not going to create the gig file

// Bypass All NeuralDSP Plugins

var 
   plugins : PluginBlock Array = [Petrucci, Gojira, Soldano, Grano, Nolly, Plini, Nameless, Cali, Henson, Toneking]


Function UnbypassOnePlugin(p : PluginBlock, text : String)
var
   index : integer
   unbypass : boolean
   mixerChannel : integer
   
   For index = 0; index < Size(plugins); index = index + 1 do
       unbypass = plugins[index] == p
       mixerChannel = index * 7 + 3  // Starting at 3, every 7th entry is the one we care about       
       SetPluginBypassed(plugins[index], !unbypass)       
       SetParameter(OutputMixer, mixerChannel, if unbypass then 0 else 1 end)        
   End 
   
   SetWidgetLabel(Label_1, text)   // Finally set the label text
End




// Track and Plugin Select Section
On ParameterValueChanged(parameterNumber : integer, parameterValue : double) from Media_Player
   select
      parameterNumber == 9 do
         UnbypassOnePlugin(Petrucci,  "A Minor Blues : Petrucci")

      parameterNumber == 10 do      
         UnbypassOnePlugin(Gojira, "Hard Rock in A Minor")   

      parameterNumber == 11 do
          UnbypassOnePlugin(Plini, "Power Ballad in C Minor")

      parameterNumber == 13 do
         UnbypassOnePlugin(Toneking, "BB King A Minor Blues : Tone King")

      parameterNumber == 14 do
         UnbypassOnePlugin(Soldano, "Medium Hard Rock in A Minor")

      parameterNumber == 15 do
         UnbypassOnePlugin(Henson,  "80's Classic in C Major")

      parameterNumber == 16 do
         UnbypassOnePlugin(Toneking,  "Rock Pop in C Major")

   End // Select

End

Hi…

Wow, that’s a serious difference to what I had…!!

Unfortunately, it crashes GP. It does compile without errors.

Cheers.

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   Media_Player : PluginBlock
   OutputMixer : PluginBlock
   MIDI_Block : MidiInBlock
   
   Petrucci : PluginBlock
   Gojira : PluginBlock
   Soldano : PluginBlock
   Grano : PluginBlock
   Nolly : PluginBlock
   Plini : PluginBlock
   Nameless : PluginBlock
   Cali : PluginBlock
   Henson : PluginBlock
   Toneking : PluginBlock
   
   Label_1 : Widget
   Bypass_All : Widget
   
   Petrucci_1 : Widget
   Gojira_1 : Widget
   Soldano_1 : Widget
   Grano_1 : Widget
   Nolly_1 : Widget
   Plini_1 : Widget
   Nameless_1 : Widget
   Cali_1 : Widget
   Henson_1 : Widget
   TKing : Widget
   
   Track_Start_1 : Widget
   Track_Start_3 : Widget
   Track_Start_2 : Widget
   Track_Start_4 : Widget
   Track_Start_5 : Widget
   Track_Start_6 : Widget
   Track_Start_7 : Widget
   Track_Start_8 : Widget
//$</AutoDeclare>

// Track and Plugin Select Section
var 
   plugins : PluginBlock Array = [Petrucci, Gojira, Soldano, Grano, Nolly, Plini, Nameless, Cali, Henson, Toneking]


Function UnbypassOnePlugin(p : PluginBlock, text : String)
var
   index : integer
   unbypass : boolean
   mixerChannel : integer
   
   For index = 0; index < Size(plugins); index = index + 1 do
       unbypass = plugins[index] == p
       mixerChannel = index * 7 + 3  // Starting at 3, every 7th entry is the one we care about       
       SetPluginBypassed(plugins[index], !unbypass)       
       SetParameter(OutputMixer, mixerChannel, if unbypass then 0 else 1 end)        
   End 
   
   SetWidgetLabel(Label_1, text)   // Finally set the label text
End

On ParameterValueChanged(parameterNumber : integer, parameterValue : double) from Media_Player
   select
      parameterNumber == 9 do
         UnbypassOnePlugin(Petrucci,  "A Minor Blues : Petrucci")
         SendNow(MIDI_Block, MakeControlChangeMessage(20,127))

      parameterNumber == 10 do      
         UnbypassOnePlugin(Gojira, "Hard Rock in A Minor")
         SendNow(MIDI_Block, MakeControlChangeMessage(11,127))

      parameterNumber == 11 do
          UnbypassOnePlugin(Plini, "Power Ballad in C Minor")
          SendNow(MIDI_Block, MakeControlChangeMessage(15,127))

      parameterNumber == 12 do
         UnbypassOnePlugin(Toneking, "BB King A Minor Blues : Tone King")
         SendNow(MIDI_Block, MakeControlChangeMessage(19,127))

      parameterNumber == 13 do
         UnbypassOnePlugin(Toneking, "12 Bar A Minor Blues : Tone King")
         SendNow(MIDI_Block, MakeControlChangeMessage(49,127))

      parameterNumber == 14 do
         UnbypassOnePlugin(Soldano, "Medium Hard Rock in A Minor")
         SendNow(MIDI_Block, MakeControlChangeMessage(12,127))

      parameterNumber == 15 do
         UnbypassOnePlugin(Henson,  "80's Classic in C Major")
         SendNow(MIDI_Block, MakeControlChangeMessage(38,127))

      parameterNumber == 16 do
         UnbypassOnePlugin(Toneking,  "Rock Pop in C Major")
         SendNow(MIDI_Block, MakeControlChangeMessage(19,127))

   End
End

(edited to code-format for better readability - schamass as mod)

What version of GP and on what OS?

Do you have a crash report?

Hi There…

Gigperformer version 4.5.8

macOS Monterey 12.4

Attached is the macOS crash report. If GP, where do I find it…??

Cheers.
Crash Report.txt (298.1 KB)

Do you have the option “Recompile automatically after global changes” set in Scripting options?

If so, could you try turning that off and see if it still crashes?

Hi…

Still crashes. Sorry…

Amps And Tracks 3.gig (2.1 MB)

How are you triggering the switching from one to another?

Also, you’re saying that your version works ok while my shorter version is crashing?

I get a crash, when opening the gig
Crash.rtf (37.1 KB)

Hi…

My longer version runs OK.

Not sure what you mean by your first question.

Thank you…!!!

How are you switching the parameter that causes that parameter changed callback to be triggered?

Hi…

If I understand you correctly, I have a button attached to the lane on the media player. That lane parameter is used to select the correct NeuralDSP plugin and preset.

I am (probably) using the most sideways method to do this, but scripting is something I struggle with big time. :slight_smile: Always have. I would have used the button to select the lane, amp and preset but I just can’t find a complete list of all commands and how to (newbie) use them. :thinking:

Cheers.
Amps And Tracks 2.gig (2.1 MB)

Are you clicking on that button with a mouse or are you triggering the button from a midi controller?