Class SpectralCentroidMean
- java.lang.Object
-
- com.tagtraum.audiokern.lowlevel.LowLevelFeatureAnalyzer<Float>
-
- com.tagtraum.audiokern.lowlevel.SpectralCentroidMean
-
- All Implemented Interfaces:
SongPropertyAnalyzer<Float>
public class SpectralCentroidMean extends LowLevelFeatureAnalyzer<Float>
SpectralCentroidMean.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description SpectralCentroidMean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SignalProcessor<AudioBuffer,Float>
createPipeline()
Creates a pipeline that produces a result with the property name in question as id.String
getName()
Name of this analyzer in the formatNAME 0.0.0
, where NAME is the name and 0.0.0 its version.String
getPropertyName()
Name of the property that shall be set on anAudioSong
object.-
Methods inherited from class com.tagtraum.audiokern.lowlevel.LowLevelFeatureAnalyzer
getFirstXSecondsOfAudio, getRequiredClip, setFirstXSecondsOfAudio
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tagtraum.audiokern.SongPropertyAnalyzer
getId
-
-
-
-
Method Detail
-
createPipeline
public SignalProcessor<AudioBuffer,Float> createPipeline()
Description copied from interface:SongPropertyAnalyzer
Creates a pipeline that produces a result with the property name in question as id. E.g. to calculate the
key
property of anAudioSong
, this method should create a pipeline that produces aKey
object under the idkey
.This method must return a new pipeline every time it is called. You must not cache a once created pipeline and return it again and again.
When this instance is used, the produced pipeline is repeatedly called with audio data. Specifically, the
SignalProcessor.process(Object)
method is called withAudioBuffer
s for the desired clip (seeSongPropertyAnalyzer.getRequiredClip(AudioFileFormat)
). The audio format is typically 44.1kHz, stereo, signed 16 bit.Once all buffers are processed, the system calls
SignalProcessor.flush()
and then expectsSignalProcessor.getOutput()
to return the computed value.- Returns:
- analysis pipeline
- See Also:
SignalProcessor.getId()
,SignalProcessor.flush()
,SignalProcessor.process(Object)
,SignalProcessor.getOutput()
-
getName
public String getName()
Description copied from interface:SongPropertyAnalyzer
Name of this analyzer in the formatNAME 0.0.0
, where NAME is the name and 0.0.0 its version.- Returns:
- name
-
getPropertyName
public String getPropertyName()
Description copied from interface:SongPropertyAnalyzer
Name of the property that shall be set on anAudioSong
object. This could be e.g.key
,comments
,grouping
, ...- Returns:
- property name
-
-