|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.audio.feature.Attribute comirva.audio.feature.AudioFeature comirva.audio.feature.SpectralPatternCent
public class SpectralPatternCent
Fluctuation Pattern
Description:
The Fluctuation Pattern is an audio feature trying to describe the rhythmic structure of a song. This is done by summarizing the loudness changes in various frequency bands according to the cent scale.
FluctuationPatternExtractor
,
Serialized FormField Summary | |
---|---|
protected Matrix |
m
|
Constructor Summary | |
---|---|
protected |
SpectralPatternCent()
Used for XML Serialization only. |
|
SpectralPatternCent(Matrix m)
A matrix describing the rhythmic structure of a song in various frequency bands known as fluctuation patterns. |
Method Summary | |
---|---|
double[] |
getAsArray()
Returns the fluctuation pattern matrix as a double array. |
double |
getDistance(AudioFeature f)
Computes the distance between two fluctuation patterns representing two songs. |
Matrix |
getMatrix()
Returns the fluctuation pattern matrix. |
double[][] |
getMatrixAsArray()
Returns the fluctuation pattern matrix as a matrix array. |
void |
readXML(XMLStreamReader parser)
Reads the xml representation of an object form the xml input stream. |
void |
writeXML(XMLStreamWriter writer)
Writes the xml representation of this object to the xml output stream. |
Methods inherited from class comirva.audio.feature.Attribute |
---|
getClassName, getType, readAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Matrix m
Constructor Detail |
---|
public SpectralPatternCent(Matrix m)
m
- Matrix the fluctuation pattern matrixprotected SpectralPatternCent()
Method Detail |
---|
public Matrix getMatrix()
public double[] getAsArray()
getAsArray
in class AudioFeature
public double[][] getMatrixAsArray()
public double getDistance(AudioFeature f) throws ClassCastException
getDistance
in class AudioFeature
f
- AudioFeature another fluctuation pattern feature
ClassCastException
- if the passed AudioFeature is
not an object of type
FluctuationPattern
public void writeXML(XMLStreamWriter writer) throws IOException, XMLStreamException
writeXML()
method
results in one xml element in the output stream.
writeXML
in interface XMLSerializable
writer
- XMLStreamWriter the xml output stream
IOException
- raised, if there are any io troubles
XMLStreamException
- raised, if there are any parsing errorspublic void readXML(XMLStreamReader parser) throws IOException, XMLStreamException
readXML()
starts parsing by
checking the start tag of this object and finishes parsing by checking the
end tag. The caller has to ensure, that at method entry the current token
is the start tag. After the method call it's the callers responsibility to
move from the end tag to the next token.
readXML
in interface XMLSerializable
parser
- XMLStreamReader the xml input stream
IOException
- raised, if there are any io troubles
XMLStreamException
- raised, if there are any parsing errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |