Debian Codegraph @

dwtools/KlattGrid_def.h

raw symbols SCIP
1 /* KlattGrid_def.h
2 *
3 * Copyright (C) 2008-2019 David Weenink, 2015,2026 Paul Boersma
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 3 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 PhonationPoint
20 oo_DEFINE_CLASS (PhonationPoint, AnyPoint)
21
22 oo_DOUBLE (period) // 1/F0
23 oo_DOUBLE (openPhase)
24 oo_DOUBLE (collisionPhase)
25 oo_DOUBLE (te) // time from glottis open to exponential decay or closing
26 oo_DOUBLE (power1) // flow function
27 oo_DOUBLE (power2)
28 oo_DOUBLE (pulseScale) // multiplier for diplophonia, shimmer
29
30 oo_END_CLASS (PhonationPoint)
31 #undef ooSTRUCT
32
33
34 #define ooSTRUCT PhonationTier
35 oo_DEFINE_CLASS (PhonationTier, Function)
36
37 oo_COLLECTION_OF (SortedSetOfDoubleOf, points, PhonationPoint, 0)
38
39 #if oo_DECLARING
40 AnyTier_METHODS
41 #endif
42
43 oo_END_CLASS (PhonationTier)
44 #undef ooSTRUCT
45
46
47 #define ooSTRUCT PhonationGridPlayOptions
48 oo_DEFINE_CLASS (PhonationGridPlayOptions, Daata)
49
50 oo_INT (voicing)
51 oo_INT (aspiration)
52 oo_INT (breathiness)
53 oo_INT (flutter)
54 oo_INT (doublePulsing)
55 oo_INT (collisionPhase)
56 oo_INT (spectralTilt)
57 oo_INT (flowFunction) // 1: user-defined with tiers (power1, power2); 2: (2,3); 3: (3,4)
58 oo_INT (flowDerivative)
59 oo_DOUBLE (maximumPeriod)
60
61 oo_END_CLASS (PhonationGridPlayOptions)
62 #undef ooSTRUCT
63
64
65 #define ooSTRUCT PhonationGrid
66 oo_DEFINE_CLASS (PhonationGrid, Function)
67
68 oo_OBJECT (PitchTier, 0, pitch)
69 oo_OBJECT (RealTier, 0, flutter) // [0, 1]
70 oo_OBJECT (IntensityTier, 0, voicingAmplitude) // dB
71 oo_OBJECT (RealTier, 0, doublePulsing) // [0, 1]
72 oo_OBJECT (RealTier, 0, openPhase) // (0, 1)
73 oo_OBJECT (RealTier, 0, collisionPhase) //
74 oo_OBJECT (RealTier, 0, power1) // 2, 3, ...
75 oo_OBJECT (RealTier, 0, power2) // 3, 4, ... power2>power1
76 oo_OBJECT (IntensityTier, 0, spectralTilt) // dB
77 oo_OBJECT (IntensityTier, 0, aspirationAmplitude) // dB
78 oo_OBJECT (IntensityTier, 0, breathinessAmplitude) // dB
79
80 #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING
81 oo_OBJECT (PhonationGridPlayOptions, 0, options)
82 #endif
83
84 #if oo_READING
85 options = PhonationGridPlayOptions_create ();
86 PhonationGrid_setNames (this);
87 #endif
88
89 #if oo_DECLARING
90 void v1_info ()
91 override;
92 #endif
93
94 oo_END_CLASS (PhonationGrid)
95 #undef ooSTRUCT
96
97
98 #define ooSTRUCT VocalTractGridPlayOptions
99 oo_DEFINE_CLASS (VocalTractGridPlayOptions, Daata)
100
101 oo_ENUM (kKlattGridFilterModel, filterModel)
102 oo_INTEGER (startOralFormant)
103 oo_INTEGER (endOralFormant)
104 oo_INTEGER (startNasalFormant)
105 oo_INTEGER (endNasalFormant)
106 oo_INTEGER (startNasalAntiFormant)
107 oo_INTEGER (endNasalAntiFormant)
108
109 oo_END_CLASS (VocalTractGridPlayOptions)
110 #undef ooSTRUCT
111
112
113 #define ooSTRUCT VocalTractGrid
114 oo_DEFINE_CLASS (VocalTractGrid, Function)
115
116 oo_OBJECT (FormantGrid, 0, oral_formants)
117 oo_OBJECT (FormantGrid, 0, nasal_formants)
118 oo_OBJECT (FormantGrid, 0, nasal_antiformants)
119 // for parallel synthesis
120 oo_COLLECTION_OF (OrderedOf, oral_formants_amplitudes, IntensityTier, 0)
121 oo_COLLECTION_OF (OrderedOf, nasal_formants_amplitudes, IntensityTier, 0)
122
123 #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING
124 oo_OBJECT (VocalTractGridPlayOptions, 0, options)
125 #endif
126
127 #if oo_READING
128 options = VocalTractGridPlayOptions_create ();
129 VocalTractGrid_setNames (this);
130 #endif
131
132 #if oo_DECLARING
133 void v1_info ()
134 override;
135 #endif
136
137 oo_END_CLASS (VocalTractGrid)
138 #undef ooSTRUCT
139
140
141 #define ooSTRUCT CouplingGridPlayOptions
142 oo_DEFINE_CLASS (CouplingGridPlayOptions, Daata)
143
144 oo_INTEGER (startTrachealFormant)
145 oo_INTEGER (endTrachealFormant)
146 oo_INTEGER (startTrachealAntiFormant)
147 oo_INTEGER (endTrachealAntiFormant)
148 oo_INTEGER (startDeltaFormant)
149 oo_INTEGER (endDeltaFormant)
150 oo_INTEGER (startDeltaBandwidth)
151 oo_INTEGER (endDeltaBandwidth)
152 oo_INT (openglottis)
153 oo_DOUBLE (fadeFraction)
154
155 oo_END_CLASS (CouplingGridPlayOptions)
156 #undef ooSTRUCT
157
158
159 #define ooSTRUCT CouplingGrid
160 oo_DEFINE_CLASS (CouplingGrid, Function)
161
162 oo_OBJECT (FormantGrid, 0, tracheal_formants)
163 oo_OBJECT (FormantGrid, 0, tracheal_antiformants)
164 oo_COLLECTION_OF (OrderedOf, tracheal_formants_amplitudes, IntensityTier, 0)
165 oo_OBJECT (FormantGrid, 0, delta_formants)
166
167 #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING
168 oo_OBJECT (PhonationTier, 0, glottis)
169 oo_OBJECT (CouplingGridPlayOptions, 0, options)
170 #endif
171
172 #if oo_READING
173 options = CouplingGridPlayOptions_create ();
174 glottis = PhonationTier_create (xmin, xmax);
175 CouplingGrid_setNames (this);
176 #endif
177
178 #if oo_DECLARING
179 void v1_info ()
180 override;
181 #endif
182
183 oo_END_CLASS (CouplingGrid)
184 #undef ooSTRUCT
185
186
187 #define ooSTRUCT FricationGridPlayOptions
188 oo_DEFINE_CLASS (FricationGridPlayOptions, Daata)
189
190 oo_INTEGER (startFricationFormant)
191 oo_INTEGER (endFricationFormant)
192 oo_INT (bypass)
193
194 oo_END_CLASS (FricationGridPlayOptions)
195 #undef ooSTRUCT
196
197
198 #define ooSTRUCT FricationGrid
199 oo_DEFINE_CLASS (FricationGrid, Function)
200
201 oo_OBJECT (IntensityTier, 0, fricationAmplitude) // dB
202 oo_OBJECT (FormantGrid, 0, frication_formants)
203 oo_COLLECTION_OF (OrderedOf, frication_formants_amplitudes, IntensityTier, 0)
204 oo_OBJECT (IntensityTier, 0, bypass) // dB
205
206 #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING
207 oo_OBJECT (FricationGridPlayOptions, 0, options)
208 #endif
209
210 #if oo_READING
211 options = FricationGridPlayOptions_create ();
212 FricationGrid_setNames (this);
213 #endif
214
215 #if oo_DECLARING
216 void v1_info ()
217 override;
218 #endif
219
220 oo_END_CLASS (FricationGrid)
221 #undef ooSTRUCT
222
223
224 #define ooSTRUCT KlattGridPlayOptions
225 oo_DEFINE_CLASS (KlattGridPlayOptions, Daata)
226
227 oo_DOUBLE (samplingFrequency)
228 oo_INT (scalePeak)
229 oo_DOUBLE (xmin)
230 oo_DOUBLE (xmax)
231
232 oo_END_CLASS (KlattGridPlayOptions)
233 #undef ooSTRUCT
234
235
236 #define ooSTRUCT KlattGrid
237 oo_DEFINE_CLASS (KlattGrid, Function)
238
239 oo_OBJECT (PhonationGrid, 0, phonation) // glottal source
240 oo_OBJECT (VocalTractGrid, 0, vocalTract) // filter
241 oo_OBJECT (CouplingGrid, 0, coupling) // coupling between source and filter
242 oo_OBJECT (FricationGrid, 0, frication) // frication source
243 oo_OBJECT (IntensityTier, 0, gain) // final scaling
244
245 #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING
246 oo_OBJECT (KlattGridPlayOptions, 0, options)
247 #endif
248
249 #if oo_READING
250 options = KlattGridPlayOptions_create ();
251 KlattGrid_setNames (this);
252 #endif
253
254 #if oo_DECLARING
255 void v1_info ()
256 override;
257 #endif
258
259 oo_END_CLASS (KlattGrid)
260 #undef ooSTRUCT
261
262 /* End of file KlattGrid_def.h */