carat.features.feature_normalization¶
-
carat.features.
feature_normalization
(feature, time, beats, n_tatums=4, pnorm=8)[source]¶ Local amplitude normalization of the feature signal.
Based on the feature map introduced in [1] and detailed in [2].
- [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.
- [2] Rocamora, Cancela, Biscainho
- “Information theory concepts applied to the analysis of rhythm in recorded music with recurrent rhythmic patterns.” Journal of the AES, 67(4), 2019.
A local amplitude normalization is carried out to preserve intensity variations of the rhythmic patterns while discarding long-term fluctuations in dynamics. A p-norm within a local window is applied. The window width is proportional to the beat period.
- Args:
- feature (numpy array): feature signal values
- time (numpy array): time instants of the feature values
- beats (numpy array): time instants of the tactus beats
- n_tatums (int): number of tatums per tactus beat
- pnorm (int): p-norm order for normalization
- Returns:
- :
- Raises:
- norm_feature (numpy array): normalized feature signal values