comparison hssf.h @ 5:5f3c32dc6e17

* Adjust comment syntax to permit Doxygen to generate HTML documentation; add Doxyfile
author Chris Cannam
date Wed, 06 Oct 2010 15:19:49 +0100
parents 6422640a802f
children 977f541d6683
comparison
equal deleted inserted replaced
4:92ee28024c05 5:5f3c32dc6e17
1 #ifndef hssfH 1 #ifndef hssfH
2 #define hssfH 2 #define hssfH
3 3
4 /* 4 /**
5 hssf.cpp - source-filter modeling for harmonic sinusoids 5 \file hssf.h - source-filter modeling for harmonic sinusoids
6 6
7 Further reading: Wen X. and M. Sandler, "Source-filter modeling in sinusoid domain," in Proc. AES 126th 7 Further reading: Wen X. and M. Sandler, "Source-filter modeling in sinusoid domain," in Proc. AES 126th
8 Convention, Munich, 2009. 8 Convention, Munich, 2009.
9 */ 9 */
10 10
15 //--------------------------------------------------------------------------- 15 //---------------------------------------------------------------------------
16 const double Amel=1127.0104803341574386544633680278; 16 const double Amel=1127.0104803341574386544633680278;
17 const bool useA0=true; //if true, use A0D+A0C instead of A0C in S-F decomposition as pre-normalizer 17 const bool useA0=true; //if true, use A0D+A0C instead of A0C in S-F decomposition as pre-normalizer
18 18
19 19
20 /* 20 /**
21 TSF is the class implementing source-filter model for harmonic sinusoids. TSF shares the basic framework 21 TSF is the class implementing source-filter model for harmonic sinusoids. TSF shares the basic framework
22 of the vibrato description class TVo, but implements a more compact source-filter representation. It does 22 of the vibrato description class TVo, but implements a more compact source-filter representation. It does
23 not go into detailed vibrato analysis such as extraction modulator shape. 23 not go into detailed vibrato analysis such as extraction modulator shape.
24 24
25 An analysis/synthesis cycle converts THS to TSF and back. 25 An analysis/synthesis cycle converts THS to TSF and back.
26 */ 26 */
27 27
28 struct TSF 28 struct TSF
29 { 29 {
30 //basic characteristics 30 //basic characteristics
31 int M; //number of partials 31 int M; ///< number of partials
32 int L; //number of frames 32 int L; ///< number of frames
33 int P; //number of segmentation points 33 int P; ///< number of segmentation points
34 double offst; //hop size 34 double offst; ///< hop size
35 double* F0C; //[0:L-1] pitch carrier 35 double* F0C; ///< [0:L-1] pitch carrier
36 double* F0D; //[0:L-1] pitch modulator 36 double* F0D; ///< [0:L-1] pitch modulator
37 double* logA0C; //[0:L-1] amplitude carreir 37 double* logA0C; ///< [0:L-1] amplitude carreir
38 double* logA0D; //[0:L-1] amplitude modulator 38 double* logA0D; ///< [0:L-1] amplitude modulator
39 39
40 double* lp; //[0:P-1] peak positions 40 double* lp; ///< [0:P-1] peak positions
41 41
42 double F; //filter: band with (linear or mel) associated to each b[][] 42 double F; ///< filter: band with (linear or mel) associated to each b[][]
43 double Fs; //sampling frequency 43 double Fs; ///< sampling frequency
44 int FScaleMode; //linear or mel 44 int FScaleMode; ///< linear or mel
45 int K; //number of filter bands 45 int K; ///< number of filter bands
46 double** b; //[0:L-1][0:M-1] single-frame source, in dB 46 double** b; ///< [0:L-1][0:M-1] single-frame source, in dB
47 double** h; //[0:L-1][0:K+1] single-frame filter, in dB 47 double** h; ///< [0:L-1][0:K+1] single-frame filter, in dB
48 double* avgb; //[0:M-1] average source 48 double* avgb; ///< [0:M-1] average source
49 double* avgh; //[0:K+1] average filter 49 double* avgh; ///< [0:K+1] average filter
50 50
51 //other properties 51 //other properties
52 52
53 double rate; //vibrato rate 53 double rate; ///< vibrato rate
54 double regularity;//vibrato regularity 54 double regularity;///< vibrato regularity
55 double F0max; //maximal fundamental frequency 55 double F0max; ///< maximal fundamental frequency
56 double F0min; //minimal fundamental frequency 56 double F0min; ///< minimal fundamental frequency
57 double F0Cmax; //maximal fundamental carrier frequency 57 double F0Cmax; ///< maximal fundamental carrier frequency
58 double F0Cmin; //minimal fundamental carrier frequency 58 double F0Cmin; ///< minimal fundamental carrier frequency
59 double F0Overall; //overall average fundamental frequency 59 double F0Overall; ///< overall average fundamental frequency
60 double F0Dmax; //maximal fundamental modulator frequency 60 double F0Dmax; ///< maximal fundamental modulator frequency
61 double F0Dmin; //minimal fundamental modulator frequency 61 double F0Dmin; ///< minimal fundamental modulator frequency
62 double* F0; //[0:L-1] fundamental frequency 62 double* F0; ///< [0:L-1] fundamental frequency
63 double* logA0; //[0:L-1] log amplitude 63 double* logA0; ///< [0:L-1] log amplitude
64 64
65 TSF(); 65 TSF();
66 ~TSF(); 66 ~TSF();
67 67
68 //copy function 68 //copy function