What's new

K2 scripts not following CC reassignments well

Thonex

Senior Member
I was going to write a simple CC Converter whereby if you are playing CC1 (Mod) and you would like it to be read as CC 11 (Expression)... it would convert it for you.

But I discovered that it's not working very well... as if the script can't keep up.

Try copying this to the K2 script editor:
Code:
on init
   message ("")
   declare $CCValue
   declare ui_value_edit $InputCC (0,127,1)
   declare ui_value_edit $OutputCC (0,127,1)
   
end on

on controller 
   
   set_controller ($OutputCC,%CC[$InputCC])
   message ("CC#: " & $OutputCC & "   Value: " &%CC[$OutputCC])
   
end on

Assign $InputCC the same value as your (for example) mod wheel = 1. Now assign $OutputCC a new value like expression = 11

move your Mod wheel (or fader) and look at how the numbers react.... not nearly as smoothly as a regular CC change and the values never reach their limits.... something's not right. You can see the CC# and Value in the message area.

Can you verify this?

Thanks

T
 
Hi Andrew,
There seems to be nothing wrong here. The CC change is reasonable smooth and I can get to both 0 and 127 without any problem. I modified your test script slightly, please try this one:
Code:
on init
   message ("")
   declare $CCValue
   declare ui_value_edit $InputCC (0,127,1)
   declare ui_value_edit $OutputCC (0,127,1)
   declare ui_table %table[128](6,4,1)
   declare $i
   declare ui_button $clear
   $InputCC := 1
end on

on controller   
   set_controller ($OutputCC,%CC[$InputCC])
   message ("CC#: " & $OutputCC & "   Value: " &%CC[$OutputCC])
   %table[%CC[$OutputCC]] := 1
end on 

on ui_control($clear)
  $clear := 0
   $i := 0
   while ($i <= 127)
     %table[$i] := 0
     inc($i)
   end while
end on

Cheers,
Nils
 
Andrew,

I have done something like that without any problems, so it should work. But, it might be a good idea to include ignore_controller in the controller callback, in case the InputCC is going to be used for something different later on in the script chain.
 
Thanks Nils... and Nickie... welcome to the board and a very informative (and correct) first post :grin:

Nils, I loaded your script into my K2.1.0 and found pretty much the same thing as before except with one more thing of concern.

First, let me explain that I'm using the Kenton Control Freak as my CC controller You can see it here: https://www.kentonuk.com/keybds_conts_midi-players/controllers_knob-slider/cf16s.html (https://www.kentonuk.com/keybds_conts_mi ... cf16s.html)

It's very accurate and it displays the CC value on an LCD screen as you transmit... also I have buttons assigned to emit the CC value of the slider's position. K2 is just not "staying" with the CC changes. It lags 1 or 2 behind and skips some (skipping is normal)... however, it should always read the last value received though.

Another thing... set your CC to 127 and then hit apply and then move the CC down a little.... see what happens.... on my K2 the first bar (value 0) lights up and so does (say) 125 or so. Why is K2 logging a CC value of 0?

So.... I just want to make sure that you guys have an accurate means of comparison. Try it in you sequencer and see if they match up.

I still think this is cause for concern.... unless I'm completely missing something.

[Edit] Let me just add that this applys to the script assigning CC values... K2 in-and-of-itself seems to respond to CC fine.

Cheers,

T
 
Thanks for taking the time Nickie :grin:

Just for the record, what version of K2 are you runing?

This gives me no confidence in re-assigning CCs to another CC.

Nils... do you find the same thing?


Cheers,


T
 
This sounds really strange. I'm a bit short of time right now, but I'll check this out as soon as I can.

Cheers,
Nils
 
Top Bottom