HISE Logo Forum
    • Categories
    • Register
    • Login

    Does component visibility get set to 0 on plugin GUI close?

    Scheduled Pinned Locked Moved Scripting
    29 Posts 4 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 @Christoph Hart
      last edited by

      @Christoph-Hart said in Does component visibility get set to 0 on plugin GUI close?:

      but all JUCE timers are inserted into a linked list across all plugin instances

      Is this list shared by different JUCE based plugins or only multiple instances of the same plugin?

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

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @d.healey
        last edited by

        @d-healey not entirely sure, but I think the "resource" that is being shared is UI render time, so this is basically shared across everything that needs to draw stuff on the screen (that's why cubase will start to freeze too and not only your plugin).

        1 Reply Last reply Reply Quote 0
        • A
          aaronventure @Christoph Hart
          last edited by

          @Christoph-Hart said in Does component visibility get set to 0 on plugin GUI close?:

          There is no memory footprint, but all JUCE timers are inserted into a linked list across all plugin instances when they are running, so if you have 10+ instances of your plugin it might start to clog the UI thread (usually Cubase is the first host that starts to choke here).

          Right, so the callback returns true if no instances of the plugin are open and false if one is open.

          If I have 15 instances of my plugin running in a project (not unrealistic, even less so if it's an effect), and any one of them is open, then all the callbacks in all the instances will return false.

          If i'm tying timer start and stop to this, this effectively means that all the timers start running?

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

            @aaronventure no, the suspension callback happens for each instance of your plugin.

            There is just the possibility that one plugin instance creates more than 1 interface (all plugin standards allow this and there are some hosts which allow having more than 1 interface open, even if it's just for a short amount of time).

            So every instance tracks the amount of open interfaces and suspend their timers by calling this callback with true whenever the count reaches zero.

            1 Reply Last reply Reply Quote 1
            • LindonL
              Lindon @Christoph Hart
              last edited by Lindon

              @Christoph-Hart said in Does component visibility get set to 0 on plugin GUI close?:

              • never ever use the timer object for anything related to MIDI processing. The frequency is as jittery as it can be so unless you want to create a random glitch machine, you absolutely need to resort to the onTimer callback.

              Well this confuses me, I think it says: dont use a timer object , instead use a timer object...unless you mean something different by "resort to the 'onTimer' callback"

              Perhaps this is saying: dont use a Panel.timer, or an Engine.timer, instead use a Synth.timer.

              HISE Development for hire.
              www.channelrobot.com

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @Lindon
                last edited by aaronventure

                @Lindon said in Does component visibility get set to 0 on plugin GUI close?:

                Perhaps this is saying: dont use a Panel.timer, or an Engine.timer, instead use a Synth.timer.

                Yes. Only the synth timer is sample accurate.

                Christoph HartC LindonL 2 Replies Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @aaronventure
                  last edited by

                  yup, with onTimer I mean the callback called onTimer :)

                  1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @aaronventure
                    last edited by

                    @aaronventure said in Does component visibility get set to 0 on plugin GUI close?:

                    @Lindon said in Does component visibility get set to 0 on plugin GUI close?:

                    Perhaps this is saying: dont use a Panel.timer, or an Engine.timer, instead use a Synth.timer.

                    Yes. Only the synth timer is sample accurate.

                    ..and I get 4 of these per Sound Generator - so this thread is confusing me more and more...

                    I have an arp, its in a ScriptProcessor - in the MAIN container... not in a sound generator...what timer should I be using?

                    HISE Development for hire.
                    www.channelrobot.com

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      aaronventure @Lindon
                      last edited by

                      @Lindon said in Does component visibility get set to 0 on plugin GUI close?:

                      what timer should I be using?

                      For anything that's related to the audio or MIDI output of your plugin, use the synth timer.

                      For the GUI, use the panel timer or a timer object.

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @aaronventure
                        last edited by

                        @aaronventure said in Does component visibility get set to 0 on plugin GUI close?:

                        @Lindon said in Does component visibility get set to 0 on plugin GUI close?:

                        what timer should I be using?

                        For anything that's related to the audio or MIDI output of your plugin, use the synth timer.

                        For the GUI, use the panel timer or a timer object.

                        yeah thats not answering the question tho is it. I've held on to the above rule-of-thumb for the 5 years I've been building HISE instruments. But now I learn that Synth.timers are attached to sound generators and as far as my mental model works a Script Processor is not a sound generator.

                        Very happy to be proved wrong.

                        HISE Development for hire.
                        www.channelrobot.com

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          aaronventure @Lindon
                          last edited by aaronventure

                          @Lindon The master container is still a container and a container is a type of Sound Generator, according to the docs

                          d3cfc03d-829c-4f22-bb74-404f8876edd9-image.png

                          I think that's what this remark was about

                          @Christoph-Hart said in Does component visibility get set to 0 on plugin GUI close?:

                          It's 4 timers per Sound Generator, not per container

                          LindonL 1 Reply Last reply Reply Quote 1
                          • LindonL
                            Lindon @aaronventure
                            last edited by

                            @aaronventure thanks OK missed that in the docs, mea culpa, so I can go back to my mental model without any nausea inducing changes at my age....

                            HISE Development for hire.
                            www.channelrobot.com

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

                              Yup a container is a sound generator.

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

                              56

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts