Forum
    • Categories
    • Register
    • Login

    Sliderpack triggers onControl callback when it shouldn't

    Scheduled Pinned Locked Moved Bug Reports
    16 Posts 5 Posters 1.3k 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.
    • David HealeyD
      David Healey @Christoph Hart
      last edited by David Healey

      @Christoph-Hart said in Sliderpack triggers onControl callback when it shouldn't:

      it will not fire the callback anymore unless you explicitly call changed() on the slider pack, but then we're back to square one I guess.

      Yes that won't solve it.

      The other controls work like this.

      If you move the control with the mouse it triggers its callback.
      If you set the value of the control from another script processor it triggers the callback.
      If you set the value from within the same script processor it does not trigger the callback but the control's value visually changes.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @David Healey
        last edited by David Healey

        @Christoph-Hart Think I might have found the fix

        https://github.com/christophhart/HISE/blob/4c64ee1944780c039c7566bf085f51ecaa45a931/hi_scripting/scripting/api/ScriptingApiContent.cpp#L2528

        Change sendNotification to dontSendNotification

        https://github.com/christophhart/HISE/pull/258

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @David Healey
          last edited by

          @d-healey Bugger, it no longer moves the sliders on the sliderpack.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @David Healey
            last edited by

            @d-healey Hmmm I think this is beyond my skill level...

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @David Healey
              last edited by

              Well, this is more complicated than I thought it was, the implementation should follow a discussion about what we're trying to achieve here. So if I understand it correctly, the control callback shall not be executed when you call setValueAtIndex() to be consistent with the other UI elements (so if you want it to be executed, call changed() afterwards), but if you change a slider on the user interface it should fire.

              What happens if you exchange the entire data set for the slider pack? Should it fire a callback then or does it still rely on calling changed()?

              David HealeyD 1 Reply Last reply Reply Quote 1
              • David HealeyD
                David Healey @Christoph Hart
                last edited by

                @Christoph-Hart I think it's always best to have more control so I say you should have to call changed.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                David HealeyD 1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey @David Healey
                  last edited by

                  I've opened a github issue for this one.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  ulrikU C 2 Replies Last reply Reply Quote 0
                  • ulrikU
                    ulrik @David Healey
                    last edited by

                    @d-healey confirmed on MacOS as well

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

                    1 Reply Last reply Reply Quote 1
                    • C
                      clevername27 @David Healey
                      last edited by

                      @d-healey said in Sliderpack triggers onControl callback when it shouldn't:

                      github issue

                      I seem to be running into the same situation - when I call .setAllValues, the callback triggers. I noticed that the GitHub issue is closed — are my expectations simply incorrect?

                      A related question – my sliderpack callback is being triggered, and when I query the value for the slider index, the value is -1. What does that mean?

                      Thanks.

                      David HealeyD 1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @clevername27
                        last edited by

                        @clevername27 said in Sliderpack triggers onControl callback when it shouldn't:

                        when I call .setAllValues, the callback triggers.

                        Here's a workaround

                        for (i = 0; i < mySliderPack.getNumSliders(); i++)
                            mySliderPack.setSliderAtIndex(i, value);
                        

                        @clevername27 said in Sliderpack triggers onControl callback when it shouldn't:

                        when I query the value for the slider index, the value is -1. What does that mean?

                        I guess that must be something unique to the setAllValues function triggering the callback

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        C 1 Reply Last reply Reply Quote 1
                        • C
                          clevername27 @David Healey
                          last edited by

                          @d-healey Ah, right - that makes sense, because it's everything. Thanks, man!!!!

                          David HealeyD 1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @clevername27
                            last edited by

                            @clevername27 Look what I just found

                            4db5f456-f24d-4d92-ba65-bad3671c7041-image.png

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            C 1 Reply Last reply Reply Quote 1
                            • C
                              clevername27 @David Healey
                              last edited by

                              @d-healey Brill!

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

                              31

                              Online

                              2.1k

                              Users

                              13.0k

                              Topics

                              113.2k

                              Posts