Package org.ptolemy.machineLearning.lib
Class AFTEDiscriminant
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.actor.lib.Transformer
-
- org.ptolemy.machineLearning.lib.AFTEDiscriminant
-
- All Implemented Interfaces:
java.lang.Cloneable,Actor,Executable,FiringsRecordable,Initializable,TypedActor,Changeable,Debuggable,DebugListener,Derivable,Instantiable,ModelErrorHandler,MoMLExportable,Moveable,Nameable
public class AFTEDiscriminant extends Transformer
This actor calculates the Auditory Filterbank Temporal Envelope (AFTE) features of a given audio signal.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Ilge Akkaya
- Pt.AcceptedRating:
- Pt.ProposedRating:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description ParametercenterFrequenciesThe array of filterbank center frequencies.ParameterfmodspecMod spec sampling frequency.ParameterfsInput sampling frequency.ParameternormalizeBoolean option to specify whether the output feature array should be normalized to have an L-2 norm of 1.ParameternormalizeByDcBoolean option to specify whether the selected output features should be normalized by the DC term.ParameternOverlapNumber of samples of overlap between adjoining sections.ParameteroutputFeatureIndicesFFT Feature indices to be output.ParameteruseEnergyBandsThe output features become log-sum of energies within certain FFT bands.ParameterwindowSizeTransfer size.-
Fields inherited from class ptolemy.actor.lib.Transformer
input, output
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description AFTEDiscriminant(CompositeEntity container, java.lang.String name)Construct an actor with the given container and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattributeChanged(Attribute attribute)Ensure that the order parameter is positive and recompute the size of internal buffers.voidfire()Consume the inputs and produce the outputs of the FFT filter.voidinitialize()Initialize the actor.voidwrapup()Do nothing except invoke the wrapup() methods of any objects that have been registered with addInitializable().-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, preinitialize, removeInitializable
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
centerFrequencies
public Parameter centerFrequencies
The array of filterbank center frequencies.
-
outputFeatureIndices
public Parameter outputFeatureIndices
FFT Feature indices to be output.
-
normalize
public Parameter normalize
Boolean option to specify whether the output feature array should be normalized to have an L-2 norm of 1.
-
normalizeByDc
public Parameter normalizeByDc
Boolean option to specify whether the selected output features should be normalized by the DC term. If set to true together with normalize, this option is applied first.
-
useEnergyBands
public Parameter useEnergyBands
The output features become log-sum of energies within certain FFT bands. Currently, the bin width is set t 4 FFT samples per bin, and the FFT length is set to 64. Only computed for the nonnegative frequencies and DC term is output as a separate feature. In the current setting, 9 features per channel is output.
-
fs
public Parameter fs
Input sampling frequency.
-
fmodspec
public Parameter fmodspec
Mod spec sampling frequency.
-
windowSize
public Parameter windowSize
Transfer size.
-
nOverlap
public Parameter nOverlap
Number of samples of overlap between adjoining sections.
-
-
Constructor Detail
-
AFTEDiscriminant
public AFTEDiscriminant(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
Construct an actor with the given container and name.- Parameters:
container- The container.name- The name of this actor.- Throws:
IllegalActionException- If the actor cannot be contained by the proposed container.NameDuplicationException- If the container already has an actor with this name.
-
-
Method Detail
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
Ensure that the order parameter is positive and recompute the size of internal buffers.- Overrides:
attributeChangedin classNamedObj- Parameters:
attribute- The attribute that has changed.- Throws:
IllegalActionException- If the parameters are out of range.
-
initialize
public void initialize() throws IllegalActionExceptionInitialize the actor. Sets up impulse responses for gammatone filters- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAtomicActor<TypedIOPort>- Throws:
IllegalActionException- If a derived class throws it.
-
fire
public void fire() throws IllegalActionExceptionConsume the inputs and produce the outputs of the FFT filter.- Specified by:
firein interfaceExecutable- Overrides:
firein classAtomicActor<TypedIOPort>- Throws:
IllegalActionException- If a runtime type error occurs.
-
wrapup
public void wrapup() throws IllegalActionExceptionDescription copied from class:AtomicActorDo nothing except invoke the wrapup() methods of any objects that have been registered with addInitializable(). Derived classes override this method to define operations to be performed exactly once at the end of a complete execution of an application. It typically closes files, displays final results, etc.- Specified by:
wrapupin interfaceInitializable- Overrides:
wrapupin classAtomicActor<TypedIOPort>- Throws:
IllegalActionException- Not thrown in this base class.
-
-