----------------------------------------------------------------------------

                      AWEDRV FREQUENTLY ASKED QUESTIONS

FAQ ver.1.21

----------------------------------------------------------------------------

1. GENERAL NOTES
     Q1.1: What is awedrv? What can I do with this?
     Q1.2: From where can I download AWE32 sound driver for Linux and
     FreeBSD?
     Q1.3: Does awedrv work on my AWE64 card?
     Q1.4: How can I play my midi files using awe driver? What configuration
     is necessary?
     Q1.5: How can I play my .MOD files using awe driver? What configuration
     is necessary?
     Q1.6: Where can I find the sf1to2.exe mentioned in the installation
     document?
2. INSTALLATION
     Q2.1*: How to install awedrv on my linux kernel?
     Q2.2*: What options should be set to configure sound module for AWE32
     on linux?
     Q2.3*: The linux sound driver can't detect my SB32-PnP card. Why?
     Q2.4*: I installed ISA PnP tools, but still awedrv says "can't detect
     AWE32".
     Q2.5*: Can I load my GM file automatically on the sound driver module?
     Q2.6*: I can't install properly on my linux-2.0.0 from Slackware 96.
     Q2.7+: How to install awedrv on my FreeBSD kernel?
     Q2.8+: How to use my PnP card on FreeBSD system?
3. PLAYING MIDI FILES
     Q3.1: I can't hear anything using drvmidi or playmidi. Why?
     Q3.2: AWE driver fails to load 2MB GM soundfont file. How to use it?
     Q3.3: I have no DRAM in my card - can I still play midi files with it?
     Q3.4: How can I play midi files using the default ROM fonts that come
     with my card?
     Q3.5: I often see a "bad checksum" error when loading samples.
     Q3.6: I have a midi file with a specified SBK file. How can I listen to
     it?
     Q3.7: Drvmidi plays strange sounds when I use an addtional SoundFont
     file.
     Q3.8: I changed chorus and reverb modes using drvmidi, but nothing
     changed. Why?
     Q3.9: Many clicking noises can be heard in some midi files.
     Q3.10: Sounds are too loud!
     Q3.11: I have GUS patch files. Can I use these samples?
     Q3.12: A strange piano sound is heard instead of drum (or other)
     sounds.
     Q3.13: ROM drum sounds seem smaller than Windows sound.
     Q3.14: What is "dynamic loading" of drvmidi? /a>
     Q3.15: I want to set up default options.
4. PROGRAMMING & MISCELLANEOUS
     Q4.1: The sounds of module player are very weird. Why?
     Q4.2*: How can MIDI files be played from Netscape?
     Q4.3: I'm planning to write a music player for AWE32. How can I control
     the AWE32 driver from my program?

The questions with asterisk(*) indicate the Linux specific problems. The
questions with plus(+) indicate the FreeBSD specific problems.

----------------------------------------------------------------------------

1. GENERAL NOTES

Q1.1: What is awedrv? What can I do with this?

Awedrv is the sound driver extension to OSS/Free (aka USS-Lite or VoxWare)
for AWE32 and its compatible wave synthesizer cards (SB32 and AWE64 series)
by CreativeLabs. This driver provides a basic way to control Emu8000 chip on
AWE32 board through /dev/sequencer and /dev/sequencer2 devices as well as
other synth drivers like FM-OPL3 and GUS wave drivers. Also from driver
v0.3, awedrv behaves as a GUS compatible driver, too. (The module players
use this feature.) You can play midi and module files using some sequencer
programs listed below.

The current driver is distributed both as a lowlevel driver to OSS/Free with
Linux 2.1.x, 2.0.x kernels, and as a patch to OSS/Free-3.0.x (aka VoxWare)
with Linux 1.2.x kernels and FreeBSD. Both environments are confirmed to
work fine. However a little attention is necessary to use this driver on PnP
cards. See Q2.3, Q2.4 and Q2.8 for installation on PnP cards.

The programs supporting awedrv are:

   * MIDI Sequencers
        o drvmidi MIDI player program (awemidi-0.3.x.tar)
        o playmidi with a patch file (playmidi-2.3+awe0.3.diff; to be
          supported officially on v2.5)
        o Jazz works without any patch (but not perfectly yet)
   * Games
        o DOOM musserver with a patch file (musserver+awe0.3.diff)
   * Module Players
        o xmp, officially supporting the AWE driver.
        o gmod module player with a small patch working as a GUS compatilble
          driver.
   * Others
        o Netscape 3.0 MIDI Plug-in

