Department of Experimental Psychology, University of Cambridge,
Downing Street, Cambridge CB2 3EB, England.

This disc contains the executable program "LOUD" which should run on an 
IBM PC or compatible. It calculates the loudness of a sound according to 
the procedure described in Moore and Glasberg (1996).  This procedure is 
applicable to subjects with normal hearing.  The program also allows 
calculation of loudness for persons with cochlear hearing loss.  The 
procedure is as described in Moore and Glasberg (1997).  An additional 
program called "LOUDAI" performs basically the same loudness 
calculations, but it also calculates a form of the articulation index, 
assuming that the input corresponds to the spectrum of speech (Moore and 
Glasberg, 1998).  

The program is intended to work correctly for binaural listening.  Even 
though it gives the option of monaural listening, the calculated 
loudness will not be correct if that option is selected; the loudness 
will be over-estimated.  If you need to calculate monaural loudness, it 
may be safer to initially calculate binaural loudness and then to halve 
the loudness in sones.  This, however, will not work well at levels 
close to the absolute threshold.  For normal hearing, more accurate 
predictions of both monaural and binaural loudness can be obtained using 
the program LOUDAES (Moore et al., 1997), which can also be downloaded 
from our web site.

Each stimulus is specified in terms of its spectrum, which can be 
entered in several ways: as a series of sinusoidal components; as one or 
more pink or white noise bands; as a mixture of these two; or as the 
level in each successive one-third octave band.  

The disc also contains the program "PARTLOUD" which can be used for 
calculating the loudness of a sound in the presence of a background 
sound.  This program is applicable only to normal hearing.  For the 
program PARTLOUD, the spectrum of the signal is entered separately from 
that of the background.  If the signal is completely masked by the 
background (according to the calculations performed by the program), a 
message to that effect is given and no loudness is specified.

To run the program LOUD you can either just type

LOUD

and answer the questions one at a time (manual input), or you can use an 
input file such as the example LOUDFF.IN and type

LOUD < LOUDFF.IN

The format of the input file can vary depending on various options in 
the program; some of the questions asked by the program are conditional 
on the answers given to earlier questions.  Therefore, to be sure that 
an input file is in the right format, you may need to go through the 
stage of running the program with manual input. 

The first line of the input file is the threshold of the subject in dB 
HL at the standard audiometric frequencies of 0.125, 0.25, 0.5, 1.0, 
2.0, 4.0, 6.0 and 8.0 kHz.  If "0" is entered for each of these (also 
obtained by typing <RETURN>), then the calculations proceed as for 
normal hearing. The second line of the input file specifies the value of 
the parameter HLOHC at each frequency.  If a <RETURN> is entered then 
the default values are assumed; the value of HLOHC is assumed to be 80% 
of the total hearing loss, up to certain limits (55 dB at low 
frequencies, 65 dB at high frequencies). The third line specifies the 
characteristic frequency limits (in kHz) of a "dead" region in the 
cochlea, i.e. a region with no surviving inner hair cells and/or no 
surviving neurones.  The default is no dead region.

The contents of the example file LOUDFF.IN are described below:

0,0,0,0,0,0,0,0	Specifies normal hearing
0,0,0,0,0,0,0,0	Specifies no outer hair cell loss
0,0		Specifies no dead region
f		This selects free-field presentation (frontal incidence)
b		Specifies binaural presentation
m		This selects a mixed signal containing sinusoids and noise
h		This selects a harmonic signal for the sinusoidal part
800,1200,200	Frequencies of lowest harmonic, highest harmonic and F0 
0		No components are removed (complete harmonic series)
1		One inharmonic component is added
1750		Frequency of added inharmonic component
60		Level in dB SPL of first harmonic component
65		Level in dB SPL of next harmonic component
63		Level in dB SPL of last harmonic component
61		Level of added inharmonic component
p		Pink noise is added
1500		Frequency at which the spectrum level of the pink noise
		is specified
45		Spectrum level of the pink noise in dB at the specified
		frequency
1000,1200	Lower and upper frequency limits of pink noise
20		Spacing of noise components; the noise is approximated as
		a series of sinusoidal components with the specified 
		spacing.  For highest accuracy the spacing should be less
		than 0.25 ERB in the frequency region of interest.  The
		spacing can be increased to speed computation, but
		to avoid large errors it should not be more than 0.5 ERB.
s		Stop execution

If an "s" is not encountered the program assumes that a new data set 
will be present, i.e. it will calculate the loudness of the next signal 
specified.  In this case it is assumed that the subject and conditions 
of presentation are the same.  Thus, the program assumes that the 
specification starts from line 6 (m above).

Note that the resulting output is the calculated total loudness of all 
the sinusoidal components plus the noise.  The answer in this case is 
14.38 sones, equivalent to 78.5 phons.

Another example input file is described below.  This file, LOUDHP.IN, 
illustrates calculations for stimuli presented via headphones.

To run this type LOUD < LOUDHP.IN

The file contents are as follows

0,0,0,0,0,0,0,0	Specifies normal hearing
0,0,0,0,0,0,0,0	Specifies no outer hair cell loss
0,0		Specifies no dead region
h		Specifies that headphone presentation is used.
y		A correction file is to be specified to allow for the
		non-flat response of the headphone at the eardrum
