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

modify sms data More...

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

Functions

void sms_initModify (SMS_Header *header, SMS_ModifyParams *params)
 initialize a modifications structure based on an SMS_Header
void sms_initModifyParams (SMS_ModifyParams *params)
 initialize modification parameters
void sms_freeModify (SMS_ModifyParams *params)
 free memory allocated during initialization
void sms_interpEnvelopes (int sizeEnv, sfloat *env1, sfloat *env2, float interpFactor)
 linear interpolation between 2 spectral envelopes.
void sms_applyEnvelope (int numPeaks, sfloat *pFreqs, sfloat *pMags, int sizeEnv, sfloat *pEnvMags, int maxFreq)
 apply the spectral envelope of 1 sound to another
void sms_resGain (SMS_Data *frame, sfloat gain)
 scale the residual gain factor
void sms_transpose (SMS_Data *frame, sfloat transpositionFactor)
 basic transposition Multiply the frequencies of the deterministic component by a constant
void sms_transposeKeepEnv (SMS_Data *frame, sfloat transpositionFactor, int maxFreq)
 transposition maintaining spectral envelope
void sms_modify (SMS_Data *frame, SMS_ModifyParams *params)
 modify a frame (SMS_Data object)

Detailed Description

modify sms data


Function Documentation

void sms_applyEnvelope ( int  numPeaks,
sfloat *  pFreqs,
sfloat *  pMags,
int  sizeEnv,
sfloat *  pEnvMags,
int  maxFreq 
)

apply the spectral envelope of 1 sound to another

Changes the amplitude of spectral peaks in a target sound (pFreqs, pMags) to match those in the envelope (pCepEnvFreqs, pCepEnvMags) of another, up to a maximum frequency of maxFreq.

Referenced by sms_modify(), and sms_transposeKeepEnv().

void sms_freeModify ( SMS_ModifyParams params  ) 

free memory allocated during initialization

Parameters:
params pointer to parameter structure
void sms_initModify ( SMS_Header header,
SMS_ModifyParams params 
)

initialize a modifications structure based on an SMS_Header

Parameters:
params pointer to parameter structure
header pointer to sms header

References SMS_Header::iMaxFreq, SMS_ModifyParams::maxFreq, SMS_Header::nEnvCoeff, SMS_ModifyParams::ready, sfloat, SMS_ModifyParams::sinEnv, SMS_ModifyParams::sizeSinEnv, and sms_error().

Here is the call graph for this function:

void sms_initModifyParams ( SMS_ModifyParams params  ) 
void sms_interpEnvelopes ( int  sizeEnv,
sfloat *  env1,
sfloat *  env2,
float  interpFactor 
)

linear interpolation between 2 spectral envelopes.

The values in env2 are overwritten by the new interpolated envelope values.

Referenced by sms_modify().

void sms_modify ( SMS_Data frame,
SMS_ModifyParams params 
)
void sms_resGain ( SMS_Data frame,
sfloat  gain 
)

scale the residual gain factor

Parameters:
frame pointer to sms data
gain factor to scale the residual

References SMS_Data::nCoeff, and SMS_Data::pFStocCoeff.

Referenced by sms_modify().

void sms_transpose ( SMS_Data frame,
sfloat  transpositionFactor 
)

basic transposition Multiply the frequencies of the deterministic component by a constant

References SMS_Data::nTracks, SMS_Data::pFSinFreq, and sms_scalarTempered().

Referenced by sms_modify(), and sms_transposeKeepEnv().

Here is the call graph for this function:

void sms_transposeKeepEnv ( SMS_Data frame,
sfloat  transpositionFactor,
int  maxFreq 
)

transposition maintaining spectral envelope

Multiply the frequencies of the deterministic component by a constant, then change their amplitudes so that the original spectral envelope is maintained

References SMS_Data::nEnvCoeff, SMS_Data::nTracks, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pSpecEnv, sms_applyEnvelope(), and sms_transpose().

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