main synthesis routines More...
#include "sms.h"
Functions | |
static void | SineSynthIFFT (SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) |
synthesis of one frame of the deterministic component using the IFFT | |
void | sms_deterministic (SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) |
synthesis of one frame of the deterministic component using the IFFT | |
static int | StocSynthApprox (SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) |
synthesis of one frame of the stochastic component by apprimating phases | |
int | sms_stochastic (SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) |
synthesis of one frame of the residual component, modeled as stochastic, by approximating phases | |
void | sms_synthesize (SMS_Data *pSmsData, sfloat *pFSynthesis, SMS_SynthParams *pSynthParams) |
synthesizes one frame of SMS data |
main synthesis routines
static void SineSynthIFFT | ( | SMS_Data * | pSmsData, | |
SMS_SynthParams * | pSynthParams | |||
) | [static] |
synthesis of one frame of the deterministic component using the IFFT
pSmsData | pointer to SMS data structure frame | |
pSynthParams | pointer to structure of synthesis parameters |
References INV_TWO_PI, SMS_SynthParams::iSamplingRate, SMS_Data::nTracks, SMS_SynthParams::pFDetWindow, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, PI_2, SMS_SynthParams::prevFrame, SMS_SynthParams::pSpectra, SMS_SynthParams::pSynthBuff, sfloat, SMS_SynthParams::sizeHop, sms_ifft(), sms_random(), sms_sinc(), sms_sine(), and TWO_PI.
Referenced by sms_synthesize().
void sms_deterministic | ( | SMS_Data * | pSmsData, | |
SMS_SynthParams * | pSynthParams | |||
) |
synthesis of one frame of the deterministic component using the IFFT
I made this function trying to pull the ifft out of the SineSynthIFFT that part of the code is in the main sms_synthesize function below Next would be sms_stochastic, so they could be summed and synthesized with only one fft, but the problem is that it needs to be 'pre-inverse-windowed' before the stochastic can be summed.
pSmsData | pointer to SMS data structure frame | |
pSynthParams | pointer to structure of synthesis parameters |
References INV_TWO_PI, SMS_SynthParams::iSamplingRate, SMS_Data::nTracks, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, PI_2, SMS_SynthParams::prevFrame, SMS_SynthParams::pSpectra, sfloat, SMS_SynthParams::sizeHop, sms_random(), sms_sinc(), sms_sine(), and TWO_PI.
Referenced by sms_synthesize().
int sms_stochastic | ( | SMS_Data * | pSmsData, | |
SMS_SynthParams * | pSynthParams | |||
) |
synthesis of one frame of the residual component, modeled as stochastic, by approximating phases
computes a linearly interpolated spectral envelope to fit the correct number of output audio samples. Phases are generated randomly.
pSmsData | pointer to the current SMS frame | |
pSynthParams | pointer to a strucure of synthesis parameters |
References SMS_SynthParams::iOriginalSRate, SMS_SynthParams::iSamplingRate, SMS_Data::nCoeff, SMS_Data::pFStocCoeff, SMS_Data::pFStocGain, SMS_SynthParams::pMagBuff, SMS_SynthParams::pPhaseBuff, SMS_SynthParams::pSpectra, SMS_SynthParams::sizeHop, sms_PolarToRect(), sms_random(), sms_spectralApprox(), and TWO_PI.
void sms_synthesize | ( | SMS_Data * | pSmsData, | |
sfloat * | pFSynthesis, | |||
SMS_SynthParams * | pSynthParams | |||
) |
synthesizes one frame of SMS data
pSmsData | input SMS data | |
pFSynthesis | output sound buffer | |
pSynthParams | synthesis parameters |
<
References SMS_SynthParams::iDetSynthType, SMS_SynthParams::iSamplingRate, SMS_SynthParams::iStochasticType, SMS_SynthParams::iSynthesisType, SMS_SynthParams::pFDetWindow, SMS_SynthParams::prevFrame, SMS_SynthParams::pSpectra, SMS_SynthParams::pSynthBuff, sfloat, SineSynthIFFT(), SMS_SynthParams::sizeHop, sms_deEmphasis(), SMS_DET_IFFT, sms_deterministic(), sms_ifft(), sms_sineSynthFrame(), SMS_STOC_IFFT, SMS_STYPE_ALL, SMS_STYPE_DET, and StocSynthApprox().
static int StocSynthApprox | ( | SMS_Data * | pSmsData, | |
SMS_SynthParams * | pSynthParams | |||
) | [static] |
synthesis of one frame of the stochastic component by apprimating phases
computes a linearly interpolated spectral envelope to fit the correct number of output audio samples. Phases are generated randomly.
pSmsData | pointer to the current SMS frame | |
pSynthParams | pointer to a strucure of synthesis parameters |
References SMS_SynthParams::iOriginalSRate, SMS_SynthParams::iSamplingRate, SMS_Data::nCoeff, SMS_Data::pFStocCoeff, SMS_Data::pFStocGain, SMS_SynthParams::pFStocWindow, SMS_SynthParams::pMagBuff, SMS_SynthParams::pPhaseBuff, SMS_SynthParams::pSynthBuff, SMS_SynthParams::sizeHop, sms_invQuickSpectrumW(), sms_random(), sms_spectralApprox(), and TWO_PI.
Referenced by sms_synthesize().