From alsa-devel-owner@alsa.jcu.cz  Wed Feb 24 16:04:36 1999
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id PAA21583;
	Wed, 24 Feb 1999 15:59:51 +0100
Date: Wed, 24 Feb 1999 15:59:51 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Takashi Iwai <iwai@ww.uni-erlangen.de>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: Instrument abstract layer
In-Reply-To: <9902241330.AA26553@servww1.ww.uni-erlangen.de>
Message-ID: <Pine.LNX.3.96.990224150507.3592D-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Wed, 24 Feb 1999, Takashi Iwai wrote:

> > OK, we are moving the discussion to another theme. I don't want discuss
> > thing about the GS/XG/GM emulations. I need only to confirm if the
> > instrument identifier contains all necessary information for an emulation
> > implementation.
> 
> OK, I was concerned only about the thing above.
> No problem except for it.

I'm not still satisfied with the explanation. Maybe the problem is that we
are discussing things about MIDI, but the instrument interface isn't
designed only for MIDI.

You are talking about separated instrument number and key pair. Can you
tell me what means the instrument number in this case? This is some
sort of the internal number stored in the specific instrument format? 
How is addressed from standard MIDI/GS/XG events? Isn't this information
needless?

OK. I'll try draft usage of current variables for MIDI emulation (maybe
this could be the begin of the emulation proposal):

	unsigned short bank;
	unsigned short prg;

GM
--
bank = (BANK_MSB << 8) | BANK_LSB
prg = 0 .. 127 [melodic]
or prg = 128 (key 0) .. 255 (key 127)

The instrument selection algorithm (if the original instrument cannot be
found): Try the bank 0.

GS
--
bank = (BANK_MSB << 8) | BANK_LSB
prg = 0 .. 127 [melodic]
or prg = (128 (key 0) .. 255 (key 127)) | (PROGRAM_CHANGE << 8)

Algorithm:

1) try PROGRAM_CHANGE = 0
2) try bank = 0
3) try PROGRAM_CHANGE = 0 and bank = 0

XG
--
???? I don't know more details about this format.

							Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic





