GSi VB3 controlling rotary speed problem


#1

Hello,

I have a GSi VB3 and have a problem controlling rotary speed with buttons on my external keyboard (slow/fast; slow/stop). I created two widgets and associated them with plugin and everything works as it should with mouse clicks.

When I associate a button with external foot controller (CC 64 Hold Pedal (on/off)), everything works fine. But when I try to associate a button with a dedicated button on my external keyboard (it sends out three line CC data), it does’t work anymore in my plugin (rotary speed latch in my plugin doesn’t move); and here’s another strange part: if I click “INVERT” in MIDI IN assigment window of my widget, then I can control rotary speed with my external keyboard button, but it’s inverted and it’s not good.

Here’s a three line MIDI from my external button (turn ON):
CC 99 Non-registered Parameter (coarse): 2 Channel 1
CC 98 Non-registered Parameter (fine): 9 Channel 1
CC 6 Data entry (coarse): 1 Channel 1

and for turn OFF:
CC 99 Non-registered Parameter (coarse): 2 Channel 1
CC 98 Non-registered Parameter (fine): 9 Channel 1
CC 6 Data entry (coarse): 0 Channel 1

I have tried all sorts of things and just can’t get it to work. Help anybody?

Thank you.


#2

My ideia: use a Midi Filter block to block the CC98 and CC99, so try to only use CC 6 to map the widget :wink:

I can take some screen shot if needed


#3

What is the brand/model of the hardware external controller?


#4

FWIW: I use vb3 in a ton of rack spaces. I have rotary speed configured for cc#65 I believe (I am not at my keyboard). I”ve had a few keyboards in the past years and they all worked to start and stop the Leslie with that.


#5

@keyman: I’ve tried MIdi FIlter block, also tried to remap it to CC64, but it doesn’t work. Midi learn in widget doesn’t get routed through the Midi FIlter.

@EnjoyRC: it’s Hammond xk-1c. I know, I know… You’re going to say, what am I doing using VB3, if I have the ‘original’… well, I have my ‘reasons’ and they sound great.

@mikelupo: I also have Yamaha MODX8 as my primary external keyboard, and I can map rotary speed to some other buttons and all other combinations work. BUT I need this with my hammond xk-1c!


#6

It is strange, and I won’t explain you what happens exactly… But if it works like this keep the INVERT option in the widget properties and change the “Parameter range and control” with “100” as a Min value and “0” as a max value and it should work the right way. Or perhaps check only the “invert value” option. If it doesn’t work… GP script !

But I still don’t understand what happens in your situation. The learn should only keep the last MIDI message which is the CC 6 with values 0 and 1. Could you confirm the CC 6 is the controller learned by GP ?

Usually MIDI values less than 64 are considered to represent OFF and values higher then 64 are considered to be ON. Both 0 and 1 should thus considered to be OFF. I don’t understand why it works at all and in a reversed way.

How did you identify the MIDI messages send by your controller ? In the GP MIDI monitor ? I am very surprise by the values 0 and 1.


#7

@David-san: it is totaly strange and I’m without any clue, how to make this work. If I keep the INVERT on and add “Parameter range and control” with “100” as a Min value and “0” as a max value, it doesn’t work anymore. The same goes with “invert value”. It’s like “double invert” is not the logic for the GP… :frowning:

You suggested scipt… I have no idea (and no time right now…), how to make that work. It’s just stupid, how something so simple (midi learn) doesn’t work.

I identified MIDI messages through GP MIDI monitor, and confirmed it with other MIDI monitor:


MIDI%20messages%20GP

The thing is, if MIDI routing for “learn” function in GP would be different, then I could make this work one way or another. But since “learn” function grabs MIDI message direct from hardware input, there’s nothing I can do with built it MIDI filter.


#8

You didn’t confirm if the CC 6 event is the one “learned” by GP ?
I suppose it is the case because the event “learned” by GP should logically be the last one. But values 0 and 1 won’t allow to switch the widget state between OFF and ON. I guess you should be over 64 for the widget to go to the ON state.
Reversing the range won’t change this and it is not a GP issue. But GP can help to solve an issue caused by an exotic way of coding ON and OFF in your controller.
The idea of a GP script would be to catch the CC 6 midi event and to multiply its value by 100 before sending it to the “value” parameter of your ON/OFF widget which will activate your plugin the right way.


#9

Unfortunately, not that stupid — our MIDI learn learns a single MIDI message. Your system is sending three messages. The first two CC messages define the function to be carried out and then the third CC message indicates on or off. (@david-san - MIDI CC 6 is intended for data entry, typically UP or DOWN, and when used this way, produces the values 1 or 0 respectively). In particular, those three messages must come together, otherwise there is no way for CC6 to know what function is being specified

We’ll have to look at alternate ways to support learning (or manually entering) a group of messages but in fact the main reason for GP Script is to allow such functionality, not yet built into GP, to be implemented.


#10

