Method modulatorCustomIndex to set all the modulators with the same index.

Home Forums Development Change requests Method modulatorCustomIndex to set all the modulators with the same index.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44246
    daimondamps
    Participant
      • Topics: 8
      • Replies: 80
      • Total: 88

      I’ve created a panel and assignet modulatorCustomIndex to the decimal value nrpn of the modulator.
      From LUA script i want to assign a values to this modulators like in the example:
      for i=0,56,1 do
      local m=panel:getModulatorWithProperty(“modulatorCustomIndex”,nrpnbase+i)
      if (m~=nil) then
      modvalue = 128 * programData:getByte((i*2)+10) + programData:getByte((i*2)+11)
      –console(tostring(i))
      –console(tostring(modvalue))
      m:setModulatorValue(modvalue, false, true, false)

      end

      end
      The problem is that if in the different layers are two modulators with the same modulatorCustomIndex value only one is updated.

      It’s possible to do some update to the ctrlr to change values of all modulators with the same modulatorCustomIndex’s?

      • This topic was modified 8 years, 11 months ago by daimondamps.
      #44250
      zeoka
      Participant
        • Topics: 73
        • Replies: 466
        • Total: 539
        • ★★★

        You can first get modulators with property vstIndex

        for d = 0, "your max" 
        e = panel:getModulatorWithProperty(“vstIndex”,d) 
        f = e:getProperty("modulatorCustomIndex")
             for i=0,56 do 
              if f == nrpnbase+i then 
                 j = 128 * programData:getByte((i*2)+10) +programData:getByte((i*2)+11)
        –console(toString(i))
        –console(toString(j ))
         e:setModulatorValue(j, false, true, false)    
        end 
        end
        end 

        it could appears slow but it wouldn’t be
        There is panel:getModulatorsWithProperty but I can’t get something with it

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