Switching from PC to Mac - virtual ports question

Kulu Orr

2016-11-19 14:46:39

Hi,
I've been using the excellent BMT for years now on a PC to control all the other software I use during my shows (lighting control program, several Java modules I've written to control video and animation projection, Ableton Live etc.) using a different MIDI virtual port to communicate with each program.
Oddly, after switching to Mac, Ableton shows the virtual ports opened in BMT, but other programs do not.
If I create an "IAC virtual port" using the OSx "Audio MIDI Setup" utility, it shows up in both BMT and the destination program (QLC+ lighting control) and I can use it to communicate with it, however the original virtual ports do not appear, and even when I route them (in the BMT router) to the IAC port that does work, no signal arrives at the destination program.
Should I just abandon the BMT virtual ports and rewrite all the translators to communicate through the IAC ports? Is there some performance related issue here that I should be aware of?
Thanks,
Kulu

Kulu Orr

2016-11-21 18:03:44

And while we are on that subject - another PC to OSx transition problem: I use keystrokes to trigger translators in BMT, and in PC there was no problem, but under OSx the keystrokes work only when BMT is not focused (regardless of whether or not I check "Suppress outgoing keystrokes when focused" or "Ignore incoming keystrokes when focused", under Preferences).
They trigger the translators just fine when BMT is not focused.

florian

2016-11-21 21:06:34

Hi Kulu,
sorry for the late reply. You're the first user to report a problem with the virtual ports on OS X. I wonder what's going on! Which version of OS X? specifically, which programs do not see the MT Pro ports?

As a workaround, the IAC virtual ports should work fine. I don't think you'll need to rewrite your project file's MIDI ports: disable virtual ports in MT Pro, then restart MT Pro. The virtual port assignments should mutate to normal aliases, which you can assign to the IAC ports then. Performance can theoretically be worse, but probably unnoticeable.

Regarding "incoming keystrokes": indeed, on OS X they always only work when MT Pro is not active -- regardless of the setting "Ignore incoming keystrokes when focused". That's because the two ways need to be programmed entirely differently, and we haven't taken on the second way to receive keystrokes when MT Pro is active. Will come in a future version!

Florian

Kulu Orr

2016-11-22 12:32:28

Hi Florian,
Thanks for taking the time to reply.
After some fiddling and twiddling the situation is that all software are now recognizing the BMT virtual ports with the exception of QLC+ (http://www.qlcplus.org) which is obstinate in showing only the physical and the IAC bus as options for incoming MIDI ports.
I'm a little wary of disabling the virtual ports in BMT since I am using 6 virtual ports as part of my system (my show is quite complex and BMT does a lot of routing) and only one of them is dedicated to QLC+. I'd rather re-code just the couple of hundred translators pertaining to the port used to communicate with QLC+, and not get in trouble with the couple of thousand other translators making use of the other virtual ports.
If you ever get around to checking out BMT compatibility with QLC+ under OSx - great. If not - also ok just keep it in mind in case some else raises the point.
As for the keystrokes not having effect on BMT - it's not such a big deal. I have so many MIDI surfaces in my show that I'll just use one of them to trigger what I need instead of the keyboard.
Thanks for all your help as always!

florian

2016-11-22 13:29:05

Hi Kulu, thanks! I've looked at the code of QLC+ and I have identified the problem: it expects a MIDI port to have a serial number. If it does not have one, the port is ignored. I assume that if I add a serial number to the MT Pro virtual ports, it should show up in QLC+. I'll also notify the QLC+ folks to change their implementation. It should be a very quick fix for them.
Thanks,
Florian

Kulu Orr

2016-11-22 17:50:33

Wow that's ver resourceful of you!
So what does it mean in practice - should I modify my translator settings or should I wait for your patch regarding the serial enumeration of the ports?

Kulu Orr

2016-11-22 17:53:10

By the way on Windows QLC+ identified all of BMT's virtual ports without a hitch. The problem occurred only under Mac OSx.

florian

2016-11-24 12:13:26

Kulu,
you need to wait for QLC+ to implement this (cannot be fixed in MT Pro) -- and manwhile, use an IAC port for QLC Plus.

When changing the port setting in your MT Pro project file, I'd recommend to create a MIDI alias "QLC+" (for input and output), and use those aliases in MT Pro instead of the virtual port which you use right now for QLC+. Then, assign this alias to the IAC port. When QLC+ gets fixed, you can simply re-assign the alias to the corresponding MT Pro virtual port, and you can get rid of the IAC dependency with just one click.

Also, if there are so many occurrences of MIDI port settings to adapt, it seems that you're using per-action MIDI Port settings (i.e. per translator)? I'd recommend to organize the translators in presets such that you can use the preset default MIDI port settings. Then, it'll be faster to change the MIDI ports for an entire preset full of translators.

Last, but not least, if you're really dealing with 100s of MIDI port settings to change, you might get a faster result with using a text editor and loading the .bmtp file into it. First, in MT Pro, change only one translator/preset to the new port setting. Then, load the .bmtp file into a text editor (make sure it's loaded as "raw" or unformatted). Then, find an occurrence of the old port name, and an occurrence of the new port name. Then, you can use search/replace to replace all occurrences. The standard format for the definition of a port setting is e.g. "0013Bome Virtual Port 1" where 0013 is the length as a hexadecimal 4-digit number of the following port name. So as an example, you might be doing search "0013Bome Virtual Port 1" and replace with "0004QLC+".

