| 1 | #cxx . . $ `<file>/fon/Harmonicity.h`/ifndef _Harmonicity_h_ |
| 2 | #define _Harmonicity_h_cxx . . $ `fon/Harmonicity.h:2:9`! |
| 3 | /* Harmonicity.h |
| 4 | * |
| 5 | * Copyright (C) 1992-2011,2015-2017,2022,2023 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 "Vector.h"cxx . . $ `<file>/fon/Vector.h`/ |
| 22 | |
| 23 | Thing_definecxx . . $ theClassInfo_Harmonicity. (Harmonicity, Vector) { |
| 24 | void v1_infocxx . . $ structHarmonicity#v1_info(49f6e7a06ebc5aa8). () |
| 25 | override; |
| 26 | int v_domainQuantitycxx . . $ structHarmonicity#v_domainQuantity(455f465bc33b4cdf). () const |
| 27 | override { return MelderQuantity_TIME_SECONDScxx . . $ `melder/melder_quantity.h:22:9`!; } |
| 28 | }; |
| 29 | |
| 30 | /* Attributes: |
| 31 | xmin // Start time (seconds). |
| 32 | xmax > xmin // End time (seconds). |
| 33 | nx >= 1 // Number of time slices. |
| 34 | dx > 0.0 // Time step (seconds). |
| 35 | x1 // Centre of first time slice (seconds). |
| 36 | ymin, ymax, dy, y1 = 1.0 |
| 37 | ny = 1 |
| 38 | z [1] [1..nt] |
| 39 | // The harmonic strength, a real number between -150 dB and +150 dB: |
| 40 | // -150 dB means not periodic at all, +150 dB means perfectly periodic. |
| 41 | // Normal values for speech are between -10 dB for [s] and +30 dB for [u]. |
| 42 | // -200 means silence. |
| 43 | */ |
| 44 | |
| 45 | autoHarmonicitycxx . . $ autoHarmonicity# Harmonicity_createcxx . . $ Harmonicity_create(ad7a3d614a026a90). (double tmin, double tmax, integercxx . . $ integer# nt, double dt, double t1); |
| 46 | |
| 47 | void Harmonicity_drawcxx . . $ Harmonicity_draw(6ba7fe32182d69fb). (Harmonicitycxx . . $ Harmonicity# me, double tmin, double tmax, double min, double max); |
| 48 | /* |
| 49 | draw a harmonicity contour into the current Graphics. |
| 50 | If tmax <= tmin, draw whole time domain. |
| 51 | If max <= min, scale to extrema. |
| 52 | */ |
| 53 | |
| 54 | double Harmonicity_getMeancxx . . $ Harmonicity_getMean(c7d7363ba8ea6d3b). (Harmonicitycxx . . $ Harmonicity# me, double tmin, double tmax); |
| 55 | double Harmonicity_getStandardDeviationcxx . . $ Harmonicity_getStandardDeviation(c7d7363ba8ea6d3b). (Harmonicitycxx . . $ Harmonicity# me, double tmin, double tmax); |
| 56 | double Harmonicity_getQuantilecxx . . $ Harmonicity_getQuantile(cbfd77030d35d7db). (Harmonicitycxx . . $ Harmonicity# me, double quantile); |
| 57 | |
| 58 | autoMatrixcxx . . $ autoMatrix# Harmonicity_to_Matrixcxx . . $ Harmonicity_to_Matrix(ca2bb0b84b54424d). (Harmonicitycxx . . $ Harmonicity# me); |
| 59 | autoHarmonicitycxx . . $ autoHarmonicity# Matrix_to_Harmonicitycxx . . $ Matrix_to_Harmonicity(c59e97f1024533b2). (Matrixcxx . . $ Matrix# me); |
| 60 | |
| 61 | /* End of file Harmonicity.h */ |
| 62 | #endif |