hsedit.h File Reference
#include "hs.h"
#include "hssf.h"
Include dependency graph for hsedit.h:

Go to the source code of this file.

Functions

void DeFM (double *a2, double *f2, double *a1, double *f1, double *arec, int npfr, int *peakfr)
 
void DFMSeg (double *arec, int &npfr, int *peakfr, int M, int Fr, atom **partials)
 
void ReFM (int M, int Fr, atom **partials, atom **partials2, double amount=1, double rate=1, TSF *SF=0)
 
void HSAM (THS *HS, THS *SrcHS, double dep, double fre, double ph)
 
void HSFM (THS *HS, THS *SrcHS, double a, double freq, double ph)
 
void HSFM_SF (THS *HS, THS *SrcHS, double a, double freq, double ph, TSF *SF)
 
void HSPitchShift (THS *HS, THS *SrcHS, double ps12)
 

Detailed Description

  • harmonic sinusoid audio editing routines.

Function Documentation

void DeFM ( double *  a2,
double *  f2,
double *  a1,
double *  f1,
double *  arec,
int  npfr,
int *  peakfr 
)

function DeFM: frequency de-modulation

In: peakfr[npfr]: segmentation into FM cycles, peakfr[0]=0, peakfr[npfr-1]=Fr-1 a1[Fr], f1[Fr]: sequence of amplitudes and frequencies arec[Fr]: amplitude-based weights for frequency averaging Out: a2[Fr], f2[Fr]: amplitude and frequency sequance after demodulation

No return value.

void DFMSeg ( double *  arec,
int &  npfr,
int *  peakfr,
int  M,
int  Fr,
atom **  partials 
)

function DFMSeg: segments HS frames into FM cycles

In: partials[M][Fr]: HS partials Out: peakfr[npfr]: segmentation, peakfr[0]=0, peakfr[npfr-1]=Fr-1. arec[Fr]: total amplitudes of frames

No return value.

void HSAM ( THS HS,
THS SrcHS,
double  dep,
double  fre,
double  ph 
)

function HSAM: harmonic sinusoid amplitude modulation

In: SrcHS: source harmonic sinusoid dep: modulation depth fre: modulator frequency ph: modulator phase Out: HS: destination harmonic sinusoid

No reutrn value.

void HSFM ( THS HS,
THS SrcHS,
double  a,
double  freq,
double  ph 
)

function HSFM: harmonic sinusoid frequency modulation

In: SrcHS: source harmonic sinusoid a: modulation extent, in semitones fre: modulator frequency ph: modulator phase Out: HS: destination harmonic sinusoid

No reutrn value.

void HSFM_SF ( THS HS,
THS SrcHS,
double  a,
double  freq,
double  ph,
TSF SF 
)

function HSFM_SF: harmonic sinusoid frequency modulation with source-filter model

In: SrcHS: source harmonic sinusoid a: modulation extent, in semitones fre: modulator frequency ph: modulator phase SF: source-filter model Out: HS: destination harmonic sinusoid

No reutrn value.

void HSPitchShift ( THS HS,
THS SrcHS,
double  ps12 
)

function: HSPitchShift: harmonic sinusoid pitch shifting

In: SrcHS: source harmonic sinusoid ps12: amount of pitch shift, in semitones Out: HS: destination harmonic sinusoid

No return value.

void ReFM ( int  M,
int  Fr,
atom **  partials,
atom **  partials2,
double  amount,
double  rate,
TSF SF 
)

function ReFM: frequency re-modulation

In: partials[M][Fr]: HS partials amount: relative modulation depth after remodulation rate: relateive modulation rate after remodulation SF: a source-filter model, optional Out: partials2[M][Fr]: remodulated HS partials. Must be allocated before calling.

No return value.