Best,
Florian

PS: the QLC+ bug report

Kulu Orr

2016-11-24 23:58:28

Wow. As usual I am amazed by your helpfulness and efficiency... Thank you!
Separating the port references by presets is impossible as they are so intertwined (oftentimes a timer sets off translators going out to 4 or 5 ports simultaneously, with differing conditions, and the presets are switched during the shows several times etc.), however the Alias concept is brilliant - I don't know how I could have missed it till now! It will definitely bring order into the chaos once and for all, plus it will tremendously facilitate porting and hardware changes!
And with the text editor shortcut you offered it'll be a breeze to make the switch from the current jumble to a clear and neat Alias based code.
And thanks so much for communicating with Massimo from QLC+ - I see things are going in the right direction.
Grateful as ever,
Kulu

P.S.
My full show is not yet ready but you can see a short snippet from a few parts of it, from a public rehearsal. Every single thing you see there passes through BMT! https://www.youtube.com/watch?v=2zXGAkozVDc

Kulu Orr

2016-11-25 00:02:47

Oh, I just realized that the announcer recorded in the beginning of the video is in Hebrew, so chances are it won't so comprehensible for you... So what he is saying is something like: "Ladies and Gentlemen, in the show you are about to see there is no playback and lighting or sound technicians - everything you will see and hear will be performed in real time, live on stage". (neglecting to add "thanks to BMT" ;-) )

Kulu Orr

2016-12-01 01:08:23

