1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

KSP Controller Events Question

Discussion in 'Scripting Workshop' started by sachsm, Dec 13, 2005.

Thread Status:
Not open for further replies.
  1. sachsm

    sachsm Forum Member

    Messages:
    28
    I noticed that some KE arp instruments go mute permanently after receiving a NOTES OFF message. Most of these scripts use a standard template structure as follows:

    on controller
    if ($CC_NUM # $A_In and $CC_NUM # $B_In and $CC_NUM # $C_In and ...
    $CC_NUM # $D_In and $CC_NUM # $E_In and $CC_NUM # $F_In) {if the number is not listed in the first row}

    if ($CC_NUM = $A_Out or $CC_NUM = $B_Out or $CC_NUM = $C_Out or ...
    $CC_NUM = $D_Out or $CC_NUM = $E_Out or $CC_NUM = $F_Out)

    ignore_controller

    end if
    end if

    if (%CC_TOUCHED[$A_In] = 1)
    $A := %CC[$A_In]
    set_controller ($A_Out, $A)
    end if
    if (%CC_TOUCHED[$B_In] = 1)
    $B := %CC[$B_In]
    set_controller ($B_Out, $B)
    end if
    if (%CC_TOUCHED[$C_In] = 1)
    $C := %CC[$C_In]
    set_controller ($C_Out, $C)
    end if
    if (%CC_TOUCHED[$D_In] = 1)
    $D := %CC[$D_In]
    set_controller ($D_Out, $D)
    end if
    if (%CC_TOUCHED[$E_In] = 1)
    $E := %CC[$E_In]
    set_controller ($E_Out, $E)
    end if
    if (%CC_TOUCHED[$F_In] = 1)
    $F := %CC[$F_In]
    set_controller ($F_Out, $F)
    end if
    end on


    Could some scripting expert point out were I need to trap the ALL NOTES OFF (123) controller number and then what should be done in that event handler to prevent the instrument from going mute.
     
  2. Nicki @ NI

    Nicki @ NI NI Team NI Team

    Messages:
    220
    Hi Mike,

    the code you've pasted belongs to the quick edit script and has no effect on CC123. The problems with the arp instruments have the same origin as the problem with the Akkord Guitar.
    Some sequencers always send CC123 when you hit the stop key, some don't. When the script receives an CC123 messages, i suspect that some variables don't get reset in the script, hence no sound afterwards.
    There could be an easy fix for the arp script, but we will look into this problem with the next Kontakt Update and fix the notes off/sound off issue on a global level, so that one does not need to take this into account when writing a script.
    cheers,
    nicki
     
Thread Status:
Not open for further replies.