Debian Codegraph @

fon/AmplitudeTier.h

raw
1 #ifndef _AmplitudeTier_h_
2 #define _AmplitudeTier_h_
3 /* AmplitudeTier.h
4 *
5 * Copyright (C) 2003-2005,2007,2010-2012,2015-2018,2021,2023,2025 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 3 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 "IntensityTier.h"
22 #include "TableOfReal.h"
23 #include "Sound.h"
24
25 /********** class AmplitudeTier **********/
26
27 Thing_define (AmplitudeTier, RealTier) {
28 int v_domainQuantity () const
29 override { return MelderQuantity_TIME_SECONDS; }
30 };
31
32 autoAmplitudeTier AmplitudeTier_create (double tmin, double tmax);
33
34 void AmplitudeTier_draw (AmplitudeTier me, Graphics g, double tmin, double tmax,
35 double ymin, double ymax, conststring32 method, bool garnish);
36
37 autoAmplitudeTier PointProcess_upto_AmplitudeTier (PointProcess me, double soundPressure);
38 autoAmplitudeTier RealTier_to_AmplitudeTier (RealTier me);
39 autoAmplitudeTier IntensityTier_to_AmplitudeTier (IntensityTier me);
40 autoIntensityTier AmplitudeTier_to_IntensityTier (AmplitudeTier me, double threshold_dB);
41 autoTableOfReal AmplitudeTier_downto_TableOfReal (AmplitudeTier me);
42 void Sound_AmplitudeTier_multiply_inplace (Sound me, AmplitudeTier intensity);
43 autoSound Sound_AmplitudeTier_multiply (Sound me, AmplitudeTier intensity);
44
45 autoAmplitudeTier PointProcess_Sound_to_AmplitudeTier_point (PointProcess me, Sound thee);
46 autoAmplitudeTier PointProcess_Sound_to_AmplitudeTier_period (PointProcess me, Sound thee,
47 double tmin, double tmax, double shortestPeriod, double longestPeriod, double maximumPeriodFactor);
48
49 /*
50 The shimmer measurements return `undefined` if there are too few periods.
51 */
52 double AmplitudeTier_getShimmer_local_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
53 double AmplitudeTier_getShimmer_local_dB_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
54 double AmplitudeTier_getShimmer_apq3_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
55 double AmplitudeTier_getShimmer_apq5_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
56 double AmplitudeTier_getShimmer_apq11_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
57 double AmplitudeTier_getShimmer_dda_u (AmplitudeTier me, double shortestPeriod, double longestPeriod, double maximumAmplitudeFactor);
58
59 autoSound AmplitudeTier_to_Sound (AmplitudeTier me, double samplingFrequency, integer interpolationDepth);
60
61 /* End of file AmplitudeTier.h */
62 #endif