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

line segment approximation of a magnitude spectrum More...

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

Functions

int sms_spectralApprox (sfloat *pFSpec1, int sizeSpec1, int sizeSpec1Used, sfloat *pFSpec2, int sizeSpec2, int nCoefficients)
 approximate a magnitude spectrum First downsampling using local maxima and then upsampling using linear interpolation. The output spectrum doesn't have to be the same size as the input one.

Detailed Description

line segment approximation of a magnitude spectrum


Function Documentation

int sms_spectralApprox ( sfloat *  pFSpec1,
int  sizeSpec1,
int  sizeSpec1Used,
sfloat *  pFSpec2,
int  sizeSpec2,
int  nCoefficients 
)

approximate a magnitude spectrum First downsampling using local maxima and then upsampling using linear interpolation. The output spectrum doesn't have to be the same size as the input one.

Parameters:
pFSpec1 magnitude spectrum to approximate
sizeSpec1 size of input spectrum
sizeSpec1Used size of the spectrum to use
pFSpec2 output envelope
sizeSpec2 size of output envelope
nCoefficients number of coefficients to use in approximation
Returns:
error code
See also:
SMS_ERRORS (or -1 if the algorithm just messes up, it will print an error of its own.

References MAX, MIN, sfloat, sms_error(), SMS_MALLOC, and SMS_OK.

Referenced by InterpolateArrays(), sms_hybridize(), sms_stocAnalysis(), sms_stochastic(), and StocSynthApprox().

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