marytts.signalproc.effects
Class BaseAudioEffect

java.lang.Object
  extended by marytts.signalproc.effects.BaseAudioEffect
All Implemented Interfaces:
AudioEffect
Direct Known Subclasses:
ChorusEffectBase, FilterEffectBase, HMMDurationScaleEffect, HMMF0AddEffect, HMMF0ScaleEffect, LpcWhisperiserEffect, RobotiserEffect, VocalTractLinearScalerEffect, VolumeEffect

public class BaseAudioEffect
extends java.lang.Object
implements AudioEffect

Author:
Oytun Türk

Field Summary
static char chEffectParamEnd
           
static char chEffectParamStart
           
static char chParamEquals
           
static char chParamSeparator
           
 int fs
           
static double NULL_DOUBLE_PARAM
           
static float NULL_FLOAT_PARAM
           
static int NULL_INT_PARAM
           
static java.lang.String NULL_STRING_PARAM
           
 java.lang.String[] paramNames
           
 float[] paramVals
           
 java.lang.String strEffectName
           
 java.lang.String strExampleParameters
           
 java.lang.String strHelpText
           
static java.lang.String strLineBreak
           
 java.lang.String strParams
           
 
Constructor Summary
BaseAudioEffect(BaseAudioEffect existing)
           
BaseAudioEffect(int samplingRate)
           
BaseAudioEffect(int samplingRate, java.lang.String strParams)
           
 
Method Summary
 DoubleDataSource apply(DoubleDataSource input)
           
 DoubleDataSource apply(DoubleDataSource input, java.lang.String param)
           
 void checkParameters()
           
 double expectDoubleParameter(java.lang.String strParamName)
           
 float expectFloatParameter(java.lang.String strParamName)
           
 int expectIntParameter(java.lang.String strParamName)
           
 java.lang.String getExampleParameters()
           
 java.lang.String getFullEffectAsString()
           
 java.lang.String getFullEffectWithExampleParametersAsString()
           
 java.lang.String getHelpText()
           
 java.lang.String getName()
           
 java.lang.String getParamsAsString()
           
 java.lang.String getParamsAsString(boolean bWithParantheses)
           
 boolean isHMMEffect()
           
static void main(java.lang.String[] args)
           
 void parseParameters(java.lang.String param)
           
 java.lang.String preprocessParams(java.lang.String params)
           
 DoubleDataSource process(DoubleDataSource input)
           
 void setExampleParameters(java.lang.String strExampleParams)
           
 void setHMMEffect(boolean bHMMEffect)
           
 void setName(java.lang.String strName)
           
 void setParams(java.lang.String params)
           
 java.lang.String setParamsFromFullName(java.lang.String fullEffectAsString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strLineBreak

public static java.lang.String strLineBreak

NULL_FLOAT_PARAM

public static float NULL_FLOAT_PARAM

NULL_DOUBLE_PARAM

public static double NULL_DOUBLE_PARAM

NULL_INT_PARAM

public static int NULL_INT_PARAM

NULL_STRING_PARAM

public static java.lang.String NULL_STRING_PARAM

strEffectName

public java.lang.String strEffectName

strHelpText

public java.lang.String strHelpText

strExampleParameters

public java.lang.String strExampleParameters

paramNames

public java.lang.String[] paramNames

paramVals

public float[] paramVals

strParams

public java.lang.String strParams

chParamEquals

public static char chParamEquals

chParamSeparator

public static char chParamSeparator

chEffectParamStart

public static char chEffectParamStart

chEffectParamEnd

public static char chEffectParamEnd

fs

public int fs
Constructor Detail

BaseAudioEffect

public BaseAudioEffect(BaseAudioEffect existing)

BaseAudioEffect

public BaseAudioEffect(int samplingRate)

BaseAudioEffect

public BaseAudioEffect(int samplingRate,
                       java.lang.String strParams)
Method Detail

apply

public DoubleDataSource apply(DoubleDataSource input)

apply

public DoubleDataSource apply(DoubleDataSource input,
                              java.lang.String param)
Specified by:
apply in interface AudioEffect

process

public DoubleDataSource process(DoubleDataSource input)
Specified by:
process in interface AudioEffect

setParams

public void setParams(java.lang.String params)
Specified by:
setParams in interface AudioEffect

preprocessParams

public java.lang.String preprocessParams(java.lang.String params)
Specified by:
preprocessParams in interface AudioEffect

parseParameters

public void parseParameters(java.lang.String param)
Specified by:
parseParameters in interface AudioEffect

checkParameters

public void checkParameters()
Specified by:
checkParameters in interface AudioEffect

getExampleParameters

public java.lang.String getExampleParameters()
Specified by:
getExampleParameters in interface AudioEffect

getName

public java.lang.String getName()
Specified by:
getName in interface AudioEffect

setName

public void setName(java.lang.String strName)
Specified by:
setName in interface AudioEffect

setExampleParameters

public void setExampleParameters(java.lang.String strExampleParams)
Specified by:
setExampleParameters in interface AudioEffect

getHelpText

public java.lang.String getHelpText()
Specified by:
getHelpText in interface AudioEffect

getParamsAsString

public java.lang.String getParamsAsString()
Specified by:
getParamsAsString in interface AudioEffect

getParamsAsString

public java.lang.String getParamsAsString(boolean bWithParantheses)
Specified by:
getParamsAsString in interface AudioEffect

getFullEffectAsString

public java.lang.String getFullEffectAsString()
Specified by:
getFullEffectAsString in interface AudioEffect

setParamsFromFullName

public java.lang.String setParamsFromFullName(java.lang.String fullEffectAsString)

getFullEffectWithExampleParametersAsString

public java.lang.String getFullEffectWithExampleParametersAsString()
Specified by:
getFullEffectWithExampleParametersAsString in interface AudioEffect

expectFloatParameter

public float expectFloatParameter(java.lang.String strParamName)
Specified by:
expectFloatParameter in interface AudioEffect

expectDoubleParameter

public double expectDoubleParameter(java.lang.String strParamName)
Specified by:
expectDoubleParameter in interface AudioEffect

expectIntParameter

public int expectIntParameter(java.lang.String strParamName)
Specified by:
expectIntParameter in interface AudioEffect

isHMMEffect

public boolean isHMMEffect()

setHMMEffect

public void setHMMEffect(boolean bHMMEffect)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception