HISE Logo Forum
    • Categories
    • Register
    • Login

    Start timer of another script (MidiProcessor)

    Scheduled Pinned Locked Moved Solved Scripting
    7 Posts 2 Posters 101 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.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      Hello to all,

      does anyone know how to start the timer of another script? So Synth.startTimer only for another script...

      Thanks a lot
      Oli

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

        @Oli-Ullmann Under what circumstance do you want it to start?

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

        Oli UllmannO 1 Reply Last reply Reply Quote 0
        • Oli UllmannO
          Oli Ullmann @d.healey
          last edited by Oli Ullmann

          @d-healey
          When I hover over a component, the timer should stop. As soon as I leave the component again with my mouse, the timer should start again.

          Everything works in the same script. I have solved this with a broadcaster.

          But I want to outsource the realtime functionality to another script so that the UI stuff doesn't run in the realtime script.

          One possible solution would be to set a variable and use it in the timer callback of script 2 itself:

          if(script1.variable == 1)
          {
          Do something
          }
          else
          {
          Do nothing
          }
          

          But I also don't know how to access variables from another script. Do you know that?

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

            @Oli-Ullmann said in Start timer of another script (MidiProcessor):

            the realtime functionality

            If it's triggered by hovering with the mouse then it's not realtime. Realtime events are things like the MIDI callbacks. What is happening within the timer?

            @Oli-Ullmann said in Start timer of another script (MidiProcessor):

            But I also don't know how to access variables from another script. Do you know that?

            You can't. But you can access UI components in other script processors, same as accessing any attribute in the built in modules.

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

            Oli UllmannO 1 Reply Last reply Reply Quote 1
            • Oli UllmannO
              Oli Ullmann @d.healey
              last edited by

              @d-healey
              I am currently creating an EQ that is modulatable. I'll post the snippet later today. Then you'll see what I'm doing there... :-)

              All right, I had also considered realizing the data communication via a UI element, but would have found it nicer to simply use a variable. But then I'll solve it this way.

              Thanks to you, David! :-)

              d.healeyD 1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey @Oli Ullmann
                last edited by

                @Oli-Ullmann said in Start timer of another script (MidiProcessor):

                I'll post the snippet later today. Then you'll see what I'm doing there

                Sounds interesting, look forward to seeing it :D

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

                Oli UllmannO 1 Reply Last reply Reply Quote 1
                • Oli UllmannO
                  Oli Ullmann @d.healey
                  last edited by

                  @d-healey
                  I'm sure you'll have one or two ideas for improving the code! 😁

                  1 Reply Last reply Reply Quote 0
                  • Oli UllmannO Oli Ullmann marked this topic as a question on
                  • Oli UllmannO Oli Ullmann has marked this topic as solved on
                  • First post
                    Last post

                  8

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  102.3k

                  Posts