From alsa-devel-owner@alsa.jcu.cz  Tue Feb  9 01:24:33 1999
Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id BAA30816
	for <alsa-devel@alsa.jcu.cz>; Tue, 9 Feb 1999 01:22:51 +0100
Received: from [212.238.75.184] (helo=obelix.vande-pol.demon.nl)
	by post.mail.nl.demon.net with esmtp (Exim 2.02 #1)
	id 10A0wy-0000x7-00
	for alsa-devel@alsa.jcu.cz; Tue, 9 Feb 1999 00:22:48 +0000
Received: (from frank@localhost)
	by obelix.vande-pol.demon.nl (8.8.7/8.8.7) id BAA05265
	for alsa-devel@alsa.jcu.cz; Tue, 9 Feb 1999 01:14:11 +0100
From: Frank van de Pol <frank@vande-pol.demon.nl>
Message-Id: <199902090014.BAA05265@obelix.vande-pol.demon.nl>
Subject: MIDI / Sequencer stuff (was:Re: Writing Article Re: Linux audio)
To: alsa-devel@alsa.jcu.cz
Date: Tue, 9 Feb 1999 01:14:10 +0100 (MET)
In-Reply-To: <36BF0DBB.CC2F1E3A@cygnus.com> from "Thomas Hudson" at Feb 8, 99 11:15:55 am
Content-Type: text
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Thomas Hudson wrote:
> 
> 
> > 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.

To keep thinks look like the "midi world" it is best to have ports that
resemble something like the physical midi ports. A port can therefore have
16 channels (for voice messages).

> 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.

If synths are daisy chained, they can either be addressed by distinct
channels, or using sysex. In that case you would send appropriate sysex
strings to that port to program a desired device from your effect gear. If a
simple port naming scheme is used that port could be named "Effects rack".
An ability to name individual channels would help for those who have a setup
with daisy chained devices. 


It will still be very important for an musician to know that devices are
daisy chained to the same midi buss, as sending eg. program changes might
otherwise affect other devices than the one the messages were intented for.
Example: if I send a pgm change to my Bassstation, and my patchbay is not
setup correctly, I also see my reverb unit reacting to those 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.

Looking forward for your implementation / prototype :-)

> 
> > 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. 

Agreed, but still very much work...

> 
> 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. 

In your case I'd recommend to write a (simple) ALSA driver (client) which
provides 8 input ports, and sends events received from these ports to that
"mqx-32 port-2" interface. And have this driver insert sysex once you switch
to another device. This can be done perfectly with the ALSA sequencer in
it's current state.

hope next diagram make the idea clear:


           application sends events to one of these ports:

                              :  
                             +-->----- +
                             |:         |
   |  |  |  |  |  |  |  |    |:    |    |
   V  V  V  V  V  V  V  V    |:    V    V          
   0  1  2  3  4  5  6  7    |:    0    1
      PATCHBAY DRIVER        |:    MQX-32
       (client xxx)          |:  (client yyy) 
             |               |:    |    |
             +---->----------+:    |    |
                              :    |    |
                              :    V    V
                                MIDI MIDI 
                    (devices connected to these midi busses) 


Frank.
   


+---- --- -- -  -   -    - 
|Frank van de Pol                  -o)
|Frank@vande-pol.demon.nl          /\\
|                                 _\_v
|Linux - Why use Windows, since there is a door?
|
|ALSA Sequencer: http://www.vande-pol.demon.nl/alsa/

