/Users/richardeakin/projects/libsms/trunk/src/sineSynth.c File Reference

functions for synthesizing evolving sinusoids More...

#include "sms.h"
Include dependency graph for sineSynth.c:

Functions

static void SinePhaSynth (sfloat fFreq, sfloat fMag, sfloat fPhase, SMS_Data *pLastFrame, sfloat *pFWaveform, int sizeBuffer, int iTrack)
 generate a sinusoid given two peaks, current and last
static void SineSynth (sfloat fFreq, sfloat fMag, SMS_Data *pLastFrame, sfloat *pFBuffer, int sizeBuffer, int iTrack)
 generate a sinusoid given two frames, current and last
void sms_sineSynthFrame (SMS_Data *pSmsData, sfloat *pFBuffer, int sizeBuffer, SMS_Data *pLastFrame, int iSamplingRate)
 generate all the sinusoids for a given frame

Detailed Description

functions for synthesizing evolving sinusoids


Function Documentation

static void SinePhaSynth ( sfloat  fFreq,
sfloat  fMag,
sfloat  fPhase,
SMS_Data pLastFrame,
sfloat *  pFWaveform,
int  sizeBuffer,
int  iTrack 
) [static]

generate a sinusoid given two peaks, current and last

it interpolation between phase values and magnitudes

Parameters:
fFreq current frequency
fMag current magnitude
fPhase current phase
pLastFrame stucture with values from last frame
pFWaveform pointer to output waveform
sizeBuffer size of the synthesis buffer
iTrack current track

References SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, PI_2, sfloat, sms_dBToMag(), and TWO_PI.

Referenced by sms_sineSynthFrame().

Here is the call graph for this function:

static void SineSynth ( sfloat  fFreq,
sfloat  fMag,
SMS_Data pLastFrame,
sfloat *  pFBuffer,
int  sizeBuffer,
int  iTrack 
) [static]

generate a sinusoid given two frames, current and last

Parameters:
fFreq current frequency
fMag current magnitude
pLastFrame stucture with values from last frame
pFBuffer pointer to output waveform
sizeBuffer size of the synthesis buffer
iTrack current track

References SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, sfloat, sms_dBToMag(), sms_random(), sms_sine(), and TWO_PI.

Referenced by sms_sineSynthFrame().

Here is the call graph for this function:

void sms_sineSynthFrame ( SMS_Data pSmsData,
sfloat *  pFBuffer,
int  sizeBuffer,
SMS_Data pLastFrame,
int  iSamplingRate 
)

generate all the sinusoids for a given frame

Parameters:
pSmsData SMS data for current frame
pFBuffer pointer to output waveform
sizeBuffer size of the synthesis buffer
pLastFrame SMS data from last frame
iSamplingRate sampling rate to synthesize for

References SMS_Data::nTracks, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, sfloat, SinePhaSynth(), SineSynth(), and TWO_PI.

Referenced by sms_analyze(), and sms_synthesize().

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Thu Oct 29 04:08:07 2009 for libsms by  doxygen 1.6.1