[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] SC_CoreMIDI questions
On Sat, Nov 29, 2003 at 07:58:05AM -0500, James Harkins wrote:
> > is the pitchbend range [-8192;8192[ or [0;16384]?
> >
>
> [0;16384] - divide by 16384 to make it compatible with ControlSpec.
ok, thanks.
> > MIDIOut has a field uid (destination), which is passed to the
> > sendmidi
> > primitive. i don't fully understand the purpose of this
> > parameter. does the destination id represent the inport of another
> > client in CoreMIDI?
> >
>
> It's a port number assigned by the OS. If you have a multiport
> interface, each midi cable gets a different uid. You can get the
> destinations by:
>
> MIDIClient.destinations.do({ |midi| [midi.device, midi.name,
> midi.uid].postln });
> MIDIClient.sources.do... // for sources
thanks, james, that makes it clearer.
the ALSA 'sequencer' on linux works like a virtual MIDI patchbay; each
application/device reqisters with the 'sequencer' and allocates a
number of i/o ports. events can be delivered either directly to a
client/port destination, or be broadcast to all ports subscribed to a
particular outport. connections can be made by external commandline
tools or gui interfaces.
therefore i'd like to extend the semantics of MIDIOut to behave as
follows:
* when uid is equal to a certain (negative) constant, MIDIOut
broadcasts to all connected ('subscribed') ports. this is the default
mode of operation with ALSA on linux. AFAICT CoreMIDI doesn't provide
a subscription system, so the implementation should trigger an error
or broadcast to all endpoints (generally undesirable) in this case.
* otherwise MIDIOut works as before, sending to a port id previously
retrieved from a MIDIEndPoint.
comments?
<sk>