setModulatorValue() and friends

Home Forums General Programming setModulatorValue() and friends

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #118453
    dnaldoog
    Participant
      • Topics: 4
      • Replies: 480
      • Total: 484
      • β˜…β˜…

      I made a panel in order to try to understand the differences between the following methods see here::

      It seems that every method triggers a function call in the receiving modulator (I only tested uiSlider) except those methods marked with a **.

      
      panel:getModulatorByName(n):setModulatorValue(value,false,true,false)
      panel:getModulatorByName(n):setModulatorValue(value,false,false,false)
      panel:getModulatorByName(n):getComponent():setValue(value,true)
      panel:getModulatorByName(n):getComponent():setValue(value,false)**
      panel:getModulatorByName(n):setValue(value,true)
      panel:getModulatorByName(n):setValue(value,false)
      panel:getModulatorByName(n):setValue(value,true,true)
      panel:getModulatorByName(n):setValue(value,false,false)
      panel:getComponent(n):setValue(value,true)
      panel:getComponent(n):setValue(value,false)**
      panel:getModulatorByName(n):setValueNonMapped(value,true,true)
      panel:getModulatorByName(n):setValueNonMapped(value,false,true)
      panel:getModulatorByName(n):setValueNonMapped(value,true,false)
      panel:getModulatorByName(n):setValueNonMapped(value,false,false)
      

      Please find attached example panel below

      Attachments:
      You must be logged in to view attached files.
      #118455
      proton
      Participant
        • Topics: 19
        • Replies: 94
        • Total: 113
        • β˜…β˜…

        Nice dnaldoog!

        I myself am diving into the whole uiCustomComponent universe right now but the Graphics Class, although very powerful, is a bitch to be honest πŸ˜‰
        Have a great weekend guys!
        M.

        #118456
        dnaldoog
        Participant
          • Topics: 4
          • Replies: 480
          • Total: 484
          • β˜…β˜…

          Hi Proton,

          The uiCustomComponent is very powerful. You could almost make a whole panel just using that component. Maybe rotating sliders would be difficult. I tried it once. Haven’t succeeded yet.

          If you are interested in the graph side of things, my JD-990 and PLG-150-AN contain a lot of ‘graphics’ objects!

          Regards,

          #118486
          lecleto
          Participant
            • Topics: 10
            • Replies: 34
            • Total: 44
            • β˜…

            Hello Dnaldoog and Ctrlrs!

            What does it means:

            (value,false,true,false)
            The first “value” is the value that you will get or set on modulator but false,true,false. What is false and true?
            IΒ΄m using this all time but I donΒ΄t know why!
            Thank you!

            #118491
            dnaldoog
            Participant
              • Topics: 4
              • Replies: 480
              • Total: 484
              • β˜…β˜…

              What does it means:

              (value,false,true,false)

              Hi Lecleto,

              That’s what I don’t fully understand. Sometimes they do nothing (maybe)

              Sometimes ‘true’ triggers a function or sending of MIDI in a triggered modulator; sometimes not. It’s still not clear to me which does which, so the panel above is a kind of work in progress.

              There’s a very interesting post by Possemo, who is very clued up on all this, here:

              forums/topic/setvalue-or-setmodulatorvalue/

              #118498
              m.tarenskeen
              Participant
                • Topics: 30
                • Replies: 113
                • Total: 143
                • β˜…β˜…

                If you are interested in the graph side of things, my JD-990 and PLG-150-AN contain a lot of β€˜graphics’ objects!

                Nice. Impressive graphics. I might borrow a trick or two from you πŸ™‚

                • This reply was modified 3 years, 10 months ago by m.tarenskeen.
                #118500
                dnaldoog
                Participant
                  • Topics: 4
                  • Replies: 480
                  • Total: 484
                  • β˜…β˜…

                  Thanks m-tarenskeen. Go for it!

                  #118502
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • β˜…β˜…β˜…

                    @ lecleto
                    You can find info about the arguments of functions in
                    https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.h

                    Need a bit searching and is missing explanations but helps a bit…

                    #120138
                    dnaldoog
                    Participant
                      • Topics: 4
                      • Replies: 480
                      • Total: 484
                      • β˜…β˜…

                      UPDATE :: 10/05/2020


                      When a callback function is set in “Called when the modulator value changes”

                      When assigning incoming MIDI to the modulator – If the receiving incoming MIDI value is the same as the current Modulator Value then some functions do not trigger the callback function; see below.

                      Note that setValue(value,false) never triggers a callback function.


                      
                      if the value is the same the function is not fired
                      
                      panel:getModulatorByName(k):getComponent():setValue(value,true)
                      panel:getComponent(k):setValue(value,true)
                      
                      Function is never fired
                      
                      panel:getComponent(k):setValue(value,false)
                      panel:getModulatorByName(k):getComponent():setValue(value,false)
                      
                      Function is always fired
                      
                      panel:getModulatorByName(k):setValue(value,true)
                      panel:getModulatorByName(k):setModulatorValue(value,true,true,true)
                      panel:getModulatorByName(k):setModulatorValue(value,true,true,false)
                      panel:getModulatorByName(k):setModulatorValue(value,true,false,false)
                      panel:getModulatorByName(k):setModulatorValue(value,true,false,true)
                      
                      panel:getModulatorByName(k):setModulatorValue(value,false,false,false)
                      panel:getModulatorByName(k):setModulatorValue(value,false,false,true)
                      panel:getModulatorByName(k):setModulatorValue(value,false,true,false)
                      panel:getModulatorByName(k):setModulatorValue(value,false,true,true)
                      
                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The forum ‘Programming’ is closed to new topics and replies.
                    There is currently 0 users and 37 guests online
                    No users are currently active
                    Forum Statistics
                    Threads: 2,495, Posts: 17,374, Members: 77,605
                    Most users ever online was 12 on January 22, 2019 3:47 pm
                    Ctrlr