smst.utils.synth module

smst.utils.synth.spectrum_for_sinusoids(ipfreq, ipmag, ipphase, N, fs)

Generates a spectrum from a series of sine values, calling a C function.

Parameters:
  • ipfreq – sine peaks frequencies
  • ipmag – sine peaks magnitudes
  • ipphase – sine peaks phases
  • N – size of the complex spectrum to generate
  • fs – sampling frequency
Returns:

Y: generated complex spectrum of sines

smst.utils.synth.spectrum_for_sinusoids_py(ipfreq, ipmag, ipphase, N, fs)

Generates a spectrum from a series of sine values. Python implementation.

Parameters:
  • ipfreq – sine peaks frequencies
  • ipmag – sine peaks magnitudes
  • ipphase – sine peaks phases
  • N – size of the complex spectrum to generate
  • fs – sampling frequency
Returns:

Y: generated complex spectrum of sines

smst.utils.synth.synthesize_sinusoid(freqs, amp, H, fs)

Synthesizes one sinusoid with time-varying frequency.

Parameters:
  • freqs – frequencies of sinusoids
  • amps – amplitudes of sinusoids
  • H – hop size
  • fs – sampling rate
Returns:

y: output sound