tclassp_affilter - tclassp affilter
Filters a signal. ::tclassp::affilter is an ASSP AOPTS command and takes the following general form .
Per default the window design method (Kaiser window) will be used to compute the coefficients of a linear-phase FIR filter with unity gain pass-band and adjustable stop-band attenuation and width of the transition band. Since steep FIR filters are computationally expensive (processing time linearly increases with decreasing width of the transition band and increasing stop-band attenuation) you may optionally use a recursive (IIR) filter with a Butterworth characteristic. Such a filter works very much faster but its non-linear phase may distort the waveform of e.g. an EGG signal beyond recognition.
All AOPTS subcommands are implemented.
Returns the current setting of the option option. option may be any option appropraite for the underlying analysis function, see OPTIONS below.
For each option-value pair sets option to value. If the last option is missing its corresponding value the current value is returned. option may be any option appropraite for the underlying analysis function, see OPTIONS below.
Currently not standard behaviour, will be changed
Filters all files whose names are given in FileNameList. FileNameList must be a proper Tcl list. Returns the number of files processed successfully
This command returns a list of information on the AOPTS command. The first three elements of the list are
the name of the analysis function
the major version number
the minor version number
The remaining elements consist of key-value pairs listing all available options of the analysis function and the the option type. Option type is useful for the creation of graphical user interfaces and may be:
bool: Options with a boolean value, best represented with check boxes
text: Options with a more or less free value, best represented with entry fields
radio: Options with a short range of fixed values, best represented by radio buttons
combo: Options with longer ranges of fixed values, best represented by combo boxes
spin: Options with continuos numerical value ranges, best represented by spin boxes
tkassp makes use of these otpion types to generate GUIs more or less automatically. In some cases, option type is the empty string to indicate that the option is not to be used in a GUI in the same way as the other options, see OPTIONS for details.
Resets all options to the default.
Returns the version of the ASSP analysis function.
The following options do not affect the resulting analysis. They do not have an option type as defined for the AOPTSname info command. These options are available for all analysis commands.
Defines the value of the output extension when the analysis result is written to file. The default extension depends on the FILTER CHARACTERISTICS, see below.
Defines the directory in which the resulting file (if any) is stored. Defaults to the working directory (pwd).
If counterVariable is a fully qualified variable name, it is incremented each time the AOPTSname exec command finishes processing a file. This is useful to track the progress of the analysis especially for long file lists. If counterVariable is empty (the default) no counting is performed.
If stopVariable is a fully qualified variable name, it is read each time the AOPTSname exec command start processing a file. Setting stopVariable to true will cause the abortion of the running AOPTSname exec command. This is useful if the necessity to abort time-consuming processes of of long file lists should arise. If stopVariable is the empty string (the default) aborting processes is not possible.
The following options will affect the results of the anaysis functions.
Defines the the high pass cutt-off frequency in Hz. Defaults to 4000 Hz (arbitrarily).
Defines the the low pass cutt-off frequency in Hz. A value of 0 Hz means no high pass cut-off. Defaults to 0 Hz.
Defines the stop band attenuation in dB. Defaults to 96 dB, minimum is 21 dB. Only effective for FIR filters.
Defines the width of the transition band in Hz. Defaults to 250 Hz. Only effective for FIR filters.
Boolean specifying whether to use a IIR filter instead of a FIR filter. Defaults to no (i.e. use FIR Filter).
Specifies the number of sections used for IIR filters. Defaults to 4 sections. Each section adds 12 dB/oct to the slope of the filter.
By specifying the high-pass and/or low-pass cut-off frequency one of four filter characteristics may be selected as shown in the table below. For FIR filters the cut-off frequency specifies the endpoint of the pass-band (in previous versions of this utility it was the -6 dB point in the centre of the transition band). For IIR filters it specifies the -3 dB point.
hp lp filter characteristic extension ------------------------------------------------------- > 0 [0] high-pass from hp '.hpf' [0] > 0 low-pass up to lp '.lpf' > 0 >= hp band-pass from hp to lp '.bpf' > lp > 0 band-stop between lp and hp '.bsf'
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category tclassp of the ASSP Library Tracker. Please also report any ideas for enhancements you may have for either package and/or documentation.
Copyright © 2007-2012 Lasse Bombien <lasselasse@users.sourceforge.net>