msaf.features.Tempogram¶
-
class
msaf.features.Tempogram(file_struct, feat_type, sr=22050, hop_length=1024, win_length=192)[source]¶ This class contains the implementation of the Tempogram feature.
The Tempogram contains rhythmic content of a given audio signal.
-
__init__(file_struct, feat_type, sr=22050, hop_length=1024, win_length=192)[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.
win_length: int > 0
The size of the window for the tempogram.
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
featuresThis getter will compute the actual features if they haven’t been computed yet. frame_timesThis getter returns the frame times, for the corresponding type of features. -