Interface SongPropertyAnalyzer<O>
-
- All Known Implementing Classes:
LowLevelFeatureAnalyzer
,RelativeSpectralEntropyMean
,RMSMean
,RMSStandardDeviation
,SpectralCentroidMean
,SpectralFluctuationPeak
,SpectralFluxMean
,SpectralNoveltyMean
,SpectralNoveltyStandardDeviation
,SpectralSpreadMean
,SpectralVariabilityMean
public interface SongPropertyAnalyzer<O>
Capable of creating a pipeline that analyzes audio with an
AudioSong
-property as result.Implementations might be picked up automatically by applications like beaTunes, if registered as plugins.
- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SignalProcessor<AudioBuffer,O>
createPipeline()
Creates a pipeline that produces a result with the property name in question as id.default String
getId()
Unique id for this analyzer.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.AudioClip
getRequiredClip(AudioFileFormat audioFileFormat)
Indicates which portion of the audio this analyzer needs to have available to do its job.
-
-
-
Method Detail
-
getId
default String getId()
Unique id for this analyzer. By default the fully qualified classname is returned. Some scripting languages (e.g. Nashorn Javascript) may require you to explicitly override this method.- Returns:
- id
-
getName
String getName()
Name of this analyzer in the formatNAME 0.0.0
, where NAME is the name and 0.0.0 its version.- Returns:
- name
-
getRequiredClip
AudioClip getRequiredClip(AudioFileFormat audioFileFormat)
Indicates which portion of the audio this analyzer needs to have available to do its job. E.g. the first 20s.- Parameters:
audioFileFormat
- file format- Returns:
- required audio clip or
null
, if we need the whole file
-
createPipeline
SignalProcessor<AudioBuffer,O> createPipeline()
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 (seegetRequiredClip(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()
-
-