carat.features.feature_map

carat.features.feature_map(feature, time, beats, downbeats, n_beats=4, n_tatums=4, norm_flag=True, pnorm=8, window=0.1)[source]

Compute feature map from accentuation feature signal.

Based on the feature map introduced in [1].

[1] Rocamora, Jure, Biscainho
“Tools for detection and classification of piano drum patterns from candombe recordings.” 9th Conference on Interdisciplinary Musicology (CIM), Berlin, Germany. 2014.

The accentuation feature is organized into a feature map. First, the feature signal is time-quantized to the rhythm metric structure by considering a grid of tatum pulses equally distributed within the annotated beats. The corresponding feature value is taken as the maximum within window centered at the frame closest to each tatum instant. This yields feature vectors whose coordinates correspond to the tatum pulses of the rhythm cycle (or bar). Finally, a feature map of the cycle-length rhythmic patterns of the audio file is obtained by building a matrix whose columns are consecutive feature vectors.

Args:
  • feature (numpy array): feature signal
  • **kw: these keyword arguments are passed down to each of the functions used
Returns:
  • :
Raises: