madmom.audio.comb_filters¶
This module contains comb-filter and comb-filterbank functionality.
-
class
madmom.audio.comb_filters.
CombFilterbankProcessor
¶ CombFilterbankProcessor class.
Parameters: filter_function : filter function or str
Filter function to use {feed_forward_comb_filter, feed_backward_comb_filter} or a string literal {‘forward’, ‘backward’}.
tau : list or numpy array, shape (N,)
Delay length(s) [frames].
alpha : list or numpy array, shape (N,)
Corresponding scaling factor(s).
Notes
tau and alpha must have the same length.
-
process
(self, data)¶ Process the given data with the comb filter.
Parameters: data : numpy array
Data to be filtered/processed.
Returns: comb_filtered_data : numpy array
Comb filtered data with the different taus aligned along the (new) first dimension.
-
-
madmom.audio.comb_filters.
comb_filter
(signal, filter_function, tau, alpha)¶ Filter the signal with a bank of either feed forward or backward comb filters.
Parameters: signal : numpy array
Signal.
filter_function : {feed_forward_comb_filter, feed_backward_comb_filter}
Filter function to use (feed forward or backward).
tau : list or numpy array, shape (N,)
Delay length(s) [frames].
alpha : list or numpy array, shape (N,)
Corresponding scaling factor(s).
Returns: comb_filtered_signal : numpy array
Comb filtered signal with the different taus aligned along the (new) first dimension.
Notes
tau and alpha must be of same length.
-
madmom.audio.comb_filters.
feed_backward_comb_filter
(signal, tau, alpha)¶ Filter the signal with a feed backward comb filter.
Parameters: signal : numpy array
Signal.
tau : int
Delay length.
alpha : float
Scaling factor.
Returns: comb_filtered_signal : numpy array
Comb filtered signal.
Notes
y[n] = x[n] + α * y[n - τ] is used as a filter function.
-
madmom.audio.comb_filters.
feed_backward_comb_filter_1d
(ndarray signal, unsigned int tau, float alpha)¶ Filter the signal with a feed backward comb filter.
Parameters: signal : 1D numpy array, float dtype
Signal.
tau : int
Delay length.
alpha : float
Scaling factor.
Returns: comb_filtered_signal : numpy array
Comb filtered signal.
Notes
y[n] = x[n] + α * y[n - τ] is used as a filter function.
-
madmom.audio.comb_filters.
feed_backward_comb_filter_2d
(ndarray signal, unsigned int tau, float alpha)¶ Filter the signal with a feed backward comb filter.
Parameters: signal : 2D numpy array, float dtype
Signal.
tau : int
Delay length.
alpha : float
Scaling factor.
Returns: comb_filtered_signal : numpy array
Comb filtered signal.
Notes
y[n] = x[n] + α * y[n - τ] is used as a filter function.
-
madmom.audio.comb_filters.
feed_forward_comb_filter
(signal, tau, alpha)¶ Filter the signal with a feed forward comb filter.
Parameters: signal : numpy array
Signal.
tau : int
Delay length.
alpha : float
Scaling factor.
Returns: comb_filtered_signal : numpy array
Comb filtered signal.
Notes
y[n] = x[n] + α * x[n - τ] is used as a filter function.