Disable widgets in variations

Hello team

Would it be possible to disable a widget in a variation?

My scenario is the next one, in helix native, you can a midi parameter with to methods, via midi cc and also with an alternative name (i.e. knobs and switches)

Lets assume i have some pitch shift fx and i set it up with a midi cc and with a knob to controll its position. These parameters are visible to gp so i can set 2 widgets (both exp pedals). One is receiving midin cc from omni (and omni receives the cc from a midi exp pedal controller, so no midi learn required) and the other widget is controlled by another midi device (whammy Bluetooth controller made at home)

The problem is, i can not figure out how to disable at will one of the 2 devices in a variation.

Lets say in one variation i just want to control the pitch bend with the foot, and in the other one with the bar, but i dont want both working at the same time, and i just want a single pitch bend fx block, not 2. As helix native allows to midi assignments, i can not think in other solution but disabling temporary a widget.

Filtering midi would not work cause the filter block handles only standards midi cc, not the other assignments such as knobs and switches found in native.

I hope is clear

Regards

With a little scripting you can achieve that

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   Blue3 : PluginBlock
   KNOB : Widget
//$</AutoDeclare>
// Called when you switch variations
On Variation(oldVariation : integer, newVariation : integer)
  if newVariation == 0 then
    MapWidgetToPlugin(KNOB, Blue3, 52)
  else
   MapWidgetToPlugin(KNOB, Blue3, 450)
  end 
End

In this example in the 1st Variation the Widget is mapped to Blue3 Speed Control of the Leslie
In the 2nd variation it is mapped to a non-existing parameter

So in the 1st variation the Widget controls the plugin parameter
In the 2nd variation a change of the widget has no effect.

1 Like

Thanks, i will try it for sure

To avoid side effect you have to check the widget property “Ignore Variations”.

I might be having some issues as I am not sure how to set up the scrip.

1st I selected : windows> current rackspace script editor and I pasted and change some keywords on your script. I changed all Blue3 for “Native” as it is written in my plugin block and compilation shows:

Plugin ‘Native’ not found in rackspace ‘Gramatico’
Scripting has been disabled for this rackspace
Gramatico (Script Entity: Rackspace) - Plugin ‘Native’ not found in rackspace ‘Gramatico’
No source information available - check GPScript options
Scripting has been disabled for this rackspace
Uh oh - GP Script runtime error

attaching screenshots


Additionally my widget name is “W bar” should I replace know for this name?

thx

You have to define handles for your Widget and for your plugin.

Also, the name “KNOB” is a keyword in GP Script so you can’t use that as a handle.

Change it to Knob1 (say)

ok thanks I added the labels and the compilation ran all good, but still I need to understand how to make It work, I set the affected widget with ignore variations and it looks like the script is making its job, the issue is now that is affecting all variations, and I need it to activate the widget in some of them. Additionally, the other widget I have added (according to my original description) is staring with another pedal position that I do not want to use as starting point. Attaching Gig file

Thx
Main Gig.gig (4.2 MB)

 if newVariation == 0 then
    MapWidgetToPlugin(Bar, Native, 52)
  else
   MapWidgetToPlugin(Bar, Native, 450)
  end

You have to give the correct Parameter Number, is it really 52?

This parameter is the position right? I can change it, but still, im not sure how to enable/disable the widget (not the position of it) at my will. What i noticed (correct me if i am wrong) is that the scrip removes the asisgned plugin that was set before. I do not know of after diisabling it can be re enable in other variations.

Thx again!

The parameter is the exposed parameter number of the plugin
When you open the plugin GUI and move a slider or knob on your plugin then a parameter number is shown in the plugin window.

The number is also shown in the plugin parameter list

Keep in mind not to map your widget to the plugin as the script handles that mapping.

In the script depending on the actual variation the widget is mapped to the desired parameter.

Thank you again now is clear. Will let you know if it works

Hello Again, I think I am close but not solved yet

I have added the name of the variation where I want to have the widget active, also added the parameter as shown in the plugin (parameter 4), the labels from the widget and plugin are correct and enabled for usage on scripting. still I do not see the widget active (as per scripting) when I select my variation

Another question will be, how to list multiple variations in the script?

code shows:
"
On Variation(oldVariation : integer, Helix_whammy : integer)

if Helix_whammy == 0 then
"

I think will be comma separated, (i.e Helix_whammy,Helix_whammy1,Helix_whammy2, etc) but not sure.

thx

In the callback On Variation (oldVariation : integer, newVariation : integer), the variables oldVariation and newVariation are the index numbers of the variation you come from and the variation you go to. If you have 4 variations with the names Jupiter, Mars, Sun and Pluto (from the upmost to the lowest), and you are on Jupiter and then you click Pluto, oldVariation will be 0 and newVariation will be 3. Then selecting Mars will result in oldVariation being 3 and newVariation having the value 1.

Renaming newVariation to Helix_whammy is rather confusing imo.

I hope this clarifies things somewhat.

2 Likes

That did the trick. Thanks a lot

1 Like

Probably this will be the last 2 questions i have regarding this issue.

The script works fine on rackspace, but what should I modify to make it work in the setlist?

The controllers do not respond the section change following the commands coming form SAFP

I found this on another post i assume i need to exchange “onVariation” for “SongNextPart”

var knob1 : Widget

On WidgetValueChanged (newvalue: double) from knob1
var beat_thresh : integer = ScaleRange(newvalue, 0, 50)
SetWidgetLabel(knob1, beat_thresh)
end

// Called when beat changes
// Only beat number is valid for now
On BeatChanged(bar : integer, beat : integer)
    var beat_thresh : integer = ScaleRange(GetWidgetValue(knob1), 0, 50)
    var i : integer
    i = i + 1
    Print(i)
    if i > beat_thresh then SongNextPart()
end
End

Could anyone give me a hint?

The 2nd a last question is regarding selectively set one value (exp pedal position) when changing presets or song parts.

Let me explain better… While the rack space script works fine, i have noticed a weird issue.

Depending the variation, One widget should always start the position centered (for whammy bar controller) and the other one full down. The issue is, even when one of the 2 widgets is fully disabled, when i change to the variation with exp pedal on, it nevers starts fully down (heel position) either graphically or in the plugin. I have set the “ignore variations” on and also added manually the values. But any time i use my controllers and change variations, this issue happen. I assume it is because there are 2 widgets for the same fx but in different positions, but in the end one is enabled and the other one disabled. So any hint here is also welcome

This is not that easy as a Song Script does not kino about Widgets.
But why is that needed?
You can reference in the Sing Parts different variations and then the rackspace script is running.

Somehow my script (or my hardware) is not really working on song parts, only on rackspace/variations.

It was working fine befor i added the scripts.

I am not sure how to troubleshoot as i have linked the song parts to the intended variations

so for example you have a rackspace with 4 variations and when you switch the variations the script is working fine.
Now you create a song with 4 song parts and each song part references a different variation of the same rackspace then the script does not work?

Right and you know, i just noticed that the script is not running properly when i am on setlist view. Imean, i check the widget the widgets link to blocks and they are empty,.

When i do the changes in panel view, variations and scripts works as intended

That is why i was asking to modify the scripts for song parts, but probably it would not be necessary if the song parts will follow the script.