Help with midiMessageCtrlrNumber

Home Forums General Programming Help with midiMessageCtrlrNumber

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #52657
    Puppeteer
    Participant
      • Topics: 16
      • Replies: 185
      • Total: 201
      • ★★

      Hi guys,

      For my Kurzweil PC3 panel, I need to reassign some uiImageSlider’s that control a standard MIDI CC, depending on the model that a user selects in a drop down box.

      Model “A” has Slider A (SlidA) as MIDI CC#6 – Data, but on model “B”, this slider is MIDI CC#13.

      I’m trying to change the parameter under the MIDI section called midiMessageCtrlrNumber, but I can’t get my code to work.

      What am I missing?

      
      ModelMethod = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value)
      if panel:getModulatorByName("ModelCombo"):getValue() == 0 then
      
      panel:getModulatorByName("SlidA"):getMidiMessage():setPropertyInt("midiMessageCtrlrNumber",6)
      
      elseif panel:getModulatorByName("ModelCombo"):getValue() == 3 then
      
      panel:getModulatorByName("SlidA"):getMidiMessage():setPropertyInt("midiMessageCtrlrNumber",13)
      
      end --if
      
      end
      

      The Puppeteer
      http://godlike.com.au

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

        I get this error (attached)

        I’m trying to follow the advice and examples in these threads.

        change midiMessageType of a modulator in LUA

        Changing Images – what could be wrong in that LUA code

        Attachments:
        You must be logged in to view attached files.

        The Puppeteer
        http://godlike.com.au

        #52687
        atom
        Keymaster
          • Topics: 159
          • Replies: 2945
          • Total: 3104
          • ★★★★★

          This is a fix i have to add, but for now you should do getMidiMessage(0) instead of getMidiMessage()

          but i’ll make the old way work too, i missed that.

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

            OK, thanks that works.

            The Puppeteer
            http://godlike.com.au

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

              Will getMidiMessage(0) continue to work in the future? I’m still on build 107 and will stay with it until the panel resizing in VST’s is fixed.

              The Puppeteer
              http://godlike.com.au

              #52752
              atom
              Keymaster
                • Topics: 159
                • Replies: 2945
                • Total: 3104
                • ★★★★★

                Both will work in all future builds.

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

                  I’ve found a strange bug with this.

                  I can change the midi cc number fine and if I’m using the virtual faders just to send Midi, its all good.

                  However, receiving Midi is a different issue. The virtual fader only receives and responds to the original midi cc.

                  For example, if the fader was originally data (cc6) and I change it to cc12, the fader still receives and responds to cc6, not cc12.

                  Is there something I need to do to refresh it, or set the midi in cc, or something else I’m missing to get it to respond to the correct incoming message?

                  The Puppeteer
                  http://godlike.com.au

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

                    I’ll work around this for the time being by hiding and showing sliders and reassigning vstIndex instead of reassigning the MIDI value.

                    Does anyone know if there’s problems with reassigning vstIndex while the plugin is running in a host. Is it likely to cause any problems?

                    The Puppeteer
                    http://godlike.com.au

                  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 54 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