Since i saw the name ‘MODX-3’ in the sreenshot above, i’d like to ask if you propably have plugged your pedal in the ‘Assignable Switch’ connector? If so, it won’t be CC64 because this would mean ‘Sustain’ which is the jack next to the one for the assignable functions (maybe you mistook them?).
I own a MOXF (which also has those assignable buttons) and i know that they are used in some of the Organ sounds to switch the rotary speed…
I guess, what you received is the message that is sent by using one of the assignable switches… if so, you can verify this by pressing those buttons on your keyboard and see what is coming in on the MIDI-monitor…


#11

@schamass: no, my pedal is plugged direct to my Hammond XK-1c. Why MODX-3? This is from Yamaha:

There are 3 Ports on MIDI IN/OUTs via the USB connection:
Port 1 - used by the MODX internal tone generator for music performing (note-ons, controllers, tempo);
Port 2 - not used currently… but typically would be for Remote Control commands between the front panel of the hardware and DAW software;
Port 3 - connect one external device via standard 5-pin MIDI I/O Ports. Items routed from the computer on “MODX Port 3” will be passed through the MODX and go OUT the 5-pin jack on the back panel. And conversely, any information arriving at the 5-pin MIDI IN of the MODX will be routed through to the DAW as “MODX Port 3”.
So I have Hammond connected with 5-pin MIDI IN/OUT through Yamaha MODX (connected throught USB with PC) to GP.

@dhj: I understand, what you’re saying. Hammond has also other switches with three messages.

Since it will take some time for developers to come up with right solution, is there any way, someone can help me with such a script, because I have zero time right now and have absolutely no idea, how to use scripting language.


#12

Ah… i see. Sorry, i totally missed that point.


#13

You have to take time and learn, it is like it works :wink:

Try to have a look at this, it shoud do the job. It is a quick and dirty hack that only use the CC6, I was too lazy to program a little state machine to take the CC98 and CC99 into account:

// Go to "Window"menu, then “Show Script Editor”, copy and compile
//
// “Leslie” is the name you have to give in the widget properties
//
// "MIDIin"is the Handle name you have to give to your MIDI In block
// => Right clic on it in the rackspace back view
// -> OSC/GPScript Handle
// -> Set Handle… “MIDIin”

Var
MIDIin : MidiInBlock
Leslie : Widget

//Called when a CC message is received at some MidiIn block
//The CC numbers must be within the specified range

On ControlChangeEvent(CC_msg:ControlChangeMessage) Matching 6 from MIDIin

if (GetCCValue(CC_msg)!=0)
Then
    Leslie.SetWidgetValue(100.0);
Else                
    Leslie.SetWidgetValue(0.0);
End

End


#14

@David-san: thank you for your help. It’s not that I don’t want to learn or expect from others to do my work, I will dig into the scripting language (it is something I’m looking forward to), but right now I really don’t have time for it (have like 6 other ongoing projects, which are far more important than making live gig setup in GP…).

Will try to use your hack and report back… :smile:

Thank you again.


#15

???
Nothing is more important than making live gig setup in GP !!! :stuck_out_tongue_winking_eye:


#16

Exactly… that’s why I’m in trouble, 'cause I want to play around with GP… :stuck_out_tongue_closed_eyes:


#17

@Orien Following the advices of @dhj (and with the help of @djogon who woke me up in another topic :wink:), here is a version taking into account the three succesives CC messages. I cannot check if it works, as I don’t have a xk-1c. This is supposed to filter out the other CC6 messages that are not intended to control the rotary speed of your organ plugin. I hope it works :grimacing:

Var
MIDIin : MidiInBlock
Leslie : Widget
CC_State : Integer

Initialization

CC_State = 0;

End

On ControlChangeEvent(CC_msg:ControlChangeMessage) Matching 99,98,6 from MIDIin

Select
    CC_State == 0 Do
        CC_State = if ((GetCCNumber(CC_msg)==99)And(GetCCValue(CC_msg)==2)) Then 1 Else 0 End

    CC_State == 1 Do
        CC_State = if ((GetCCNumber(CC_msg)==98)And(GetCCValue(CC_msg)==9)) Then 2 Else 0 End          
        
    CC_State == 2 Do
        if ((GetCCNumber(CC_msg)==6))
        Then
            if (GetCCValue(CC_msg)!=0)
            Then
                Leslie.SetWidgetValue(100.0);
            Else                
                Leslie.SetWidgetValue(0.0);
            End
            CC_State = 0;
        End
End     

End

Let me know if it works.


#18

It may be that we are going to have to build-in an easy-to-use FSM that would just automatically update state as events come in. This will require some thinking.


#19

This is a good idea, it could be interesting even for people with programming skills, because it would be much easier. It could be more tricky with continuously valued controller, like CC64 or any other slider… but this is something probably already under control in GP.


#20

@David-san, thank you. I will try your solution and report back, but unfortunately not before sunday evening. On the road again…