----------------------------------------------------------------------------

Q1.2: From where can I download AWE32 sound driver for Linux and FreeBSD?

You can download from my web page:
         http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/index.html

Also the following mirroring sites are available:

   * UK - Linux Sources
   * Brasil - Mirror of this page
   * Free BSD port (v0.2.99c)

----------------------------------------------------------------------------

Q1.3: Does awedrv work on my AWE64 card?

Yes. It works as a AWE32 compatible driver, but the software synthesizer is
not supported. So only 32 voices are available.

----------------------------------------------------------------------------

Q1.4: How can I play my midi files using awe driver? What configuration is
necessary?

To play a sound using awedrv, you need awesfx utility to load samples on the
driver, and midi player programs which support awedrv. Basically, awedrv
doesn't have any sound information in it at beginning. So, users must
prepare their own SoundFont files using sfxload program (included in awesfx
utils). This procedure is necessary even for ROM sounds (see Q3.4). Awesfx
utility can be downloaded also from the web site above (Q1.2).

To load the SoundFont file onto the AWE driver, use sfxload utility. For
example, to load your GM SoundFont file synthgm.sbk,

        % sfxload synthgm

Note: when you're using the older version of driver and utilities than
ver.0.4, the additional option '-i' is required. This option means to remove
all samples on the driver before loading this sample.

Now you can hear your midi files by a midi player like drvmidi (distributed
in awemidi package).

        % drvmidi sample.mid

See Q3.6 to how to use specified SBK or SF2 files with a midi file.

The new drvmidi (v0.4.0) has a function of "dynamic loaindg" of samples on
demand. This enables to play most of MIDI files with 2MB GM/GS soundfonts on
only 512kB DRAM soundcards.

        % drvmidi -L 2mbgmgs sample.mid

See Q3.14 and Q3.15 for details.

----------------------------------------------------------------------------

Q1.5: How can I play my .MOD files using awe driver? What configuration is
necessary?

So far, some module players are available (see Q1.1). Xmp supports awedrv as
default. To get it work, edit config.h in its source package, and define the
line

        #define AWE_DEVICE

then make it.

To use GMOD, you need to applay a small patch file gmod+x-3.0.1+awe.diff to
the source file.

        % cd GMOD source directory
        % patch > gmod+x-3.0.1+awe.diff

The patched program works only on AWE32 driver. Though the patch is provided
for gmod-3.0.1, but it can be applied on gmod-3.0.3, too. The new released
gmod (gmod-3.0.5) will support awedrv officially.

Note: both programs watches read selection of the sequencer device. To
support this, you need to activate MIDI input interface on SB16 driver when
configuring the sound module.

----------------------------------------------------------------------------

Q1.6: Where can I find the sf1to2.exe mentioned in the installation
document?

Note: the recent awesfx utilities (from 0.1.5d) support both SBK and SF2
files. Conversion is not necessary for normal use.

sf1to2.exe can be found in the latest creative drivers. You can also find on
some web pages, for example,
              http://www.telebyte.nl/sound/programs/sf1to2.exe

----------------------------------------------------------------------------

2. INSTLLATION

Q2.1*: How to install awedrv on my linux kernel?

See INSTALL.awe file in awedrv source package for details. Basically, you
only need to run install.sh script on the awedrv source directory as root
user.

        % su
        # sh ./install.sh

Then, reconfigure the kernel options. See Q2.2 about which options to be
set.

        # cd /usr/src/linux
        # make xconfig
                or
        # make menuconfig

Now, remake and install the kernel and modules.

        # make
        # make modules; make modules_install

----------------------------------------------------------------------------

Q2.2*: What options should be set to configure sound module for AWE32 on
linux?

Basically, to configure awedrv, say Yes only to "lowlevel sound driver
support" and "AWE32 wave synth". (If you're using OSS/Free-3.0.x (aka
VoxWare), only the latter question will appear.) On AWE32 board, all
transfers are done through I/O ports (not DMA), and awedrv probes these I/O
ports automatically, so no need to specify any address or IRQ at
configuration.

