Forum

    • Register
    • Login
    • Search
    • Categories

    Post init callback

    Feature Requests
    2
    6
    278
    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.healey
      d.healey last edited by d.healey

      I have need to trigger some components in my secondary scripts from my main interface script at init. The problem is the init function of the main script triggers before all of the other scripts are initialiased. My current solution is to use a timer in the main script to delay this action but this is imprecise.

      A better way I think would be to have a post init callback that triggers after everything (not just the main script) is ready.

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

      ustk 2 Replies Last reply Reply Quote 1
      • ustk
        ustk @d.healey last edited by ustk

        @d-healey That would be nice to have indeed...

        In the waiting, what if you do the opposite? check from the secondary scripts the state of the interface script components?

        Or even a script at the end of the "script chain", so it is the last one to be triggered and checks for everything that you need? I never tried such a thing...

        Tired to press F5 in the forum...
        Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

          @d-healey It should work. I just tested and the component's CBs are called before the init of the next script begins...

          Tired to press F5 in the forum...
          Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

            @ustk said in Post init callback:

            what if you do the opposite? check from the secondary scripts the state of the interface script components?

            The timer is fine for me for now until we have a proper solution.

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

            ustk d.healey 2 Replies Last reply Reply Quote 1
            • ustk
              ustk @d.healey last edited by ustk

              @d-healey I have kind of the same issue with the samplerate. It is not ready at init so I use a timer that sets all the depending variables.
              Not a neat solution because I cannot use const variables since they cannot be updated later.

              Tired to press F5 in the forum...
              Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

                @d-healey said in Post init callback:

                The timer is fine for me for now until we have a proper solution.

                Problem with the timer. If you reopen a saved session in the DAW it will run the timer and reload the default preset. I think the same problem will exist with a post init callback too...

                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

                7
                Online

                740
                Users

                5.4k
                Topics

                50.4k
                Posts