Class
FormantCanvas
In: rbSnack/tkSnackUtil.rb
Parent: TkCanvas

This is a canvas widget used to display the first and second formants.

Methods

drawGraph, getF1, getF2, getNextColour, getX, getY, new, plotBandWidth, plotFormant,
Attributes

 [RW]  :title
Public Class methods
new( *args , &op_block) src

Standard constructor of a canvas

Public Instance methods
drawGraph() src

Draws graph with horizontal and vertical axis labeled, Will also label with sound file name if set

getX(f1) src

This gets the X coordinate for the graph in terms of the first formant

getY(f2) src

This gets the Y coordinate for the graph in terms of the second formant

getF1(x) src

Returns the first formant given an X (screen) coordinate

getF2(y) src

Returns the second formant given a Y (screen) coordinate

getNextColour() src

This is used to cycle through a set of 6 different colors

plotFormant(f1, f2, colour=") src

Plots given the first and second formant and an optional color.

plotBandWidth(f1, b1, f2, b2, colour=") src

Plots the bandwidth as an elipse, centered at the formant center.

*f1*
is the first formant center (mean)
*b1*
is the first formant bandwidth (3 std deviations)
*f2*
is the second formant center (mean)
*b2*
is the second formant bandwidth (3 std deviations)