msaf.features.MFCC

class msaf.features.MFCC(file_struct, feat_type, sr=22050, hop_length=1024, n_fft=4096, n_mels=128, n_mfcc=14, ref_power='max')[source]

This class contains the implementation of the MFCC Features.

The Mel-Frequency Cepstral Coefficients contain timbral content of a given audio signal.

__init__(file_struct, feat_type, sr=22050, hop_length=1024, n_fft=4096, n_mels=128, n_mfcc=14, ref_power='max')[source]

Constructor of the class.

Parameters:

file_struct: `msaf.input_output.FileStruct`

Object containing the file paths from where to extract/read the features.

feat_type: `FeatureTypes`

Enum containing the type of features.

sr: int > 0

Sampling rate for the analysis.

hop_length: int > 0

Hop size in frames for the analysis.

n_fft: int > 0

Number of frames for the FFT.

n_mels: int > 0

Number of mel filters.

n_mfcc: int > 0

Number of mel coefficients.

ref_power: function

The reference power for logarithmic scaling.

Methods

__init__(file_struct, feat_type[, sr, ...]) Constructor of the class.
compute_HPSS() Computes harmonic-percussive source separation.
compute_beat_sync_features(beat_frames, ...) Make the features beat-synchronous.
compute_features() Actual implementation of the features.
estimate_beats() Estimates the beats using librosa.
get_id() Identifier of these features.
get_param_names() Returns the parameter names for these features, avoiding the global parameters.
read_ann_beats() Reads the annotated beats if available.
read_features([tol]) Reads the features from a file and stores them in the current object.
select_features(features_id, file_struct, ...) Selects the features from the given parameters.
write_features() Saves features to file.

Attributes

features This getter will compute the actual features if they haven’t been computed yet.
frame_times This getter returns the frame times, for the corresponding type of features.