[ Table Of Contents | Keyword Index ]

tclassp_f0ana(n) 0.5 doc "tclassp - Compute the fundamental frequency of a signal"


tclassp_f0ana - tclassp f0ana

Table Of Contents



Analysis of the fundamental frequency of a signal using the K. Schaefer-Vincent periodicity detection algorithm . ::tclassp::f0ana is an ASSP AOPTS command and takes the following general form .

::tclassp::f0ana method ?arg arg ...?


All AOPTS subcommands are implemented.

::tclassp::f0ana cget option

Returns the current setting of the option option. option may be any option appropraite for the underlying analysis function, see OPTIONS below.

::tclassp::f0ana configure option ?value? ?option? ?value?

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

::tclassp::f0ana exec fileNameList

Computes the fundamental frequency of all files whose names are given in FileNameList. FileNameList must be a proper Tcl list. Returns the number of files processed successfully

::tclassp::f0ana info

This command returns a list of information on the AOPTS command. The first three elements of the list are

  1. the name of the analysis function

  2. the major version number

  3. 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.

::tclassp::f0ana reset

Resets all options to the default.

::tclassp::f0ana version

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.

-extension outputExtension

Defines the value of the output extension when the analysis result is written to file. Defaults to ".f0".

-outDir outputDirectory

Defines the directory in which the resulting file (if any) is stored. Defaults to the working directory (pwd).

-counter counterVariable

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.

-stop stopVariable

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. Some are available in all ASSP analysis functions but not in all of them:

-begin beginTime

Start time of the analysis in ms. Defaults to begin of signal.

-end endTime

End time of the analysis in ms. Defaults to end of signal.

-winShift windowShift

Specifies the size of the window shift in ms.

-gender genderCode

Specifying a gender code sets default parameters for the options -maxF and -minF, see below. Valid gender codes are

  • "f"emale: set F0 range from 80 Hz to 640 Hz

  • "m"ale: set F0 range from 50 Hz to 400 Hz

  • "u"nknown: set F0 range from 50 Hz to 600 Hz (the default)

-maxF maximalF0

Sets the maximal fundamental frequency. For defaults, see -gender option.

-minF minimalF0

Sets the minimal fundamental frequency. For defaults, see -gender option.

-minAmp ampThreshold

Sets amplitude threshold for voiced samples in dB. Defaults to 50 dB. Used for voicing detection.

-maxZCR zcrMaximum

Set maximum zero crossing rate in Hz for voicing detection. Defaults to 3000 Hz. Set to zero to switch off.


Schäfer-Vincent, K. (1982), "Significant points: Pitch period detection as a problem of segmentation," Phonetica 39, pp. 241-253

Schäfer-Vincent, K. (1983), "Pitch period detection and chaining: Method and evaluation," Phonetica 40, pp. 177-202


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.

See Also