HISE Logo Forum
    • Categories
    • Register
    • Login

    while note is held

    Scheduled Pinned Locked Moved Scripting
    2 Posts 2 Posters 127 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      matifena
      last edited by

      Hi, i just started using hise, and its my first time posting in here , english is not my mother tongue so sorry if i write something wrong.
      In kontakt you can use " while ($NOTE_HELD = 1) " to make something happend while a key is pressed and held, is there a function like that one in hise scripting?

      Thank you

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        No that is not possible. Script callbacks are supposed to return immediately so any kind of "thread management" (sleep, while, etc) is not available.

        What you need to do is to set a variable to true in the onNoteOn callback, then query it somehow (either using a timer callback or other callbacks) and reset it to false in the onNoteOff callback.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        59

        Online

        1.7k

        Users

        11.7k

        Topics

        102.1k

        Posts