KSP Error

Options
Kyle261
Kyle261 Member Posts: 1 Newcomer
edited December 2022 in Scripting Workshop

Hello i am receiving an error that say “change tune…. is not allowed in this callback type!” but according to the user manual, change tune can only be used in the on note on release callbacks…. HELP


on note

$key := %keynum[$EVENT_NOTE]

$bend := %tune[$EVENT_NOTE]

change_note ($EVENT_ID, $key)

change_tune ($EVENT_ID, $bend, 0)

end on

Comments

  • Gablux
    Gablux Member Posts: 85 Helper
    Options

    if you run this

    on init
      declare %keynum[128]
      declare %tune[128]
      declare $key
      declare $bend
    end on
    
    on note
      $key := %keynum[$EVENT_NOTE]
      $bend := %tune[$EVENT_NOTE]
      change_note ($EVENT_ID, $key)
      change_tune ($EVENT_ID, $bend, 0)
    end on
    

    you will see there are no errors.

  • shen
    shen Member Posts: 1 Member
    Options

    I am also receiving this error when trying to upload kontakt script generated with Scala. Any help would be much appreciated.

    Here's the script:


    on init

    declare %keynum[128]

    declare %tune[128]

    declare $bend

    declare $key


    %keynum[0] := 12

    %tune[0] := -4292

    end on


    on note

    $key := %keynum[$EVENT_NOTE]

    $bend := %tune[$EVENT_NOTE]

    change_note ($EVENT_ID, $key)

    change_tune ($EVENT_ID, $bend, 0)

    end on

  • Gablux
    Gablux Member Posts: 85 Helper
    edited January 2023
    Options

    the script above also runs with no errors.

    Please use code block when writing code, it is painful to read as regular text.
    
  • CarlD
    CarlD Member Posts: 1 Newcomer
    Options

    Hi all, I too had this issue but it seems to go in OK in the standalone version.

Back To Top