SPEECH FILING SYSTEM V3.3
ENVIRONMENT VARIABLE SETTINGS
July 1998
1. ENVIRONMENT VARIABLES TO SUPPORT DEVICE-INDENPENDENT
GRAPHICS
1.1 Introduction
The Device Independent Graphics library allows SFS programs
to internally support a range of graphics devices. At
compile-time the devices required are compiled into SFS
programs and then at run-time the appropriate device is
selected by environment variables. Characteristics of the
display can also be controlled by other environment
variables. These are described in the sections below.
1.1 GTERM and GPRINT variables
The GTERM variable is used to select the graphics display
method for screen-based displays and all interactive
programs (e.g. 'Ds' program). The GPRINT variable is used
to select the method for printed graphics (e.g. 'Ds -p')
When the GTERM variable is not set, the system uses the
setting for the TERM environment variable.
To map from the settings of these variables to the graphics
device, the values are first looked up in a mapping file
$(SFSBASE)/data/digmap. This file contains lines mapping
a particular setting to a two-part code consisting of a
device type and a device subtype. Thus for a GTERM setting
setenv GTERM svga # Unix
set GTERM=svga # DOS
and an entry in the digmap file of
v 4 svga
The selected device type is 'v', and the subtype is '4'.
The device type identifies a particular driver, and the
subtype is passed to the driver as an additional
configuration parameter. Different drivers use the subtype
number in different ways.
For users of the Korn Shell, the command export is used
inplace of setenv:
% export GTERM=xterm
1.2 Current DIGMAP mappings
The currently suppported devices and device letters are:
o Graphics metafile output
a ANSI terminals (UCL have extended command set for
graphics)
e Epson Stylus Pro colour printers
m Masscomp colour display
b BBC microcomputer terminals with GTERM chip
k Kyocera laser printer command language
s Sun console
p Postscript
v SuperVGA displays
w Word Perfect Graphics files
X X-Windows displays and WIN32
B GIF graphics files
D Windows printer driver
The devices with the most complex use of the subtype coding
are the VGA and the postscript devices. Here is a summary:
VGA driver subtype codes:
v 0 vga Biggest supported graphics
v 1 vga-16 640x480 16 colours (not recommended)
v 2 vga-256 640x480 256 colours
v 3 svga-16 800x600 16 colours (not recommended)
v 4 svga-256 800x600 256 colours
v 5 xvga-16 1024x768 16 colours (not recommended)
v 6 xvga-256 1024x768 256 colours
Postscript subtype codes (Unix):
- The subtype code modulus 50 is sent to the shell
script $(SFSBASE)/bin/postscript to identify the
printer.
Postscript subtype codes (DOS):
- The subtype code modulus 50 is used to identify the
output channel:
0 stdprn
1 stdprn
2 PRN
3 PRN
4 LPT1
5 LPT1
6 LPT2
7 LPT2
Postscript subtype codes (both):
- If the subtype is odd then orientation is portrait,
otherwise landscape.
- If the subtype is between 0 and 49, then codes are
sent to the printer for A4 pages.
- If the subtype is between 50 and 99, then codes are
sent to the printer for A5 pages.
- if the subtype is between 100 and 149, then codes are
sent to the standard output for A4 pages.
- if the subtype is between 150 and 199, then codes are
sent to the standard output for A5 pages.
- if the subtype is between 200 and 249, then codes are
sent to an EPS format file in A4 page size.
- if the subtype is between 250 and 299, then codes are
sent to an EPS format file in A5 page size.
1.3 Control of size
Each driver displays/prints in a default size. Some
drivers adapt to a display size in pixels set in the GSIZE
environment variable. The value of the variable must be of
the format <width>x<height>, for example:
setenv GSIZE 640x480 # Unix
set GSIZE=640x480 # DOS/WIN32
1.4 Control of output file
When drivers output to a file, a default name is supplied
(and usually reported). The name of the file may be over-
ridden by the GFILE environment variable, for example:
setenv GFILE fig1.eps # Unix
set GFILE=fig1.eps # DOS
1.5 Capturing standard output from graphics programs
By default, if the standard output of a graphics program is
redirected to a file, it is assumed that the Graphics
metafile format is required. To enforce the use of the
GTERM variable, set the environment variable GFORCE to 1.
2. ENVIRONMENT VARIABLES TO SUPPORT ANALOGUE INPUT/OUTPUT
2.1 Introduction
Support for analogue I/O within SFS is managed in a similar
way as for graphical devices: firstly a number of different
device drivers are selected at compile-time, then any SFS
record/replay program switches between the supported
devices by the action of an environment variable.
2.2 The DAC environment variable
The DAC environment variable selects the major type and
subtype of the digital to analogue conversion routines.
The allowed values are compiled into the routine
$(SFSBASE)/libsfs/sfsdac.c. Currently supported values are
as follows:
Unix systems:
sun Sun standard 8-bit (mulaw) audio
sparc2 Sun standard 8-bit (mulaw) audio
sun8 Sun standard 8-bit (mulaw) audio
sun8-spkr Sun standard 8-bit (mulaw) audio -
speaker output
sun8-phone Sun standard 8-bit (mulaw) audio -
phone output
sun8-line Sun standard 8-bit (mulaw) audio - line
output
sparc10 Sun DBRI 16-bit audio
sun16 Sun DBRI 16-bit audio
dbri Sun DBRI 16-bit audio
sun16-spkr Sun DBRI 16-bit audio - speaker output
sun16-phone Sun DBRI 16-bit audio - phone output
sun16-line Sun DBRI 16-bit audio - line output
0 Masscomp DA08 8-channel DAC, Channel 0
1 Masscomp DA08 8-channel DAC, Channel 1
2 Masscomp DA08 8-channel DAC, Channel 2
3 Masscomp DA08 8-channel DAC, Channel 3
4 Masscomp DA08 8-channel DAC, Channel 4
5 Masscomp DA08 8-channel DAC, Channel 5
6 Masscomp DA08 8-channel DAC, Channel 6
7 Masscomp DA08 8-channel DAC, Channel 7
ansi UCL/ANSI terminal emulator on PC
ansi16 UCL/ANSI terminal emulator on PC
ansi12 UCL/ANSI terminal emulator on PC (12-
bit transport)
extend Interface to Vista Extend (PC X-Windows
software)
pipe Output to shell script
$(SFSBASE)/bin/dacpipe
linux Linux standard audio device
DOS systems:
win32 Windows multimedia driver
pp UCL Parallel port DAC
dt2811 Data Translation DT2811 12-bit DAC
pclx Laryngograph Ltd PCLX
eb12 UCL Expansion Bus 12bit DAC
sb8 SoundBlaster 8 compatible
sb16 SoundBlaster-16 compatible
2.3 The ADC environment variable
The ADC environment variable selects the major type and
subtype of the analogue to digital conversion routines.
The allowed values are compiled into the routine
$(SFSBASE)/libsfs/sfsadc.c. Currently supported values are
as follows:
Unix systems:
sun Sun standard 8-bit (mulaw)
sparc2 Sun standard 8-bit (mulaw)
sun8 Sun standard 8-bit (mulaw)
sun8-mic Sun standard 8-bit (mulaw) - mic input
sun8-line Sun standard 8-bit (mulaw) - line input
sparc10 Sun DBRI 16-bit audio
sun16 Sun DBRI 16-bit audio
dbri Sun DBRI 16-bit audio
sun16-mic Sun DBRI 16-bit audio - mic input
sun16-line Sun DBRI 16-bit audio - line input
DOS systems:
win32 Windows multimedia driver
pclx Laryngograph PC/LX board
sb16 SoundBlaster 16 bit compatible
This software is copyright University College London 1987-1998.
No part of the software may be sold, but copies may be made and
the software modified and distributed free of charge providing
the copyright of University College London continues to be
demonstrated.
This software bears no warranty or guarantee of any kind.
UCL and Mark Huckvale are unable to support this software. While
bug-fixes are welcome, requests for help may be ignored.
Mark Huckvale
Phonetics and Linguistics
University College London
Gower Street
London WC1E 6BT
SFS@phon.ucl.ac.uk