Hi Aaron,

Thanks for your clear and definitive information - very helpful indeed. My app 
doesn’t do realtime audio per se, just control functions and firmware updates. 
It was originally written for a music-related product, but this time it’s been 
adapted for an industrial system that has nothing to do with music, and it will 
never be on the App Store. I stayed with MIDI because I already had the 
framework, and because both Mac and Windows have class-compliant USB MIDI 
drivers, so I don’t have to worry about drivers.

So Helper App, here I come! I can see that debugging will be challenging unless 
I buy another Xojo license :/

Thanks,
Julia


Date: Thu, 28 Dec 2017 20:14:35 +0100
From: Aaron Andrew Hunt 
<aaronandrewh...@zentral.zone<mailto:aaronandrewh...@zentral.zone>>
Subject: Re: [MBS] Main Thread UI Blocking MIDI Plugins

Hi Julia.

This problem is due to Xojo's “cooperative threading model”. They’ve said on 
the forums that they aren’t going to change it, so we’re stuck with it.

So the only way around this problem using Xojo is to handle MIDI input in a 
helper MIDI app which communicates with a GUI app using sockets. I’ve done it 
and it works.

Unfortunately working this way brings in a host of other problems. It taxes the 
processor more heavily, and is a nightmare for debugging. The apps have to keep 
tabs on each other to handle exceptions.

Also keep in mind that such “multi-apps” won’t work on the Mac App Store. Apple 
has something called XPC-Services which are supposed to allow one to do this 
same kind of thing within one app, and MBS has some functions for it, but 
despite my efforts I never got them to do anything, so I gave up on it. I need 
things to be cross-platform anyway, so using an Apple-only solution is not good 
enough.

Conclusion: realtime audio is doable using a multiple app model, but it’s far 
from ideal. Until Xojo drops its “cooperative threading model”, it will remain 
a poor choice for making realtime audio apps. I say that with regret, because 
I’ve used Xojo forever and otherwise I love it.

Cheers,
Aaron

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to