msaf.features.PCP

class msaf.features.PCP(file_struct, feat_type, sr=22050, hop_length=1024, n_bins=84, norm=inf, f_min=27.5, n_octaves=6)[source]

This class contains the implementation of the Pitch Class Profiles.

The PCPs contain harmonic content of a given audio signal.

__init__(file_struct, feat_type, sr=22050, hop_length=1024, n_bins=84, norm=inf, f_min=27.5, n_octaves=6)[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_bins: int > 0

Number of bins for the CQT computation.

norm: int > 0

Normalization parameter.

f_min: float > 0

Minimum frequency.

n_octaves: int > 0

Number of octaves.

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.