Forum

    • Register
    • Login
    • Search
    • Categories

    Sliderpack triggers onControl callback when it shouldn't

    Bug Reports
    4
    11
    275
    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.
    • d.healey
      d.healey last edited by d.healey

      So the problem with the sliderpack not triggering its control callback when it should is fixed. Now I have a new problem 😄

      The sliderpack is triggering its control callback without me calling .changed(). This is a problem because I'm using it to store the values of buttons for preset save/recall and now each time I click one of the buttons it triggers the sliderpack's callback which changes the value of the button.

      In this snippet you can see the issue. Moving knob1 changes the value of a slider in the sliderpack and the value of knob2. Knob2's callback does not trigger, which is correct because I haven't included a call to .changed(), however the slider pack's callback does trigger, which it shouldn't.

      HiseSnippet 970.3ocsV0saSbDEdV6roX2lpBhGfUbkohFYmBzJgPXhSBxhlvptgndGZxtyFOxyNypclMDCBItnOO8Un7nPeC3MfdNyt1dbw1kZU7EQ47+24Ly7c1vBULSqUEDuVmNImQ79F+nIRynAinbIY3ADuuyWK3IrhbZ7XCSaH6OImp0rDhmWymfd40ZKh82Gdz9TAUFylqhPNSwiY+BOialqMr+S4BwQzD1o7LGuua+gwJ4.kPUBHpoeWBVU5ErSnnaM7IdaeXB2nJhLT.LDus1WkLIZj5kxJ+Oiq4mKXnPORDjnJ0GoDIHhQsjAi3hjvoctl.YIb9bnY0b3l9GyS3yz6NOPCAyivcd30XQ30bA30yEdccf2RfjmCj1pBRW2OJtfmalaAwyW6OTZXEoTXr6BkJeIM99l9CTfGRytYzwriJ.gYQz49c6dm.3O29AsaCidsI3RZQPj8DODl88BdXvzvufYFnxxURPnysb74VXzbofKYAokxXCWICTRGOvTTnDchmF+cf5HJY2t8qa2BLpUB1t4E7ESLl22.o9y..6pQa1hLfJDmCZ6rLDrXe9To578VYGZsthdyZ6+RWMKYqtgpcY4shaAQHsBLs9Isy7.qRk3igqCIrq5zcpmOncKa0PWNC0zYp90i8dqC6NG.NP9Dkg8LYGK3Z+l1A+SSooK0VctDrhkZFIUJVWfcjkYmyJbGMnivKsEe95u5mutrKwUiDGGUxgRt4Y4L4p3bH0yQ3+d9vCnFJ9luVG3WNqvvQH3c.6Rf.shAnk+AL8XiJGx5rgO.Si05Mp4GleJS3.UvN9NG6jqlw19dZ+IyDd6Y80zKYCkgEL3LDIPHNUX6pJ7sKTAa1+Je6oqSdIW3j22U1WaX4Q7WMklu+e8pe+QqqV67uTq8bp06doSsdOVqI3wy1VGIY7jDAKTo43wuydp+zESu9l+wSPLk4tJiPxnW4tYSWllxuxtCJkKxzF.aCyfUS3b+4ZVPBKkVJLA5wPdfmliYImpr9+IM6mRsCKUTIkBpYwMM350ZCXC3RuiT3Rnwl3Bx+2V+74Bwq6GxMwiVNFarDLB2x+Rfw5k163eXZJK1LGfa4ezu8kYCM4WUkFt7hiovUA3hg+IkYQv2sDyfpKkLAxe30.eoWI2EkwIPDSlXE9H7q1XOT1q1XuoFgKgwEpWDWwZgeVv0rZ.LIseQTK+iQ4fdDKSFDme2c6hW74uHNFa+enGgr7X1aCh4G2fXt6FDy81fXt+FDyOsAw7yqMF7iCeboQkU8b.TDdnkd2y6PIEtYYuER9arswOsB
      

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

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

        Confirmed - happening here on windows too. Seems to be a bug.

        HISE Development for hire.
        www.channelrobot.com

        Christoph Hart 1 Reply Last reply Reply Quote 0
        • Christoph Hart
          Christoph Hart @Lindon last edited by

          If you comment out that line:

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

          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.

          d.healey 1 Reply Last reply Reply Quote 0
          • d.healey
            d.healey @Christoph Hart last edited by d.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.

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

            d.healey 1 Reply Last reply Reply Quote 0
            • d.healey
              d.healey @d.healey last edited by d.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

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

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

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

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

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

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

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

                  Christoph Hart 1 Reply Last reply Reply Quote 0
                  • Christoph Hart
                    Christoph Hart @d.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()?

                    d.healey 1 Reply Last reply Reply Quote 1
                    • d.healey
                      d.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.

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

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

                        I've opened a github issue for this one.

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

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

                          @d-healey confirmed on MacOS as well

                          Hise Develop branch
                          MacOs 12.4, Xcode 13.0
                          http://musikboden.se

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

                          4
                          Online

                          740
                          Users

                          5.4k
                          Topics

                          50.4k
                          Posts