On Thu, 03 Jan 2002 14:24:19 -0500
Paul Davis <[EMAIL PROTECTED]> wrote:

> nice idea from a user-space perspective erik, but this doesn't take
> into account the whole picture here. if the information is being
> distributed to actual physical MIDI ports, then there needs to be
> something that takes the message from the queue and delivers it to the
> port's low level device driver. the code that does this would have to
> be in the kernel, 

My idea was that the Midi Mapper was actually a userspace daemon. User
space process connect to the daemon with a library.

> where the semantics of sysv message queues don't
> exist (since the API is for user space). 
> 
> besides, under POSIX, read(2) and write(2) are also atomic, 

Yes, but open() will not allow more than one program to open a device. That
along with the multiplexing issues is why I was looking at message queues.

> and finally, its not the right answer anyway because of MIDI running
> status. note on/off messages are not always 3 bytes because of this
> feature. 

I hadn't actually thought of this but it shouldn't be a problem. The running
status messages are all on the physical layer and the daemon could simply 
translate back an forth between wire format and format used by the user space 
library.

> moreover, there are several single byte MIDI "real time"
> messages that can arrive at any time, even in the middle of a non-real
> time MIDI message. 

Sorry, I'm not aware of these. Any more info? I do know of running status
bytes but they seem to be filtered by the device driver.

> this means that defining "a complete midi message"
> is much more complex than you are suggesting.
> 
> the MIDI specification includes a classic flow chart for a MIDI
> parser, and if you become familiar with it (alas, its not online), 

Bummer!

> it can be seen that there are no short circuits around the "wire" level
> of the MIDI protocol.

I'm still not totally convinced. By imposing certain small restrictions
on what is allowed, this should still be possible.

Erk
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
Laws of Thermodynamics:
1) You cannot win.
2) You cannot break even.
3) You cannot get out of the game.

Reply via email to