1 #ifndef _KlattTable_h_
2 #define _KlattTable_h_
3 /* KlattTable.h
4 *
5 * Copyright (C) 2008-2020 David Weenink
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. See the GNU
15 * 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 /*
22 djmw 20081018 Initial version
23 djmw 20110306 Latest modification
24 */
25
26 #include "TableOfReal.h"
27 #include "Sound.h"
28 #include "Table.h"
29
Thing_define(KlattTable,Table)30 Thing_define (KlattTable, Table) {
31 };
32
33 autoKlattTable KlattTable_create (double frameDuration, double totalDuration);
34 /*
35 f0 (08) This is the fundamental frequency (pitch) of the utterance.
36 In this case it is specified in steps of 0.1 Hz, hence 100Hz
37 will be represented by a value of 1000.
38 av (08) Amplitude of voicing for the cascade branch of the
39 synthesizer in dB0. Range 0-70, value usually 60 for a vowel sound.
40 f1 (08) First formant frequency in 200-1300 Hz.
41 b1 (08) Cascade branch bandwidth of first formant in the range 40-1000 Hz.
42 f2 (08) Second formant frequency in the range 550 - 3000 Hz.
43 b2 (08) Cascade branch bandwidth of second formant in the range 40-1000 Hz.
44 f3 (08) Third formant frequency in the range 1200-4999 Hz.
45 b3 (08) Cascade branch bandwidth of third formant in the range 40-1000 Hz.
46 f4 (08) Fourth formant frequency in 1200-4999 Hz.
47 b4 (08) Cascade branch bandwidth of fourth formant in the range 40-1000 Hz.
48 f5 (08) Fifth formant frequency in the range 1200-4999 Hz.
49 b5 (08) Cascade branch bandwidth of fifth formant in the range 40-1000 Hz.
50 f6 (08) Sixth formant frequency in the range 1200-4999 Hz.
51 b6 (08) Cascade branch bandwidth of sixth formant in the range 40-2000 Hz.
52 fnz (08) Frequency of the nasal zero in the range 248-528 Hz.
53 (cascade branch only)
54 bnz (08) Bandwidth of the nasal zero in the range 40-1000 Hz
55 (cascade branch only)
56 fnp (08) Frequency of the nasal pole in the range 248-528 Hz
57 bnp (08) Bandwidth of the nasal pole in the range 40-1000 Hz
58 ah (08) Amplitude of aspiration 0-70 dB.
59 kopen (-8) Open quotient of voicing waveform, range 0-60, usually 30.
60 Will influence the gravelly or smooth quality of the voice.
61 Only works with impulse and antural simulations. For the
62 sampled glottal excitation waveform the open quotient is fixed.
63 aturb Amplitude of turbulence 0-80 dB. A value of 40 is useful. Can be
64 used to simulate "breathy" voice quality.
65 tltdb (-8) Spectral tilt in dB, range 0-24. Tilts down the output spectrum.
66 The value refers to dB down at 3Khz. Increasing the value emphasizes
67 the low frequency content of the speech and attenuates the high
68 frequency content.
69 af (08) Amplitude of frication in dB, range 0-80 (parallel branch)
70
71 skew Spectral Skew - skewness of alternate periods, range 0-40
72
73 a1 (08) Amplitude of first formant in the parallel branch, in 0-80 dB.
74 b1p (-8) Bandwidth of the first formant in the parallel branch, in Hz.
75 a2 (08) Amplitude of parallel branch second formant.
76 b2p (-8) Bandwidth of parallel branch second formant.
77 a3 (08) Amplitude of parallel branch third formant.
78 b3p (-8) Bandwidth of parallel branch third formant.
79 a4 (08) Amplitude of parallel branch fourth formant.
80 b4p (-8) Bandwidth of parallel branch fourth formant.
81 a5 (08) Amplitude of parallel branch fifth formant.
82 b5p (-8) Bandwidth of parallel branch fifth formant.
83 a6 (08) Amplitude of parallel branch sixth formant.
84 b6p (-8) Bandwidth of parallel branch sixth formant.
85
86 anp Amplitude of the parallel branch nasal formant.
87
88 ab (08) Amplitude of bypass frication in dB. 0-80.
89
90 avp Amplitude of voicing for the parallel branch, 0-70 dB.
91
92 gain Overall gain in dB range 0-80.
93
94 */
95
96 autoSound KlattTable_to_Sound (KlattTable me, double samplingFrequency, int synthesisModel, int numberOfFormants, double frameDuration, int voicing, double flutter, int outputType);
97
98 autoSound KlattTable_Sound_to_Sound (KlattTable me, Sound thee);
99
100 autoKlattTable KlattTable_createExample ();
101
102 autoKlattTable Table_to_KlattTable (Table me);
103
104 autoTable KlattTable_to_Table (KlattTable me);
105
106 autoKlattTable KlattTable_readFromRawTextFile (MelderFile fs);
107
108 #endif /* _KlattTable_h_ */
109