<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Measuring plugin delay times....]]></title><description><![CDATA[<p dir="auto">Okay, so I have a <em>massive</em> multi-fx plugin - there are 6 slots in it, and each slot can load any of the FX that ship with the plugin.</p>
<p dir="auto">There are 133 FX.....</p>
<p dir="auto">Yep, thats not a typo ... 133 FX.</p>
<p dir="auto">Any of these can be loaded into one of 6 Hardcoded FX "slots", there are C++ FX, Scriptnode FX and Faust FX all in there....</p>
<p dir="auto">So now I'd like my plugin to report to the DAW some consistent delay time...</p>
<p dir="auto">So the plan is, nothing special here, to have a variable delay at the end of the chain....whos value can max out at the worst case scenario (6 copies of the worst "performing" FX loaded across all slots in the plugin),  and to calculate every time a new FX is loaded what the current delay is - and add "make-up delay"  to get us back to this worst case scenario - and thus always report this worst case to the DAW.</p>
<p dir="auto">Now I realise that some of the actual delay any given FX induces may well be changable based on the params the FX are set at, the sample rate being used or even the type of content arriving at the plugin.... Im going to live with this inaccuracy.</p>
<p dir="auto">Heres the plugin layout - its pretty simple:</p>
<p dir="auto"><img src="/assets/uploads/files/1786615747049-36c4836a-bfea-44a7-b3b6-53ba5469fa9b-image.png" alt="36c4836a-bfea-44a7-b3b6-53ba5469fa9b-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So, to the question:<br />
What currently the best way to measure delay induced by any given FX?</p>
]]></description><link>https://forum.hise.audio/topic/14996/measuring-plugin-delay-times</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 12:30:29 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14996.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Aug 2026 10:10:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Measuring plugin delay times.... on Thu, 13 Aug 2026 11:38:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/3542">@griffinboy</a> '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:</p>
<p dir="auto">You can leverage <a href="https://docs.hise.dev/scripting/scripting-api/engine/index.html#setlatencysamples" rel="nofollow ugc">Engine.get/setLatencySamples</a> to do this.</p>
<p dir="auto">I discussed it <a href="https://forum.hise.audio/topic/13339/issues-with-plugin-latency-and-oversampling/2">here</a>, 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)....</p>
<p dir="auto">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:</p>
<pre><code>Console.print(Engine.getLatencySamples);
</code></pre>
<p dir="auto">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).</p>
<p dir="auto">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.</p>
<p dir="auto">*Note: I've never tested this method thoroughly enough. Possibly some hosts are not going to support dynamic changes to the latency reported *</p>
]]></description><link>https://forum.hise.audio/post/122488</link><guid isPermaLink="true">https://forum.hise.audio/post/122488</guid><dc:creator><![CDATA[HISEnberg]]></dc:creator><pubDate>Thu, 13 Aug 2026 11:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to Measuring plugin delay times.... on Thu, 13 Aug 2026 11:02:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a></p>
<p dir="auto">I was under the impression that Hise has a Hisescript way to probe latency?<br />
And so you could measure it whenever you make a change to the FX stack. But maybe I was mistaken.</p>
<p dir="auto">If I'm honest with you, in this situation, this is the kind of task I would be lazy and let an AI agent handle.<br />
Although I know already that you might not have something like that set up.<br />
But if it were me solving it, I would be tempted to be lazy and brute force it, use the REST API and Codex, and have it send timed impulses through the empty chain, and then through each FX once loaded individually. That then becomes the lookup table of all the latencies. Do it for different sample rates to find the ones that scale with sample rate. Since its a serial chain, you can basically just add together the latency that each processor give you. I would also <em>entirely</em> discard any latency that is non-linear / different for different frequencies, for individual effects.<br />
I would discard the entire value for that effect, because those are likely nonlinear-phase / group delay latencies and it will actually have a worse sounding phasing if you compensate for those.</p>
<p dir="auto">That's the lazy route. It's pretty wasteful.<br />
And I suppose you could actually do this by hand too, using the Hise latency finding tool, and write the LUT yourself.</p>
<p dir="auto">But personally I always keep track of the latency of my own DSP while I'm developing it, so it's never a mystery. But I can only do that because I only use my own C++ DSP in Hise.</p>
<p dir="auto">An alternative is that you could read through the source code of whatever DSP pieces you are using and find all the delays though (it will mostly be explicit delay lines for lookahead, feedback stabilization, and things like Linear phase oversampling (dont try to compensate nonlinear phase oversampling), and FIR filters, FFT) those all give measurable latency.</p>
<p dir="auto">But yeah, if there is a Hisescript API for measuring latency, I would assume that is the thing to use! You could even build a LUT using Hisescript and no C++, if that feature exists.</p>
]]></description><link>https://forum.hise.audio/post/122482</link><guid isPermaLink="true">https://forum.hise.audio/post/122482</guid><dc:creator><![CDATA[griffinboy]]></dc:creator><pubDate>Thu, 13 Aug 2026 11:02:21 GMT</pubDate></item></channel></rss>