sample.beatsdrop.sample module¶
Module for integrating BeatsDROP in the SAMPLE model
- class sample.beatsdrop.sample.SAMPLEBeatsDROP(beatsdrop: ~typing.Optional[~sample.beatsdrop.regression.BeatRegression] = None, beat_decisor: ~typing.Optional[~sample.beatsdrop.decision.BeatDecisor] = None, sinusoidal: ~typing.Optional[~sample.sms.sm.SinusoidalModel] = None, regressor: ~typing.Optional[~sample.hinge.HingeRegression] = None, regressor_k: str = 'k_', regressor_q: str = 'q_', freq_reduce: ~typing.Callable[[~numpy.ndarray], float] = <function mean>, max_n_modes: ~typing.Optional[int] = None, **kwargs)¶
Bases:
SAMPLE
SAMPLE model with BeatsDROP beat decoupling
- Parameters:
beatsdrop (BeatRegression) – Beat regression model. Default is an instance of
sample.beatsdrop.regression.DualBeatRegression
beat_decisor (BeatDecisor) – Model responsible for deciding wether the trajectory is a beat or not. By default it is an instance of
sample.beatsdrop.decision.AlmostNotABeatDecisor
sinusoidal (SinusoidalModel) – Sinusoidal analysis model. Default is an instance of
sample.sms.mm.ModalModel
regressor – Modal parameters regression model. Default is an instance of
sample.hinge.HingeRegression
regressor_k (str) – Attribute name for the estimated slope coefficient of
regressor
regressor_q (str) – Attribute name for the estimated intercept coefficient of
regressor
freq_reduce (callable) – Callable function for reducing the frequency track into a single frequency. Defaults to
numpy.mean()
max_n_modes (int) – Number of modes to use in resynthesis. If
None
(default), then synthesise all modes**kwargs – Additional parameters for sub-models. See
sample.beatsdrop.regression.DualBeatRegression
,sample.beatsdrop.decision.AlmostNotABeatDecisor
,sample.sms.mm.ModalTracker
,sample.sms.mm.ModalModel
,sample.hinge.HingeRegression
, andsample.utils.learn.OptionalStorage
- param_matrix_¶
4-by-N matrix of modal parameters
- Type:
array
- property beat_decisor¶
Beat decision model
- property beatsdrop¶
Beat regression model
- property phases_: ndarray¶
Learned sinusoidal phases. Relevant between pairs of beating partials
- predict(x: ndarray, **kwargs) ndarray ¶
Resynthesize audio
- Parameters:
x (array) – Time axis
**kwargs – Keyword arguments for
sample.sample.SAMPLE.predict()
- Returns:
Array of audio samples
- Return type:
array