smst.utils.residual module¶
-
smst.utils.residual.
subtract_sinusoids
(x, N, H, sfreq, smag, sphase, fs)¶ Subtracts sinusoids from a sound.
Parameters: - x – input sound
- N – FFT size
- H – hop size
- sfreq – sinusoidal frequencies
- smag – sinusoidal magnitudes
- sphase – sinusoidal phases
Returns: xr: residual sound
-
smst.utils.residual.
subtract_sinusoids_with_stochastic_residual
(x, N, H, sfreq, smag, sphase, fs, stocf)¶ Subtracts sinusoids from a sound and approximate the residual with an envelope.
Parameters: - x – input sound
- N – FFT size
- H – hop size
- sfreq – sinusoidal frequencies
- smag – sinusoidal magnitudes
- sphase – sinusoidal phases
- fs – sampling rate
- stocf – stochastic factor, used in the approximation
Returns: stocEnv: stochastic approximation of residual