[openbeos-midi] Re: Greetings!

  • From: "Martijn Sipkema" <msipkema@xxxxxxxxxxxxxxxxxxx>
  • To: <openbeos-midi@xxxxxxxxxxxxx>
  • Date: Sun, 20 Oct 2002 22:57:30 +0100

[...]
> What do you mean, "sending sys ex data in several
> packets does not result in the callback function being
> called?" What exactly is your code doing?

In the consumer class there are callbacks for noteon, noteoff,
sysex, etc. These are only called when the data is sent atomically, 
i.e. using the noteon, noteoff, etc. member functions of a producer
or using the generic data spray member function with atomic == true.

[...]
> Also: you may know better than I, but in MIDI isn't it
> better if you split up the sysex data into more
> manageable chunks ahead of time? If other instruments
> are on the same MIDI port as your super-mega-sampler,
> then one big MIDI message to that sampler is going to
> starve all other instruments on the same bus from any
> time-sensitive MIDI events they were hoping to
> receive. I'm trying to remember what the MIDI protocol
> for this was, but I'd have to go look it up somewhere.

MIDI system exclusive messages cannot be interleaved by
other messages (except system realtime) and cannot be split
up (in the protocol level that is).

> > Another thing about the midi2 kit is the handling of
> > timestamps. Are timestamps supposed to be
> > monotonically increasing?
> 
> >From a single source, yes.

Is there then, in the midi2 kit, a way to know what is the source of
a received MIDI message?

> > two kinds of stamps exist. The one where the
> > message is late and the stamp indicates when it
> > was received (e.g. on a physical input). And the one
> > where the stamp is in the future indicating when it
> > is to be transmitted (e.g. on a physical output).
> 
> In the Media Kit, absolutely! In the MIDI Kit, there
> was no such distinction. I don't recall how captured
> MIDI events were stamped (test it yourself!), but most
> stamps were of the "future" variety. Actually, most of
> the code I wrote sent everything "now," so the stamps
> were basically irrelevant--the events got performed as
> soon as they were received!

I guess what I wanted to say then is that the usage of timestamps in the
midi2 kit isn't as good as it could be and certainly should have been
documented. IIRC the standard BeOS output drivers do use the
timestamps to schedule the messages, but scheduling far into the future
will delay following messages from all sources (I may be wrong...)
effectively rendering the use of timestamps useless.

--martijn






Other related posts: