Home › Forums › General › Using Ctrlr › Multiple MIDI ports?
- This topic has 8 replies, 3 voices, and was last updated 4 years, 11 months ago by Possemo.
-
AuthorPosts
-
April 23, 2019 at 1:18 pm #110648
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
HansApril 23, 2019 at 2:50 pm #110655Not 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 5 years ago by Possemo.
April 24, 2019 at 10:30 pm #111103I’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.
April 25, 2019 at 8:20 am #111252But 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 5 years ago by Possemo.
April 26, 2019 at 9:23 am #111824April 27, 2019 at 3:25 pm #112703But 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?April 27, 2019 at 7:21 pm #112722In 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.
April 29, 2019 at 6:49 pm #114370You 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, 12 months ago by daimondamps.
May 4, 2019 at 8:55 am #114672I didn’t know modalWindow. This is very interesting – thanks diamondamps.
-
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.