carat.features.feature_time_quantize¶
-
carat.features.
feature_time_quantize
(feature, time, tatums, window=0.1)[source]¶ Time quantization of the feature signal to a tatum grid.
The feature signal is time-quantized to the rhythm metric structure by considering a grid of tatum pulses equally distributed within the tactus beats. The feature value assigned to each tatum time instant is obtained as the maximum value of the feature signal within a certain window centered at the tatum time instant. Default value for the total window lenght is 100 ms.
- Args:
- feature (numpy array): feature signal values
- time (numpy array): time instants of the feature values
- tatums (numpy array): time instants of the tatum grid
- Returns:
- :
- Raises:
- quantized_feature (numpy array): time quantized feature signal values