comparison hs.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 fc19d45615d1
children 977f541d6683
comparison
equal deleted inserted replaced
4:92ee28024c05 5:5f3c32dc6e17
1 #ifndef hsH 1 #ifndef hsH
2 #define hsH 2 #define hsH
3 3
4 /* 4 /**
5 hs.cpp - harmonic sinusoid model 5 \file hs.h - harmonic sinusoid model
6 6
7 Further reading: Wen X. and M. Sandler, "Sinusoid modeling in a harmonic context," in Proc. DAFx'07, Bordeaux, 2007. 7 Further reading: Wen X. and M. Sandler, "Sinusoid modeling in a harmonic context," in Proc. DAFx'07, Bordeaux, 2007.
8 */ 8 */
9 9
10 //--------------------------------------------------------------------------- 10 //---------------------------------------------------------------------------
93 double* pinf; //frequencies of pinned partials 93 double* pinf; //frequencies of pinned partials
94 int* pinfr; //frame indices of pinned partials, used in multi-frame constant-pitch note match 94 int* pinfr; //frame indices of pinned partials, used in multi-frame constant-pitch note match
95 }; 95 };
96 96
97 97
98 /* 98 /**
99 stiffcandid is the harmonic atom class used internally by harmonic grouping and tracking routines. Literally 99 stiffcandid is the harmonic atom class used internally by harmonic grouping and tracking routines. Literally
100 it means "candidate harmonic atoms on a stiff string model". The stiff string is the main harmonic model used 100 it means "candidate harmonic atoms on a stiff string model". The stiff string is the main harmonic model used
101 by me for describing frequency relations between partials of a harmonic sound. 101 by me for describing frequency relations between partials of a harmonic sound.
102 102
103 stiffcandid is superceded by TTempAtom class. 103 stiffcandid is superceded by TTempAtom class.
121 stiffcandid(stiffcandid* prev, int ap, double af, double errf, double ds); //create by updating with new atom 121 stiffcandid(stiffcandid* prev, int ap, double af, double errf, double ds); //create by updating with new atom
122 ~stiffcandid(); 122 ~stiffcandid();
123 }; 123 };
124 124
125 125
126 /* 126 /**
127 THS is the data structure hosting a harmonic sinusoid representation. Its key members include the number 127 THS is the data structure hosting a harmonic sinusoid representation. Its key members include the number
128 of partials, number of frames, and all its atoms (sinusoid parameters of all partials at measurement points). 128 of partials, number of frames, and all its atoms (sinusoid parameters of all partials at measurement points).
129 */ 129 */
130 130
131 class THS 131 class THS
168 int WriteToStream(TStream* Stream); 168 int WriteToStream(TStream* Stream);
169 int ReadFromStream(TStream* Stream); 169 int ReadFromStream(TStream* Stream);
170 }; 170 };
171 171
172 172
173 /* 173 /**
174 TPolygon is a polygon class. This class itself does not enforce convexness. However, when used for solving 174 TPolygon is a polygon class. This class itself does not enforce convexness. However, when used for solving
175 the stiff string model, all polygons are convex, as they are the results of current a first convex polygon 175 the stiff string model, all polygons are convex, as they are the results of current a first convex polygon
176 by straight lines. 176 by straight lines.
177 177
178 For the convenience of computation, the sequence of vertices are arranged so that they come in clockwise 178 For the convenience of computation, the sequence of vertices are arranged so that they come in clockwise
190 TPolygon(int cap, TPolygon* R); 190 TPolygon(int cap, TPolygon* R);
191 ~TPolygon(); 191 ~TPolygon();
192 }; 192 };
193 193
194 194
195 /* 195 /**
196 TTempAtom is an atom class within the stiff-stirng harmonic atom context used internally by harmonic 196 TTempAtom is an atom class within the stiff-stirng harmonic atom context used internally by harmonic
197 grouping and tracking routines. Literally it means "a temporary atom", and truly it hosts most info 197 grouping and tracking routines. Literally it means "a temporary atom", and truly it hosts most info
198 one expects of a potential atom. TTempAtom replaces stiffcandid class in harmonic sinusoid group and 198 one expects of a potential atom. TTempAtom replaces stiffcandid class in harmonic sinusoid group and
199 tracking algorithms, due to the advanges that it carries atom information (frequency, amplitude, etc.) 199 tracking algorithms, due to the advanges that it carries atom information (frequency, amplitude, etc.)
200 as well as harmonic atom information (link to other atom, the F-G polygon), and is therefore both an 200 as well as harmonic atom information (link to other atom, the F-G polygon), and is therefore both an