skip to primary navigationskip to content


Manual Reference Pages  - GENNAP (1)


gennap - generate neural activity pattern


Neural Transduction
See Also


gennap [ option=value | -option ] [ filename ]


The gennap module of the AIM software converts an input wave into a neural activity pattern (NAP), which is AIM’s representation of the firing pattern in the auditory nerve at about the level of the cochlear nucleus. Gennap begins by calculating the basilar membrane motion (BMM) associated with the input wave using the genbmm module, and then it applies several additional transforms that we know occur in some form during the neural transduction process. AIM provides two alternative methods for generating the NAP, a two-dimensional adaptive thresholding mechanism (Holdsworth and Patterson, 1993), and an array of inner haircell simulators based on (Meddis et al., 1990; Giguere and Woodland, 1994). In the functional version of AIM, the adaptive thresholding mechanism applies rectification, log compression, adaptation in time, and suppression across frequency; its purpose is to stabilise the level of the membrane activity with compression and then sharpen the features that appear in the compressed membrane motion. Together, the gammatone filterbank and adaptive thresholding form a ’functional’ cochlea simulation. In the physiological version of AIM, the transmission-line filterbank applies level-dependant compression and the Meddis haircell bank applies compression and adaptation. The haircells are not coupled and so there is no frequency sharpening in this module. Together, the transmission-line filterbank and the Meddis module form a ’physiological’ cochlea simulation.


The options for gennap are grouped according to the functions they control. The adaptive thresholding options are identified by the common suffix _at; the Meddis module options are identified by the common suffix _med. These two groups of options are the subject of this manual entry, together with two additional options that specify whether rectification and compression are required before transduction. There is also an option to specify the choice of transduction module.


The adaptive thresholding process in the functional version of AIM begins with rectification and compression of the BMM. The default form of compression is logarithmic; it has the advantage of transforming the exponential envelope of the ringing response of the gammatone filter into a linear decay with time. There is evidence, however, that auditory compression may be better represented by power compression with an exponent in the range of 0.5. It is also advisable in some cases to insert power compression before the Meddis haircell when driving it with a gammatone filter. For a discussion of these issues, see docs/aimMeddisHewitt. To accommodate the assembly of different configurations of AIM, the rectification and compression options are presented separately in the options list before the neural transduction section.

rectify Apply half-wave rectification to filtered waves Switch. Default value: off.

If rectify is on, the BMM is half-wave rectified. The log compressor also performs half-wave rectification to avoid negative logs. Since the compressor default is ’log’, the rectify default is ’off’.

Note: Full wave rectification is produced if rectify is set to 2. This is useful when calculating envelopes with genasa.

compress Apply compression to filtered waves. The form of the compression can be either logarithmic (log), or a power function (with a value between 0 and 1). Switch: Choices log, 0-1, off. Default value: log

NOTE: When using the physiological version of AIM with the transmission-line filterbank and the Meddis haircell bank, set compress=off, as compression is an integral part of the feedback loop in the transmission-line filterbank module.

Neural Transduction

The neural transduction is performed either by two-dimensional adaptive thresholding or an array of Meddis haircells. The choice is controlled by the option ’transduction’.

transduction The transduction function Switch. Choices: at, med, off. Default value: at
If adaptive thresholding is specified (at), the options with suffix _at below apply; if the Meddis module is specified (med), the options with suffix _med below apply. If off is specified, no transduction function is applied. The default is at.


The adaptive thresholding mechanism is a functional model of neural encoding (Holdsworth, 1990; Patterson and Holdsworth, 1996). Its purpose is to enhance the contrast of the larger features that appear in the surface of the BMM and reduce those aspects of the representation which are just a direct consequence of the filtering and compression processes. The process begins with rectification and compression of the BMM. The tail of the envelope of the impulse response of the gammatone filter is exponential. As a result, logarithmic compression is used, since this makes the filter decay function linear in NAP coordinates. Following compression, adaptation is applied in time and suppression is applied across frequency (Holdsworth and Patterson, 1993, Patterson, 1994a).

