[linux-audio-dev] ideas for a new MIDI API

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] ideas for a new MIDI API
From: Martijn Sipkema (m.j.w.sipkema_AT_student.tudelft.nl)
Date: Tue Mar 12 2002 - 15:26:58 EET


I'm working on a new low level MIDI API and would like
some comments on the ideas I have for it.

- In contrast to the ALSA RawMidi API, it should not provide
writing/reading raw (unchanged) MIDI data to an interface. Some
interfaces might not support this, e.g MWPP.

- It would allow only one application to have an input or output
open at a time since merging is nontrivial.

- For output there should be 3 modes:
* immediate - Used to send a MIDI command immediately.
* scheduled - Used for having a MIDI command transmitted in
the near future. Events should be scheduled in time order. Not for
long term scheduling.

Both modes should be non-blocking and allow a minimum number
of commands to be queued (128). A command has a maximum
length of 8 bytes (for realtime sysex).

Drop/drain functionality as in ALSA RawMidi is not available since
it might not be supported by all interfaces.

* sysex - For sending large, time uncritical system exclusive messages.

System exclusive messages are sent in segments of a maximum size.
Two functions, one (non-blocking) for adding a segment to the queue,
one for waiting until completion of a segment. This allows for streaming
sysex.

- Input of MIDI messages would be done from a high priority callback
function.

- This should be implemented using IPC.

I'd appreciate any comments on this.

--martijn


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Mar 12 2002 - 15:18:27 EET