To overcome these disadvantages ALSA will bring a new architecture for scheduling and dispatching MIDI and MIDI oriented events within the Linux sound driver. Note that this is still in the brainstorming phase, and has yet to be developed.
Some of the ideas presented here are inspired by the MidiShare "MIDI operating system", which exists for Apple mac's.
This new sequencer is intended as a replacement for /dev/music and /dev/sequencer. For compatibility with older applications these old interfaces can be emulated if needed.
Highlights:
Support for multiple in-depended event queues. Each event queue can have it's own tempo.
Supports multiple concurrent clients, both in user-land and in kernel space.
Kernel space clients can be loaded as modules.
The sequencer takes care of dispatching and routing of events, any client can send messages to any other client or broadcast the message to all clients that want to receive that message. The sequencer basicly handles all the 'inter client communications'.
Super fast event routing in case of messaging between kernel module clients.
Events can be inserted into the queue in arbitrary order, the sequencer uses a priority queue to make sure events are dequeued in the right order.
This is only a sequencer framework, all I/O and intelligent processing (eg. MIDI, synth) has to be performed by clients. There's nothing but clients.
Processing of high-level MIDI oriented messages: note on at timestamp xxx, control change at timestamp xxx.
Event queues can accept both timestamps in us and timestamps in tick.
The sequencer handles tempo changes and supports synchronization, both as master and as slave.