previous next Up Title Contents

Utility_SelectChannels:


File name
UtSelectChans.[ch]


Description
This module copies the process EarObject's input signal to the output signal, but copies only the specified input channels or sets the other channels to zero, depending upon the mode: "remove" or "zero". The channels are marked as ones (on) and zeroes (off) in the array supplied as a parameter to the module.


Example parameter file format
remove	Operating mode "remove" or "zero".
10		No. of frequencies to be selected.

# Selection array 0 = off, 1 = on.
1
0
1
0
1
0
1
0
1
0



Test program directory
Tests/Utilities

Generic Module Routines

This module has the standard Generic Module Routines (see 0 Basic Module Routines used in Generic Programming).

The Process_Utility_SelectChannels(...) Process Routine

Syntax
BOOLN Process_Utility_SelectChannels(EarObjectPtr data);


Returns
TRUE if the process is successful, otherwise it returns FALSE.

The SetMode_Utility_SelectChannels(...) Routine

Syntax
BOOLN SetMode_Utility_SelectChannels(char *theMode);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetNumChannels_Utility_SelectChannels(...) Routine

Syntax
BOOLN SetNumChannels_Utility_SelectChannels(int theNumChannels);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPars_Utility_SelectChannels(...) Routine

Syntax
BOOLN SetPars_Utility_SelectChannels(int numChannels, int *selectionArray);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetSelectionArray_Utility_SelectChannels(...) Routine

Syntax
BOOLN SetSelectionArray_Utility_SelectChannels(int *theSelectionArray);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

Example: Tests/Utilities/SelectChannels.c

Parameter file: SelectChannels.par:
#
# Main Parameter file
#

output.dat	Name of output file.

# Module specifications.
#Par. file		Name				Description
#---------		-----				-------------
PTone5.par		PureTone			Stimulus generation paradigm.
PreEmph1.par		null				Outer-/middler-ear filter model.
GammaTL3.par	BasilarM_GammaT	Basilar membrane filter model.

SelecCh1.par		Select channels utility module parameter file.

# Miscellaneous parameters

0.0e-3	Ramp up rise time for signal (s).
Output

Figure [161] This shows the output from a 10 channel gammatone filter bank with alternate channels removed using the "SelectChannels" utility module.


previous next Up Title Contents