From alsa-devel-owner@alsa.jcu.cz  Mon May 11 12:48:14 1998
Received: from pat.bath.ac.uk (qmailr@pat.bath.ac.uk [138.38.32.2])
	by marvin.jcu.cz (8.8.8/8.8.8) with SMTP id MAA29764
	for <alsa-devel@jcu.cz>; Mon, 11 May 1998 12:48:01 +0200
Received: (qmail 15510 invoked from network); 11 May 1998 10:47:57 -0000
Received: from solomon.bath.ac.uk (HELO bath.ac.uk) (mmdf@138.38.32.1)
  by pat.bath.ac.uk with SMTP; 11 May 1998 10:47:57 -0000
Received: from tobi.bath.ac.uk by solomon.bath.ac.uk id aa16872;
          11 May 98 11:47 BST
Message-ID: <3556D742.31DF@bath.ac.uk>
Date: Mon, 11 May 1998 11:47:30 +0100
From: "P.J.Leonard" <P.J.Leonard@bath.ac.uk>
MIME-Version: 1.0
To: alsa-devel@jcu.cz
Subject: Re: New Sequencer core
References: <199805082125.XAA05203@obelix.fvdpol.inter.nl.net>
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:
> 
> P.J.Leonard wrote:
> >
> >  I was doing some work on my sequencer over the weekend. I was wondering
> > what the best
> > way to organise the allocation of voices:
> >
> > In my scheme of things a Voice has a table of effects which implements
> > the interface to a given
> > device. A voice also has an lookup table which maps midi input events
> > onto these effects.
> > However this is not really anything to do with my querry.
> >
> >  Plan.
> >
> >  A singleton VoiceManager provides the high level interface.
> >
> >  An application requests a voice using the folling infomation.
> >
> >
> > SYNTHTYPE:VOICETYPE:patchname:id
> >
> > e.g
> >
> >  AWE32:VOICE:piano2:1
> >
> >  *:VOICE:harp:2
> >
> >  GUS:DRUM:jazz:1
> >
> >
> > explination:
> >
> >  - SYNTHTYPE  is the synth type the voice manager will attempt to
> > allocate a voice on the requested
> >               device. Otherwise ?
> >
> >  - VOICETYPE  the type of channel required. This is a normal voice of
> > drum. Maybe polyphonic or mono ?
> >
> >  - patchname  name of the patch (for example GM). It could also be A
> > program id + bank id ?
> >               it could also be a traditional midi port and channel.
> >
> >  - id         two or more tracks may want to share the same voice
> > channel. e.g. splitting the drum track
> >               into snare/ high hat etc. If you want to share a channel
> > you use the same id. If you want
> >               to use the patch but have a different channel you would
> > use 2 distinct ids.
> >
> >
> >  Note that a wild "*" flag could be used if we don't care.
> >
> >  I was going to code this up in a string ?
> >
> >  The voice manager has the task of returning a reference to a voice when
> > given a string. YOu can also free
> > voices (the voice manager can reference count if it is owned by more
> > than one).
> 
> I'm not sure I understand your plan.
> 
> Did I read correctly that the voice allocation is completely done by your
> app? If so, than it looks more like a MOD player.

 The Voice Manager provides an interface between the application and
allocation of voices.

> Is is possible to use another SYNTHTYPE? Can one also use an externaly
> connected synth, or it it AWE32 only?

 The voice manager will provide a list of devices for the use of the
application.
You can select __any__ device by using it's name in the synth type field
of a voice
request. 

 Was voice the wrong name for this ?  A voice in my terms is a device
channel + some
mapping of input events.

> >  Hmmmm, I am not so happy about all this. But I am not happy with the
> > midi port + channel stuff because
> > in my opinion it sucks. If you want a drum channel you use channel 10
> > (OR is it 16). The AWE32 driver
> > supports the DRUMS on any channel. This is useful if you want to use a
> > heavy reverb on a snare but leave
> > the rest of the kit dry (impossible if you play the kit using a single
> > channel).
> 
> Having drums at channel 10 (like 'dictated' with general midi) is not a must.
> The extended standards like GS & XG, and all other non GM synths & samplers
> can have the drums on ony channel one wants. The capability of AWE & GUS to
> play drums on every channel _is_ compatible with midi, it's just a matter of
> what standard (if any) to support.
> 
> Typical scenario achieveble with XG synths (and thus also with onboard
> synths if we make'm sort of XG compatible):
>         - drum 1 at midi channel 10 (standard drumkit)
>         - drum 2 at midi channel 11 (909 drumkit)
>         each channel can have it's own drumkit, effect settings.
>         NRPN are provided to set for a drum channel PER NOTE (ie.
>         bassdrum, tom, highhat etc.) certain parameters:
>                 filter cutoff, resonance
>                 attack, decay, release
>                 pitch fine & coarse
>                 level, panning
>                 3x effect send (reverb, chorus, variation)
> 
> quite some knobs to twiddle with...

 A voice will have an associated channel. The channel must be capable of
providing
information about the services available. 

 cheers Paul.

