bodhidharma.data_structures
Class FeatureSet

java.lang.Object
  extended by bodhidharma.data_structures.FeatureSet

public class FeatureSet
extends java.lang.Object

Part of the Bodhidharma automatic music classification project. Holds the features extracted from a MIDI recording. Features may be one-dimensional or multi-dimensional.

See Also:
Feature, MIDIIntermediateRepresentations
Author:
Cory McKay

Field Summary
 Feature[] features
          The array of features for a recording
 
Constructor Summary
FeatureSet(Feature[] given_features)
          Stores the given array in the features field.
FeatureSet(java.lang.String file_path, java.lang.String[] features_to_extract)
          Takes in the name of a MIDI file, extracts the features from it and stores them in features,/i>.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

features

public Feature[] features
The array of features for a recording

Constructor Detail

FeatureSet

public FeatureSet(java.lang.String file_path,
                  java.lang.String[] features_to_extract)
           throws java.lang.Exception
Takes in the name of a MIDI file, extracts the features from it and stores them in features,/i>. Throws an exception if there are any problems during parsing of the MIDI file or feature extraction. This exception contains information about the type of problem (it is generated by a MIDIIntermediateRepresentations object).

Only the features whose names are referred to in features_to_extract are extracted. An exception is thrown if an unidentified feature name is encountered.

Exceptions are thrown if there is a problem during parsing or if an improper feature value is found.

Parameters:
file_path - The path of a MIDI file
features_to_extract - Names of features to extract.
Throws:
java.lang.Exception

FeatureSet

public FeatureSet(Feature[] given_features)
Stores the given array in the features field.