HISE Logo Forum
    • Categories
    • Register
    • Login

    Calling multiple functions with delay on a Knob's Callback

    Scheduled Pinned Locked Moved General Questions
    33 Posts 9 Posters 2.1k 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.
    • DanHD
      DanH @orange
      last edited by

      @orange is there a form we can fill out or specific email to contact? Or just their info@ one?

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      orangeO 1 Reply Last reply Reply Quote 0
      • orangeO
        orange @DanH
        last edited by

        @DanH Just using the website support ticket system worked here.

        develop Branch / XCode 13.1
        macOS Monterey / M1 Max

        1 Reply Last reply Reply Quote 1
        • resonantR
          resonant
          last edited by

          Still no luck :/

          If there is no fix for this for now, what can we do as an alternative shortcut hack?

          ulrikU 1 Reply Last reply Reply Quote 0
          • ulrikU
            ulrik @resonant
            last edited by

            @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.R1FPZg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IKS0yfL0NCxr5YPl0NCxbsyfLW+LHyaOUYTUpuYrjOHIlGHzZS8SLZaa7B.V+ev4RidQ
            

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

            resonantR 1 Reply Last reply Reply Quote 2
            • resonantR
              resonant @ulrik
              last edited by resonant

              @ulrik Thank you for the suggestion.

              Maybe there are other methods instead of delaying functions to prevent multi instance crash.

              orangeO 1 Reply Last reply Reply Quote 0
              • orangeO
                orange @resonant
                last edited by orange

                @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 placing setBypassed 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.

                develop Branch / XCode 13.1
                macOS Monterey / M1 Max

                resonantR 2 Replies Last reply Reply Quote 0
                • d.healeyD
                  d.healey
                  last edited by

                  Can you reduce the number of setAttribute calls by connecting through processor/parameter id instead?

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

                  resonantR 1 Reply Last reply Reply Quote 0
                  • resonantR
                    resonant @orange
                    last edited by

                    @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!

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

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @Christoph Hart
                        last edited by A Former User

                        @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
                        
                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @A Former User
                          last edited by

                          @harris-rosendahl I guess that's how it should be used...

                          Can't help pressing F5 in the forum...

                          1 Reply Last reply Reply Quote 0
                          • resonantR
                            resonant @orange
                            last edited by

                            @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 :) :

                            Screen Shot 2023-04-19 at 15.45.51.png

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

                            36

                            Online

                            1.7k

                            Users

                            11.9k

                            Topics

                            103.6k

                            Posts