HISE Logo Forum
    • Categories
    • Register
    • Login

    GUI in non-deferred script

    Scheduled Pinned Locked Moved Scripting
    6 Posts 2 Posters 1.1k 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

      I have a script I'm writing which has a simple GUI, the idea is that the various controls are set once and then never touched again while the instrument is in use - it's a kind of behind-the-scenes UI. The script also does a load of stuff in the note callbacks. I rather not have to use two separate scripts just so that I can defer the GUI so my question is will having these GUI controls - that won't be moved once set - affect the instrument's performance?

      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

        Duh I just realised that the On Control callback runs in the message thread anyway

        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

          Kind of...

          If you are automating the parameter it will be executed in the message thread, the audio thread or even another dedicated automation track (depending on the host software).

          But the "Defer callbacks of the Interface" advice is just useful if you are doing graphical related stuff in the midi callbacks (like updating a label or changing the key colours). If they are empty or only doing "audio stuff", keep them in the audio thread.

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

            That's good to know. One thing I've noticed is that if the note off callback is deferred then Message.ignoreEvent(true); has no effect.

            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

              Yes this is intended. When the deferred callback gets executed in the message thread, the audio thread is way ahead so you can't use any methods that change the message event (I think I got a safe check which prints out an error if you try this, but maybe I forgot it on Message.ignoreEvent()

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

                That makes sense, thanks for confirming

                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

                54

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts