native_midi_gpl/awe_voice.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 13 Feb 2002 19:07:39 +0000
changeset 160 c62666b42573
permissions -rw-r--r--
Peter Kutak - Wed Feb 13 10:26:57 PST 2002
* Added native midi support on Linux, using GPL code
--enable-music-native-midi-gpl
     1 /*
     2  * sound/awe_voice.h
     3  *
     4  * Voice information definitions for the low level driver for the 
     5  * AWE32/Sound Blaster 32 wave table synth.
     6  *   version 0.4.2c; Oct. 7, 1997
     7  *
     8  * Copyright (C) 1996,1997 Takashi Iwai
     9  *
    10  * This program is free software; you can redistribute it and/or modify
    11  * it under the terms of the GNU General Public License as published by
    12  * the Free Software Foundation; either version 2 of the License, or
    13  * (at your option) any later version.
    14  *
    15  * This program is distributed in the hope that it will be useful,
    16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    18  * GNU General Public License for more details.
    19  *
    20  * You should have received a copy of the GNU General Public License
    21  * along with this program; if not, write to the Free Software
    22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    23  */
    24 
    25 #ifndef AWE_VOICE_H
    26 #define AWE_VOICE_H
    27 
    28 #ifndef SAMPLE_TYPE_AWE32
    29 #define SAMPLE_TYPE_AWE32	0x20
    30 #endif
    31 
    32 #ifndef _PATCHKEY
    33 #define _PATCHKEY(id) ((id<<8)|0xfd)
    34 #endif
    35 
    36 /*----------------------------------------------------------------
    37  * patch information record
    38  *----------------------------------------------------------------*/
    39 
    40 /* patch interface header: 16 bytes */
    41 typedef struct awe_patch_info {
    42 	short key;			/* use AWE_PATCH here */
    43 #define AWE_PATCH	_PATCHKEY(0x07)
    44 
    45 	short device_no;		/* synthesizer number */
    46 	unsigned short sf_id;		/* file id (should be zero) */
    47 	short optarg;			/* optional argument */
    48 	int len;			/* data length (without this header) */
    49 
    50 	short type;			/* patch operation type */
    51 #define AWE_LOAD_INFO		0	/* awe_voice_rec */
    52 #define AWE_LOAD_DATA		1	/* awe_sample_info */
    53 #define AWE_OPEN_PATCH		2	/* awe_open_parm */
    54 #define AWE_CLOSE_PATCH		3	/* none */
    55 #define AWE_UNLOAD_PATCH	4	/* none */
    56 #define AWE_REPLACE_DATA	5	/* awe_sample_info (optarg=#channels)*/
    57 #define AWE_MAP_PRESET		6	/* awe_voice_map */
    58 #define AWE_LOAD_CHORUS_FX	0x10	/* awe_chorus_fx_rec (optarg=mode) */
    59 #define AWE_LOAD_REVERB_FX	0x11	/* awe_reverb_fx_rec (optarg=mode) */
    60 
    61 	short reserved;			/* word alignment data */
    62 
    63 	/* the actual patch data begins after this */
    64 #if defined(AWE_COMPAT_030) && AWE_COMPAT_030
    65 	char data[0];
    66 #endif
    67 } awe_patch_info;
    68 
    69 /*#define AWE_PATCH_INFO_SIZE	16*/
    70 #define AWE_PATCH_INFO_SIZE	sizeof(awe_patch_info)
    71 
    72 
    73 /*----------------------------------------------------------------
    74  * open patch
    75  *----------------------------------------------------------------*/
    76 
    77 #define AWE_PATCH_NAME_LEN	32
    78 
    79 typedef struct _awe_open_parm {
    80 	unsigned short type;		/* sample type */
    81 #define AWE_PAT_TYPE_MISC	0
    82 #define AWE_PAT_TYPE_GM		1
    83 #define AWE_PAT_TYPE_GS		2
    84 #define AWE_PAT_TYPE_MT32	3
    85 #define AWE_PAT_TYPE_XG		4
    86 #define AWE_PAT_TYPE_SFX	5
    87 #define AWE_PAT_TYPE_GUS	6
    88 #define AWE_PAT_TYPE_MAP	7
    89 
    90 #define AWE_PAT_LOCKED		0x100	/* lock the samples */
    91 
    92 	short reserved;
    93 	char name[AWE_PATCH_NAME_LEN];
    94 } awe_open_parm;
    95 
    96 /*#define AWE_OPEN_PARM_SIZE	28*/
    97 #define AWE_OPEN_PARM_SIZE	sizeof(awe_open_parm)
    98 
    99 
   100 /*----------------------------------------------------------------
   101  * raw voice information record
   102  *----------------------------------------------------------------*/
   103 
   104 /* wave table envelope & effect parameters to control EMU8000 */
   105 typedef struct _awe_voice_parm {
   106 	unsigned short moddelay;	/* modulation delay (0x8000) */
   107 	unsigned short modatkhld;	/* modulation attack & hold time (0x7f7f) */
   108 	unsigned short moddcysus;	/* modulation decay & sustain (0x7f7f) */
   109 	unsigned short modrelease;	/* modulation release time (0x807f) */
   110 	short modkeyhold, modkeydecay;	/* envelope change per key (not used) */
   111 	unsigned short voldelay;	/* volume delay (0x8000) */
   112 	unsigned short volatkhld;	/* volume attack & hold time (0x7f7f) */
   113 	unsigned short voldcysus;	/* volume decay & sustain (0x7f7f) */
   114 	unsigned short volrelease;	/* volume release time (0x807f) */
   115 	short volkeyhold, volkeydecay;	/* envelope change per key (not used) */
   116 	unsigned short lfo1delay;	/* LFO1 delay (0x8000) */
   117 	unsigned short lfo2delay;	/* LFO2 delay (0x8000) */
   118 	unsigned short pefe;		/* modulation pitch & cutoff (0x0000) */
   119 	unsigned short fmmod;		/* LFO1 pitch & cutoff (0x0000) */
   120 	unsigned short tremfrq;		/* LFO1 volume & freq (0x0000) */
   121 	unsigned short fm2frq2;		/* LFO2 pitch & freq (0x0000) */
   122 	unsigned char cutoff;		/* initial cutoff (0xff) */
   123 	unsigned char filterQ;		/* initial filter Q [0-15] (0x0) */
   124 	unsigned char chorus;		/* chorus send (0x00) */
   125 	unsigned char reverb;		/* reverb send (0x00) */
   126 	unsigned short reserved[4];	/* not used */
   127 } awe_voice_parm;
   128 
   129 #define AWE_VOICE_PARM_SIZE	48
   130 
   131 
   132 /* wave table parameters: 92 bytes */
   133 typedef struct _awe_voice_info {
   134 	unsigned short sf_id;		/* file id (should be zero) */
   135 	unsigned short sample;		/* sample id */
   136 	int start, end;			/* sample offset correction */
   137 	int loopstart, loopend;		/* loop offset correction */
   138 	short rate_offset;		/* sample rate pitch offset */
   139 	unsigned short mode;		/* sample mode */
   140 #define AWE_MODE_ROMSOUND		0x8000
   141 #define AWE_MODE_STEREO			1
   142 #define AWE_MODE_LOOPING		2
   143 #define AWE_MODE_NORELEASE		4	/* obsolete */
   144 #define AWE_MODE_INIT_PARM		8
   145 
   146 	short root;			/* midi root key */
   147 	short tune;			/* pitch tuning (in cents) */
   148 	char low, high;			/* key note range */
   149 	char vellow, velhigh;		/* velocity range */
   150 	char fixkey, fixvel;		/* fixed key, velocity */
   151 	char pan, fixpan;		/* panning, fixed panning */
   152 	short exclusiveClass;		/* exclusive class (0 = none) */
   153 	unsigned char amplitude;	/* sample volume (127 max) */
   154 	unsigned char attenuation;	/* attenuation (0.375dB) */
   155 	short scaleTuning;		/* pitch scale tuning(%), normally 100 */
   156 	awe_voice_parm parm;		/* voice envelope parameters */
   157 	short index;			/* internal index (set by driver) */
   158 } awe_voice_info;
   159 
   160 /*#define AWE_VOICE_INFO_SIZE	92*/
   161 #define AWE_VOICE_INFO_SIZE	sizeof(awe_voice_info)
   162 
   163 /*----------------------------------------------------------------*/
   164 
   165 /* The info entry of awe_voice_rec is changed from 0 to 1
   166  * for some compilers refusing zero size array.
   167  * Due to this change, sizeof(awe_voice_rec) becomes different
   168  * from older versions.
   169  * Use AWE_VOICE_REC_SIZE instead.
   170  */
   171 
   172 /* instrument info header: 4 bytes */
   173 typedef struct _awe_voice_rec_hdr {
   174 	unsigned char bank;		/* midi bank number */
   175 	unsigned char instr;		/* midi preset number */
   176 	char nvoices;			/* number of voices */
   177 	char write_mode;		/* write mode; normally 0 */
   178 #define AWE_WR_APPEND		0	/* append anyway */
   179 #define AWE_WR_EXCLUSIVE	1	/* skip if already exists */
   180 #define AWE_WR_REPLACE		2	/* replace if already exists */
   181 } awe_voice_rec_hdr;
   182 
   183 /*#define AWE_VOICE_REC_SIZE	4*/
   184 #define AWE_VOICE_REC_SIZE	sizeof(awe_voice_rec_hdr)
   185 
   186 /* the standard patch structure for one sample */
   187 typedef struct _awe_voice_rec_patch {
   188 	awe_patch_info		patch;
   189 	awe_voice_rec_hdr	hdr;
   190 	awe_voice_info		info;
   191 } awe_voice_rec_patch;
   192 
   193 
   194 /* obsolete data type */
   195 #if defined(AWE_COMPAT_030) && AWE_COMPAT_030
   196 #define AWE_INFOARRAY_SIZE	0
   197 #else
   198 #define AWE_INFOARRAY_SIZE	1
   199 #endif
   200 
   201 typedef struct _awe_voice_rec {
   202 	unsigned char bank;		/* midi bank number */
   203 	unsigned char instr;		/* midi preset number */
   204 	short nvoices;			/* number of voices */
   205 	/* voice information follows here */
   206 	awe_voice_info info[AWE_INFOARRAY_SIZE];
   207 } awe_voice_rec;
   208 
   209 
   210 /*----------------------------------------------------------------
   211  * sample wave information
   212  *----------------------------------------------------------------*/
   213 
   214 /* wave table sample header: 32 bytes */
   215 typedef struct awe_sample_info {
   216 	unsigned short sf_id;		/* file id (should be zero) */
   217 	unsigned short sample;		/* sample id */
   218 	int start, end;			/* start & end offset */
   219 	int loopstart, loopend;		/* loop start & end offset */
   220 	int size;			/* size (0 = ROM) */
   221 	short checksum_flag;		/* use check sum = 1 */
   222 	unsigned short mode_flags;	/* mode flags */
   223 #define AWE_SAMPLE_8BITS	1	/* wave data is 8bits */
   224 #define AWE_SAMPLE_UNSIGNED	2	/* wave data is unsigned */
   225 #define AWE_SAMPLE_NO_BLANK	4	/* no blank loop is attached */
   226 #define AWE_SAMPLE_SINGLESHOT	8	/* single-shot w/o loop */
   227 #define AWE_SAMPLE_BIDIR_LOOP	16	/* bidirectional looping */
   228 #define AWE_SAMPLE_STEREO_LEFT	32	/* stereo left sound */
   229 #define AWE_SAMPLE_STEREO_RIGHT	64	/* stereo right sound */
   230 #define AWE_SAMPLE_REVERSE_LOOP 128	/* reverse looping */
   231 	unsigned int checksum;		/* check sum */
   232 #if defined(AWE_COMPAT_030) && AWE_COMPAT_030
   233 	unsigned short data[0];		/* sample data follows here */
   234 #endif
   235 } awe_sample_info;
   236 
   237 /*#define AWE_SAMPLE_INFO_SIZE	32*/
   238 #define AWE_SAMPLE_INFO_SIZE	sizeof(awe_sample_info)
   239 
   240 
   241 /*----------------------------------------------------------------
   242  * voice preset mapping
   243  *----------------------------------------------------------------*/
   244 
   245 typedef struct awe_voice_map {
   246 	int map_bank, map_instr, map_key;	/* key = -1 means all keys */
   247 	int src_bank, src_instr, src_key;
   248 } awe_voice_map;
   249 
   250 #define AWE_VOICE_MAP_SIZE	sizeof(awe_voice_map)
   251 
   252 
   253 /*----------------------------------------------------------------
   254  * awe hardware controls
   255  *----------------------------------------------------------------*/
   256 
   257 #define _AWE_DEBUG_MODE			0x00
   258 #define _AWE_REVERB_MODE		0x01
   259 #define _AWE_CHORUS_MODE		0x02
   260 #define _AWE_REMOVE_LAST_SAMPLES	0x03
   261 #define _AWE_INITIALIZE_CHIP		0x04
   262 #define _AWE_SEND_EFFECT		0x05
   263 #define _AWE_TERMINATE_CHANNEL		0x06
   264 #define _AWE_TERMINATE_ALL		0x07
   265 #define _AWE_INITIAL_VOLUME		0x08
   266 #define _AWE_INITIAL_ATTEN	_AWE_INITIAL_VOLUME
   267 #define _AWE_RESET_CHANNEL		0x09
   268 #define _AWE_CHANNEL_MODE		0x0a
   269 #define _AWE_DRUM_CHANNELS		0x0b
   270 #define _AWE_MISC_MODE			0x0c
   271 #define _AWE_RELEASE_ALL		0x0d
   272 #define _AWE_NOTEOFF_ALL		0x0e
   273 #define _AWE_CHN_PRESSURE		0x0f
   274 /*#define _AWE_GET_CURRENT_MODE		0x10*/
   275 #define _AWE_EQUALIZER			0x11
   276 /*#define _AWE_GET_MISC_MODE		0x12*/
   277 /*#define _AWE_GET_FONTINFO		0x13*/
   278 
   279 #define _AWE_MODE_FLAG			0x80
   280 #define _AWE_COOKED_FLAG		0x40	/* not supported */
   281 #define _AWE_MODE_VALUE_MASK		0x3F
   282 
   283 /*----------------------------------------------------------------*/
   284 
   285 #define _AWE_SET_CMD(p,dev,voice,cmd,p1,p2) \
   286 {((char*)(p))[0] = SEQ_PRIVATE;\
   287  ((char*)(p))[1] = dev;\
   288  ((char*)(p))[2] = _AWE_MODE_FLAG|(cmd);\
   289  ((char*)(p))[3] = voice;\
   290  ((unsigned short*)(p))[2] = p1;\
   291  ((unsigned short*)(p))[3] = p2;}
   292 
   293 /* buffered access */
   294 #define _AWE_CMD(dev, voice, cmd, p1, p2) \
   295 {_SEQ_NEEDBUF(8);\
   296  _AWE_SET_CMD(_seqbuf + _seqbufptr, dev, voice, cmd, p1, p2);\
   297  _SEQ_ADVBUF(8);}
   298 
   299 /* direct access */
   300 #define _AWE_CMD_NOW(seqfd,dev,voice,cmd,p1,p2) \
   301 {struct seq_event_rec tmp;\
   302  _AWE_SET_CMD(&tmp, dev, voice, cmd, p1, p2);\
   303  ioctl(seqfd, SNDCTL_SEQ_OUTOFBAND, &tmp);}
   304 
   305 /*----------------------------------------------------------------*/
   306 
   307 /* set debugging mode */
   308 #define AWE_DEBUG_MODE(dev,p1)	_AWE_CMD(dev, 0, _AWE_DEBUG_MODE, p1, 0)
   309 /* set reverb mode; from 0 to 7 */
   310 #define AWE_REVERB_MODE(dev,p1)	_AWE_CMD(dev, 0, _AWE_REVERB_MODE, p1, 0)
   311 /* set chorus mode; from 0 to 7 */
   312 #define AWE_CHORUS_MODE(dev,p1)	_AWE_CMD(dev, 0, _AWE_CHORUS_MODE, p1, 0)
   313 
   314 /* reset channel */
   315 #define AWE_RESET_CHANNEL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 0, 0)
   316 #define AWE_RESET_CONTROL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 1, 0)
   317 
   318 /* send an effect to all layers */
   319 #define AWE_SEND_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,type,value)
   320 #define AWE_ADD_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x80),value)
   321 #define AWE_UNSET_EFFECT(dev,voice,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x40),0)
   322 /* send an effect to a layer */
   323 #define AWE_SEND_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)),value)
   324 #define AWE_ADD_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x80),value)
   325 #define AWE_UNSET_LAYER_EFFECT(dev,voice,layer,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x40),0)
   326 
   327 /* terminate sound on the channel/voice */
   328 #define AWE_TERMINATE_CHANNEL(dev,voice) _AWE_CMD(dev,voice,_AWE_TERMINATE_CHANNEL,0,0)
   329 /* terminate all sounds */
   330 #define AWE_TERMINATE_ALL(dev) _AWE_CMD(dev, 0, _AWE_TERMINATE_ALL, 0, 0)
   331 /* release all sounds (w/o sustain effect) */
   332 #define AWE_RELEASE_ALL(dev) _AWE_CMD(dev, 0, _AWE_RELEASE_ALL, 0, 0)
   333 /* note off all sounds (w sustain effect) */
   334 #define AWE_NOTEOFF_ALL(dev) _AWE_CMD(dev, 0, _AWE_NOTEOFF_ALL, 0, 0)
   335 
   336 /* set initial attenuation */
   337 #define AWE_INITIAL_VOLUME(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 0)
   338 #define AWE_INITIAL_ATTEN  AWE_INITIAL_VOLUME
   339 /* relative attenuation */
   340 #define AWE_SET_ATTEN(dev,atten)  _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 1)
   341 
   342 /* set channel playing mode; mode=0/1/2 */
   343 #define AWE_SET_CHANNEL_MODE(dev,mode) _AWE_CMD(dev, 0, _AWE_CHANNEL_MODE, mode, 0)
   344 #define AWE_PLAY_INDIRECT	0	/* indirect voice mode (default) */
   345 #define AWE_PLAY_MULTI		1	/* multi note voice mode */
   346 #define AWE_PLAY_DIRECT		2	/* direct single voice mode */
   347 #define AWE_PLAY_MULTI2		3	/* sequencer2 mode; used internally */
   348 
   349 /* set drum channel mask; channels is 32bit long value */
   350 #define AWE_DRUM_CHANNELS(dev,channels) _AWE_CMD(dev, 0, _AWE_DRUM_CHANNELS, ((channels) & 0xffff), ((channels) >> 16))
   351 
   352 /* set bass and treble control; values are from 0 to 11 */
   353 #define AWE_EQUALIZER(dev,bass,treble) _AWE_CMD(dev, 0, _AWE_EQUALIZER, bass, treble)
   354 
   355 /* remove last loaded samples */
   356 #define AWE_REMOVE_LAST_SAMPLES(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_REMOVE_LAST_SAMPLES, 0, 0)
   357 /* initialize emu8000 chip */
   358 #define AWE_INITIALIZE_CHIP(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_INITIALIZE_CHIP, 0, 0)
   359 
   360 /* set miscellaneous modes; meta command */
   361 #define AWE_MISC_MODE(dev,mode,value) _AWE_CMD(dev, 0, _AWE_MISC_MODE, mode, value)
   362 /* exclusive sound off; 1=off */
   363 #define AWE_EXCLUSIVE_SOUND(dev,mode) AWE_MISC_MODE(dev,AWE_MD_EXCLUSIVE_SOUND,mode)
   364 /* default GUS bank number */
   365 #define AWE_SET_GUS_BANK(dev,bank) AWE_MISC_MODE(dev,AWE_MD_GUS_BANK,bank)
   366 /* change panning position in realtime; 0=don't 1=do */
   367 #define AWE_REALTIME_PAN(dev,mode) AWE_MISC_MODE(dev,AWE_MD_REALTIME_PAN,mode)
   368 
   369 /* extended pressure controls; not portable with other sound drivers */
   370 #define AWE_KEY_PRESSURE(dev,ch,note,vel) SEQ_START_NOTE(dev,ch,(note)+128,vel)
   371 #define AWE_CHN_PRESSURE(dev,ch,vel) _AWE_CMD(dev,ch,_AWE_CHN_PRESSURE,vel,0)
   372 
   373 /*----------------------------------------------------------------*/
   374 
   375 /* reverb mode parameters */
   376 #define	AWE_REVERB_ROOM1	0
   377 #define AWE_REVERB_ROOM2	1
   378 #define	AWE_REVERB_ROOM3	2
   379 #define	AWE_REVERB_HALL1	3
   380 #define	AWE_REVERB_HALL2	4
   381 #define	AWE_REVERB_PLATE	5
   382 #define	AWE_REVERB_DELAY	6
   383 #define	AWE_REVERB_PANNINGDELAY 7
   384 #define AWE_REVERB_PREDEFINED	8
   385 /* user can define reverb modes up to 32 */
   386 #define AWE_REVERB_NUMBERS	32
   387 
   388 typedef struct awe_reverb_fx_rec {
   389 	unsigned short parms[28];
   390 } awe_reverb_fx_rec;
   391 
   392 /*----------------------------------------------------------------*/
   393 
   394 /* chorus mode parameters */
   395 #define AWE_CHORUS_1		0
   396 #define	AWE_CHORUS_2		1
   397 #define	AWE_CHORUS_3		2
   398 #define	AWE_CHORUS_4		3
   399 #define	AWE_CHORUS_FEEDBACK	4
   400 #define	AWE_CHORUS_FLANGER	5
   401 #define	AWE_CHORUS_SHORTDELAY	6
   402 #define	AWE_CHORUS_SHORTDELAY2	7
   403 #define AWE_CHORUS_PREDEFINED	8
   404 /* user can define chorus modes up to 32 */
   405 #define AWE_CHORUS_NUMBERS	32
   406 
   407 typedef struct awe_chorus_fx_rec {
   408 	unsigned short feedback;	/* feedback level (0xE600-0xE6FF) */
   409 	unsigned short delay_offset;	/* delay (0-0x0DA3) [1/44100 sec] */
   410 	unsigned short lfo_depth;	/* LFO depth (0xBC00-0xBCFF) */
   411 	unsigned int delay;	/* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
   412 	unsigned int lfo_freq;		/* LFO freq LFO freq (0-0xFFFFFFFF) */
   413 } awe_chorus_fx_rec;
   414 
   415 /*----------------------------------------------------------------*/
   416 
   417 /* misc mode types */
   418 enum {
   419 /* 0*/	AWE_MD_EXCLUSIVE_OFF,	/* obsolete */
   420 /* 1*/	AWE_MD_EXCLUSIVE_ON,	/* obsolete */
   421 /* 2*/	AWE_MD_VERSION,		/* read only */
   422 /* 3*/	AWE_MD_EXCLUSIVE_SOUND,	/* ignored */
   423 /* 4*/	AWE_MD_REALTIME_PAN,	/* 0/1: do realtime pan change (default=1) */
   424 /* 5*/	AWE_MD_GUS_BANK,	/* bank number for GUS patches (default=0) */
   425 /* 6*/	AWE_MD_KEEP_EFFECT,	/* 0/1: keep effect values, (default=0) */
   426 /* 7*/	AWE_MD_ZERO_ATTEN,	/* attenuation of max volume (default=32) */
   427 /* 8*/	AWE_MD_CHN_PRIOR,	/* 0/1: set MIDI channel priority mode (default=1) */
   428 /* 9*/	AWE_MD_MOD_SENSE,	/* integer: modwheel sensitivity (def=18) */
   429 /*10*/	AWE_MD_DEF_PRESET,	/* integer: default preset number (def=0) */
   430 /*11*/	AWE_MD_DEF_BANK,	/* integer: default bank number (def=0) */
   431 /*12*/	AWE_MD_DEF_DRUM,	/* integer: default drumset number (def=0) */
   432 /*13*/	AWE_MD_TOGGLE_DRUM_BANK, /* 0/1: toggle drum flag with bank# (def=0) */
   433 	AWE_MD_END,
   434 };
   435 
   436 /*----------------------------------------------------------------*/
   437 
   438 /* effect parameters */
   439 enum {
   440 
   441 /* modulation envelope parameters */
   442 /* 0*/	AWE_FX_ENV1_DELAY,	/* WORD: ENVVAL */
   443 /* 1*/	AWE_FX_ENV1_ATTACK,	/* BYTE: up ATKHLD */
   444 /* 2*/	AWE_FX_ENV1_HOLD,	/* BYTE: lw ATKHLD */
   445 /* 3*/	AWE_FX_ENV1_DECAY,	/* BYTE: lw DCYSUS */
   446 /* 4*/	AWE_FX_ENV1_RELEASE,	/* BYTE: lw DCYSUS */
   447 /* 5*/	AWE_FX_ENV1_SUSTAIN,	/* BYTE: up DCYSUS */
   448 /* 6*/	AWE_FX_ENV1_PITCH,	/* BYTE: up PEFE */
   449 /* 7*/	AWE_FX_ENV1_CUTOFF,	/* BYTE: lw PEFE */
   450 
   451 /* volume envelope parameters */
   452 /* 8*/	AWE_FX_ENV2_DELAY,	/* WORD: ENVVOL */
   453 /* 9*/	AWE_FX_ENV2_ATTACK,	/* BYTE: up ATKHLDV */
   454 /*10*/	AWE_FX_ENV2_HOLD,	/* BYTE: lw ATKHLDV */
   455 /*11*/	AWE_FX_ENV2_DECAY,	/* BYTE: lw DCYSUSV */
   456 /*12*/	AWE_FX_ENV2_RELEASE,	/* BYTE: lw DCYSUSV */
   457 /*13*/	AWE_FX_ENV2_SUSTAIN,	/* BYTE: up DCYSUSV */
   458 	
   459 /* LFO1 (tremolo & vibrato) parameters */
   460 /*14*/	AWE_FX_LFO1_DELAY,	/* WORD: LFO1VAL */
   461 /*15*/	AWE_FX_LFO1_FREQ,	/* BYTE: lo TREMFRQ */
   462 /*16*/	AWE_FX_LFO1_VOLUME,	/* BYTE: up TREMFRQ */
   463 /*17*/	AWE_FX_LFO1_PITCH,	/* BYTE: up FMMOD */
   464 /*18*/	AWE_FX_LFO1_CUTOFF,	/* BYTE: lo FMMOD */
   465 
   466 /* LFO2 (vibrato) parameters */
   467 /*19*/	AWE_FX_LFO2_DELAY,	/* WORD: LFO2VAL */
   468 /*20*/	AWE_FX_LFO2_FREQ,	/* BYTE: lo FM2FRQ2 */
   469 /*21*/	AWE_FX_LFO2_PITCH,	/* BYTE: up FM2FRQ2 */
   470 
   471 /* Other overall effect parameters */
   472 /*22*/	AWE_FX_INIT_PITCH,	/* SHORT: pitch offset */
   473 /*23*/	AWE_FX_CHORUS,		/* BYTE: chorus effects send (0-255) */
   474 /*24*/	AWE_FX_REVERB,		/* BYTE: reverb effects send (0-255) */
   475 /*25*/	AWE_FX_CUTOFF,		/* BYTE: up IFATN */
   476 /*26*/	AWE_FX_FILTERQ,		/* BYTE: up CCCA */
   477 
   478 /* Sample / loop offset changes */
   479 /*27*/	AWE_FX_SAMPLE_START,	/* SHORT: offset */
   480 /*28*/	AWE_FX_LOOP_START,	/* SHORT: offset */
   481 /*29*/	AWE_FX_LOOP_END,	/* SHORT: offset */
   482 /*30*/	AWE_FX_COARSE_SAMPLE_START,	/* SHORT: upper word offset */
   483 /*31*/	AWE_FX_COARSE_LOOP_START,	/* SHORT: upper word offset */
   484 /*32*/	AWE_FX_COARSE_LOOP_END,		/* SHORT: upper word offset */
   485 /*33*/	AWE_FX_ATTEN,		/* BYTE: lo IFATN */
   486 
   487 	AWE_FX_END,
   488 };
   489 
   490 #endif /* AWE_VOICE_H */