functions for making smoothly evolving tracks (partial frequencies) More...
#include "sms.h"
Functions | |
static void | FillGap (int iCurrentFrame, int iTrack, int *pIState, SMS_AnalParams *pAnalParams) |
fill a gap in a given track | |
static void | DeleteShortTrack (int iCurrentFrame, int iTrack, int *pIState, SMS_AnalParams *pAnalParams) |
delete a short track | |
void | sms_cleanTracks (int iCurrentFrame, SMS_AnalParams *pAnalParams) |
fill gaps and delete short tracks | |
void | sms_scaleDet (sfloat *pFSynthBuffer, sfloat *pFOriginalBuffer, sfloat *pFSinAmp, SMS_AnalParams *pAnalParams, int nTrack) |
scale deterministic magnitude if synthesis is larger than original |
functions for making smoothly evolving tracks (partial frequencies)
Tries to fix gaps and short tracks
static void DeleteShortTrack | ( | int | iCurrentFrame, | |
int | iTrack, | |||
int * | pIState, | |||
SMS_AnalParams * | pAnalParams | |||
) | [static] |
delete a short track
this function is not exported to sms.h
iCurrentFrame | current frame | |
iTrack | track to be deleted | |
pIState | pointer to the state of tracks | |
pAnalParams | pointer to analysis parameters |
References SMS_AnalFrame::deterministic, SMS_AnalParams::iDebugMode, SMS_AnalFrame::iFrameNum, SMS_AnalParams::iMaxSleepingTime, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, SMS_AnalParams::ppFrames, SMS_DBG_ALL, and SMS_DBG_CLEAN_TRAJ.
Referenced by sms_cleanTracks().
static void FillGap | ( | int | iCurrentFrame, | |
int | iTrack, | |||
int * | pIState, | |||
SMS_AnalParams * | pAnalParams | |||
) | [static] |
fill a gap in a given track
iCurrentFrame | currrent frame number | |
iTrack | track to be filled | |
pIState | pointer to the state of tracks | |
pAnalParams | pointer to analysis parameters |
References SMS_AnalFrame::deterministic, SMS_AnalParams::fFreqDeviation, SMS_AnalParams::iDebugMode, SMS_AnalParams::iFormat, SMS_AnalFrame::iFrameNum, SMS_AnalParams::iMinTrackLength, SMS_AnalParams::iSamplingRate, MIN, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, SMS_AnalParams::ppFrames, sfloat, SMS_AnalParams::sizeHop, SMS_DBG_ALL, SMS_DBG_CLEAN_TRAJ, SMS_FORMAT_IH, SMS_FORMAT_IHP, and TWO_PI.
Referenced by sms_cleanTracks().
void sms_cleanTracks | ( | int | iCurrentFrame, | |
SMS_AnalParams * | pAnalParams | |||
) |
fill gaps and delete short tracks
iCurrentFrame | current frame number | |
pAnalParams | pointer to analysis parameters |
References DeleteShortTrack(), SMS_AnalFrame::deterministic, FillGap(), SMS_AnalParams::iDebugMode, SMS_AnalParams::iFormat, SMS_AnalFrame::iFrameNum, SMS_AnalParams::iMaxSleepingTime, SMS_AnalParams::iMinTrackLength, SMS_AnalParams::nGuides, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pFSinPha, SMS_AnalParams::ppFrames, SMS_DBG_ALL, SMS_DBG_CLEAN_TRAJ, SMS_FORMAT_H, and SMS_FORMAT_HP.
Referenced by sms_analyze().
void sms_scaleDet | ( | sfloat * | pFSynthBuffer, | |
sfloat * | pFOriginalBuffer, | |||
sfloat * | pFSinAmp, | |||
SMS_AnalParams * | pAnalParams, | |||
int | nTrack | |||
) |
scale deterministic magnitude if synthesis is larger than original
pFSynthBuffer | synthesis buffer | |
pFOriginalBuffer | original sound | |
pFSinAmp | magnitudes to be scaled | |
pAnalParams | pointer to analysis parameters | |
nTrack | number of tracks |
References SMS_AnalParams::iDebugMode, SMS_AnalFrame::iFrameNum, SMS_AnalParams::ppFrames, sfloat, SMS_AnalParams::sizeHop, SMS_DBG_ALL, SMS_DBG_CLEAN_TRAJ, sms_dBToMag(), and sms_magToDB().
Referenced by sms_analyze().