Using SB32/64/AWE in OSS
-------------------------

OSS contains support for the Emu 8000 synthesizer chip
used in SB32 and AWE32 cards.

The "autodetection" feature doesn't currently detect ancient non-PnP SB32/AWE
properly (it detects SB16 instead). To get SB32 support working you need to delete
the autodetected (SB16) device and to add the SB32 device MANUALLY. Note
that this is not a problem with recent SB32/64 PnP cards.

The General MIDI ROM patch set is initialized automaticly every time
soundon is executed. You may need to perform this initialization manually
if you play MIDI music after using gmod (or other programs that load their
own samples to the cards memory). To do this you need to execute the following
command on the directory you installed OSS (usually /usr/lib/oss):

sfxload -i synthgm.sf2

The best way to play MIDI music is to use the mplay program distributed with
OSS. This program accepts the device number and the midi file name as it's
parameters (for example play 1 midifile.mid). Run mplay without any arguments
to find out the available device numbers.

Enclosed is the full README for the sfxload program


================================================================
AWE32 Sound Driver Utility Programs for Linux / FreeBSD
version 0.4.2; Sep. 1, 1997
================================================================

----------------------------------------------------------------
* GENERAL NOTES

Thie package includes a couple of utilities for AWE32 sound driver on
Linux and FreeBSD systems. You need to use these utilities to enable
sounds on the driver properly.

Some minor changes has been done in sfxload utility from ver.0.3
programs. See the options -a, -A and -d section.


----------------------------------------------------------------
* SFXLOAD

Sfxload is a utility program to transfer the sound wave and
instruments data in a SoundFont file to the AWE32 sound driver.
This program is necessary for playing MIDI samples via sequencer
programs supporting AWE driver.

Basically, sfxload behaves as two ways.

% sfxload fontfile
% sfxload -b1 fontfile

The first usage is to read SF2 (or SBK) file and transfer to the awe
driver. In this case, the samples which were loaded on the driver are
replaced with the new one.
In the second case, sfxload reads the file and appends it to the
pre-loaded samples on the driver with specified bank number. The old
samples remain in the driver. The additional samples can be cleared
via -x option (see below).

The sound files are searched through the path list. The path list is
defined as built-in. If the environment variable SFBANKDIR or the
command line option -P is given, it replaces the default search list.
The file extension .sf2, and .sbk can be abbreviated.

The new sfxload can deal with a virtual bank file. It contains
a list of presets from various soundfonts. See the virtual bank file
section for more details.


OPTIONS:

-x, --remove[=bool]
Remove the optional samples previouly loaded via -b option.
Otherwise, all new samples are simply appended.
If this option is specified alone without soundfont file
arguments, sfxload does onlay remove samples.
Either of "on", "off", "yes", "no", "true", or "false" can be
specified as an optional argument.

-b, --bank=number
Append the sound samples on the specified bank.
Without this option, all samples in the driver are reset, and
new samples are loaded.
This option is necessary to load user bank, usually in bank
one.

eg)
% sfxload synthgm.sbk
% sfxload -b1 surprise.sf2

-l, --lock[=bool]
Lock the font. The locked font is no longer removed via
remove option (-x) even if it's loaded together with -b
option.

-A, --sense=sensitivity
-a, --atten=attenuation
These options are used to control the attenuation of samples.
The former defines the sensitivity of initial attenuation
parameter of each instrument in SoundFont file. In the
program, the actual attenuaton is calculated from the divided
value by this sensitivity from the original parameter. Then,
1.0 means to use the original parameter without modification.
Generally, smaller number makes drum sounds louder. The
default value is 10. (I think -A 2 would be similar to
Windows sounds.)

The latter option defines the minimum attenuation. The value
is given in the raw parameter for AWE driver, that is, in 8/3
dB unit. The default value is 32. Note that since -A option
will change the minimum attenuation automatically, the option
-a must be speicifed later from -A option.

-d, --decay=scale
Set the scale of envelope decay time. Default value is 50.0.
Sounds decay fast when larger number is set.

The ver.0.3 sfxload uses 54.8. If you want to keep the same
sound, use this number instead.

-B, --addblank[=bool]
Add 48 size of blank loop on each sample data. Usually, this
option is not necessary. Most of soundfont files are designed
well for enough blank loops for each sample.

-M, --memory[=0|1]
Display the left memory size of DRAM on the AWE32 card.

-c, --chorus=percent
-r, --reverb=percent
Specify the effects of chorus and reverb, respectively. The
value is in percent, from 0 to 100. The default is
unspecified.
Note: these values may be overwritten by MIDI control
messages.

-L, --extract=source[:map]
Extract and load only the specified preset(s).
This option is usually employed by drvmidi.
The preset is given as same as in virtual bank file.

-v, --verbose[=level]
Increase or set the verbosity level.

-V, --volume=percent
Set the total volume of sounds, provided in percent.
Default volume is 70%.

-P, --path=path1:path2:...
Specify the search path for sound files. It overrides both
the system path and environment variable SFBANKDIR.


VIRTUAL BANK FILE:

The virtual bank file is a list of presets treated as one soundfont
file. The syntax of virtual bank is as follows:

# comments
source:map[:soundfont [preset-name]
source:map[:soundfont [preset-name]
...

The first and second items are the source and mapped presets,
respectively. The former is the existing preset in the soundfont,
and the latter is the actual preset loaded on the sound driver.
The preset is described by the following three values,

preset/bank/keynote

If bank and keynote are omitted, bank 0 and keynote -1 (meaning to
search all keys) are applied.

The third item is the name of soundfont file. The file is searched
from the prescribed search-path. The remaining arguments are
ignored in sfxload.

If the soundfont name is omitted, sfxload loads them as preset
mapping. It just behaves like a symbolic link of file opposing to
copying of the file. Any sample data is not referred at this time,
but searched first when the note is played.

A couple of special commands can be used together with the virtual
presets above. "default" command is used to specify the default
soundfont file. Any other presets which are not defined in the
virtual preset lists are loaded from this default font. For
example, in the following virtual bank, 2mbgmgs.sf2 is used except
for standard drumsets which employs drum.sf2:

0/128:0/128:drum.sf2
default 2mbgmgs.sf2

Another special command is "include" command. This simply includes
another virtual bank file under the current position.
For example,

default standard.sf2
0/128:0/128:drum.sf2
include xgsfx.bnk


SYSTEM RESOURCE FILE:

You can set default option arguments in the system resource file.
There're two files loaded as default.

$HOME/.sfxloadrc
/etc/sfxloadrc

The syntax is as follows:

fontname options..

The first argument is soundfont file name for each option. The
remaining arguments are identical with command line options.
The font name "default" is used for default options for all sound
fonts. The default options are overridden by specific options or
command line options.

For example, to set attenuation scale 10.0 except synthgm font, you
need to make a resource file ~/.sfxloadrc like that:

default --scale=10.0
synthgm --scale=2.0 --atten=10


ENVIRONMENT:

SFBANKDIR
Search path for sound files. The current directory is always
searched at first.