There exist two type of interfaces for clients: a user-land interface and a kernel mode interface. Which one is to be used depends on the place the client is executing.
Each type has its own strengths and weaknesses:
The kernel client interfaces gives lower latency because it uses direct invocation, and does not have to go though the Unix scheduler.
The user-land client has easier access to resources like memory, networking.
Debugging capabilities are better for user-land stuff. For making it easier to test and debug kernel clients a wrapper can be provided to make the interface to ALSA sequencer the same for both user-land clients and kernel clients.
A user-land client is created at each open() syscall to /dev/snd/seq device. This /dev/sndseq device can be opened r/w by multiple concurrent clients, much like pty's etc. The communication between a user-client and sequencer core is done via read()/write() or ioctl() syscalls just like they used to do with the /dev/music device. The read and write syscalls are used for sending and receiving event packets to/from sequencer. All other controls (e.g. creating/deleting a port, getting/setting client information) are done via ioctl() syscall. Efficient blocking I/O (ie. no polling) can be performed by using the select() call for I/O multiplexing.
The kernel mode clients reside in kernel modules. These can be stand-alone loadable kernel modules, or modules that offer other functionality (eg. MIDI driver, sound card driver).
The module level interface exists of following:
Client can register itself, provide information about itself and it's capabilities to the system by calling a function exported by the sequencer.
Client registers a call-back function that will be called when a event is to be dispatched to the client. This can be called from an interrupt handler. All the call-back function addresses are stored in some sort of a jump table.
The client can call an (exported) function within the sequencer to enqueue a message.
Unregistering also goes by calling unregister function.
Because the events can be dispatched to kernel mode client immediately, this offers possibilities to provide good midi thru and filtering functions.