FILES IN TVL.ZIP:

tvl_read.txt		this file
tvl_orig.exe		(Time Varying Loudness). This corresponds to the model described in Glasberg and Moore (2002) AES Journal
tvl.exe			This is a modified version where the release time used in the calculation of long-term loudness is shorter by a factor of 10.
df.32k			file of coefficients for simulating a diffuse field correction
ff.32k			file of coefficients for simulating a free field frontal correction
midear.32k		file of coefficients for simulating the middle ear correction only
resample_2_32k.exe	resample a WAV file to 32kHz
1k200.wav		example 32k WAV file

For transmission over email, the file extension "exe" has been changed to "xxx" (many email security systems block files with the .exe extension, even when contained within zip files).  Hence, before using the software, any file of format *.xxx should be renamed as *.exe

Note that the version with the shorter release time constant (tvl) was the one available on this web site from 2008 to Sept. 2015.
To see what time constant is used in the version that you have been using, use the command line option -v (see below for details).
Release 2 has the value 0.0005 for the original version and 0.005 for the version with shorter release time. These correspond to time constants of 2000 and 200 ms, respecitvely.

As input you need a mono WAV file sampled at 32 kHz.  When -m (mon) is not selected as a command line option (see below for details), it is assumed that the same signal is presented to each ear (diotic presentation). 
To simulate transfer through the outer & middle ear 3 coefficient files 
are included, ff.32k, df.32k and midear.32k (free-field
frontal, diffuse field & midear only: see section 1.1 in JAES
paper). 
For converting mono wav files to a 32 kHz sample rate you can use
resample_2_32k.exe.

1k200.wav contains 220 ms of a full-scale 1-kHz tone with 10-ms ramps on both
ends.

The programs run under the COMMAND prompt (DOS).

Entering tvl_orig or tvl on its own gives a list of options.

The command line options are:

-i sig_input_wav_file    (sig = signal)
-I (information)
-v (verbose)
-m (monaural [default binaural])
-b begin (point in ms from which the loudness should be saved) eg -b 100
-e end   (point in ms to   which the loudness should be saved) eg -e 200
-c dB (calibration level for sig - overrides filename calibration)
-s dB (scale factor for sig)
-x dB ([default 60] all spectral components this much below the maximum are discarded)
-F coeffts_filename (forces the 32k file to be filtered using the coefficients provided
                     eg -F ff.32k  for a frontal-free field correction)
-p changes format of printed results to screen


For example:

tvl_orig -i 1k200 for no outer / middle ear filtering
tvl_orig -i 1k200 -F ff.32k for free-field frontal incidence; this also saves the filtered
waveform as sig_fir.wav

resample_2_32k -i xxx.wav -o x32.wav will resample most wav files to a 32-kHz rate.
(it does nothing if the input waveform is already sampled at 32 kHz)
examples:
1k200r.wav contains a full scale 1-kHz sinewave sampled at 32 kHz with 10-ms ramps

tvl_orig -i 1k200r.wav       : outputs the loudness of this file using the default calibration of 100 dB full scale
tvl_orig -i 1k200r.wav -p    : outputs the loudness of this file using the default calibration of 100 dB full scale
tvl_orig -i 1k200r.wav > xxx : redirects output to file xxx
tvl_orig -i 1k200r.wav -c 90 : sets calibration to 90 dB full scale prior to loudness calculation
tvl_orig -i 1k200r.wav -c 90 -p > 1k200r.out : puts results in file 1k200r.out
tvl_orig -i 1k200r.wav -c 90 -s -6.0 -p: sets the calibration to 90 & scales the waveform down by 6 dB
tvl_orig -i 1k200r.wav -c 90 -F ff.32k -p : does FIR filtering of 32-kHz sampled file using coeffts in ff.32k

In the output, average 1 corresponds to the short-term loudness and average 2 corresponds to the long-term loudness impression.
