HISE Logo Forum
    • Categories
    • Register
    • Login

    Detect if the plugin UI interface is open or closed (bypass code when the ui is closed using broadcasters and listeners)

    Scheduled Pinned Locked Moved Solved Scripting
    14 Posts 5 Posters 728 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.
    • griffinboyG
      griffinboy @d.healey
      last edited by griffinboy

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @griffinboy
        last edited by

        Link Preview Image
        HISE | Docs

        favicon

        (docs.hise.dev)

        griffinboyG 1 Reply Last reply Reply Quote 0
        • griffinboyG
          griffinboy @Christoph Hart
          last edited by

          @Christoph-Hart
          Aha! Thank you I missed this

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

            @griffinboy You just drop it in your on init callback and the entire script (all midi callbacks) are deferred. I thought this applied to timers as well but as Christoph points out the timers are automatically deferred.

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

            griffinboyG 1 Reply Last reply Reply Quote 0
            • griffinboyG
              griffinboy @d.healey
              last edited by griffinboy

              @d-healey
              I'm not sure if I can do what I want using Synth.deferCallbacks(true);

              I am firstly trying to defer my Timer script which loops and draws the UI, and then secondly to disable the scriptnode which is creating the information for the Ui.
              This is for performance reasons.

              I think I shall have to look into what Christoph posted, it looks like I shall have to create a listener to this suspend event!

              griffinboyG 1 Reply Last reply Reply Quote 0
              • griffinboyG
                griffinboy @griffinboy
                last edited by

                @griffinboy
                It works perfectly using the documentation here:
                https://docs.hise.dev/scripting/scripting-api/content/index.html#setsuspendtimercallback

                Note* I discovered that all the repaint() routines get called when switching from a different window, back to the main interface window.
                This was confusing me for a moment, making me think that my UI was still updating in the background.

                But no, it was successfully paused and only repainted once, when opening up the UI page,

                griffinboyG 1 Reply Last reply Reply Quote 0
                • griffinboyG griffinboy marked this topic as a question on
                • griffinboyG griffinboy has marked this topic as solved on
                • griffinboyG
                  griffinboy @griffinboy
                  last edited by griffinboy

                  @griffinboy
                  For those who want to see the working code:

                  a65d740b-515e-4772-9145-7b93a8130635-image.png

                  HISEnbergH 1 Reply Last reply Reply Quote 3
                  • HISEnbergH
                    HISEnberg @griffinboy
                    last edited by

                    @griffinboy thanks for posting this, it wasn't something I had given much thought to previously, but my newer projects could benefit greatly from this

                    griffinboyG 1 Reply Last reply Reply Quote 1
                    • griffinboyG
                      griffinboy @HISEnberg
                      last edited by griffinboy

                      @HISEnberg
                      No problem,
                      I'm going to update this screenshot in a second to be less case specific, and with the code for altering scriptnode bypass

                      I'll probably delete this post and just make a neat answer post.

                      1 Reply Last reply Reply Quote 1
                      • J
                        jack52
                        last edited by

                        I find this topic incredibly interesting and would like to discuss it in depth.

                        1 Reply Last reply Reply Quote 0
                        • J
                          jack52
                          last edited by

                          Last week, while working on a project for custom logo design services, I faced a challenge with the plugin's UI interface. It was crucial to detect whether it was open or closed. I implemented a solution using broadcasters and listeners to bypass certain code when the UI was closed. This not only streamlined the process but also indirectly optimized my workflow, allowing me to focus more on delivering creative designs to my clients.

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

                          21

                          Online

                          1.7k

                          Users

                          11.9k

                          Topics

                          103.7k

                          Posts