Briefly, an adaptive threshold value is maintained for each channel and updated at the sampling rate. The new value is the largest of a) the previous value reduced by a fast-acting temporal decay factor (t1recovery_at), b) the previous value reduced by a longer-term temporal decay factor (t2recovery_at), c) the adapted level in the channel immediately above, reduced by a frequency spread factor (frecovery_at), d) the adapted level in the channel immediately below, reduced by the same frequency spread factor, or e) a floor level that precludes the mechanism listening to its own internal noise (reclimit_at). The mechanism produces output whenever the input exceeds the adaptive threshold, and the output level is the difference between the input and the adaptive threshold. The adaptation and suppression are coupled, and they jointly sharpen features like vowel formants which appear smeared in compressed BMM.

trise_at Threshold rise rate Default value: 10000.

Upward Adaptation: This option specifies the rate at which the adaptive threshold will rise in response to a rise in signal level. The default value, 10000, means that the adaptive threshold responds very quickly to increases in the input wave; essentially, it follows the envelope of any rise in signal amplitude.

Downward Adaptation: Following the cessation of sound, or a rapid drop in input level, temporal adaptation occurs in two stages as determined by t1recovery_at, t2recovery_at and propt2t1_at: If the default values are used, the mechanism initially adapts at a rate slightly slower than the decay rate of the gammatone filter in the given channel, and this represses much of the ringing of the impulse response of the filter. Later the adaptation switches to a slower rate more in line with data on auditory forward masking. The option propt2t1_at determines the point at which the initial fast rate of decay gives way to the slower limiting decay rate.

t1recovery_at The initial rate of threshold recovery relative to filter decay rate Default value: 0.6.

This option determines the initial rate of decay of the adaptive threshold relative to the rate of decay of the auditory filter, provided propt2t1_at is less than unity. Values of t1recovery_at less than unity cause the adaptive threshold to decay more slowly than the auditory filter and thereby to remove the filter response from the representation when it is the sole reason for BMM activity. The rate of decay is linear with respect to the log-compressed BMM, so it is like an exponential decay with respect to the BMM.

t2recovery_at The secondary threshold recovery rate Default value: 0.2.

This option determines the limiting rate of decay of the adaptive threshold when the sound ceases provided propt2t1_at is less than unity. The default value causes the adaptive threshold to decay more slowly than the initial rate as observed in auditory forward masking. Note, however, that the system to this point is level independent, whereas auditory forward masking is level dependent.

propt2t1_at The point at which t1recovery_at gives way to t2_recovery_at Default value: 0.5.

This option determines the point at which the initial fast rate of decay (t1recovery_at) gives way to the slower limiting decay rate (t2recovery_at). The nomanclature assumes that propt2t1_at is a value less than unity. Otherwise the the roles of the initial and limiting decays are reversed.

frecovery_at Recovery rate across frequency Default value: 20.

This parameter specifies the rate at which a threshold value in one channel propagates to influence threshold in neighbouring channels.

reclimit_at Limitation on recovery level Default units: mB. Default value: 500 mB. (mB=milliBells)

In order to prevent the mechanism from encountering system noise, or alternately, to reduce sensitivity to stimulus noise, there is a limit placed on the recovery that the adaptive threshold can achieve. The limit, reclimit_at, is the limit of the sensitivity of the system.

gain_at Output gain Default units: scalar. Default value: 1.


The purpose of the Meddis module is to simulate neural transduction of BMM as performed by the inner haircells of the cochlea (Meddis, 1986, 1988). There is one haircell simulation unit for each output channel of the filterbank. The haircell equations (Meddis et al., 1990) are solved using the wave digital filter algorithm described in Giguere and Woodland (1994). The characteristics of the haircell are controlled by options: fiber_med, thresh_med, and gain_med.

fiber_med The spontaneous-rate of the simulated fiber Default value: medium. Choices: medium, high.

If medium is specified, a medium spontaneous-rate haircell fiber is simulated. If high is specified, a high spontaneous-rate fiber is simulated. The properties of these two types of fibers are listed in Table II in Meddis et al. (1990). The default value is medium.