tdh.39		The name of the correction file.  The first line in 
		this file specifies the number of points, N (28 in this 
		example). This is followed by a list of N frequencies, 
		separated by commas. Then follows a list of "corrections" 
		in dB, indicating the differences between the nominal input 
		level and the level actually achieved at the eardrum.  
		For example, for a nominal input level of 60 dB SPL, the 
		eardrum sound pressure at 80 Hz might be 44.7 dB SPL, so 
		the correction is 15.3 dB.  Note the convention that the 
		correction is positive when the eardrum SPL is below the 
		nominal SPL.
		Some headphones (e.g. the Sennheiser HD414) are designed 
		to have a free-field response, i.e. their response at
		the eardrum is similar to what would be achieved with
		free-field presentation.  In such cases, it may be 
		simpler to specify f for free-field rather than h for 
		headphones.  
b		Specifies binaural presentation
o		The stimulus will be specified as the levels in 1/3
		octave bands.  The program runs more slowly when this 
		option is selected.
10		Level in first 1/3 octave band
10		Level in second 1/3 octave band
.
.
.
.
.
.
20		Level in 26th (last) 1/3 octave band
s		Stop execution 


A third example input file is TONE.IN.  The contents of this file are as 
follows:

50,50,50,50,50,50,50,50	Specifies a flat 50 dB hearing loss
				Use the default values for HLOHC
0,0				No dead region
f				Free-field presentation
b				Binaural presentation
t				Tone signal
i				Inharmonic signal
1				One component
1000				Frequency of 1000 Hz
60				Level of 60 dB
t				Another tonal signal
i				Inharmonic signal
1				One component
1000				Frequency of 1000 Hz
70				Level of 70 dB
s				Stop execution

The program can be interrupted by typing ctrl-C (hold down the ctrl key 
and press C). 

The program LOUDAI is used in a similar way.  An example input file for 
normal hearing is speech65.in.  This file contains the 1/3 octave levels 
at the eardrum for speech with a free-field level of 65 dB SPL.  The 
program is "told" that headphones are used, but no correction file is 
applied.  An example input file for impaired hearing is loss165.in.  If 
no heaadphone correction is specified, the program calculates the 
loudness and AI for a speech with a free-field level of 65 dB SPL.  The 
effect of a hearing aid can be simulated by specifying a correction file 
(equivalent to a headphone correction) that gives insertion gains as a 
function of frequency (with with positive gains represented by negative 
numbers). 

The program PARTLOUD is used in a similar way.  You can either type

PARTLOUD

and answer the questions, or you can use an input file.  A suitable 
input file is PARTLOUD.IN.   So, to run this program, type

PARTLOUD < PARTLOUD.IN

The contents of the input file are as follows:

f		This selects free-field presentation (frontal incidence)
b		This selects binaural listening
t		This selects a complex tone signal
h		This selects a harmonic signal
800,1200,200	Frequencies of lowest harmonic, highest harmonic and F0 
0		No components are removed (complete harmonic series)
1		One inharmonic component is added
1750		Frequency of added inharmonic component
60		Level in dB SPL of first harmonic component
65		Level in dB SPL of next harmonic component
63		Level in dB SPL of last harmonic component
61		Level of added inharmonic component
n		Type of partial masker - noise in this case
p		Pink noise for the partial masker
1500		Frequency at which the spectrum level of the pink noise
		is specified
45		Spectrum level of the pink noise in dB at the specified
		frequency
1000,1200	Lower and upper frequency limits of pink noise
20		Spacing of noise components
s		Stop execution

The calculated partial loudness is 9.13 sones, 71.8 phons. 

Both programs give some information in addition to the calculated 
loudness.  The program LOUD displays four columns.  The first gives the 
filter centre frequency (spaced uniformly in ERBs).  The second gives 
the interpolated absolute threshold (in dB HL) at each frequency.  The 
third gives the excitation level and the fourth gives the specific 
loudness.  Results are only displayed for frequencies where the 
excitation is above threshold.

The program PARTLOUD displays seven columns.  The first is an index 
which should be ignored.  The second gives the number of ERBs. The third 
gives the filter centre frequency (spaced uniformly in ERBs). The fourth 
gives the total excitation level evoked by the signal and background. 
The fifth gives the excitation level evoked by the background alone and 
the sixth gives the excitation level evoked by the signal alone.  The 
seventh gives the specific partial loudness. 


References

Moore, B. C. J., and Glasberg, B. R. (1996). "A revision of Zwicker's 
loudness model," Acustica - Acta Acustica 82, 335-345.
Moore, B. C. J., and Glasberg, B. R. (1997). "A model of loudness 
perception applied to cochlear hearing loss," Auditory Neurosci. 3, 
289-311.
Moore, B. C. J., and Glasberg, B. R. (1998). "Use of a loudness model 
for hearing aid fitting. I.  Linear hearing aids," Br. J. Audiol. 32, 
301-319.
Moore, B. C. J., Glasberg, B. R., and Baer, T. (1997). "A model for the 
prediction of thresholds, loudness and partial loudness," J. Audio 
Eng. Soc. 45, 224-240.

Please let us know if there are any problems, but no promises
come with this software.  You can pass it on to anyone who wants
it, but please tell them where it comes from!

Brian Moore and Brian Glasberg.  Updated September, 1999
email: bcjm@cus.cam.ac.uk, bg12@cus.cam.ac.uk


