Help with Drawbar control with XK1

I’m trying to control blue3 in GP
with my xk1 Hammond.
Every drawbar outputs cc80
Think I need a script to conver systex message to something blue 3 understands.
GP output on 1 drawbar full travel.
0=off

Info out of manual

Did you try creating drawbar widgets in the panel view…then learning each of the controller draw bars to the individual widgets? You would also have to assign each widget to the corresponding Blue3 drawbar.

Not yet . I’ll try that first

That probably won’t work. From looking at that description, there’s one CC number for all 9 drawbars and just different ranges of values, 0-8, 9-17, etc

It will require a GPScript to handle this

1 Like

No , doesn’t work, it only moves the drawbar on position and back.
I think for every click of one drawbar on cc80 it increments by one , eg 0-7,

Like @dhj mentioned you need a gp script.

Can I ask for help with a script in script section

Sure, tomorrow I can give you a script you can test with

1 Like

thanks , your a star Paul

1 Like

Yes…This keyboard may have been designed before the popularity of organ plugins.

However, for the heck of it, you might check page 84 of the manual.

“7. REGISTRATION
This is for switching ON/OFF the Drawbar Registration
send/receive at the Keyboard Channel.
This is to select whether or not to send/return the information of the movement of each footage of the Drawbars.
When ON, it transmits/receives. When OFF, it does not.”

Try this:
Hammond_Blue3.gig (24.7 KB)

This is the script:

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   U16 : Widget
   U513 : Widget
   U8 : Widget
   U4 : Widget
   U223 : Widget
   U2 : Widget
   U135 : Widget
   U113 : Widget
   U1 : Widget
   L16 : Widget
   L513 : Widget
   L8 : Widget
   L4 : Widget
   L223 : Widget
   L2 : Widget
   L135 : Widget
   L113 : Widget
   L1 : Widget

   mv : Integer
   HAMMOND : MidiInBlock
//$</AutoDeclare>

//Called when a CC message is received at some MidiIn block
On ControlChangeEvent(m : ControlChangeMessage) Matching 80 from HAMMOND
 mv = GetCCValue(m)
  if mv < 9 then
  U16.SetWidgetValue(1.0 - 1.0/8.0 * mv)
 elsif mv >= 9 and mv <= 17 then
  mv = mv - 9
  U513.SetWidgetValue(1.0 - 1.0/8.0 * mv)
 elsif mv >= 18 and mv <= 26 then
  mv = mv - 18
  U8.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 27 and mv <= 35 then
  mv = mv - 27
  U4.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 36 and mv <= 44 then
  mv = mv - 36
  U223.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 45 and mv <= 53 then
  mv = mv - 45
  U2.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 54 and mv <= 62 then
  mv = mv - 54
  U135.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 63 and mv <= 71 then
  mv = mv - 63
  U113.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 72 and mv <= 80 then
  mv = mv - 72
  U1.SetWidgetValue(1.0 - 1.0/8.0 * mv)   
 end 
End

On ControlChangeEvent(m : ControlChangeMessage) Matching 81 from HAMMOND
 mv = GetCCValue(m)
 if mv < 9 then
  L16.SetWidgetValue(1.0 - 1.0/8.0 * mv)
 elsif mv >= 9 and mv <= 17 then
  mv = mv - 9
  L513.SetWidgetValue(1.0 - 1.0/8.0 * mv)
 elsif mv >= 18 and mv <= 26 then
  mv = mv - 18
  L8.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 27 and mv <= 35 then
  mv = mv - 27
  L4.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 36 and mv <= 44 then
  mv = mv - 36
  L223.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 45 and mv <= 53 then
  mv = mv - 45
  L2.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 54 and mv <= 62 then
  mv = mv - 54
  L135.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 63 and mv <= 71 then
  mv = mv - 63
  L113.SetWidgetValue(1.0 - 1.0/8.0 * mv)  
 elsif mv >= 72 and mv <= 80 then
  mv = mv - 72
  L1.SetWidgetValue(1.0 - 1.0/8.0 * mv)   
 end 
end
1 Like

Thanks Paul, I’ll try tomz, and I’ll print to see if I can understand it. Cheers

Works a dream
But pops up with

Much appreciated that coding for me, I can now create sounds on all
My Hammond clones, it’s a lot better than mouse dragging, thanks Paul

1 Like

Here the changed gig, I forgot to remove 2 Widget declarations, and much smaller code:
Hammond_Blue3.gig (23.2 KB)

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   U16 : Widget
   U513 : Widget
   U8 : Widget
   U4 : Widget
   U223 : Widget
   U2 : Widget
   U135 : Widget
   U113 : Widget
   U1 : Widget
   L16 : Widget
   L513 : Widget
   L8 : Widget
   L4 : Widget
   L223 : Widget
   L2 : Widget
   L135 : Widget
   L113 : Widget
   L1 : Widget

   mv : Integer
   HAMMOND : MidiInBlock
   WUArray : Widget Array 
   WLArray : Widget Array
   I     : Integer
   
//$</AutoDeclare>


Initialization
 WUArray = [U16, U513, U8, U4, U223, U2, U135, U113, U1]
 WLArray = [L16, L513, L8, L4, L223, L2, L135, L113, L1]
end

//Called when a CC message is received at some MidiIn block
On ControlChangeEvent(m : ControlChangeMessage) Matching 80 from HAMMOND
 mv = GetCCValue(m)
 I  = mv/9
 mv = mv - 9*I 
 if I < 9 then
  SetWidgetValue(WUArray[I],1.0 - 1.0/8.0 * mv)  
 end  
End

On ControlChangeEvent(m : ControlChangeMessage) Matching 81 from HAMMOND
 mv = GetCCValue(m)
 I  = mv/9
 mv = mv - 9*I 
 if I < 9 then
  SetWidgetValue(WLArray[I],1.0 - 1.0/8.0 * mv)  
 end   
end
1 Like

Cheers, will test it out today

Small typo here:

Has to be replaced by
WLArray = [L16, L513, L8, L4, L223, L2, L135, L113, L1]

Thx, just corrected.

First script worked ok apart from declaration.

2nd script
Drawbars are back to front and comes up with same declare error and array errors when working lower drawerbars
Cheers

The gig file from @pianopaul is now working properly, I don’t understand what is exactly your concern. Did you reload the gig file again from the link above? It has been newly updated by @pianopaul.