| 1 | #ifndef _SpectrumTier_h_ |
| 2 | #define _SpectrumTier_h_ |
| 3 | /* SpectrumTier.h |
| 4 | * |
| 5 | * Copyright (C) 2007,2010-2012,2014-2018,2020,2022-2024 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "RealTier.h" |
| 22 | #include "Graphics.h" |
| 23 | #include "Spectrum.h" |
| 24 | |
| 25 | /********** class SpectrumTier **********/ |
| 26 | |
| 27 | Thing_define (SpectrumTier, RealTier) { |
| 28 | void v1_info () |
| 29 | override; |
| 30 | int v_domainQuantity () const |
| 31 | override { return MelderQuantity_FREQUENCY_HERTZ; } |
| 32 | conststring32 v_getUnitText (integer /* level */, int /* unit */, uint32 /* flags */) const |
| 33 | override { return U"Frequency (Hz)"; } |
| 34 | }; |
| 35 | |
| 36 | autoSpectrumTier SpectrumTier_create (double fmin, double fmax); |
| 37 | /* |
| 38 | Postconditions: |
| 39 | result -> xmin == fmin; |
| 40 | result -> xmax == fmax; |
| 41 | result -> points.size == 0; |
| 42 | */ |
| 43 | |
| 44 | void SpectrumTier_draw (SpectrumTier me, Graphics g, double fmin, double fmax, |
| 45 | double pmin, double pmax, bool garnish, conststring32 method); |
| 46 | |
| 47 | void SpectrumTier_list (SpectrumTier me, bool includeIndexes, bool includeFrequency, bool includePowerDensity); |
| 48 | |
| 49 | autoTable SpectrumTier_downto_Table (SpectrumTier me, bool includeIndexes, bool includeFrequency, bool includePowerDensity); |
| 50 | |
| 51 | autoSpectrumTier Spectrum_to_SpectrumTier_peaks (Spectrum me); |
| 52 | |
| 53 | /* End of file SpectrumTier.h */ |
| 54 | #endif |