HISE Logo Forum
    • Categories
    • Register
    • Login

    Pause, Wait, Sleep?

    Scheduled Pinned Locked Moved Scripting
    6 Posts 2 Posters 1.2k 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.
    • d.healeyD
      d.healey
      last edited by

      Is there a way to pause the execution of a script for a given number of milliseconds? I want to play note in a loop when two keys are held but there doesn't seem to be a function to slow down the script.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

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

        Pausing a script like in KONTAKT is not possible, but there are two options how to handle stuff in the future:

        1. Add a time stamp to generated messages
        2. Use the onTimer callback.

        I think for your use case the second option suits better. If you give me more information, I could sketch out an example script for you.

        Allowing the user to yield callbacks introduces all kinds of problems so I'd like to avoid adding this.

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          I'd forgotten about the timer callback, I think it will do the job perfectly.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            Is there a way to alter the timer frequency on the fly?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

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

              Synth.startTimer() changes the speed and can be called at any time (even in the onTimer callback itself)

              1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey
                last edited by

                Thanks, really easy :)

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

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

                52

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts