Multiple MIDI ports?

Home Forums General Using Ctrlr Multiple MIDI ports?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #110648
    hanshoffnung
    Participant
      • Topics: 2
      • Replies: 3
      • Total: 5

      Hi,
      Is it possible to send MIDI messages to multiple MIDI ports?
      (In Mac to multiple IAC ports?)
      I can’t find a port assignment.
      Thanks
      Hans

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

        Not sure about that but in theory with Lua scrips it should be possible. It would probably be easier to send to different midi channels. Wouldn’t this be an option?

        • This reply was modified 4 years, 11 months ago by Possemo.
        #111103
        daimondamps
        Participant
          • Topics: 8
          • Replies: 80
          • Total: 88

          I’m afraid not . CTRLR open only one device for each type (input , Output , Ctlr). With Lua you can not open another MIDI thread/port. But there are some MIDI routing apps. MIDI yoke is one of them.

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

            But you could switch midi-ports in lua and send messages to multiple ports one by one. Maybe switching would be too slow, this would have to be tried out. Maybe switching would be fast enough as IAC are virtual ports. As said – using multiple midi channels would be the better way.

            virtual midiports such as midi yoke would be a good idea but it is only available on windows (not mac). No idea if there is something similar available on mac.

            • This reply was modified 4 years, 11 months ago by Possemo.
            #111824
            daimondamps
            Participant
              • Topics: 8
              • Replies: 80
              • Total: 88
              #112703
              hanshoffnung
              Participant
                • Topics: 2
                • Replies: 3
                • Total: 5

                But you could switch midi-ports in lua and send messages to multiple ports one by one. Maybe switching would be too slow, this would have to be tried out. Maybe switching would be fast enough as IAC are virtual ports. As said – using multiple midi channels would be the better way.

                virtual midiports such as midi yoke would be a good idea but it is only available on windows (not mac). No idea if there is something similar available on mac.

                Thank you.
                I don’t need real time for the other ports, just to send parameters values.
                Would it be possible to create a script that switches midi ports depending on what layer is active? I will have 16 layers, and depending on which layer I activate could be possible to switch to a different port?

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

                  In theory that should work but I never tried to switch ports within a script. To satisfy my curiosity – what do you intend to achieve with this panel? You probably have already made a script that switches the visibility of layers. If you upload the panel here I will have a look.

                  #114370
                  daimondamps
                  Participant
                    • Topics: 8
                    • Replies: 80
                    • Total: 88

                    You can use my script by modifying it a bit.

                    if panel:getProperty("panelMidiOutputDevice")=="-- None" or panel:getProperty("panelMidiInputDevice")=="-- None" then
                    
                    		saMidiInputDevices = StringArray()
                    		for i=0,(utils.getMidiInputDevices():size()) do
                    			saMidiInputDevices:set(i, utils.getMidiInputDevices():get(i))
                    		end
                    
                    		saMidiOutputDevices = StringArray()
                    		for i=0,(utils.getMidiOutputDevices():size()) do
                    			saMidiOutputDevices:set(i, utils.getMidiOutputDevices():get(i))
                    		end
                    
                    		
                    
                    		modalWindow = AlertWindow("\nFirst time run setup.\nPlease select you MIDI Input and Otput Device", " ", AlertWindow.InfoIcon)
                    		modalWindow:addButton("    OK    ", 1, KeyPress(KeyPress.returnKey),KeyPress())
                    		modalWindow:addButton("Cancel", 0, KeyPress(KeyPress.escapeKey),KeyPress())
                    		modalWindow:addComboBox ("cmbMidiInputDevices", saMidiInputDevices, "MIDI Input Device")
                    		modalWindow:addComboBox ("cmbMidiOutputDevices", saMidiOutputDevices, "MIDI Output Device")
                    		modalWindow:addTextBlock ("Program will be closed to save changes.")
                    
                    		ret = modalWindow:runModalLoop()
                    
                    		if ret == 1 then
                    
                    			panel:setPropertyString("panelMidiInputDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText())
                    			panel:setPropertyString("panelMidiOutputDevice",modalWindow:getComboBoxComponent("cmbMidiOutputDevices"):getText())
                    			panel:setPropertyString("panelMidiControllerDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText())
                    
                    			
                    		end
                    
                    		modalWindow:setVisible (false)
                    
                    end
                    
                    end
                    • This reply was modified 4 years, 11 months ago by daimondamps.
                    #114672
                    Possemo
                    Participant
                      • Topics: 14
                      • Replies: 638
                      • Total: 652
                      • ★★★

                      I didn’t know modalWindow. This is very interesting – thanks diamondamps.

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