| 1 |
/* FormantPath_def.h |
| 2 |
* |
| 3 |
* Copyright (C) 2020,2022-2023 David Weenink |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#define ooSTRUCT FormantPath |
| 20 |
oo_DEFINE_CLASS (FormantPath, Sampled) |
| 21 |
|
| 22 |
oo_COLLECTION_OF (OrderedOf, formantCandidates, Formant, 2) |
| 23 |
oo_VEC (ceilings, formantCandidates.size) |
| 24 |
|
| 25 |
#if oo_DECLARING |
| 26 |
oo_OBJECT (TextGrid, 0, path) |
| 27 |
autoINTVEC dummyPath; |
| 28 |
#endif |
| 29 |
|
| 30 |
#if oo_READING |
| 31 |
oo_VERSION_UNTIL (1) |
| 32 |
oo_INTVEC (dummyPath, nx) |
| 33 |
path = FormantPath_to_TextGrid_version0 (this, dummyPath.get()); |
| 34 |
dummyPath. reset(); |
| 35 |
oo_VERSION_ELSE |
| 36 |
oo_OBJECT (TextGrid, 0, path) |
| 37 |
oo_VERSION_END |
| 38 |
#endif |
| 39 |
|
| 40 |
#if oo_WRITING || oo_COMPARING |
| 41 |
oo_OBJECT (TextGrid, 0, path) |
| 42 |
#endif |
| 43 |
|
| 44 |
#if oo_DECLARING |
| 45 |
void v1_info () |
| 46 |
override; |
| 47 |
int v_domainQuantity () const |
| 48 |
override { return MelderQuantity_TIME_SECONDS; } |
| 49 |
conststring32 v_getUnitText (integer level, int unit, uint32 flags) const |
| 50 |
override; |
| 51 |
double v_getValueAtSample (integer sampleNumber, integer level, int unit) const |
| 52 |
override; |
| 53 |
conststring32 v_getIndexText () const |
| 54 |
override { return U"frame number"; } |
| 55 |
conststring32 v_getNxText () const |
| 56 |
override { return U"the number of frames"; } |
| 57 |
#endif |
| 58 |
|
| 59 |
oo_END_CLASS (FormantPath) |
| 60 |
#undef ooSTRUCT |
| 61 |
|
| 62 |
/* End of FormantPath_def.h */ |