Would it be possible to detect the case when a user makes such a double-connection? One could then disable one of the connections and show some alert explaining how it works.
Ah, yes, choosing between two exclusive modes would fix it:
1) send only on "Gestrument" virtual source port
2) send to one or more virtual destinations
The cases where one would need both at the same time is probably rare
enough to not support it.
However, how do I detect if a destination is virtual or not?
On Sat, Jan 5, 2013 at 8:56 PM, Nic G (Audeonic Apps) <ap...@audeonic.com> wrote:
> No, the manifesto doesn't solve the problem. As Jesse says, user education
> is key here; and with flexibility comes danger.
>
> Making the user select which port(s) an app listens to mitigates the problem
> somewhat (or selecting the output in a controller)
>
> Your observation holds, but just about every dev has implemented CoreMIDI in
> their apps differently with varying levels of configuration vs hardcode, so
> you have to take this on board.
>
> If you limit Gestrument to only controlling apps that have defined a virtual
> destination, then your users won't be able to control GarageBand or the Korg
> apps (without some sort of bridging app) for example.
>
> I think it is better to offer your users the ability to control both kinds
> of apps, and in your case to solve the double connection to Magellan and
> SampleTank (the only two apps I can think of that behave this way) you make
> your users specifically select or even consider only allowing one virt.
> destination at a time. You're going to have to make the call in the tradeoff
> of flexibility vs safety yourself ultimately. ;-)
>
> Nic.
>
--
/Jonatan
http://kymatica.com
However, how do I detect if a destination is virtual or not?
MIDIEndpointGetEntity()
the endpoint's owning entity, or NULL if none.
Virtual sources and destinations don't have entities.
So, if this returns NULL, it's virtual.