| 1 | /* FormantGrid_def.h |
| 2 | * |
| 3 | * Copyright (C) 2008-2012,2015-2018,2023 Paul Boersma & 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. |
| 13 | * See the GNU 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 FormantGrid |
| 20 | oo_DEFINE_CLASS (FormantGrid, Function) |
| 21 | |
| 22 | oo_COLLECTION_OF (OrderedOf, formants, RealTier, 0) |
| 23 | oo_COLLECTION_OF (OrderedOf, bandwidths, RealTier, 0) |
| 24 | |
| 25 | #if oo_DECLARING |
| 26 | bool v_hasGetVector () const |
| 27 | override { return true; } |
| 28 | double v_getVector (integer irow, integer icol) const |
| 29 | override; |
| 30 | bool v_hasGetFunction1 () const |
| 31 | override { return true; } |
| 32 | double v_getFunction1 (integer irow, double x) const |
| 33 | override; |
| 34 | conststring32 v_getUnitText (integer ilevel, int /* unit */, uint32 /* flags */) const |
| 35 | override { return ilevel & 1 ? U"Formant (Hz)" : U"Bandwidth (Hz)"; } |
| 36 | void v_shiftX (double xfrom, double xto) |
| 37 | override; |
| 38 | void v_scaleX (double xminfrom, double xmaxfrom, double xminto, double xmaxto) |
| 39 | override; |
| 40 | #endif |
| 41 | |
| 42 | oo_END_CLASS (FormantGrid) |
| 43 | #undef ooSTRUCT |
| 44 | |
| 45 | /* End of file FormantGrid_def.h */ |