TextParam Class Reference

The value of speech attribute. More...

List of all members.

Public Member Functions

double getValue (double min, double aver, double max) const
 Returns the value mapped into specified interval.
size_t getValue ()
 Returns native (not amapped) parameter value.
const TextParamoperator+= (size_t step)
 Increments current value onto specified step.
const TextParamoperator-= (size_t step)
 Decrements current value onto specified step.
const TextParamoperator= (size_t value)
 Sets new value to this parameter.
void reset ()
 Restores default parameter value.
 TextParam (size_t value)
 The constructor with initial value specification.
 TextParam ()
 The default constructor.


Detailed Description

This class contains value of any text characteristic. Usually such characteristics are a voice pitch, rate or volume. A value stored in percents and can be mapped into the provided interval. A interval can be specified by minimum, average and maximum values.

Constructor & Destructor Documentation

TextParam::TextParam ( size_t  value  ) 

Parameters:
[in] value The initial value for new object


Member Function Documentation

double TextParam::getValue ( double  min,
double  aver,
double  max 
) const

This method maps stored value into the specified interval. The interval can be specified by three floating point values: two bounds and average point. Average point can be used to shift middle of the interval from its original position. It allows non-linear mapping, what is often required for good adjusting of speech parameters. There is no checking for relations between provided values. The middle point can lay outside of minimal and maximum bounds.

Parameters:
[in] min The low bound of the interval to map into
[in] aver The average value of the interval to map into
[in] max The upper bound of the interval to map into
Returns:
The mapped value

size_t TextParam::getValue (  ) 

This method returns the value of parameter as it stored in the object and not mapped into any interval. This value must be between 0 and 100.

Returns:
The native parameter value

const TextParam & TextParam::operator+= ( size_t  step  ) 

This operator increments current value onto on specified step. It preserves from overflow and if step is too large maximum valid value will be assumed .

Parameters:
[in] step The step to change value for
Returns:
The reference to the current object

const TextParam & TextParam::operator-= ( size_t  step  ) 

This operator decrements current value onto on specified step. It preserves from overflow and if step is too large minimum valid value will be assumed .

Parameters:
[in] step The step to change value for
Returns:
The reference to the current object

const TextParam & TextParam::operator= ( size_t  value  ) 

This method sets new value of this object. It contains checking to validate specified argument. If received number too large the maximum value is used.

Parameters:
[in] value The new value to set
Returns:
The reference to the current object

void TextParam::reset (  ) 

Use this method to set value as in just created object (usually 50).


Generated on Thu May 6 16:10:58 2010 for VoiceMan by  doxygen 1.5.9