Of course, you may want other functions of SoundBlaster like playing and
recording digital sound, FM synthesizer, and mixer support. Awedrv is only
an enhancement to control Emu8000 synthesizer, and such functions are
supported by other SB drivers. So better to keep Yes for all other SB16
options as well.

In my case, the sound part of .config file looks like:

#
# Sound
#
CONFIG_SOUND=m
# CONFIG_PAS is not set
CONFIG_SB=y
CONFIG_ADLIB=y
# CONFIG_GUS is not set
# CONFIG_MPU401 is not set
# CONFIG_UART6850 is not set
# CONFIG_PSS is not set
# CONFIG_GUS16 is not set
# CONFIG_GUSMAX is not set
# CONFIG_MSS is not set
# CONFIG_SSCAPE is not set
# CONFIG_TRIX is not set
# CONFIG_MAD16 is not set
# CONFIG_CS4232 is not set
# CONFIG_MAUI is not set
CONFIG_AUDIO=y
CONFIG_MIDI=y
CONFIG_YM3812=y
SBC_BASE=220
SBC_IRQ=7
SBC_DMA=1
SB_DMA2=7
SB_MPU_BASE=300
SB_MPU_IRQ=-1
DSP_BUFFSIZE=65536
CONFIG_LOWLEVEL_SOUND=y
# CONFIG_ACI_MIXER is not set
CONFIG_AWE32_SYNTH=y

