MusicExtractor
extends BaseAlgorithm
in package
MusicExtractor
Inputs:
[string] filename - the input audiofile
Outputs:
[pool] results - Analysis results pool with across-frames statistics [pool] resultsFrames - Analysis results pool with computed frame values
Parameters:
analysisSampleRate: real ∈ (0,inf) (default = 44100) the analysis sampling rate of the audio signal [Hz]
chromaprintCompute: bool ∈ {true,false} (default = false) compute the Chromaprint
chromaprintDuration: real ∈ [0,inf) (default = 0) the amount of time from the beginning used to compute the Chromaprint. 0 to use the full audio length [s]
endTime: real ∈ [0,inf) (default = 1000000) the end time of the slice you want to extract [s]
gfccStats: vector_string (default = ["mean", "cov", "icov"]) the statistics to compute for GFCC features
highlevel: vector_string list of high-level classifier models (gaia2 history filenames) to apply using extracted features. Skip classification if not specified (empty list)
loudnessFrameSize: integer ∈ (0,inf) (default = 88200) the frame size for computing average loudness
loudnessHopSize: integer ∈ (0,inf) (default = 44100) the hop size for computing average loudness
lowlevelFrameSize: integer ∈ (0,inf) (default = 2048) the frame size for computing low-level features
lowlevelHopSize: integer ∈ (0,inf) (default = 1024) the hop size for computing low-level features
lowlevelSilentFrames: string ∈ {drop,keep,noise} (default = "noise") whether to [keep/drop/add noise to] silent frames for computing low-level features
lowlevelStats: vector_string (default = ["mean", "var", "stdev", "median", "min", "max", "dmean", "dmean2", "dvar", "dvar2"]) the statistics to compute for low-level features
lowlevelWindowType: string ∈ {hamming,hann,triangular,square,blackmanharris62,blackmanharris70,blackmanharris74,blackmanharris92} (default = "blackmanharris62") the window type for computing low-level features
lowlevelZeroPadding: integer ∈ [0,inf) (default = 0) zero padding factor for computing low-level features
mfccStats: vector_string (default = ["mean", "cov", "icov"]) the statistics to compute for MFCC features
profile: string profile filename. If specified, default parameter values are overwritten by values in the profile yaml file. If not specified (empty string), use values configured by user like in other normal algorithms
requireMbid: bool ∈ {true,false} (default = false) ignore audio files without musicbrainz recording id tag (throw exception)
rhythmMaxTempo: integer ∈ [60,250] (default = 208) the fastest tempo to detect [bpm]
rhythmMethod: string ∈ {multifeature,degara} (default = "degara") the method used for beat tracking
rhythmMinTempo: integer ∈ [40,180] (default = 40) the slowest tempo to detect [bpm]
rhythmStats: vector_string (default = ["mean", "var", "stdev", "median", "min", "max", "dmean", "dmean2", "dvar", "dvar2"]) the statistics to compute for rhythm features
startTime: real ∈ [0,inf) (default = 0) the start time of the slice you want to extract [s]
tonalFrameSize: integer ∈ (0,inf) (default = 4096) the frame size for computing tonal features
tonalHopSize: integer ∈ (0,inf) (default = 2048) the hop size for computing tonal features
tonalSilentFrames: string ∈ {drop,keep,noise} (default = "noise") whether to [keep/drop/add noise to] silent frames for computing tonal features
tonalStats: vector_string (default = ["mean", "var", "stdev", "median", "min", "max", "dmean", "dmean2", "dvar", "dvar2"]) the statistics to compute for tonal features
tonalWindowType: string ∈ {hamming,hann,triangular,square,blackmanharris62,blackmanharris70,blackmanharris74,blackmanharris92} (default = "blackmanharris62") the window type for computing tonal features
tonalZeroPadding: integer ∈ [0,inf) (default = 0) zero padding factor for computing tonal features
Description:
This algorithm is a wrapper for Music Extractor. See documentation for 'essentia_streaming_extractor_music'.
Category: Extractor Mode: standard
Table of Contents
Properties
- $algorithmName : string
- $category : string
- $essentia : EssentiaFFI
- $mode : string
- $parameters : array<string|int, mixed>
- $algorithmHandle : CData|null
- $configured : bool
Methods
- __construct() : mixed
- __destruct() : mixed
- compute() : array<string|int, mixed>
- getAlgorithmName() : string
- getCategory() : string
- getMode() : string
- getParameters() : array<string|int, mixed>
- setParameter() : self
- configure() : void
- isValidParameter() : bool
- validateInput() : void
- cleanupAlgorithm() : void
- configureAlgorithmParameters() : void
- estimateOutputSize() : int
- executeAlgorithm() : array<string|int, mixed>
- executeGenericAlgorithm() : array<string|int, mixed>
- executeSpecificAlgorithm() : array<string|int, mixed>
- getAlgorithmCreateFunction() : string
- getValidParameters() : array<string|int, mixed>
- initializeAlgorithm() : void
- prepareInput() : mixed
- processOutput() : array<string|int, mixed>
- processRhythmOutput() : array<string|int, mixed>
- processSpectralOutput() : array<string|int, mixed>
- processStatsOutput() : array<string|int, mixed>
- processTemporalOutput() : array<string|int, mixed>
- processTonalOutput() : array<string|int, mixed>
- setAlgorithmParameter() : void
- setArrayParameter() : void
- validateAlgorithmInput() : void
Properties
$algorithmName
protected
string
$algorithmName
= 'MusicExtractor'
$category
protected
string
$category
= 'Extractor'
$essentia
protected
EssentiaFFI
$essentia
$mode
protected
string
$mode
= 'standard'
$parameters
protected
array<string|int, mixed>
$parameters
= []
$algorithmHandle
private
CData|null
$algorithmHandle
= null
$configured
private
bool
$configured
= false
Methods
__construct()
public
__construct([array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
- $parameters : array<string|int, mixed> = []
__destruct()
public
__destruct() : mixed
compute()
public
compute(mixed $input) : array<string|int, mixed>
Parameters
- $input : mixed
Return values
array<string|int, mixed>getAlgorithmName()
public
getAlgorithmName() : string
Return values
stringgetCategory()
public
getCategory() : string
Return values
stringgetMode()
public
getMode() : string
Return values
stringgetParameters()
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>setParameter()
public
setParameter(string $key, mixed $value) : self
Parameters
- $key : string
- $value : mixed
Return values
selfconfigure()
protected
configure(array<string|int, mixed> $parameters) : void
Parameters
- $parameters : array<string|int, mixed>
isValidParameter()
protected
isValidParameter(string $parameter) : bool
Parameters
- $parameter : string
Return values
boolvalidateInput()
protected
validateInput(mixed $input, string $expectedType) : void
Parameters
- $input : mixed
- $expectedType : string
cleanupAlgorithm()
private
cleanupAlgorithm() : void
configureAlgorithmParameters()
private
configureAlgorithmParameters() : void
estimateOutputSize()
private
estimateOutputSize(mixed $input) : int
Parameters
- $input : mixed
Return values
intexecuteAlgorithm()
private
executeAlgorithm(mixed $input) : array<string|int, mixed>
Parameters
- $input : mixed
Return values
array<string|int, mixed>executeGenericAlgorithm()
private
executeGenericAlgorithm(FFI $ffi, mixed $input) : array<string|int, mixed>
Parameters
- $ffi : FFI
- $input : mixed
Return values
array<string|int, mixed>executeSpecificAlgorithm()
private
executeSpecificAlgorithm(FFI $ffi, mixed $input) : array<string|int, mixed>
Parameters
- $ffi : FFI
- $input : mixed
Return values
array<string|int, mixed>getAlgorithmCreateFunction()
private
getAlgorithmCreateFunction() : string
Return values
stringgetValidParameters()
private
getValidParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>initializeAlgorithm()
private
initializeAlgorithm() : void
prepareInput()
private
prepareInput(mixed $input) : mixed
Parameters
- $input : mixed
processOutput()
private
processOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>processRhythmOutput()
private
processRhythmOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>processSpectralOutput()
private
processSpectralOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>processStatsOutput()
private
processStatsOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>processTemporalOutput()
private
processTemporalOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>processTonalOutput()
private
processTonalOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
Return values
array<string|int, mixed>setAlgorithmParameter()
private
setAlgorithmParameter(FFI $ffi, string $key, mixed $value) : void
Parameters
- $ffi : FFI
- $key : string
- $value : mixed
setArrayParameter()
private
setArrayParameter(FFI $ffi, string $key, array<string|int, mixed> $value) : void
Parameters
- $ffi : FFI
- $key : string
- $value : array<string|int, mixed>
validateAlgorithmInput()
private
validateAlgorithmInput(mixed $input) : void
Parameters
- $input : mixed