manual_KlattGrid.cpp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /* manual_KlattGrid.cpp
  2. *
  3. * Copyright (C) 2009-2014 David Weenink
  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 2 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. See the GNU
  13. * 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. #include "ManPagesM.h"
  19. void manual_KlattGrid (ManPages me);
  20. void manual_KlattGrid (ManPages me)
  21. {
  22. MAN_BEGIN (U"KlattGrid", U"djmw", 20140117)
  23. INTRO (U"A KlattGrid represents the source-filter model as a function of time. It consists of a number of tiers that model aspects of the source and the filter, and the interaction between source and filter. The KlattGrid implements a superset of the speech synthesizer described in figure 14 in the @@Klatt & Klatt (1990)@ article.")
  24. NORMAL (U"The following drawing represents a cascade synthesizer with six oral formants, one nasal formant, "
  25. "one nasal antiformant, one tracheal formant, one tracheal antiformant and six frication formants. ")
  26. SCRIPT (7.0, 6.5,
  27. U"Create KlattGrid: \"kg\", 0, 1, 6, 1, 1, 6, 1, 1, 1\n"
  28. "Draw synthesizer: \"Cascade\"\n"
  29. "Remove\n")
  30. NORMAL (U"In the next picture a parallel synthesizer branch is used instead of the cascade one.")
  31. SCRIPT (7.0, 6.5,
  32. U"Create KlattGrid: \"kg\", 0, 1, 6, 1, 1, 6, 1, 1, 1\n"
  33. "Draw synthesizer... Parallel\n"
  34. "Remove\n")
  35. NORMAL (U"All parameters in the synthesizer are represented by separate tiers.")
  36. ENTRY (U"The source")
  37. NORMAL (U"The source is modelled by the following tiers:")
  38. TAG (U"##Pitch")
  39. DEFINITION (U"models fundamental frequency (in Hertz).")
  40. TAG (U"##Flutter")
  41. DEFINITION (U"models a kind of \"random\" variation of the pitch (with a number between zero and one). ")
  42. TAG (U"##Voicing amplitude")
  43. DEFINITION (U"models the maximum amplitude of the glottal flow (in dB SPL).")
  44. TAG (U"##Open phase")
  45. DEFINITION (U"models the open phase of the glottis (with a number between zero and one). If the tier is empty a default of 0.7 "
  46. "will be used.")
  47. TAG (U"##Power1#, ##Power2#")
  48. DEFINITION (U"model the form of the glottal flow function flow(%t)=%t^^%%power1%^-%t^^%%power2%^ for 0\\<_ t \\<_ 1. "
  49. "To make glottal closure possible, %power2 has to be larger than %power1. If the power1 tier is empty, a default "
  50. "value of 3 will be used. If the power2 tier is empty, a default of 4 will be used.")
  51. TAG (U"##Collision phase")
  52. DEFINITION (U"models the last part of the flow function with an exponential decay function instead of a polynomial one. "
  53. "More information about #Power1, #Power2, ##Open phase# and ##Collision phase# can be found in the @@PointProcess: To Sound (phonation)...@ manual.")
  54. TAG (U"##Spectral tilt")
  55. DEFINITION (U"models the extra number of dB the voicing spectrum should be down at 3000 Hertz.")
  56. TAG (U"##Aspiration amplitude")
  57. DEFINITION (U"models the (maximum) amplitude of the noise generated at the glottis (in dB SPL). ")
  58. TAG (U"##Breathiness amplitude")
  59. DEFINITION (U"models the maximum breathiness noise amplitude during the open phase of the glottis (in dB SPL). "
  60. "The amplitude of the breathiness noise is modulated by the glottal flow.")
  61. TAG (U"##Double pulsing")
  62. DEFINITION (U"models diplophonia (by a fraction between zero and one). Whenever this parameter is greater than zero, "
  63. "alternate pulses are modified. A pulse is modified with this %%single% parameter in %%two% ways: it is %%delayed "
  64. "in time% and its amplitude is %%attenuated%. If the double pulsing value is a maximum and equals one, the time of "
  65. "closure of the first peak coincides with the opening time of the second one. ")
  66. ENTRY (U"The vocal tract filter")
  67. NORMAL (U"The filter is modelled by a number of @@FormantGrid@'s. For parallel synthesis the formant grids that normally "
  68. "only contain formant frequency and formant bandwidth tiers, have been extended with amplitude tiers. Amplitudes values are in dB. The following formant grids can be used:")
  69. TAG (U"##Oral formants")
  70. DEFINITION (U"represent the \"standard\" oral resonances of the vocal tract. ")
  71. TAG (U"##Nasal formants")
  72. DEFINITION (U"model resonances in the nasal tract. Because the form of the nasal tract does not vary much during the course of an utterance, nasal formants tend to be constant. ")
  73. TAG (U"##Nasal antiformants")
  74. DEFINITION (U"model dips in the spectrum caused by leakage to the nasal tract.")
  75. ENTRY (U"Interaction between source and filter")
  76. NORMAL (U"The interaction between source and filter is modeled by two formant grids.")
  77. TAG (U"##Tracheal formants")
  78. DEFINITION (U"model one aspect of the coupling of the trachea with the vocal tract transfer function, namely, by the "
  79. "introduction of extra formants (and antiformants) that sometimes distort vowel spectra to a varying degrees. "
  80. "According to @@Klatt & Klatt (1990)@, the other effect being increased losses at glottal termination which primarily affect first-formant bandwidths.")
  81. TAG (U"##Tracheal antiformants")
  82. DEFINITION (U"model dips in the spectrum caused by the trachea.")
  83. TAG (U"##Delta formants")
  84. DEFINITION (U"The values in this grid model the number of hertz that the oral formants and/or bandwidths change during the open phase "
  85. "of the glottis. @@Klatt & Klatt (1990)@ distinguish four types of source-filter interactions: an F1 ripple in the "
  86. "source waveform, a non-linear interaction between the first formant and the fundamental frequency, a truncation of "
  87. "the first formant and tracheal formants and antiformants. ")
  88. ENTRY (U"The frication section")
  89. NORMAL (U"The frication section is modeled with a frication formant grid, with formant frequencies, bandwidths and (separate) "
  90. "amplitudes (dB), a frication by-pass tier (dB) and an amplitude tier (dB SPL) that governs the frication noise source.")
  91. ENTRY (U"A minimal synthesizer")
  92. NORMAL (U"The following script produces a minimal voiced sound. The first line creates the standard KlattGrid."
  93. "The next two lines define a pitch point, in Hz, and the voicing amplitude, in dB. The last line "
  94. "creates the sound.")
  95. CODE (U"Create KlattGrid: \"kg\", 0, 1, 6, 1, 1, 6, 1, 1, 1")
  96. CODE (U"Add pitch point: 0.5, 100")
  97. CODE (U"Add voicing amplitude point: 0.5, 90")
  98. CODE (U"To Sound")
  99. NORMAL (U"The following script will produce raw frication noise. Because we do not specify formant amplitudes, "
  100. "we turn off the formants in the parallel section.")
  101. CODE (U"Create KlattGrid: \"kg\", 0, 1, 6, 1, 1, 6, 1, 1, 1")
  102. CODE (U"Add frication amplitude point: 0.5 ,80")
  103. CODE (U"Add frication bypass point: 0.5, 0")
  104. CODE (U"To Sound (special): 0, 0, 44100, \"yes\", \"no\", \"yes\", \"yes\", \"yes\", \"yes\",")
  105. CODE (U"... \"Powers in tiers\", \"yes\", \"yes\", \"yes\",")
  106. CODE (U"... \"Cascade\", 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, \"yes\"")
  107. ENTRY (U"Changes")
  108. NORMAL (U"In praat versions before 5.1.05 the values for the %%oral / nasal / tracheal formant amplitudes% and"
  109. " %%frication bypass amplitude% had to be given in dB SPL; "
  110. " now they are in real dB's, i.e."
  111. " 0 dB means no change in amplitude. You can calculate new values from old values as:\n"
  112. "new_value = old_value + 20*log10(2e-5). This means that you have to subtract approximately 94 dB from the old values.")
  113. MAN_END
  114. MAN_BEGIN (U"Create KlattGrid...", U"djmw", 20081224)
  115. INTRO (U"A command to create a multitier @@KlattGrid@ speech synthesizer.")
  116. MAN_END
  117. #define PhonationGrid_to_Sound_COMMON_PARAMETERS_HELP \
  118. TAG (U"##Sampling frequency (Hz)") \
  119. DEFINITION (U"the @@sampling frequency@ of the resulting sound.") \
  120. TAG (U"##Voicing") \
  121. DEFINITION (U"switches voicing on or off.") \
  122. TAG (U"##Flutter") \
  123. DEFINITION (U"switches the flutter tier on or off. This will, of course, only have effect if at least one flutter point has been defined in the flutter tier.") \
  124. TAG (U"##Double pulsing") \
  125. DEFINITION (U"switches the double pulsing tier on or off.") \
  126. TAG (U"##Collision phase") \
  127. DEFINITION (U"switches the collision phase tier on or off.") \
  128. TAG (U"##Spectral tilt") \
  129. DEFINITION (U"switches the spectral tilt tier on or off.") \
  130. TAG (U"##Flow function") \
  131. DEFINITION (U"determines which flow function will be used. The flow function is determined by two parameters, %%power1% and %%power2% as %%flow(t)=x^^power1^-x^^power2^%. " \
  132. "If the option \"Powers in tier\" is chosen the power1 and power2 tiers will be used for the values of %%power1% and %%power2%. The other choices switch the two tiers off and instead fixed values will be used for %%power1% and %%power2%.") \
  133. TAG (U"##Flow derivative") \
  134. DEFINITION (U"determines whether the flow or the flow derivative is used for phonation. ") \
  135. TAG (U"##Aspiration") \
  136. DEFINITION (U"determines whether aspiration is included in the synthesis.") \
  137. TAG (U"##Breathiness") \
  138. DEFINITION (U"determines whether breathiness is included in the synthesis.")
  139. MAN_BEGIN (U"KlattGrid: To Sound (phonation)...", U"djmw", 20090122)
  140. INTRO (U"A command to synthesize a Sound from the selected @@KlattGrid@.")
  141. ENTRY (U"Settings")
  142. PhonationGrid_to_Sound_COMMON_PARAMETERS_HELP
  143. MAN_END
  144. MAN_BEGIN (U"KlattGrid: Play special...", U"djmw", 20090421)
  145. INTRO (U"A command to play part of a @@KlattGrid@.")
  146. ENTRY (U"Settings")
  147. TAG (U"##Time range (s)")
  148. DEFINITION (U"determines the part of the sound's domain that you want to hear. If both argument equal zero the complete sound is played. ")
  149. TAG (U"##Sampling frequency (Hz)")
  150. DEFINITION (U"determines the @@sampling frequency@ of the resulting sound.")
  151. TAG (U"##Scale peak")
  152. DEFINITION (U"determines whether the peak value of the sound will be set to 0.99. In this way the sound will always play well.")
  153. PhonationGrid_to_Sound_COMMON_PARAMETERS_HELP
  154. TAG (U"##Model")
  155. DEFINITION (U"switches on either the cascade or the parallel section of the synthesizer.")
  156. TAG (U"##Oral formant range#, ##Nasal formant range# ...")
  157. DEFINITION (U"selects the formants to use in the synthesis. Choosing the end of a range smaller than the start of the range switches off the formants. ")
  158. TAG (U"##Frication bypass")
  159. DEFINITION (U"switches the frication bypass of the frication section on or off. "
  160. "The complete frication section can be turned off by also switching off the frication formants.")
  161. MAN_END
  162. MAN_BEGIN (U"KlattGrid: To Sound (special)...", U"djmw", 20090415)
  163. INTRO (U"A command to synthesize a Sound from the selected @@KlattGrid@.")
  164. ENTRY (U"Settings")
  165. TAG (U"##Time range (s)")
  166. DEFINITION (U"determines the part of the domain that you want to save as a sound. If both argument equal zero the complete sound is created. ")
  167. TAG (U"##Sampling frequency (Hz)")
  168. DEFINITION (U"determines the @@sampling frequency@ of the resulting sound.")
  169. TAG (U"##Scale peak")
  170. DEFINITION (U"determines whether the peak value of the sound will be set to 0.99. In this way the sound will always play well and can be saved to a file with minimal loss of resolution.")
  171. PhonationGrid_to_Sound_COMMON_PARAMETERS_HELP
  172. TAG (U"##Model")
  173. DEFINITION (U"switches on either the cascade or the parallel section of the synthesizer.")
  174. TAG (U"##Oral formant range#, ##Nasal formant range# ...")
  175. DEFINITION (U"selects the formants to use in the synthesis. Choosing the end of a range smaller than the start of the range switches off the formants. ")
  176. TAG (U"##Frication bypass")
  177. DEFINITION (U"switches the frication bypass of the frication section on or off. "
  178. "The complete frication section can be turned off by also switching off the frication formants.")
  179. MAN_END
  180. MAN_BEGIN (U"KlattGrid: Extract oral formant grid (open phases)...", U"djmw", 20090421)
  181. INTRO (U"Extracts the oral formant grid as used in the synthesis, i.e. the resulting grid contains the informantion from the oral formant grid and the delta formant grid combined during the open phase of the glottis. ")
  182. MAN_END
  183. MAN_BEGIN (U"KlattTable", U"djmw", 20160601)
  184. INTRO (U"The parameters for the Klatt synthesizer in table format. You can convert it to a @@KlattGrid@ which is easier to view and edit.")
  185. MAN_END
  186. MAN_BEGIN (U"Sound: To KlattGrid (simple)...", U"djmw", 20090415)
  187. INTRO (U"Create a @@KlattGrid@ from a @@Sound@.")
  188. ENTRY (U"Algorithm")
  189. NORMAL (U"Oral formants are determined by the @@Sound: To Formant (burg)...@ method and transformed to a @@FormantGrid@. "
  190. "Pitch is determined by the @@Sound: To Pitch...@ method and transformed to a @@PitchTier@. "
  191. "With @@Sound: To Intensity...@ we determine intensity and convert it to an @@IntensityTier@.")
  192. NORMAL (U"Next a KlattGrid is created whose time domain conforms to the sound. Its pitch tier, normal formant grid "
  193. "and its voicing amplitude are replaced by the results from the analyses.")
  194. MAN_END
  195. MAN_BEGIN (U"Sound & KlattGrid: Filter by vocal tract...", U"djmw", 20090108)
  196. INTRO (U"Filters the selected sound with the vocal tract part of the selected @@KlattGrid@. During this filtering the delta formants and bandwidths are %%not% used. ")
  197. MAN_END
  198. }
  199. /* End of file manual_KlattGrid.cpp */