bodhidharma.midi_parsing
Class FeatureMaker

java.lang.Object
  extended by bodhidharma.midi_parsing.FeatureMaker

public class FeatureMaker
extends java.lang.Object

A container class for the makeFeature and\ getNumberPossibleFeatures methods.

See Also:
MIDIIntermediateRepresentations, FeatureMultiDimensional, FeatureOneDimensional
Author:
Cory McKay

Constructor Summary
FeatureMaker()
           
 
Method Summary
static int getNumberPossibleFeatures()
          Returns the number of different types of features which have been implemented.
static Feature makeFeature(java.lang.String feature_name, MIDIIntermediateRepresentations recording_data)
          Takes in the name of a type of Feature and returns a Feature object of the appropriate type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureMaker

public FeatureMaker()
Method Detail

makeFeature

public static Feature makeFeature(java.lang.String feature_name,
                                  MIDIIntermediateRepresentations recording_data)
                           throws java.lang.Exception
Takes in the name of a type of Feature and returns a Feature object of the appropriate type. The name may also be a numerical code (see implementation).

Also takes in a MIDIIntermediateRepresentations. If this is null, then the returned Feature is instantiated without a valid value. If the value is not null, then the Feature is instantiated with a value that is derived from the MIDIIntermediateRepresentations.

Parameters:
feature_name - The name of the type of Feature to be returned.
recording_data - The data upon which the value of the Feature is based.
Returns:
A Feature object of the appropriate type.
Throws:
java.lang.Exception - Exception thrown if the type of Feature specified is not known.

getNumberPossibleFeatures

public static int getNumberPossibleFeatures()
Returns the number of different types of features which have been implemented.