getModulatorsWithProperty

Home Forums General Programming getModulatorsWithProperty

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25755
    zeoka
    Participant
      • Topics: 73
      • Replies: 466
      • Total: 539
      • ★★★

      how get this working and after how to set properties by blocs ?
      getModulatorsWithProperty(“modulatorCustomIndexGroup”,1,7)
      1 is the index 7 the number of mods to modify : that’s wrong !!
      Any idea ?
      Could reduce strongly “visbility” scripts..

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

        The correct way is getModulatorsWithProperty(“modulatorCustomIndexGroup”,1)

        You cannot select only some of them this way.

        #25767
        zeoka
        Participant
          • Topics: 73
          • Replies: 466
          • Total: 539
          • ★★★

          tried..
          it seems no
          it needs something else ,a second int ?
          CtrlrPanel&,String const&,String const&

          it said no matching overload found…. as if there no mods with custom index 1
          but they are

          • This reply was modified 9 years, 9 months ago by zeoka.
          #25769
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            Both parameters to the method are string so type “1” instead of 1.

            getModulatorsWithProperty(“modulatorCustomIndexGroup”,”1″)

            i just checked and there seems to be a fault in the logic, it will return an array the size of ALL modulators with valid modulators placed in the array, i changed it so that it returns an array of just the matching modulators not ALL modulators with invalid ones set to nil.

            You can use that method, just check each element if it’s not nil.

            #25774
            zeoka
            Participant
              • Topics: 73
              • Replies: 466
              • Total: 539
              • ★★★

              In this array what is there ?
              I tried this

              FILTER2 = function(mod, newValue)
              d = panel:getModulatorsWithProperty("modulatorCustomIndexGroup","1")
                if newValue == 0 then z = false 
              else                    z = true
               end
               for g = 1,7,1 do 
                   string.format("%s",d[g]):getComponent():setVisible(z)
               end
               
              end

              How could I group task ? I tried to diplay the table in the console but failed
              custom group names and indexes are great features

              #118283
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                Did anyone succeeded to have this function working? Tried without success, returned table is always empty…
                Setting Custom group index to some modulators to 1
                then in Lua:

                tSub={}
                 tSub = panel:getModulatorsWithProperty("modulatorCustomIndexGroup","1")
                 console(tostring(#tSub))

                Always giving a size of 0, whatever property I’m trying 🙁
                I have also checked the Github code and it seems OK (scans all modulators and make a match on property and value to store in an array)

                #118295
                proton
                Participant
                  • Topics: 19
                  • Replies: 94
                  • Total: 113
                  • ★★

                  Hi goodweather,

                  works fine here (PC ver 5.3.201).

                  EDIT: I was too fast 😉 Nope, it seems it is still not working. After changing the value from “0” to “1” it shows 0 what is not true. So basically the same result as you had.
                  Cheers!

                  • This reply was modified 3 years, 11 months ago by proton.
                  Attachments:
                  You must be logged in to view attached files.
                  #118306
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    Thx to confirm, my friend!
                    I’m now doing the scanning of all modulators myself and it works fast

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