Struggles with Scaling a Toggle Switch Widget

@dhj

Sending a MIDI value of greater than 1 keeps the B3X rotary switch at fast. The widget continues to toggle around the half way point, however. ( didn’t measure it. Just moved the knob to determine estimated 1/2 way point for the widget change of display from off to on.

I suspect MIDI learn is expecting 0-127 (as it appears you cannot edit MIDI learn to exact values) but with scaling it should be 0-1 however maybe my scaling formula should have been x127 instead of x100 if as @wd8dky says the high value it is sending is .8

Steve

@schamass

I’m using the B3X VST3 plugin so I don’t think it would allow MIDI if you even wanted it to. Yes, look at the gig file. I posted it so anyone could take a closer look on their own if needed. Although the B3X plugin cost money, you can get an evaluation copy for testing purposes and it will still run, albeit with occasional audio cutout.

Steve

Here is a short video that demonstrates what is happening.

Note that the Leslie switch toggles and value of 1 (as indicated by the knob), but the switch doesn’t flip on until it reaches the half way point. I’m controlling the knob with an external MIDI controller (knob) CC23 on MIDI channel 1.

Steve

I think this is working as designed.
The Widget Value Curve influences the value sent by the widget.
The Widget itself reacts on incoming Midi Values.
And therefore the behavior is correct.

@pianopaul

Yes, I figured that this was probably the case. I was thinking the switch indicator would be based on the output value instead of it’s input value but I guess I’m wrong.

Steve

First of all we should use and only consider host automation if available in the plugin. As far as I now (I don’t own it) B3X has host automation. So, we shouldn’t consider sending MIDI values to B3X.

There is a mix of a lot of thing here. Could we split things into two separate steps:

1 - For the widget: in the Value tab (independently from what happens at the MIDI controller side): move the widget and chec if the assigned plugin parameter changes the right way. If not, do the appropriate adjustment (e.g. “reverse” its value or even adapt the curve)

2 - For the MIDI controller: in the MIDI tab (independently from what happens at the plugin side): move the assigned MIDI controller and check if the widget moves the right way. If not, do the appropriate adjustment (e.g. use “invert” or in the most difficult case use a gig script)

I am interested in the success or difficulties encountered in the first and second steps (uncorrelated). Otherwise, we’ll keep going in circles.

NB: And to make sure everyone agrees:

  • the standard MIDI values range from 0 to 127 (in integer steps)
  • the plugins parameters values go from 0.0 to 1.0 (in decimal numbers)

+10000

Ok guys, i connected my dusty Numa C2X, downloaded the demo of B-3X and tried to use the the “Decay fast/slow” button on the controller to use it with the widget.
There was no need to explicitly enable host automation in the plugin, the pairing of the widget and the Leslie speed parameter works flawlessly (as long as you switch the widget manually/by mouse) ! So far so good.

The problem is that this controller button on the Numa actually sends a value of 0 or 1 on CC#23.
So you can scale the widgets range to be from 0 (min) to 1 (max) which make it go ON or OFF with each press of the controller button, but this scaled value seems also to be forwarded to the plugins parameter, which expects a value coming in from 0-100 (or 127 if we talk MIDI).

I also tried to group two button widgets where one was scaled to go only from 0-1 and which was supposed to react to the 0/1 on CC#23 which comes from the controller and the other with full range which was connected to the plugin parameter with the purpose of giving it the full 0-100 value range.
This didn’t work either, since the “full range button” would only switch when the value would exceed the 50 what never happens, since the first button only ranges from 0-1.

So this all could work if the switch state of a button widget and the value it sends out would be handled separately, so that a group of switches would not “listen” to the value but rather to the switch state:
If one switch is ON, all other switches of the group should also change to ON, no matter what values would be used.
But this is not the case - i can’t tell if this was a good idea… maybe, maybe not.

Anyway:
My opinion is that you’ll have to “translate” these values by scripting, i see no other way to succed.

No Scripting required. In this version I changed the CC # of Leslie Fast/Slow to 22 and then added Percussion Decay using CC23. Then I scaled the new widget.
B3X-Example-2021-09-05b.gig (53.8 KB)

Steve

Hmm… i guess you missunderstood something here - well i guess you don’t have the Numa C2X.
There is a button on this controller for “Percussion Decay” which sends out a value of 0 or 1 on CC#23 when pressed:

And this button is what @wd8dky wants to use to switch the Leslie.
So, your first attempt with a script was absolutely OK as far as i can say.
I made a little scriptlet which does the job too… maybe a bit less messing with Scripting for the basic user, but it needs a group of two buttons… i guess it could be done on one single widget too, but then it has to be given a predefined handle name.
I also didn’t use the MIDI injection, so if CC#23 is used anywhere else, it won’t work either… but i think this could be easily changed if there will be any real need for the Scriptlet…
B-3X test.rackspace (39.0 KB)

Thanks @schamass so, things are very clear now. There are at least two solutions; one without GPScript and one with a Gig Script:

Solution without scripting:

  • MIDI learn a GP knob widget to the Numa controller which send 0 and 1 on CC23 (don’t use a switch!)
  • modify the GP knob widget curve with the expression, say x*200
  • map the GP knob widget to the rotary speed parameter of the B3X
    => That’s it.

Solution with a Gig Script:

  • MIDI learn a GP switch/button widget to the Numa controller which send 0 and 1 on CC23 (now it can be a switch or a button)
  • use a gig script to modify the CC23 0/1 range to 0/127
  • map the GP switch/button widget to the rotary speed parameter of the B3X
    => That’s it.

The Gig Script can be something like that:

Var numaRigManagerAlias : MidiInDeviceAlias

On ControlChangeEvent(m : ControlChangeMessage) matching 23 from numaRigManagerAlias
 InjectMidiEventViaRigManager(numaRigManagerAlias,m.WithCCValue(If GetCCValue(m)>0.5 Then 127 Else 0 End)) 
End
2 Likes

Works like a charm! :beers: :+1:

1 Like

I didn’t test the solution, but I guest you did? :wink:

Yeah i did, both solutions do the job perfectly!
There are two things that could make a user stumble:

  1. The Numa C2X provides two MIDI ports, but only one of them sends out the CC#23 (on CH16), so you’ll have to choose the right one!
  2. Pressing this button might send a bunch of other values for the very first press (later on it will only send CC#23, but this keyboard is a little bit weird anyway when it comes to MIDI) - this might lead to confusion when you want to MIDI learn a widget.
1 Like

Could you please elaborate a bit about this? I also have some weierd MIDI related things in my Numa Organ 2…

Yeah… two MIDI ports with diffrent data that is sent on diffrent channels, drawbars that behave diffrently (MIDI wise) depending on what kind of patch you are using, always two patches active which will send you either double notes on one channel or the same note on two diffrent channels…

And the configuration via the settings menues is a nightmare… completely unintuitive.

There is a lot i like on the C2X (the keybed, the weight…) but also some things that are unacceptable from my point of view (the f*cking joysticks, the MIDI implementation, many of the internal sounds, the software…).

I see, this is not a sign of serious work. I am in touch with Gianni Giudici at Studiologic regarding the bugs of the Numa Organ 2, but even if he told me he is not pushing back, it is exactly what he is doing. There are stupids bugs in the NO2 that could be probably be fixed in a few hours and make this controller a perfect organ controller, but they don’t do it. As I adviced it at a time, I will probably have to make things clear about it on the community forum and give the link to Gianni Giudici if he wants to react…

1 Like

Don’t get me started — I have two Studio Logic SL88 keyboards. Both of them exhibit the problem where, when you boot up everything, pressing a key generates NoteOff and releasing a key generates NoteOn.
You have to power cycle the SL88 after everything is booted to fix this.

When I reported this issue originally (long before I was using GP by the way), I was told it was a problem with my USB hub — how exactly a USB hub problem could cause “inverted” MIDI message events was never explained. Years later, they told me they were looking at a fix but when I reached out to them a few months ago (more years later) - they had no plans to fix it.

Very frustrating.

It looks a bit like the conclusion of my discussion with Giani Giudici.

I have an SL73 Studio and a numa organ 2… neither have this issue