Cool! I will check it out, for sure. My experience in adding as much as one boring letter to a KSP – or any script, for that matter – equals scary close to zero. So, if I may ask, is there an exact spot in this particular KSP your line should be pasted?
Sure, it's around line 1142 where the section starts that interprets CC messages (case 6 to 10).
See my comment starting with "AP":
{Sets the value of noteMode, based on the values defined by CSS's keyswitch CC}
function SetNoteMode
{There seems to be an inherrant latency with testing the CC's value in the same callback, so wait a moment}
wait (2)
select(%CC[$keyswitchCC])
case 0 to 5
{Standard Legato}
{Test whether we're using CSS, CSB or CSW here}
select ($instrumentMode)
case 0
$noteMode := 4
set_text($statusLabel,"Articulation updated to sustain/standard legato")
case 1
$noteMode := 4
set_text($statusLabel,"Articulation updated to sustain/standard legato")
case 2
$noteMode := 5
set_text($statusLabel,"Articulation updated to sustain/advanced legato")
end select
case 6 to 10
{Advanced Legato}
{Test whether we're using CSS, CSB or CSW here}
select ($instrumentMode)
case 0
$legatoMode := 1 {AP added to turn legato back on after shorts}
$noteMode := 5
set_text($statusLabel,"Articulation updated to sustain/advanced legato")
case 1
$noteMode := 4
set_text($statusLabel,"Articulation updated to sustain/standard legato")
case 2
$noteMode := 5
set_text($statusLabel,"Articulation updated to sustain/advanced legato")
end select