|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.audio.extraction.AttributeExtractor comirva.audio.extraction.AudioFeatureExtractor comirva.audio.extraction.FluctuationPatternExtractor
public class FluctuationPatternExtractor
Title: Fluctuation Patterns
Description:
This class supports the extraction of the so-called "Fluctuation Patterns" from an audio stream. The fluctuation pattern of a song is a feature describing the rhythmic structure of the whole song in some way. Form implementation point of viewFluctuationPatternExtractor
implements the AudioFeatureExtractor
interface and returns a
FluctuationPattern
object, which is an instance of a subclass
of the abstract AudioFeature
class.
[1] Fastl, "Fluctuation strength and temporal masking patterns of
amplitude-modulated broad-band noise", Hearing Research, 8:59-69, 1982.
[2] Rauber, Pampalk, Merkl "Using Psycho-Acoustic Models and Self-Organizing
Maps to create a Hierarchical Structuring of Music by Sound Similarity",
In proceedings of ISMIR 2002, pages 71-80, 2002.
[3] Pampalk, Rauber "Content-based Organization and Visualization of Music
Archives", In Proceedings of the ACM Multimedia 2002, pages 570-579, 2002.
AudioFeatureExtractor
,
FluctuationPattern
Field Summary | |
---|---|
protected int |
fftSize
|
protected FFT |
magnitudeFFT
|
protected NormalizedConvolution |
normalizedConvolution
|
protected AudioPreProcessor |
preProcessor
|
protected float |
sampleRate
|
protected int |
segmentSize
|
protected Sone |
soneProcessor
|
Constructor Summary | |
---|---|
FluctuationPatternExtractor()
The default constructor uses segments of size 65536 samples. |
|
FluctuationPatternExtractor(float sampleRate,
int fftSize,
int segmentSize)
Constructs an individualized FluctuationPatternExtractor. |
Method Summary | |
---|---|
Attribute |
calculate(File input)
This method is used to calculate the fluctuation pattern for a whole song. |
AttributeExtractor |
copy()
This method returns a copy of an AttributeExtractor. |
protected Matrix |
createPattern(double[][] sone)
Computes the fluctuation pattern for a short piece of audio. |
int |
getAttributeType()
Returns the type of the attribute that the class implementing this interface will return as the result of its extraction process. |
protected Vector<Matrix> |
getFluctuationPatterns()
Splits the audio stream in short segments and computes a fluctuation pattern for every third segment. |
double[] |
getFluxWeights()
Returns weights for the amplitude modulation coefficients based on the psychoarcoustic model of the fluctuation strength. |
static double |
getMedian(double[] array)
Computes the median of all the elements in the array. |
protected static void |
sortArray(double[] array)
Sorts all elements of the given array. |
String |
toString()
Returns the feature extractors name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int segmentSize
protected int fftSize
protected float sampleRate
protected FFT magnitudeFFT
protected Sone soneProcessor
protected NormalizedConvolution normalizedConvolution
protected AudioPreProcessor preProcessor
Constructor Detail |
---|
public FluctuationPatternExtractor()
public FluctuationPatternExtractor(float sampleRate, int fftSize, int segmentSize)
fftSize
- int number of sone values to considersegmentSize
- int number of samples a segments consists ofMethod Detail |
---|
public AttributeExtractor copy()
AttributeExtractor
copy
in class AttributeExtractor
public Attribute calculate(File input) throws IllegalArgumentException, IOException, UnsupportedAudioFileException
AudioPreProcessor
object. All settings are set by the constructor, so this method can easily
be called for a large number of songs to extract this feature.
calculate
in class AttributeExtractor
input
- Object an AudioPreProcessor
representing the audio
input stream;
FluctuationPattern
feature is returned as a
result of this feature extraction process
IOException
- if there are any problems regarding the inputstream
IllegalArgumentException
- raised if method contract of a subroutine
is violated
UnsupportedAudioFileException
protected Vector<Matrix> getFluctuationPatterns() throws IOException, IllegalArgumentException
IOException
- if there are any problems regarding the inputstream
IllegalArgumentException
- raised if method contract of a subroutine
is violatedprotected Matrix createPattern(double[][] sone)
sone
- double[][] sone values; must not be a null value;
public double[] getFluxWeights()
public static double getMedian(double[] array) throws IllegalArgumentException
array
- double[] array of values; must not be a null value and must
contain at least one element;
IllegalArgumentException
- raised if method contract is violatedprotected static void sortArray(double[] array)
array
- double[] array of values; must not be a null value and must
contain at least one element;public int getAttributeType()
getAttributeType
in class AttributeExtractor
Attribute
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |