From alsa-devel-owner@alsa.jcu.cz  Mon Feb  8 17:16:36 1999
Received: from thudson1.cygnus.com (thudson1.cygnus.com [205.226.144.45])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id RAA26729
	for <alsa-devel@alsa.jcu.cz>; Mon, 8 Feb 1999 17:16:14 +0100
Received: from cygnus.com (thudson@localhost [127.0.0.1])
	by thudson1.cygnus.com (8.8.7/8.8.7) with ESMTP id LAA15393
	for <alsa-devel@alsa.jcu.cz>; Mon, 8 Feb 1999 11:15:55 -0500
Message-ID: <36BF0DBB.CC2F1E3A@cygnus.com>
Date: Mon, 08 Feb 1999 11:15:55 -0500
From: Thomas Hudson <thudson@cygnus.com>
MIME-Version: 1.0
To: alsa-devel@alsa.jcu.cz
Subject: Re: Writing Article Re: Linux audio;  also have new hardware support
References: <199902072353.AAA31288@obelix.vande-pol.demon.nl>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Frank van de Pol wrote:
> Hmmm, can you give me a pointer to this SysEx dev inq. stuff? 

There is not much info online. I have info in a book, and I also
believe it made it into the most recent ('95) MIDI spec. I don't
have the book handy but I can tell you what I remember.

0xF7 0x7E ch 0x06 0xF0  - Device inquiry. 'ch' is not MIDI channel but
actually
supports up to 127 virtual or user-defined channels. Using the value
127 is broadcast, all devices must respond. I will try to find my
book at lunch, I don't remember the details of the response.


> Named devices is not diffictult to realize - ALSA seq already provides a
> name for each port, so instead of name the port just something like 'MPU
> MIDI' it could be named "Ultraproteus". Bingo!
> 
Is a port 16 channels? What about when I have two or more devices
daisy-chained.
I have some synths that only respond on one MIDI channel, so I use a
single
port for multiple synths. In most cases, these are effects devices that
I
only want to send program change or SysEx messages.

> Some utility which can provide patch names (and provide info on what to do
> to select this patch - ie. bank select, pgm change) is indeed very usefull,
> but this would get very very very big as there are many synths around at
> this planet. Some synth specific userland daemon or plugin code which is
> accessible through the alsa-lib might be the way to go.
>
I have been playing with designs for a universal sysex editor plugin.
Perhaps
this plugin should be responsible for giving names. I limited
implementation
might only read this from a file, whereas a full-blown implementation
would
request this info from the device.

> Remember that besides synths that have their sounds in ROM there are also
> more devices that are user programmable, so the available patches depend on
> what kind of banks the user has loaded into that device (eg. Roland D10,
> Kawai K1, Korg M1, various samplers..) If we have this "Synth specific
> daemon" approach, this daemon can (and sometimes even _has_) to take care of
> patch management (downloading patch data / samples to the instrument).
> 
> This 'daemon' approach might be the solution for handling patch loading on
> onboard synths like GUS (and possibly many others) - for these kind of
> devices some daemon is needed anyway (perhaps a userland daemon to support
> the kernel client synth driver).
> 
> Problem is that to get full support for a certain device we need something
> specific (eg. a daemon program) for this device; there are VERY MANY
> devices... So to do this good it would be an absurd amount of work! (Hmmm, I
> get the feeling we are reinventing a wheel....)
> 
I've been trying to design my sysex editor plugin so that a programmer
could decide to implement only a bare minimum, perhaps just "give patch
names" and "set current patch." This way each device handler could be
developed incrementally. Also, if you look at the SysEx implementation
for a particular company, for example Emu, a single plugin would work
for all of their Proteus series, including the Morpheus and quite a few
of their samplers. 

One feature that would nice is the ability of some plugin code to be
statically
registered with a port. For example, in my setup:

mqx-32 port 1   ---> Emu e64 sampler
mqx-32 port 2   ---> MIDI Patch bay  1+--> Roland GR50
                                     2+--> Roland U110
                                     3+--> Emu UltraProteus
                                     4+--> JMP-1 and SE50
                                     5+--> TSR-24
                                     ...
                                     8+--> MOTU Mixer 7s

I want to register ports for all the devices hanging off my patch bay,
but
I need to activate my multiplexer code whenever another application
tries
to connect to these ports. 

Thomas

