Multiple MIDI ports?

Home Forums General Using Ctrlr Multiple MIDI ports?

This topic contains 8 replies, has 3 voices, and was last updated by Possemo Possemo 2 months, 2 weeks ago.

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
    Possemo
    Participant
    • Topics: 13
    • Replies: 568
    • Total: 581
    • ★★★

    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 3 months ago by Possemo Possemo.
    #111103

    daimondamps
    Participant
    • Topics: 8
    • Replies: 79
    • Total: 87

    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
    Possemo
    Participant
    • Topics: 13
    • Replies: 568
    • Total: 581
    • ★★★

    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 2 months, 4 weeks ago by Possemo Possemo.
    #111824

    daimondamps
    Participant
    • Topics: 8
    • Replies: 79
    • Total: 87
    #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
    Possemo
    Participant
    • Topics: 13
    • Replies: 568
    • Total: 581
    • ★★★

    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: 79
    • Total: 87

    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 2 months, 3 weeks ago by  daimondamps.
    #114672
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 568
    • Total: 581
    • ★★★

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

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

There is currently 0 users and 25 guests online
No users are currently active
Forum Statistics
Threads: 2,233, Posts: 15,732, Members: 55,748
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!