HISE Logo Forum
    • Categories
    • Register
    • Login

    Scriptnode Parameter Aliases

    Scheduled Pinned Locked Moved Bug Reports
    5 Posts 3 Posters 81 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.
    • clevername27C
      clevername27
      last edited by clevername27

      This post is deleted!
      d.healeyD A 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @clevername27
        last edited by

        @clevername27 said in Scriptnode Parameter Aliases:

        SCRIPTNODE_Synth.setAttribute.myGain

        setAttribute is a function, isn't it?

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

        1 Reply Last reply Reply Quote 1
        • A
          aaronventure @clevername27
          last edited by

          @clevername27 I don't think this is a bug, setAttribute is always expecting an index, and the network reference object contains properties named after the parameters which just hold their respective indexes.

          So network.myGain will just return the index of that parameter.

          If you change the name of the parameter (or should I say its ID), how would the unchanged call be able to fetch the index if a parameter with that ID no longer exists?

          clevername27C 1 Reply Last reply Reply Quote 1
          • clevername27C
            clevername27 @aaronventure
            last edited by clevername27

            @d-healey @aaronventure Thanks for your replies; I mistyped the syntax in my original post (now fixed). I meant that initially, the parameter name resolves to its associated index (or the other way around)…and that's great, because it's self-documenting, and you avoid bugs from mistakenly using the wrong index (number). But when I change the name, it no longer seems to resolve to an index.

            A 1 Reply Last reply Reply Quote 0
            • A
              aaronventure @clevername27
              last edited by

              @clevername27 well yeah.

              This ain't a JetBrains IDE, references don't automatically change everywhere.

              It should throw an error (because the property you're now referring to returns undefined), then you know you gotta change it there. But no, it's not automatic.

              Same thing if you change the ID of a component in the property editor. Any script references to it are now invalid (because you're getting the reference by means of ID).

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

              13

              Online

              1.7k

              Users

              11.8k

              Topics

              102.6k

              Posts