console() modulatorValue

Home Forums General Programming console() modulatorValue

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #69539
    boonier
    Participant
      • Topics: 5
      • Replies: 12
      • Total: 17

      HI

      I’m a bit new to Ctrlr and I’m trying to reverse engineer a panel – specifically the Osc 2 detune modulator on the M1000 panel – to see what values it is outputting.

      I can’t quite see how to simply print this value to a console. Is it straightforward?

      THanks

      #69541
      dasfaker
      Keymaster
        • Topics: 80
        • Replies: 793
        • Total: 873
        • ★★★

        console(“modName value: “..panel:getModulatorByName(“modulatorName”):getValue())

        #69542
        boonier
        Participant
          • Topics: 5
          • Replies: 12
          • Total: 17

          console(“modName value: “..panel:getModulatorByName(“modulatorName”):getValue())

          The other problem is I don’t know where to put this exactly! I want the value to go into the console when I change the modulator. Am I to create a new method for this?:

          myNewMethod = function(--[[ CtrlrModulator --]] modulator, --[[ number --]] value)
          end

          The other thing is that I want to view the print the value after the “Expression to evaluate when calculating…” field is done

          cheers

          #69543
          dasfaker
          Keymaster
            • Topics: 80
            • Replies: 793
            • Total: 873
            • ★★★

            Yes, you need to create this method and place there the console code.
            Also you can write it directly on the console, but it’s not updated each time the modulator change value.

            #69544
            boonier
            Participant
              • Topics: 5
              • Replies: 12
              • Total: 17

              Thanks, so is the method called from “Expression to evaluate when calculating…” field in the modulator options?

              #69545
              dasfaker
              Keymaster
                • Topics: 80
                • Replies: 793
                • Total: 873
                • ★★★

                You should use method “called when the modulatorValue changes”. And I think this method is called after “Expression to evaluate…” operation is done.

                #69548
                boonier
                Participant
                  • Topics: 5
                  • Replies: 12
                  • Total: 17

                  Sorry I’m really not getting this! Is there a doc you can point me too, or could you attach a very simple 1 modulator example that shows how to connect the modulator to the method please?

                  thanks

                  #69549
                  dasfaker
                  Keymaster
                    • Topics: 80
                    • Replies: 793
                    • Total: 873
                    • ★★★
                    #69551
                    boonier
                    Participant
                      • Topics: 5
                      • Replies: 12
                      • Total: 17

                      That’s perfect thanks again.

                      One more thing:

                      lt (modulatorValue, 0, 97 + (31 + modulatorValue), modulatorValue)

                      This won’t work in the LUA editor will it? The value I get from

                      panel:getModulatorByName(“modulatorName”):getValue()

                      seems to be before any expressions are performed on it

                      #69552
                      Possemo
                      Participant
                        • Topics: 14
                        • Replies: 638
                        • Total: 652
                        • ★★★

                        Hi boonier,

                        that may be the case but you can do any calc in Lua, so you won’t need the calced value, do you?

                        #69559
                        Puppeteer
                        Participant
                          • Topics: 16
                          • Replies: 185
                          • Total: 201
                          • ★★

                          You might be able to use this if you use a fixed slider or a fixed image slider and map all your values.

                          Controller7 = panel:getModulatorByName(“EnvAA3T”):getValueMapped()

                          The Puppeteer
                          http://godlike.com.au

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • The forum ‘Programming’ is closed to new topics and replies.
                        There is currently 0 users and 92 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