thresh_med The threshold shift of the fiber Default Units: dB. Default value: 0.

This option shifts the entire rate-intensity function of the haircell fiber horizontally to a higher or lower level, to accomodate changes in the scaling of the input wave. A positive (negative) value increases (decreases) the rate- and saturation-thresholds of the fiber by that amount. This operation does not change the dynamic range, the spontaneous and saturation rates, or the adaptation time constants or synchronization index of the fiber.

gain_med Output gain Default units: scalar. Default value: 1.

Note: There is an internal gain of 20.0 within the software of the Meddis haircell model itself. The total gain is therefore 20.0 times the value for gain_med.


The following command generates the neural activity pattern using the gammatone auditory filterbank (the default) and adaptive thresholding (the default) for an input file named cegc:

> gennap cegc

The following command generates the neural activity pattern using the transmission line filterbank and Meddis haircell transduction for cegc:

> gennap filter=tlf compress=off transduction=meddis cegc

The following command generates the neural activity pattern using the gammatone filterbank and Meddis haircell transduction for input cegc:

> gennap compress=off transduction=meddis cegc

NOTE: docs/aimMeddisHewitt shows how to produce a Meddis and Hewitt (1991) model of pitch perception using the AIM software package, and how to insert power compression between the gammatone filterbank and the Meddis haircell bank.


Giguere, C. and Woodland, P.C. (1994). "A computational model of the auditory periphery for speech and hearing research," I. Ascending path. J.Acoust. Soc. Am. 95: 331-342.

Holdsworth, J. (1990). "Two dimensional adaptive thresholding." Annex 4 of AAM-HAP Report 1, APU contract Report.

Holdsworth, J. and Patterson, R.D. (1993). Analysis of waveforms. UK Patent GB 2234078B.

Meddis, R. (1986). "Simulation of mechanical to neural transduction in the auditory receptor," J. Acoust. Soc. Am. 79, 702-711.

Meddis, R. (1988). "Simulation of auditory neural transduction: Further studies," J. Acoust. Soc. Am. 83, 1056-1063.

Meddis, R., Hewitt, M. and Shackleton, T. (1990). "Implementation details of a computational model of the inner-haircell/auditory-nerve synapse," J.Acoust. Soc. Am. 87: 1813-1816.

Patterson, R.D. and Holdsworth, J. (1996). "A functional model of neural activity patterns and auditory images," In: Advances in Speech, Hearing and Language Processing Vol. 3, W.A. Ainsworth (ed.), JAI Press, Greenwich, Connecticut, 551-567. (in press since 1991)

Patterson, R.D. (1994a). "The sound of a sinusoid: Spectral models," J. Acoust. Soc. Am. 96, 1409-1418.


.gennaprc The options file for gennap.


genepn, gencgm, genbmm


Copyright (c) Applied Psychology Unit, Medical Research Council, 1995

Permission to use, copy, modify, and distribute this software without fee is hereby granted for research purposes, provided that this copyright notice appears in all copies and in all supporting documentation, and that the software is not redistributed for any fee (except for a nominal shipping charge). Anyone wanting to incorporate all or part of this software in a commercial product must obtain a license from the Medical Research Council.

The MRC makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.



The AIM software was developed for Unix workstations by John Holdsworth and Mike Allerhand of the MRC APU, under the direction of Roy Patterson. The physiological version of AIM was developed by Christian Giguere. The options handler is by Paul Manson. The revised SAI module is by Jay Datta. Michael Akeroyd extended the postscript facilites and developed the xreview routine for auditory image cartoons.

The project was supported by the MRC and grants from the U.K. Defense Research Agency, Farnborough (Research Contract 2239); the EEC Esprit BR Porgramme, Project ACTS (3207); and the U.K. Hearing Research Trust.

SunOS 5.6 GENNAP (1) 15 April 1997
Generated by manServer 1.07 from /cbu/cnbh/aim/release/man/man1/gennap.1 using man macros.