BTW, please do not copy these values directly to your kernel. IRQ and DMA
numbers of SB card may be different on each machine. In usual cases, MPU
base address may be 0x330. I set this value as different one to avoid
confliction between SCSI card. (The setting in Q3.2 is 0x300 because this is
Neal's machine.)

----------------------------------------------------------------------------

Q2.3*: The linux sound driver can't detect my SB32-PnP card. Why?

This is a problem in PnP initialization. Because the original Linux kernels
don't support initialization of PnP cards yet, some special treatment is
necessary before loading sound driver. There're a couple of ways to solve
this:

  1. use PnP ISA driver by Tom Lees.
  2. use PnP utilities like ISAPnPtool and PnP4Kernel.
  3. initialize PnP card on DOS and use loadlin to boot linux.

Tom Lees developed a Plug'n'Play ISA driver for Linux kernel. It includes
patches to automatically configure the sound driver (SB16, MPU401, OPL3,
AWE32), and your Plug'n'Play ISA card. This requires to recompile the
kernel. Also, you need to apply a patch to the source file of awedrv. The
patch file is included under patches directory of PnP driver package. (The
pach looks applicable to awedrv-v0.4, too.) See Tom's web page for more
details,
                 http://www.lpsg.demon.co.uk/pnp-linux.html

Neal Sanche (neal@nsdev.ocunix.on.ca) summarizes the procedure to install on
PnP card by ISAPnP tool that:

Setting up SoundBlaster 32 PnP under Linux

The SoundBlaster 32 PnP, like all plug and play devices, requires
initialization before the Linux device driver is loaded in order to function
properly. This means that some form of initialization is required to hear
sound. Currently many PnP projects (one at
http://www.redhat.com/linux-info/pnp) are being developed. I use a simple
tool called ISAPnP. It is available at:
              http://www.redhat.com/linux-info/pnp/other.html

The steps you need to do in order to get sound working:

  1. Compile your Linux kernel with module support, and compile the sound
     driver as a module. This is important because you must load the module
     after initializing your PnP card under Linux.
  2. Somewhere in your startup scripts (in rc.local, or rc.modules in a
     recent version of RedHat) you must initialize your sound card with some
     tool. ISAPnP is easy to configure and seems very reliable.
  3. Load the sound module. Set your mixer settings.

For example, this is how I initialize the SB32 PnP in my startup scripts.
(Note: refer to Q2.4 about the settings of ports 0xe20 and 0xa20 here.)

#!/bin/sh

# initialize PnP devices
if [ -x /sbin/isapnp ]; then
  echo "Configuring PnP devices"
  /sbin/isapnp /etc/isapnp.conf
fi

echo "Loading sound module"
/sbin/modprobe -a sound

ISAPnP is quite an easy program to configure. Here is a copy of my
isapnp.conf file. I used all of the defaults (from the SB manual) for ports
and IRQ settings.

(READPORT 0x0273)
(ISOLATE)
(IDENTIFY *)

# Card 1: (serial identifier 6d 00 0e b0 52 44 00 8c 0e)
# CTL0044 Serial No 962642 [checksum 6d]
# Version 1.0, Vendor version 1.0
# ANSI string -->Creative SB32 PnP<--
#
# Logical device id CTL0031
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

(CONFIGURE CTL0044/962642 (LD 0
# ANSI string -->Audio<--
  (INT 0 (IRQ 5 (MODE +E)))
  (DMA 0 (CHANNEL 1))
  (DMA 1 (CHANNEL 5))
  (IO 0 (BASE 0x0220))
  (IO 1 (BASE 0x0330))
  (IO 2 (BASE 0x0388))

  (ACT Y)
))

# Logical device id CTL0021
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

(CONFIGURE CTL0044/962642 (LD 2
# ANSI string -->WaveTable<--
  (IO 0 (BASE 0x0620))
  (IO 1 (BASE 0x0a20))
  (IO 2 (BASE 0x0e20))
  (ACT Y)
))

# Logical device id CTL7001
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

(CONFIGURE CTL0044/962642 (LD 3
#     Compatible device id PNPb02f
#     ANSI string -->Game<--
#     Logical device decodes 16 bit IO address lines
#         Minimum IO base address 0x0200
#         Maximum IO base address 0x0200
#         IO base alignment 1 bytes
#         Number of IO addresses required: 8
# (IO 0 (BASE 0x0200))
# (ACT Y)
))

# Logical device id CTL0051
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

(CONFIGURE CTL0044/962642 (LD 4
#     ANSI string -->StereoEnhance<--
#     Logical device decodes 16 bit IO address lines
#         Minimum IO base address 0x0100
#         Maximum IO base address 0x03f8
#         IO base alignment 8 bytes
#         Number of IO addresses required: 1
  (IO 0 (BASE 0x0108))
(ACT Y)))

That's all there is to it. In the future, the Linux kernel source will
directory support Plug and Play, and there will be no need for the isapnp
tool.

----------------------------------------------------------------------------

Q2.4*: I installed ISA PnP tools, but still awedrv says "can't detect
AWE32".

Check WaveTable entries in your /etc/isapnp.conf file. AWE32 uses three I/O
ports, normally 0x620, 0xa20, and 0xe20, but in the default ouput from
pnpdump is sometimes lack of the last two pots (0xa20 and 0xe20). In such a
case, you have to add them manually. For example,

# Logical device id CTL0021
(CONFIGURE CTL0044/962642 (LD 2
# ANSI string -->WaveTable<--
  (IO 0 (BASE 0x0620))
  (IO 1 (BASE 0x0A20))
  (IO 2 (BASE 0x0E20))
  (ACT Y)
))

Also, don't forget set (ACT Y), too.

----------------------------------------------------------------------------

Q2.5*: Can I load my GM file automatically on the sound driver module?

Yes. You can specify the command to be executed after loading modules in
your /etc/conf.modules file with post-install command. For example,

post-install sound      /usr/local/bin/sfxload synthgm

Similary, it's possible to set the mixer volume automatically,

post-install sound      /usr/local/bin/setmix -f /etc/mixrc;\
                        /usr/local/bin/sfxload synthgm

----------------------------------------------------------------------------

Q2.6*: I can't install properly on my linux-2.0.0 from Slackware 96.

Slackware 96 initially installs Linux-2.0.0 system. The AWE driver doesn't
support this version of sound driver. So please update the kernel version to
the newer one. Sorry for incovenience...

----------------------------------------------------------------------------

Q2.7+: How to install awedrv on my FreeBSD kernel?

See the document INSTALL.frbsd in awedrv source package for details. Also,
if you're using a PnP sound card like SB32 PnP or AWE64, refer to Q2.8.

  1. Copy all source files to the system directory
     /usr/src/sys/i386/isa/sound.
  2. Edit awe_config.h if necessary.
     If you're using awedrv ver.0.4 or newer, you don't need to touch
     AWE_MAX_SAMPLES and AWE_MAX_INFOS.
  3. Append an entry to kernel configuration file.

               device awe0     at isa? port 0x620

  4. Recompile and install a new kernel.

----------------------------------------------------------------------------

Q2.8+: How to use my PnP card on FreeBSD system?

See the how-to document by Takuya Koumoto (takuya-k@is.aist-nara.ac.jp) for
more details (written in Japanese).

  1. Get FreeBSD PnP package (FreeBSD-ISA_PnP_June8.tar.gz)
  2. Run a program pnpinfo in it. You may have an output like following:

             Checking for Plug-n-Play devices...
             Trying Read_Port at 203
             Trying Read_Port at 243
             .. (snip) ..
             Card assigned CSN #1
             Board Vendor ID: CTL009d
             Board Serial Number: 10005fdc
             PnP Version: 1.0
             Vendor Version: 32
             Device Description: Creative SB AWE64 PnP
             Logical Device ID: CTL0042 (42008c0e)
             Device Description: Audio
             Start Dependent Function
             .. (snip) ..

     Remember the serial number of your sound card in the message. In this
     example, it's 10005fdc. This value must be different on each sound
     card.
  3. Applay a patch (kernel.patch.2.2-current) included in the package to
     kernel source tree.

             # cd /usr/src/sys
             # patch -p0 < kernel.patch.2.2-current

  4. Edit /usr/src/sys/i386/isa/pnp.c:
     Replace the line 34

             #include "pnp.h"

     with

             #include "i386/isa/pnp.h"

     and the part from line 50 to 103 with the following

       {
         0x10005fdc,             /* Serial Number */
         2,             /* Logical Device Number */
         {
           { -1, -1 },     /* Primary IRQ Number, Type */
           { -1, -1 }      /* Second  IRQ Number, Type */
         },
         { -1, -1 },               /* DRQ Number */
         {
           0x620,          /* Ports 1 */
           0xa20,          /* Ports 2 */
           0xe20,          /* Ports 3 */
           -1,          /* Ports 4 */
           -1,          /* Ports 5 */
           -1,          /* Ports 6 */
           -1,          /* Ports 7 */
           -1,          /* Ports 8 */
         },
         {
           { -1, -1, -1 }, /* Memory desc0 - base, ctrl, range */
           { -1, -1, -1 }, /* Memory desc1 - base, ctrl, range */
           { -1, -1, -1 }, /* Memory desc2 - base, ctrl, range */
           { -1, -1, -1 }  /* Memory desc3 - base, ctrl, range */
         }
       }

     Please put the serial number of your card on the first item.
  5. Copy source files of awedrv. Do it as well as in Q2.7.
  6. Edit kernel config file. Append both

             controller      pnp0

     and

             device awe0     at isa? port 0x620 conflicts

----------------------------------------------------------------------------

3. PLAYING MIDI FILES

Q3.1: I can't hear anything using drvmidi or playmidi. Why?

The AWE driver itself doesn't have any sound information in it. You need to
load the soundfont file at first. See Q1.4 how to load soundfont files.

----------------------------------------------------------------------------

Q3.2: AWE driver fails to load 2MB GM soundfont file. How to use it?

The new version (v0.4 beta) can deal with dynamic buffered table, this
problem doesn't happen. If you're using the older version (v0.3.x), you need
to fix as follows.

AWE driver has a fixed size table to store the sound voice and sample
informations. The default table size is designed for 512k GS samples, so it
often be too short for 2MB or larger GM/GS samples. In such a case, you need
to modify configuration in awe_config.h:

  1. edit awe_config.h (in lowlevel directory) and change the following
     values like

             #define AWE_MAX_SAMPLES 600
             #define AWE_MAX_INFOS 3200

  2. remake the sound module (or kernel) again.

----------------------------------------------------------------------------

Q3.3: I have no DRAM in my card - can I still play midi files with it?

Chris Wedgwood <chris@cyphercom.com> answers:

Yes. You can use the default ROM fonts that are built into the card.
However, it won't necessarily sound very good.

----------------------------------------------------------------------------

Q3.4: How can I play midi files using the default ROM fonts that come with
my card?

Chris Wedgwood <chris@cyphercom.com> answers:

You have to load the ROM fonts into the card using sfxload. To do this you
need a file called 'synthgm.sbk' (or synthgm.sf2) which is installed under
Windows95 and presumably Windows 3.1.

There always seems to be a copy in the 'windows system' directory, and often
another copy amongst the other installed Creative Labs files. The windows
system directory is usually \WINDOWS\SYSTEM.

For the 'purists' who don't have Windows installed - you will probably have
to try and get this file from elsewhere, as it is not stored on the CDROM in
any useful form. (At least not on mine). It appears to be archive in the
win95/sfbank/sfbank.lib file - but I have no details on the format of this).

To load the ROM fonts type:

        % sfxload synthgm.sbk

(Obviously you will have to prepend a path if synthgm.sbk is not in the
current working directory).

The size of the file is about 35k, it compresses down to about 14k, so
obtaining it via FTP or email shouldn't be a big problem - although there
maybe copyright issues involved. I wouldn't know, I'm not a lawyer.

----------------------------------------------------------------------------

Q3.5: I often see a "bad checksum" error when loading.

Note: the new version (v0.4) never causes this error.

In the older versions, awedrv occasionally failed to transfer sample data to
DRAM on AWE32. This shorten the length of actual sample data, and raise up
address mismatch. So impure data may be included during its loop. When you
see this message frequently, initialize AWE32 once by option -I of sfxload,
and reload samples again.

        % sfxload -I synthgs.sf2

Note that the option '-I' doesn't remove samples. It only re-initializes
Emu8000 chip.

----------------------------------------------------------------------------

Q3.6: I have a midi file with a specified SBK file. How can I listen to it?

Just load the SBK file after GM (or GS) presets. At first, load GM font.
(For the older version (v0.3.x), the option -i is necessary.)

        % sfxload synthgm

Then, append SBK font after it. If you've already loaded other samples, the
additional option -x is required.

        % sfxload -b 1 foo.sbk

Don't forget to add a command option "-b 1" in this case (see Q3.7).

Now you can hear your midi file. Enjoy.

        % drvmidi foo.mid

----------------------------------------------------------------------------

Q3.7: Drvmidi plays strange sounds when I use an addtional SoundFont file.

Most of user-defined SoundFont files are designed to be loaded on bank 1.
Try the option -b 1 of sfxload for such a sample (see Q3.6).

----------------------------------------------------------------------------

Q3.8: I changed chorus and reverb modes using drvmidi, but nothing changed.
Why?

To activate chorus and reverb modes, you have to specify non-zero values for
these effects at loading samples via -c and -r options of sfxload,
respectively.

        % sfxload -c 30 -r 20 synthgm

----------------------------------------------------------------------------

Q3.9: Many clicking noises can be heard in some midi files.

If this happens when panning status changes, it is due to the restriction of
Emu8000 chip. Try -P option with drvmidi. This option suppress the realtime
pan position change. Otherwise, it may be a bug.

----------------------------------------------------------------------------

Q3.10: Sounds are too loud!

I think so, too... The total volume of the samples can be changed by using
-V option at loading.

        % sfxload -V 40 synthgm

The value is in percent with a default of 70%.

If you're using linux, the mixer volumes can be set at loading the module
automatically (see Q2.5).

----------------------------------------------------------------------------

Q3.11: I have GUS patch files. Can I use these samples?

Yes. For example, to load a patch gunshot.pat onto preset #127, run

        % gusload -p 127 gunshot.pat

----------------------------------------------------------------------------

Q3.12: A strange piano sound is heard instead of drum (or other) sounds.

Some MIDI files use the channel 16 as a drum channel. while only the channel
10 is accepted as a drum in drvmidi as default. (In the case of GS file, it
may vary according to system exclusive messages.) To change the drum state,
use the option -D. The positive argument means to turn on the drum channel,
but the negative argument means to turn off. For example, '-D 16' option
specifies the channel 16 as a drum channel, and '-D -10' option reserves the
channel 10 as a normal channel.

Another possibility is the problem of multi-part support. Drvmidi treats
tracks over 16 as second MIDI part. This feature is suppressed using '-T -1'
option with drvmidi. Then all tracks are assumed as one MIDI part.

----------------------------------------------------------------------------

Q3.13: ROM drum sounds seem smaller than Windows sound.

If you're using v0.4 or newer driver, try -A option of sfxload program. I
feel the value 2 is better than the default state.

        % sfxload -A 2 synthgm.sbk

----------------------------------------------------------------------------

Q3.14: What is "dynamic loading" of drvmidi?

This is a new feature added from ver.0.4.0 to load the required fonts in a
soundfont file "on demand" for each MIDI file. drvmidi looks for instruments
used in each file before playing, then it invokes sfxload to load only the
required samples. This function enables us to to play with larger samples on
samller soundcard RAM size. In most cases, you can play MIDI files via 2MB
GM/GS soundfonts (2mbgmgs.sf2) on 512kB DRAM. Of course, it's possible to
play 8MB fonts on 2MB DRAM (though it'll take a bit long time to load the
fonts). Many soundfont files are distributed on web sites. You'd better to
check them out. The font above is stored on Creative's web site. Also,
there're 2MB and 4MB fonts are included in AWE64 distribution. AWE64 users
can try it.

To use dynamic loading, the following precodure is necessary.

  1. load ROM fonts previously.

             % sfxload synthgm

  2. Specify the soundfont file to be used via -L option in the command line
     of drvmidi.

             % drvmidi -L 2mbgmgs foo.mid

Sometimes, drvmidi fails to load all samples due to out of memeory. In such
a case, the following message will appear:

        preload: couldn't load all fonts.

drvmidi uses ROM fonts instead of the samples not loaded.

----------------------------------------------------------------------------

Q3.15: I want to set up default options.

Note: this function is available only on ver.0.4 or later.

The command line options of sfxload and drvmidi can be specified in the
resource files in advance. The resource file of sfxload are /etc/sfxloadrc
and ~/.sfxloadrc, and those of drvmidi are /etc/drvmidirc and ~/.drvmidirc,
repsectively. If both files are specified, the latter one is used.

The sfxload resource file has the following format:

        fontname        options..
        fontname        options..

The first argument is the soundfont name, and the remaining arguments are
command line options to be specified. The font name "default" is special,
and means that the default options to be used if any font name doesn't match
the given soundfont. Both short and long options are available. For example:

        default --sense=10 --atten=32 -V100
        synthgm --sense=2 -V100

The format of drvmidi resource file is similar to the above. However, the
valid font name is only "default". For example:

        default -L 2mbgmgs

With this function, you can use dynamic loading without specifying command
line options at each time.

----------------------------------------------------------------------------

4. PROGRAMMING & MISCELLANEOUS

Q4.1: The sounds of module player are very weird. Why?

This happens when not enough DRAM is on the AWE32 card. Please upgrade
memories on your card.

Also, the old drivers have a bug in sample loop addresses. Please use the
latest driver (v0.3.3e or later).

----------------------------------------------------------------------------

Q4.2*: How can MIDI files be played from Netscape?

If you're using..

Netscape 3.0
     The plug-in for Netscape 3.0 is now available. Please install MIDI
     plug-in package, and check the helper list in Options menu. See the
     document in this package for more details.

     The plug-in with MIDI control panel causes a bus error when displaying
     the directory page (i.e. file://directory/). To avoid this, you need to
     preload the plug-in file before starting Netscape. It would be
     convenient to replace netscape as a wrapper script like

     #!/bin/sh
     LD_PRELOAD=$HOME/.netscape/plugins/npmidi.so; export LD_PRELOAD
     exec /usr/local/bin/netscape

     This bug doesn't appear on the plug-in without control panel window.

     Also, if you already add mime types as below, you should edit these
     configuration files manually. Netscape only appends its list.

Other browsers
     Add a new mime type for MIDI files by adding the following to your
     ~/.mime.types file:

     audio/x-midi    exts=mid,midi

     Then specify the application for this type by adding to ~/.mailcap:

     audio/x-midi; drvmidi %s

     Of course, you can choose your favorite MIDI players instead of this.

----------------------------------------------------------------------------

Q4.3: I'm planning to write a music player for AWE32. How can I control the
AWE32 driver from my program?

See the AWEDRV programming notes for control of awedrv device.

From ver.0.2, awedrv accepts the GUS compatible patches and hardware
controls, so you can play module players using GUS driver like gmod by a
slight modification.

For example, to use gmod for awedrv, just change the line 62 of Sequencer.c
for detection of synthesizer card to accept subtype 0x20 like

if (info.synth_type == SYNTH_TYPE_SAMPLE
    && (info.synth_subtype == SAMPLE_TYPE_GUS||info.synth_subtype==0x20))
    gus_dev = i;

(0x20 means SAMPLE_TYPE_AWE32 defined in awe_voice.h.)

----------------------------------------------------------------------------
Takashi Iwai
iwai@dragon.mm.t.u-tokyo.ac.jp
http://bahamut.mm.t.u-tokyo.ac.jp/~iwai