Did I understand correctly (from https://github.com/mcallegari/qlcplus/issues/907) that you and Massimo from QLC+ solved the problem of identifying BMT's the virtual port from within QLC+? Is it all fixed and I just need to copy the Midi Plugin into my installation of QLC+?
Thank you so much (as usual)!

florian

2016-12-01 18:00:09

Hi Kulu, yes, would be great if you could test with the indicated binary in Massimo's post where he says "Complete test version available here".
Thanks a lot!
Florian

Kulu Orr

2016-12-04 21:36:05

Well, after downloading and installing the test version, I can testify that some headway has been made as the virtual ports of BMT are now visible in the port list of QLC+. However they still can't be used as they appear to have a "closed" status as input ports, at all times regardless of what I do.
The IAC port, for example, appears to be closed but when I select it as a QLC+ input it changes status into "open", however the virtual ports change status to "open" only as output ports (e.g., when selected as "feedback" ports) but not as input ports.
The same virtual ports can function perfectly if for example I select them as input ports for other programs, like Ableton Live, but in QLC+ they refuse to function as viable input ports.
Am I missing something?

Kulu Orr

2016-12-12 19:21:39

Situation still unchanged, and identical under three different systems I checked it with (MacBook 15|", MacBook 13" and iMac).
I guess I'll be using the IAC port in the near future.

florian

2016-12-15 15:03:36

I've looked into the issue and spotted the bug in QLC+. Hopefully they'll implement my suggested fixes.
Regards,
Florian

florian

2016-12-15 21:18:44

Hi Kulu,
seems that Massimo from QLC+ has already implemented my fixes and released a test version 4.10.6 here. Click the link QLC+_4.10.6-TEST-20161215.dmg .

Sorry for this incremental process, but Massimo doesn't know MT Pro, and I don't know QLC+, so testing is cumbersome for both of us...

Thanks,
Florian

Kulu Orr

2016-12-18 22:17:24

This process is the epitome of the metaphor "one step at a time":
Now QLC+ recognizes the BMT virtual ports, is willing to open them and even acknowledges MIDI signals incoming from them! However... It only recognizes the 1st of any chain of incoming signals :-(
For example if I have a translator sending out three Note-On messages using the virtual port, only the 1st one is recognized by QLC+ and the other two are ignored. No matter how I reorder the outgoing signal train - always only the 1st is recognized and the subsequent messages in the train are ignored.
If I use the virtual port on a PC all the messages in the chain are executed, and on OSx also, if I go back to using the IAC port - everything works great. The problem appears only when using the BMT virtual port.

Since almost all my translators output multiple MIDI messages to QLC+ (e.g., CC messages to modify light scenes fade times along with Note On and Note Off messages to turn various lights on or off), splitting up each of these numerous translators into single-message-output translators will turn the project into a real mess.

As a side note I want again to thank you Florian for all your amazing work. It's just unbelievable that you are taking the time to debug not just BMT but now also QLC+!
If you feel like you've had enough of this just say so and we'll let it rest - I can use the (perhaps less efficient but functioning) IAC port, and you can note down this QLC+ incompatibility for future revisions. I feel like this might have taken enough of your time already, and truthfully I think the bugs here are not in BMT.

florian

2016-12-19 10:45:02

Hi Kulu,
I can see what's happening here. Windows does split up a MIDI stream into single messages and delivers the single messages to applications. OS X does not do that, so if applications are not prepared for multiple messages at once, they'll only see the first one. I can report that to QLC+, but fixing it is not trivial, actually. MT Pro correctly processes such incoming multi-message packets on OS X (and also partial message fragments, which are possible, too).

For outgoing, however, MT Pro does not split messages up into their individual MIDI messages. It's probably worthwhile to do that, to ensure maximum interoperability with "simple" MIDI applications.

I guess for now, it's worthwhile for you to use the IAC port until we've fixed that.

Thanks,
Florian

Kulu Orr

2016-12-19 21:39:54

Fair enough.
I gather that the IAC virtual port performs the stream-splitting service for QLC+ then? Since all is working well when I go through it.
It's strange if QLC+ can't handle MIDI streams, even under OSx, since I tried to google quite a while various keywords pertaining to this problem, and couldn't find anyone else so far who encountered this problem. I'm curious to know what Massimo will have to say about it and whether this is inherent to QLC+.
And like I wrote - I feel like enough of your precious time was wasted on this so if it doesn't work out it's o.k. so long as I have the IAC bypass.

florian

2016-12-21 22:13:16

normally, MIDI will get into QLC+ by way of USB, and USB splits up a MIDI stream into individual MIDI messages anyway...
We'll implement that, but might take some time. Good that there is the work-around to use the IAC ports.
Florian

Kulu Orr

2016-12-23 14:39:47

By the way it may be good to communicate this to Massimo from QLC+. There might be a solution for it up his sleeve somehow, and anyway he asked for feedback.

florian

2016-12-28 16:29:03

thanks, I did mention it to him. I don't think he's gonna fix it, but you never know.
Regards,
Florian