Forum
    • Categories
    • Register
    • Login

    Measuring plugin delay times....

    Scheduled Pinned Locked Moved General Questions
    12 Posts 5 Posters 100 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.
    • HISEnbergH
      HISEnberg @Lindon
      last edited by HISEnberg

      @Lindon @griffinboy 's method is essentially how I do it too (measure them beforehand while working on the core DSP). But to do it from within HISE is not so hard either:

      You can leverage Engine.get/setLatencySamples to do this.

      I discussed it here, and I believe someone developed an automated process for it on the forum elsewhere (I can't find the link, or perhaps I am going mad)....

      I'm not terribly confident the HISE CLI/MCP could handle this, but you could direct an agent to load each network, one at a time, into a HardcodedMasterFx. Each time get it to recompile with:

      Console.print(Engine.getLatencySamples);
      

      Collect all those values, then anytime that network is loaded in, use Engine.setlatencySamples to update the host. In my experience these two functions will work both when the plugin is loaded, and during real-time processing (presumably at blockrate).

      Likewise you could turn an Agent onto the source code and read the DSP pieces (as griffinboy suggested), but in a complex network, done for all 133 FX, I picture that leading to more errors long-term.

      *Note: I've never tested this method thoroughly enough. Possibly some hosts are not going to support dynamic changes to the latency reported *

      Sonic Architect && Software Mercenary

      ustkU dannytaurusD 3 Replies Last reply Reply Quote 1
      • ustkU
        ustk @HISEnberg
        last edited by ustk

        @Lindon My process is to automate this from Hise itself.

        You can write a test script that:

        • loads the FXs one by one
        • play a test signal
        • record that test signal before and after the FX in 2 scriptFX module process callbacks (or 1 unique recorder with 2 passes, bypassed/unbypassed)
        • perform a cross correlation between the two buffers to get the sample diff
        • and populate an array that will hold the latencies per FX

        Claude can easily create this for you if you need

        And as @griffinboy said group delay can be tricky and give weird results, especially with impulses. I'd do it with white noise since cross-correlation is very effective with it (I do this in my Align-IT app)

        Hise made me an F5 dude, any other app just suffers...

        LindonL 1 Reply Last reply Reply Quote 2
        • dannytaurusD
          dannytaurus @HISEnberg
          last edited by dannytaurus

          @HISEnberg said in Measuring plugin delay times....:

          Console.print(Engine.getLatencySamples);

          Unfortunately, all that does is show you the value you already set with setLatencySamples(), it doesn't get the actual latency of the current configuration.

          HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
          Meat Beats: https://meatbeats.com
          Klippr Video: https://klippr.video

          1 Reply Last reply Reply Quote 0
          • dannytaurusD
            dannytaurus @HISEnberg
            last edited by dannytaurus

            @Lindon @HISEnberg said in Measuring plugin delay times....:

            Possibly some hosts are not going to support dynamic changes to the latency reported

            This might end up being the biggest issue of all. Even if you accurately record all those permutations and combinations of latency, if the hosts don't play ball with dynamic changes to latency values you're SOL.

            EDIT: nonsense, as oust points out below 😅

            HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
            Meat Beats: https://meatbeats.com
            Klippr Video: https://klippr.video

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @dannytaurus
              last edited by ustk

              @dannytaurus said in Measuring plugin delay times....:

              This might end up being the biggest issue of all

              Not really because this would be poor design to report dynamic latency anyway.
              The way (one way?) to do it is to report for the maximum latency, and add a delay in the chain based on the difference between the maximum and the currently loaded FXs. This is the purpose of having a latency array per FX.
              So the host sees a permanent latency, and it's the plugin job to compensate for exceeding reported latency.

              Hise made me an F5 dude, any other app just suffers...

              dannytaurusD 1 Reply Last reply Reply Quote 1
              • dannytaurusD
                dannytaurus @ustk
                last edited by dannytaurus

                @ustk Oh yeah, of course. We already discussed all that previously in other topics. I must be delirious! 😂

                HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                Meat Beats: https://meatbeats.com
                Klippr Video: https://klippr.video

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

                  @ustk said in Measuring plugin delay times....:

                  @Lindon My process is to automate this from Hise itself.

                  You can write a test script that:

                  • loads the FXs one by one
                  • play a test signal
                  • record that test signal before and after the FX in 2 scriptFX module process callbacks (or 1 unique recorder with 2 passes, bypassed/unbypassed)
                  • perform a cross correlation between the two buffers to get the sample diff
                  • and populate an array that will hold the latencies per FX

                  Claude can easily create this for you if you need

                  And as @griffinboy said group delay can be tricky and give weird results, especially with impulses. I'd do it with white noise since cross-correlation is very effective with it (I do this in my Align-IT app)

                  do you have an example(snippet) of this cause I dont(yet) use Claude and its all new to me.

                  HISE Development for hire.
                  www.channelrobot.com

                  ustkU 2 Replies Last reply Reply Quote 0
                  • ustkU
                    ustk @Lindon
                    last edited by

                    @Lindon I'll try to find and recycle something...

                    Hise made me an F5 dude, any other app just suffers...

                    1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @Lindon
                      last edited by

                      @Lindon this one uses an impulse. See if you can make it work with your project, then you might need to use a noise and a correlation algorithm later instead of simple subtraction of the peak index

                      Note that it takes the number of channels of the routing matrix.
                      the current snippet gives you a report of ch0-1 delay L-R, and ch2-3 scriptFX, which is L=silent and R=untouched. A silence gives a negative latency that easily speaks for "there's nothing to report"

                      HiseSnippet 2567.3oc6Z80baabDGTxvNjwsSbl9Pm9zE9RghnoHnUbriicknDUrlZJwgj1Mc73ndD3n3YAdfE.zRrc7646Wm9snOzuAs6d2g+QBZIqX2LYlRayg31a++d68aIc2.eGVXnefQoJClOkYT51l8mKhFu2XJWXb39Fk9Lyms6f1Gs2e9jCN7n8a2yn07ozvPlqQoRq+c3tJU9FFxW+6+PKpGU3vRWxv3E9bG1y3S3Qoq1cm+H2y6.pKa.eRlcu8NG53K1y2yeFXQqa1vXJ04L5orin31Vyz3ozvwFk9RyG533LZ6sG0z1Ya6sev8G9PamQNCa17gM9Z2lL2g2eHi8vGLxnzMa6xi7C5GQiXgFktQKe248G6etPofWvC4C8X3C1F8AMqV9.eOWzEwUM1aL2ysabnJz.jR2z.25p.2uwrC2kmrd1.HRfjxQ1.Xo0xadqmy7ryZdMxXdEXRkxXR2PYR2wruS.eZTJEzd9TyCEQrfQTHOk0TT60Xs+UEy87gcHhpOgdF6f.3gDNrteiF0Hvaa7nJvtB88X0c7Xz.KXgJUDPdJDxYLR9hlJ+cfHeDw5K3g6yFwELWqSOY3rQiXAgarQ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TVbrsvTVLwOrmfOhEctevYxuxZ8mgyfprVnL8bxnK.GGZdhnmfipMpC+wXWOO+yQ.qbMtJHcJWqqu27oi8EbGbI0Nhc5cmfeAEw1aJnrVwY1351mRCGP4dHFs9yBAP7tGK5CxQ9iYfXjNx2E9zMOf5.Yq4coHj16XhiA..qvuzrD.V4bizhOLso9YLxsATtw+fGJSA7fIRH4qYBbgzUwJkAfZ3VlSl4EwMVownHWjtiY8pp10xoV42zed0dayIH9HEkh0nh1knw05RCf8Gwz+XFwOAatCW7B0.OlXsfQG5EIOaCOqrM0R4139rQTvayslQlKLLLx6cxT3kjgWgKJocECpFYc0b1i7GwAeBlOXMUszggu.oBvbh8MnTdkB3mtna46e1Dp774O4KaKt47mmLCPu16cbu8WwP.V+BcH.6e9FBnvewp28X.1W2w.bFWHnekQrL99XP+KLKfjMvwAz2E6.u2.+cFeYv7uDE813jzU.7+VacEf+amB+eqsz1+RRWMB.RWOD.4+OEvG3o.9eryY7tbtRK4bSnNA9m3nxzX+5OQtBjpDx6XJa1AelXu7W92DtK+DGm7hZIFadcY7dWWF295x3WccY79WWF+5qKiO3xYD+e+wtyh7mnfsBvP61VV9VpTaA96jIu1y3+BPu2HsI
                      

                      Hise made me an F5 dude, any other app just suffers...

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

                        @ustk thanks mate I will give it a go...I have no idea how to do a "correlation algorithm" but its all an adventure...

                        HISE Development for hire.
                        www.channelrobot.com

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

                        21

                        Online

                        2.5k

                        Users

                        13.9k

                        Topics

                        121.2k

                        Posts