sf1to2.exe
mentioned in the installation document?
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:
awemidi-0.3.x.tar
)
playmidi-2.3+awe0.3.diff
;
to be supported officially on v2.5)
musserver+awe0.3.diff
)
You can download from my web page:
Also the following mirroring sites are available:
Yes. It works as a AWE32 compatible driver, but the software synthesizer is not supported. So only 32 voices are available.
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 synthgmNote: 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.midSee 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.midSee Q3.14 and Q3.15 for details.
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_DEVICEthen 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.diffThe 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.
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,
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.shThen, reconfigure the kernel options. See Q2.2 about which options to be set.
# cd /usr/src/linux # make xconfig or # make menuconfigNow, remake and install the kernel and modules.
# make # make modules; make modules_install
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.)
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:
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,
Neal Sanche (neal@nsdev.ocunix.on.ca) summarizes the procedure to install on PnP card by ISAPnP tool that:
The steps you need to do in order to get sound working:
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.
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.
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.
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 synthgmSimilary, it's possible to set the mixer volume automatically,
post-install sound /usr/local/bin/setmix -f /etc/mixrc;\ /usr/local/bin/sfxload synthgm
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...
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.
/usr/src/sys/i386/isa/sound
.
awe_config.h
if necessary.AWE_MAX_SAMPLES
and
AWE_MAX_INFOS
.
device awe0 at isa? port 0x620
See the how-to document by Takuya Koumoto (takuya-k@is.aist-nara.ac.jp) for more details (written in Japanese).
FreeBSD-ISA_PnP_June8.tar.gz
)
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.
kernel.patch.2.2-current
) included in
the package to kernel source tree.
# cd /usr/src/sys # patch -p0 < kernel.patch.2.2-current
/usr/src/sys/i386/isa/pnp.c
:#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.
controller pnp0and
device awe0 at isa? port 0x620 conflicts
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.
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
:
awe_config.h
(in lowlevel directory) and
change the following values like
#define AWE_MAX_SAMPLES 600 #define AWE_MAX_INFOS 3200
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.
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.
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.sf2Note that the option '
-I
' doesn't remove samples.
It only re-initializes Emu8000 chip.
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 synthgmThen, append SBK font after it. If you've already loaded other samples, the additional option
-x
is required.
% sfxload -b 1 foo.sbkDon'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
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).
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
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.
I think so, too...
The total volume of the samples can be changed
by using -V
option at loading.
% sfxload -V 40 synthgmThe 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).
Yes.
For example, to load a patch gunshot.pat
onto preset #127,
run
% gusload -p 127 gunshot.pat
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.
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
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.
% sfxload synthgm
-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.
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 2mbgmgsWith this function, you can use dynamic loading without specifying command line options at each time.
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).
If you're using..
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/netscapeThis 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.
~/.mime.types
file:
audio/x-midi exts=mid,midiThen specify the application for this type by adding to
~/.mailcap
:
audio/x-midi; drvmidi %sOf course, you can choose your favorite MIDI players instead of this.
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
.)