Calling multiple functions with delay on a Knob's Callback
-
@Christoph-Hart said in Calling multiple functions with delay on a Knob's Callback:
@resonant yeah I wrote them for an NFR but never heard back, then I stopped caring.
They have changed their NFR License section lately. The new system is very cool and easy to use/update, their response is now quick. Maybe giving a one more shot would be useful.
-
@orange is there a form we can fill out or specific email to contact? Or just their info@ one?
-
@DanH Just using the website support ticket system worked here.
-
Still no luck :/
If there is no fix for this for now, what can we do as an alternative shortcut hack?
-
@resonant based on the snippet from @Christoph-Hart , this will make sure all functions will be executed, and in the right order, even if you touch the knob.
You say you have a lot of knobs and functions to be executed, so maybe this is not an alternative for your project but anyway, here's my go for it...
HiseSnippet 1989.3oc2YEzaabbEdWIsIZYpSsCRZSuMPnnfxQldWRI6DXTPZKIlJDKKJQV6Vf.XOZ4PwAd4LLyNqbTb8sBzCEEEE8Tt0+AsGaQOT+CHG5k1yAEEEH8TO1So8MytK2YEonnURbjCuHMu48dy27du48dyrsD7.RTDWXY614ngDK6ukS6iXx9q2GSYVasgk8kbDwLTMTuXVfjxYQV25ng3nHRWKa64eWEa1tKXo+8epeKbHlEPxIYYcWNMfba5.pLmZqFuGMLrItKoCcfA2q1Xq.NacdHOFfz7NdVCwAODe.4NXEay4XY+Ra1kJ4h1RrjDYYuvs3cOpce9iXI7eWZDc+PhZfuUaPQIjaxC6pPrhp058ogcaks0irrrcZkaHlOwP75NaS6RGQO2fbQ8DnbILsG1yUDdyW.d9lvyy.dS.R1FPZgDHcIm1AB5PY9LJ77JNawjDQOLX1MgRBuVy8.Wm04.GLYkA3GRZJfAijnbMOuUPU87V9FkJAl9HI5Pr.0BKvatK5GhzACUNfH2rWORfr7RIyrDvdN2soCFFRTgBDwjjwb9hRtG4PhXeh.LVSRPioWpH.eOFeeeUrinEKDDMaGBBuNevPNCFTdoBbo0ffb.pcma1YSPFuaTp.CUhHR8+uNNLbeHtqbVLe4kK83RtzdnxoxBBubIWflqlkNOhWFztqalp8UCj8oQUhjXQhVKulxH69jRtkbIgQDS46KHjhZ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243J0OCpe5u+p+s+hlRFVevuh9yR3YLv5OFZ8GCt9Y38AW7MW5oZJ4.1hjvSFh+ce7GuXBkwfreAL2rYmMYXvil38mel899SO3aOdrDpuuMFJ1.IFb.+ZadrHf.wdLHCh18NmJeYxXO0XEjZSztaG6+G7KcRe0X6zI8ylzL.ewQONxn545XrW0wr.+I8xHOX8e4mWeCRHtvIw6UHq0e.2XBucxVLnkFYKdHVb7yweYYJsWXlS1nuTv45Dhuli1LedGjZW+4aPdQH64WWN6myGtSe4yryxIWiPaDtfiwcJJXAxtIYVOU+huymUO8NGY1j89i+i52iHuMngvrDA8582qug3HSZO8S9j+YcybAPt0OqNbyJxGQ.yOIm5ep9Kr4OeiDS7q3bO7gD8y7osuugdbOtX.5cILkUlK7mx6K+Wm02Wd3L+9x6DHAHzQfYQC4QDeSMer4pZN2FDYLqH6IjJvkZ60D1dF7sXiLhUMIBm1JnLXbAMsM0n+2OsdRQ01DX2zcmn.XyprclGGaEGFQzwU9lBlStpI4eDVzE7KASqDyByVz1o7T6uz4tmZ+EfKDT3qA3lgwj7UaB8HDB2caTAvd33PYF0hGm1ly3C6yYzBN58HPVfCNfTH9YhaH3x83fGlS40arGIjfiLNh88abanWHrvH20ypsv+Y9KiLQ+0a5j.WjJG.5E2KxM+2nuH2re5CRAd91K9ccfTwUQZWI5qGe4yi55OOViA3.A+9AIuvk5P+hZJv9lo+RvtNaqFiF8zVNNdU7rF.kKtePfJd8JP0mIKS0yfL0NCxr5YPl0NCxbsyfLW+LHyaOUYTUpuYrjOHIlGHzZS8SLZaa7B.V+ev4RidQ
-
@ulrik Thank you for the suggestion.
Maybe there are other methods instead of delaying functions to prevent multi instance crash.
-
@resonant said in Calling multiple functions with delay on a Knob's Callback:
Maybe there are other methods instead of delaying functions to prevent multi instance crash.
I've been seeing this issue for a while. I've made a few suggestions here for this problem: https://forum.hise.audio/topic/3677/multi-instance-daw-crash-issue-guide?_=1680361788380
Apart from these, my suggestion is: if you are using more than one
setAttribute
calls at the same time and if you are sure exactly where the crash comes from the code (it's generally where you used multiple setAttribute methods mostly or on the Oversampling function), it may sound a bit silly, but I recommend placingsetBypassed
between the setAttribute lines :) For example for a Simple Gain or Curve EQ module.I discovered that adding setBypassed interestingly reduces bottlenecks caused by multiple setAttribute lines. Especially watch out the Oversampling functions. It's worth a try.
BTW, assigning setBypassed to a Knob will cause errors while turning the knob. But you can assign it to a Button, or ComboBox.
-
Can you reduce the number of
setAttribute
calls by connecting through processor/parameter id instead? -
@orange said in Calling multiple functions with delay on a Knob's Callback:
@resonant said in Calling multiple functions with delay on a Knob's Callback:
I discovered that adding setBypassed interestingly reduces bottlenecks caused by multiple setAttribute lines. Especially watch out the Oversampling functions. It's worth a try.
I'll try this, Thanks!
-
@d-healey said in Calling multiple functions with delay on a Knob's Callback:
Can you reduce the number of
setAttribute
calls by connecting through processor/parameter id instead?Unfortunately not. Because in this project, I use multiple modulations with one knob.
-
@Christoph-Hart said in Calling multiple functions with delay on a Knob's Callback:
I've pushed an experimental build flag that might help with the issue. Please pull HISE and export your plugin with the
HI_DONT_SEND_ATTRIBUTE_UPDATES
flag set in your Extradefinitions. This should deactivate the internal messaging and hopefully fix the crash. Let me know if that helped.This flag should be used like this, right?
HI_DONT_SEND_ATTRIBUTE_UPDATES=1
-
@harris-rosendahl I guess that's how it should be used...
-
@orange said in Calling multiple functions with delay on a Knob's Callback:
Especially watch out the Oversampling functions.
After doing tons of testing, I found that using the
Engine.getMilliSecondsForSamples()
function is one of the causes of the multi instance crashes.I've used this after declaring the delay compensation with
Engine.setLatencySamples()
for compensating the delay with a simple gain's delay parameter when the Oversampling is off. So when the Oversampling is off, I am giving the exact sample delay (that we declared via delay compensation) with a Simple Gain unit like this:SimpleGain.setAttribute(SimpleGain.Delay, Engine.getMilliSecondsForSamples(4));
But it seems that method causes the crashes. Maybe getting the sample rate multiple times on a multi instance DAW project? I don't know.
Then I created a SN network like the below which converts the sample delay directly with converter, the crash is gone :) :