[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Rethinking MIDI

On Nov 12, 2007 11:51 PM, nescivi <nescivi@xxxxxxxxx> wrote:
> I just looked at this.
> The problem is that MIDOut.new does not have a default argument for
> uid. If this would be set to 0 by default, then it would behave as
> expected.
(expected meaning: "events get sent to all ports connected to sc's output port")

I think there might be a confusion here.
the uid that is passed in to MIDIOut is the integer uid for the port.
the way the code is written, its always the uid for that midi out port.

so in fact it shouldn't be passed in at all but should be

       *new { arg port;
               ^super.newCopyArgs(port, MIDIClient.destinations[port].uid);

this uid I'm sure its different / irrelevant on linux

yes (as you know), the SC_AlsaMIDI.cpp shows that uid is being used to
choose which of the subscribed ports that are connected to that port.


I'm obviously still confused about the os x ports / destinations.

here is what actually gets called on os x to send midi:

Abstract: Send MIDI to a destination.

extern OSStatus MIDISend( MIDIPortRef port,
 MIDIEndpointRef dest,
 const MIDIPacketList * pktlist );

so the port and uid (to find the endpoint) were both needed.
so WE ARE sending midi, via a port, to a destination.  the port and
destination are not the same objects.