HISE Logo Forum
    • Categories
    • Register
    • Login

    setAttribute - not working for me

    Scheduled Pinned Locked Moved General Questions
    14 Posts 5 Posters 1.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.
    • Christoph HartC
      Christoph Hart
      last edited by

      Yeah, basically that requires you to open up the JSON editor and remove the processorId and parameterId manually.

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

        @Christoph-Hart any chance of a fix then?

        HISE Development for hire.
        www.channelrobot.com

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

          Yes, however there's an unspoken "if there's a workaround, it's not a bug" policy in HISE :) so it's categorized under "cleanup maintenance task"

          1 Reply Last reply Reply Quote 1
          • ustkU
            ustk
            last edited by

            @Christoph-Hart What if I want to link a button from the main interface to a script processor, AND use a callback in the main interface script?

            Can I link to the script processor from the callback in the main interface?
            I know there's a workaround using a global variable, but this is not a good idea AFAIK

            For instance, I have a button in the interface which controls another button in a script processor, but at the same time I want to set a panel visible in the main interface

            Thanks

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

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

              @ustk You can either use the interface designer to link a control to a parameter or you can write a custom callback function. You can't have both. So if you want a control to perform more than one function you will have to use a custom callback.

              @Christoph-Hart Would it be possible to link a control in the interface designer and also have it trigger a custom callback after it performs its linked action? Or is there something fundamental preventing this?

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

              1 Reply Last reply Reply Quote 0
              • ustkU
                ustk
                last edited by

                @d-healey Thanks, I understand that we can't have both, I think because it would be weird to have two different callbacks for the same control (I guess the property editor use a kind of callback in the background)

                so what should I do in my custom callback if I want also to link to a button in a script processor?
                is a:

                ScriptProcessor.setAttribute(n, value)
                

                working?
                If so, how to define "n" when you have 20 controls?

                If it is not the way, it would be cool to add it 😀

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

                orangeO 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk
                  last edited by

                  Ok I tried, and it works this way ☺

                  Still, I don't understand how to find "n" except by trying all the possibilities

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

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

                    @ustk To get n put all the controls in an array then use array.indexOf(control);

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

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

                      @ustk Take a look at this example

                      A knob controlling Gain, Limiter Treshold and Delay at the same time. You can multiply the controls as much as you want...

                      By the way to get the n, you need to learn the control parameter names: create a slider (you won't use it to control, just to learn parameter name), select processor ID and Parameter. You can apply this Parameter name in setAttribute controls. Then delete the slider... ;)

                      HiseSnippet 1318.3oc6X8zaaTDEe1jrgXCA0h3CvJK.4fRS8FmjVUDxIw4OXBw1pNs.mhlr633QY8LV6NaaLUQhOAbOHNzuCbhy7ofaH0u.bf6v6M6td2E6DRPzpFoL4Rl2626Mu4su+MtsuzgEDH8IFENX3.Fw38L6LTn5UuGkKHM1hXXZZaaS1b3.ZP.ykXXL8tHKiByPzq+n1lTOpvgkRhPdpj6v9JdetJkZ602i64sC0kc.ueFzqrdCGontzSFBlwzlUHCnNmPOl0jhvlxjXL61tbkzuihpXADiY1T5NrSO4yEQ3eJOfejGC2XS5.JJh7NROWzhQpj583dtsSttADPKsSu7SGc4+Py84t7QzScB2QyvJUhr9CiotLyyNq4U4padFYLuYhLu6Z1wwmOPkxAss20rgPw76RgOAYMqHrjo9jYLqKADB0R8omv1wG1LRhx1qUYQK6UprvmMew4Kd+wVVat8tMZ1n4tVs1w5fuXaqM1us0SZ13.q6ewKTUv2z.k0yn9ZI9bKcX0RGyTa2sKyQUtDPtDdp4.t7Efb4+ATcrEy2dRvS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K++Mh26MwYzm53KOzI5cNXgs4zTf6sPOMdAy8w8V1IutA8GvyK3G53fCGdOH1ZxRr70VhpWaIV4ZKwpWaIV6ZKwCt1R7vKQB7G2aiPkreT0BfP6s0upzvXaAEhV0oLj+FCRRsfC
                      

                      develop Branch / XCode 13.1
                      macOS Monterey / M1 Max

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

                        Or use the autocomplete popup which shows you all available parameters - this is also more safe because of NO MAGIC NUMBERS.

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

                          @Christoph-Hart said in setAttribute - not working for me:

                          Or use the autocomplete popup which shows you all available parameters - this is also more safe because of NO MAGIC NUMBERS.

                          Oops I totally misunderstood the question.

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

                          1 Reply Last reply Reply Quote 0
                          • ustkU
                            ustk
                            last edited by

                            Thanks! It is way easier...

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

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

                            21

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            105.5k

                            Posts