smst.models.stochastic module¶
Functions that implement analysis and synthesis of sounds using the Stochastic Model.
In this model the sound is modeled using a magnitude envelope of the signal’s spectrum. The magnitude envelope is decimated. On reconstruction the phases are generated randomly.
-
smst.models.stochastic.
from_audio
(x, H, N, stocf)¶ Analyzes a sound using the stochastic model.
Parameters: - x – input array sound
- H – hop size
- N – FFT size
- stocf – decimation factor of mag spectrum for stochastic analysis, bigger than 0, maximum of 1
Returns: stocEnv: stochastic envelope
-
smst.models.stochastic.
scale_time
(stocEnv, timeScaling)¶ Scales the stochastic model of a sound in time.
Parameters: - stocEnv – stochastic envelope
- timeScaling – scaling factors, in time-value pairs
Returns: ystocEnv: stochastic envelope
-
smst.models.stochastic.
to_audio
(stocEnv, H, N)¶ Synthesizes sound from a stochastic model.
Parameters: - stocEnv – stochastic envelope
- H – hop size
- N – fft size
Returns: y: output sound