HISE Logo Forum
    • Categories
    • Register
    • Login

    using setModValue and Snex Node Macros / Variables

    Scheduled Pinned Locked Moved Solved ScriptNode
    6 Posts 2 Posters 330 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.
    • griffinboyG
      griffinboy
      last edited by griffinboy

      Is there an issue with my syntax?
      (line 10)
      It works perfectly when I inject a float directly into the setModValue, but for some reason it will not accept this float variable macro.

      d9364b48-ba2e-45be-872e-ecd90ee9172c-image.png

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

        @griffinboy setModValue expects a double precision number.

        modValue.setModValue((double)dummy) should work.
        

        I haven't exactly figured out why it complains at stuff like this, because the compiler should actually be able to implicitely cast the float to a double value.

        griffinboyG 2 Replies Last reply Reply Quote 1
        • griffinboyG
          griffinboy @Christoph Hart
          last edited by

          @Christoph-Hart
          Thanks! Ah I did not think of that, no problem

          1 Reply Last reply Reply Quote 0
          • griffinboyG griffinboy marked this topic as a question on
          • griffinboyG griffinboy has marked this topic as solved on
          • griffinboyG
            griffinboy @Christoph Hart
            last edited by griffinboy

            @Christoph-Hart
            Unfortunately it seems that something else is afoot too lol 😓
            1323a93f-8f04-4989-a515-d1cb9ddf0cd3-image.png

            781bbbda-70c6-44ba-a136-e20506e7de39-image.png

            I'm right in thinking this is the correct way to use the macros that belong to a snex node?
            Declare them as variables and use them?
            For some reason the macro is not affecting the variable.
            I can't find a difference between what I have done, and the scripts in the example snippets involving the snex node.

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

              @griffinboy dummy is the 7th parameter, so it must say

              if(P == 6)
              {
                   dummy = (float)v;
              }
              
              griffinboyG 1 Reply Last reply Reply Quote 1
              • griffinboyG
                griffinboy @Christoph Hart
                last edited by

                @Christoph-Hart
                Thanks! Apologies for the dumb question : )
                I am still figuring out what everything does.
                I see, P is parameter 👍

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

                38

                Online

                1.7k

                Users

                11.9k

                Topics

                103.5k

                Posts