manual_Fon.cpp 119 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221
  1. /* manual_Fon.cpp
  2. *
  3. * Copyright (C) 1992-2008,2010,2011,2014-2017 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 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.
  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. #include "ManPagesM.h"
  19. static void draw_CreateDurationTier (Graphics g) {
  20. static double x [] = { 0.0, 0.3, 0.6, 0.7, 0.9 }, y [] = { 1.0, 1.0, 2.3, 1.0, 1.0 };
  21. Graphics_setWindow (g, 0.0, 0.9, 0.0, 2.5);
  22. Graphics_drawInnerBox (g);
  23. Graphics_marksLeftEvery (g, 1.0, 1.0, true, true, false);
  24. Graphics_marksBottomEvery (g, 1.0, 0.1, true, true, false);
  25. Graphics_setInner (g);
  26. Graphics_setColour (g, Graphics_RED);
  27. Graphics_polyline (g, 5, x, y);
  28. Graphics_setColour (g, Graphics_BLACK);
  29. Graphics_unsetInner (g);
  30. Graphics_textBottom (g, true, U"Time (s)");
  31. Graphics_textLeft (g, true, U"Relative duration");
  32. }
  33. void manual_Sampling_init (ManPages me);
  34. void manual_sound_init (ManPages me);
  35. void manual_pitch_init (ManPages me);
  36. void manual_spectrum_init (ManPages me);
  37. void manual_formant_init (ManPages me);
  38. void manual_annotation_init (ManPages me);
  39. void manual_Fon_init (ManPages me);
  40. void manual_Fon_init (ManPages me) {
  41. manual_Sampling_init (me);
  42. manual_sound_init (me);
  43. manual_pitch_init (me);
  44. manual_spectrum_init (me);
  45. manual_formant_init (me);
  46. manual_annotation_init (me);
  47. MAN_BEGIN (U"Get high index from time...", U"ppgb", 20101230)
  48. INTRO (U"A @query to ask the selected tier object "
  49. "(@DurationTier, @IntensityTier, @PitchTier) "
  50. "which point is nearest to, but no earlier than, the specified time.")
  51. ENTRY (U"Setting")
  52. TAG (U"##Time (s)")
  53. DEFINITION (U"the time from which you want to get the point index.")
  54. ENTRY (U"Return value")
  55. NORMAL (U"This query returns the index of the point with the lowest time greater than or equal to #Time. "
  56. "It is @undefined if there are no points. "
  57. "It is the number of points plus 1 (offright) if the specified time is greater than the time of the last point.")
  58. MAN_END
  59. MAN_BEGIN (U"Get low index from time...", U"ppgb", 20101230)
  60. INTRO (U"A @query to ask the selected tier object "
  61. "(@DurationTier, @IntensityTier, @PitchTier) "
  62. "which point is nearest to, but no later than, the specified time.")
  63. ENTRY (U"Setting")
  64. TAG (U"##Time (s)")
  65. DEFINITION (U"the time from which you want to get the point index.")
  66. ENTRY (U"Return value")
  67. NORMAL (U"This query returns the index of the point with the highest time less than or equal to #Time. "
  68. "It is @undefined if there are no points. "
  69. "It is 0 (offleft) if the specified time is less than the time of the first point.")
  70. MAN_END
  71. MAN_BEGIN (U"Get nearest index from time...", U"ppgb", 20101230)
  72. INTRO (U"A @query to ask the selected tier object "
  73. "(@DurationTier, @IntensityTier, @PitchTier) "
  74. "which point is nearest to the specified time.")
  75. ENTRY (U"Setting")
  76. TAG (U"##Time (s)")
  77. DEFINITION (U"the time near which you want to get the point index.")
  78. ENTRY (U"Return value")
  79. NORMAL (U"This query returns the index of the point with the highest time less than or equal to #Time. "
  80. "It is @undefined if there are no points.")
  81. MAN_END
  82. MAN_BEGIN (U"Remove point...", U"ppgb", 20101230)
  83. INTRO (U"A command to remove one point from every selected time-based tier object "
  84. "(@DurationTier, @IntensityTier, @PitchTier).")
  85. ENTRY (U"Setting")
  86. TAG (U"##Point number")
  87. DEFINITION (U"the index of the point you want to remove.")
  88. ENTRY (U"Behaviour")
  89. NORMAL (U"If ##Point number# is 3, the third point counted from the start of the tier (if it exists) "
  90. "is removed from the tier.")
  91. MAN_END
  92. MAN_BEGIN (U"Remove point near...", U"ppgb", 20101230)
  93. INTRO (U"A command to remove one point from every selected time-based tier object "
  94. "(@DurationTier, @IntensityTier, @PitchTier).")
  95. ENTRY (U"Setting")
  96. TAG (U"##Time (s)")
  97. DEFINITION (U"the time near which you want to remove a point.")
  98. ENTRY (U"Behaviour")
  99. NORMAL (U"The point nearest to #Time (if there is any point) is removed from the tier.")
  100. MAN_END
  101. MAN_BEGIN (U"Remove points between...", U"ppgb", 20101230)
  102. INTRO (U"A command to remove some points from every selected time-based tier object "
  103. "(@DurationTier, @IntensityTier, @PitchTier).")
  104. ENTRY (U"Settings")
  105. TAG (U"##From time (s)")
  106. TAG (U"##To time (s)")
  107. DEFINITION (U"the times between which you want to remove all points.")
  108. ENTRY (U"Behaviour")
  109. NORMAL (U"Any points between ##Frome time# and ##To Time# (inclusive) are removed from the tier.")
  110. MAN_END
  111. MAN_BEGIN (U"AmplitudeTier", U"ppgb", 20070825)
  112. INTRO (U"One of the @@types of objects@ in Praat. "
  113. "An AmplitudeTier object represents a time-stamped amplitude contour, i.e., it contains a series of (%time, %amplitude) points. "
  114. "The amplitude values are in Pascal. To see some applications, consult the @IntensityTier information; "
  115. "the difference between an AmplitudeTier and an IntensityTier is that the former has values in Pascal "
  116. "which multiply linearly with a Sound (for instance), and the latter has values in dB, "
  117. "which multiply logarithmically with a Sound.")
  118. MAN_END
  119. MAN_BEGIN (U"Cochleagram", U"ppgb", 20030316)
  120. INTRO (U"One of the @@types of objects@ in Praat. It represents the excitation pattern "
  121. "of the basilar membrane in the inner ear (see @Excitation) as a function of time.")
  122. MAN_END
  123. MAN_BEGIN (U"Cochleagram: Formula...", U"ppgb", 20021206)
  124. INTRO (U"A command for changing the data in all selected @Cochleagram objects.")
  125. NORMAL (U"See the @Formulas tutorial for examples and explanations.")
  126. MAN_END
  127. MAN_BEGIN (U"Create DurationTier...", U"ppgb", 20140421)
  128. INTRO (U"A command in the @@New menu@ to create an empty @DurationTier object.")
  129. NORMAL (U"The resulting object will have the specified name and time domain, but contain no duration points. "
  130. "To add some points to it, use @@DurationTier: Add point...@.")
  131. ENTRY (U"Scripting example")
  132. NORMAL (U"To create a tier 0.9 seconds long, with an deceleration around 0.6 seconds, you do:")
  133. CODE (U"Create DurationTier: \"dur\", 0, 0.9")
  134. CODE (U"Add point: 0.3, 1")
  135. CODE (U"Add point: 0.6, 2.3")
  136. CODE (U"Add point: 0.7, 1")
  137. NORMAL (U"The result will look like")
  138. PICTURE (5, 2.5, draw_CreateDurationTier)
  139. NORMAL (U"The target duration will be the area under this curve, which is 0.9 + 1/2 · 1.3 · 0.4 = 1.16 seconds.")
  140. MAN_END
  141. MAN_BEGIN (U"Create empty PointProcess...", U"ppgb", 20021204)
  142. INTRO (U"A command in the @@New menu@ to create an empty @PointProcess. The newly created object is put in the list of objects.")
  143. MAN_END
  144. MAN_BEGIN (U"Create IntensityTier...", U"ppgb", 20021204)
  145. INTRO (U"A command in the @@New menu@ to create an empty @IntensityTier object.")
  146. NORMAL (U"The resulting object will have the specified name and time domain, but contain no formant points. "
  147. "To add some points to it, use @@IntensityTier: Add point...@.")
  148. NORMAL (U"For an example, see @@Source-filter synthesis@.")
  149. MAN_END
  150. MAN_BEGIN (U"Create Matrix...", U"ppgb", 20021212)
  151. INTRO (U"A command in the @@New menu@ to create a @Matrix with the specified sampling attributes, "
  152. "filled with values from a formula (see @@Matrix: Formula...@).")
  153. MAN_END
  154. MAN_BEGIN (U"Create Poisson process...", U"ppgb", 20041005)
  155. INTRO (U"A command to create a @PointProcess object that represents a Poisson process.")
  156. NORMAL (U"A Poisson process is a stationary point process with a fixed density %λ, "
  157. "which means that there are, on the average, %λ events per second.")
  158. ENTRY (U"Settings")
  159. TAG (U"##Start time (s)")
  160. DEFINITION (U"%t__%min_, the beginning of the time domain, in seconds.")
  161. TAG (U"##End time (s)")
  162. DEFINITION (U"%t__%max_, the end of the time domain, in seconds.")
  163. TAG (U"##Density (Hz)")
  164. DEFINITION (U"the average number of points per second.")
  165. ENTRY (U"Algorithm")
  166. NORMAL (U"First, the number of points %N in the time domain is determined. Its expectation value is")
  167. FORMULA (U"%λ = (%t__%max_ – %t__%min_) · %density")
  168. NORMAL (U"but its actual value is taken from the Poisson distribution:")
  169. FORMULA (U"%p(%n) = (%%λ^n% / %n!) %e^^–%λ")
  170. NORMAL (U"Then, %N points are computed throughout the time domain, according to a uniform distribution:")
  171. FORMULA (U"%p(%t) = 1 / (%t__%max_ – %t__%min_) for %t ∈ [%t__%min_, %t__%max_]")
  172. FORMULA (U"%p(%t) = 0 outside [%t__%min_, %t__%max_]")
  173. MAN_END
  174. MAN_BEGIN (U"Create simple Matrix...", U"ppgb", 20021204)
  175. INTRO (U"A command in the @@New menu@ to create a @Matrix with the specified number of rows and columns, "
  176. "filled with values from a formula (see @@Matrix: Formula...@).")
  177. MAN_END
  178. MAN_BEGIN (U"Create Strings as directory list...", U"ppgb", 20060919)
  179. INTRO (U"A command in the @@New menu@ to create a @Strings object containing a list of directories in a given parent directory. "
  180. "It works completely analogously to @@Create Strings as file list...@.")
  181. MAN_END
  182. MAN_BEGIN (U"Create Strings as file list...", U"ppgb", 20150713)
  183. INTRO (U"A command in the @@New menu@ to create a @Strings object containing a list of files in a given directory.")
  184. ENTRY (U"Settings")
  185. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (2.6), U""
  186. Manual_DRAW_SETTINGS_WINDOW ("Create Strings as file list", 2.6)
  187. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Name", "fileList")
  188. Manual_DRAW_SETTINGS_WINDOW_TEXT ("File path", "/Users/miep/Sounds/*.wav")
  189. )
  190. TAG (U"##Name")
  191. DEFINITION (U"the name of the resulting Strings object.")
  192. TAG (U"##File path")
  193. DEFINITION (U"the directory name, with an optional %wildcard (see below) for selecting files.")
  194. ENTRY (U"Behaviour")
  195. NORMAL (U"The resulting Strings object will contain an alphabetical list of file names, "
  196. "without the preceding path through the directory structures. If there are no files that match the file path, "
  197. "the Strings object will contain no strings.")
  198. ENTRY (U"Usage")
  199. NORMAL (U"There are two ways to specify the file path.")
  200. NORMAL (U"One way is to specify a directory name only. On Unix, the file path could be "
  201. "##/usr/people/miep/sounds# or ##/usr/people/miep/sounds/#, for instance. On Windows, "
  202. "##C:\\bsUsers\\bsMiep\\bsSounds# or ##C:\\bsUsers\\bsMiep\\bsSounds\\bs#. "
  203. "On Macintosh, ##/Users/miep/Sounds# or ##/Users/miep/Sounds/#. Any of these produce "
  204. "a list of all the files in the specified directory.")
  205. NORMAL (U"The other way is to specify a wildcard (a single asterisk) for the file names. "
  206. "To get a list of all the files whose names start with \"hal\" and end in \".wav\", "
  207. "type ##/usr/people/miep/sounds/hal*.wav#, ##C:\\bsUsers\\bsMiep\\bsSounds\\bshal*.wav#, "
  208. "or ##/Users/miep/Sounds/hal*.wav#.")
  209. ENTRY (U"Script usage")
  210. NORMAL (U"In a script, you can use this command to cycle through the files in a directory. "
  211. "For instance, to read in all the sound files in a specified directory, "
  212. "you could use the following script:")
  213. CODE (U"directory\\$ = \"/usr/people/miep/sounds\"")
  214. CODE (U"strings = Create Strings as file list: \"list\", directory\\$ + \"/*.wav\"")
  215. CODE (U"numberOfFiles = Get number of strings")
  216. CODE (U"for ifile to numberOfFiles")
  217. CODE1 (U"selectObject: strings")
  218. CODE1 (U"fileName\\$ = Get string: ifile")
  219. CODE1 (U"Read from file: directory\\$ + \"/\" + fileName\\$ ")
  220. CODE (U"endfor")
  221. NORMAL (U"If the script has been saved to a script file, you can use file paths that are relative to the directory "
  222. "where you saved the script. Thus, with")
  223. CODE (U"Create Strings as file list: \"list\", \"*.wav\"")
  224. NORMAL (U"you get a list of all the .wav files that are in the same directory as the script that contains this line. "
  225. "And to get a list of all the .wav files in the directory Sounds that resides in the same directory as your script, "
  226. "you can do")
  227. CODE (U"Create Strings as file list: \"list\", \"Sounds/*.wav\"")
  228. NORMAL (U"As is usual in Praat scripting, the forward slash (\"/\") in this example can be used on all platforms, including Windows. "
  229. "This makes your script portable across platforms.")
  230. ENTRY (U"See also")
  231. NORMAL (U"To get a list of directories instead of files, use @@Create Strings as directory list...@.")
  232. MAN_END
  233. MAN_BEGIN (U"Distributions", U"ppgb", 20030316)
  234. INTRO (U"One of the @@types of objects@ in Praat. Inherits most actions from @TableOfReal.")
  235. ENTRY (U"Actions")
  236. LIST_ITEM (U"@@Distributions: To Strings...@")
  237. MAN_END
  238. MAN_BEGIN (U"Distributions: To Strings...", U"ppgb", 19971022)
  239. INTRO (U"A command to create a @Strings object from every selected @Distributions object.")
  240. ENTRY (U"Settings")
  241. TAG (U"##Column number")
  242. DEFINITION (U"the column (in the #Distributions object) that contains the distribution that you are "
  243. "interested in. Often the #Distributions object will only contain a single distribution, "
  244. "so this argument will often be 1. If the #Distributions object contains nine distributions, "
  245. "specify any number between 1 and 9.")
  246. TAG (U"##Number of strings")
  247. DEFINITION (U"the number of times a string will be drawn from the chosen distribution. "
  248. "This is the number of strings that the resulting @Strings object is going to contain.")
  249. ENTRY (U"Behaviour")
  250. NORMAL (U"Every string in the resulting #Strings object will be a row label of the #Distributions object. "
  251. "The number in each row at the specified column will be considered the relative frequency of "
  252. "occurrence of that row.")
  253. NORMAL (U"%#Example. Suppose we have the following #Distributions:")
  254. CODE (U"File type = \"ooTextFile\"")
  255. CODE (U"Object class = \"Distributions\"")
  256. CODE (U"2 (number of columns)")
  257. CODE (U" \"English\" \"French\" (column labels)")
  258. CODE (U"3 (number of rows)")
  259. CODE (U"\"the\" 108 1.5")
  260. CODE (U"\"a\" 58.1 33")
  261. CODE (U"\"pour\" 0.7 15.5")
  262. NORMAL (U"If you set %Column to 1 and %%Number of strings% to 1000, "
  263. "you will get a @Strings object with approximately 647 occurrences of \"the\", "
  264. "348 occurrences of \"a\", and 4 occurrences of \"pour\". "
  265. "If you had set %Column to 2 (\"French\"), you would have gotten about "
  266. "30 times \"the\", 660 times \"a\", and 310 times \"pour\". "
  267. "The actual numbers will vary because the choice of a string will not depend on previous choices.")
  268. MAN_END
  269. MAN_BEGIN (U"DurationTier", U"ppgb", 20030316)
  270. INTRO (U"One of the @@types of objects@ in Praat. "
  271. "A DurationTier object contains a number of (%time, %duration) points, "
  272. "where %duration is to be interpreted as a relative duration (e.g. the duration of a manipulated sound "
  273. "as compared to the duration of the original). For instance, "
  274. "if your DurationTier contains two points, one with a duration value of 1.5 at a time of 0.5 seconds "
  275. "and one with a duration value of 0.6 at a time of 1.1 seconds, this is to be interpreted as "
  276. "a relative duration of 1.5 (i.e. a slowing down) for all original times before 0.5 seconds, "
  277. "a relative duration of 0.6 (i.e. a speeding up) for all original times after 1.1 seconds, "
  278. "and a linear interpolation between 0.5 and 1.1 seconds (e.g. a relative duration of "
  279. "1.2 at 0.7 seconds, and of 0.9 at 0.9 seconds).")
  280. NORMAL (U"See @@Intro 8.2. Manipulation of duration@ and @@Create DurationTier...@.")
  281. MAN_END
  282. MAN_BEGIN (U"DurationTier: Add point...", U"ppgb", 20030216)
  283. INTRO (U"A command to add a point to each selected @DurationTier. "
  284. "For an example, see @@Create DurationTier...@.")
  285. ENTRY (U"Settings")
  286. TAG (U"##Time (s)")
  287. DEFINITION (U"the time at which a point is to be added.")
  288. TAG (U"##Relative duration")
  289. DEFINITION (U"the relative duration value of the requested new point.")
  290. ENTRY (U"Behaviour")
  291. NORMAL (U"The tier is modified so that it contains the new point. "
  292. "If a point at the specified time was already present in the tier, nothing happens.")
  293. MAN_END
  294. MAN_BEGIN (U"DurationTier: Get target duration...", U"ppgb", 20101228)
  295. INTRO (U"A @query to the selected @DurationTier for the target duration of a specified time range.")
  296. ENTRY (U"Settings")
  297. TAG (U"##From time (s)")
  298. TAG (U"##To time (s)")
  299. DEFINITION (U"the start and end of the (original) time range.")
  300. ENTRY (U"Return value")
  301. NORMAL (U"the target duration in seconds.")
  302. MAN_END
  303. MAN_BEGIN (U"DurationTierEditor", U"ppgb", 20110128)
  304. INTRO (U"One of the @editors in the Praat program, for viewing and editing a @DurationTier object. "
  305. "To create a DurationTierEditor window, select a DurationTier and click ##View & Edit#.")
  306. MAN_END
  307. MAN_BEGIN (U"Editors", U"ppgb", 20110128)
  308. INTRO (U"Many @@types of objects@ in Praat can be viewed and edited in their own windows.")
  309. ENTRY (U"Editor windows")
  310. LIST_ITEM (U"• @SoundEditor")
  311. LIST_ITEM (U"• @LongSoundEditor")
  312. LIST_ITEM (U"• @TextGridEditor")
  313. LIST_ITEM (U"• @ManipulationEditor")
  314. LIST_ITEM (U"• @SpectrumEditor")
  315. LIST_ITEM (U"• @PitchEditor")
  316. LIST_ITEM (U"• @PointEditor")
  317. LIST_ITEM (U"• @PitchTierEditor")
  318. LIST_ITEM (U"• @IntensityTierEditor")
  319. LIST_ITEM (U"• @DurationTierEditor")
  320. LIST_ITEM (U"• #SpectrogramEditor")
  321. LIST_ITEM (U"• #ArtwordEditor")
  322. LIST_ITEM (U"• @OTGrammarEditor")
  323. LIST_ITEM (U"• (any type: @Inspect)")
  324. ENTRY (U"How to open an editor for an object")
  325. NORMAL (U"To open an editor window for an object in the list, select the object and choose ##View & Edit# "
  326. "(if the ##View & Edit# button exists, it is usually at the top of the @@Dynamic menu@). "
  327. "The name of the object will appear as the title of the editor window.")
  328. NORMAL (U"Objects that cannot be modified (e.g. LongSound) just have the command #View instead of ##View & Edit#.")
  329. ENTRY (U"General behaviour")
  330. NORMAL (U"Changes that you make to an object in its editor window will take effect immediately. "
  331. "For instance, you do not have close the editor window before saving the changed object to disk.")
  332. NORMAL (U"If you @Remove an object that you are viewing or editing from the @@List of Objects@, "
  333. "the editor window will automatically disappear from the screen.")
  334. NORMAL (U"All editors are independent windows: you can minimize and maximize them; "
  335. "if an editor window goes hiding behind another window, "
  336. "you can raise it by choosing the ##View & Edit# command again.")
  337. NORMAL (U"If you rename an object that you are viewing or editing (with @@Rename...@), "
  338. "the title of the editor window immediately changes to the new name.")
  339. ENTRY (U"Ways to control an editor window")
  340. LIST_ITEM (U"• @@Click")
  341. LIST_ITEM (U"• @@Shift-click")
  342. LIST_ITEM (U"• @@Drag")
  343. LIST_ITEM (U"• @@Shift-drag")
  344. LIST_ITEM (U"• @@Time selection")
  345. LIST_ITEM (U"• @@Keyboard shortcuts")
  346. MAN_END
  347. MAN_BEGIN (U"Excitation", U"ppgb", 20030316)
  348. INTRO (U"One of the @@types of objects@ in Praat. It represents the excitation pattern "
  349. "of the basilar membrane in the inner ear.")
  350. ENTRY (U"Inside an Excitation object")
  351. NORMAL (U"With @Inspect, you will see the following attributes.")
  352. TAG (U"%xmin = 0")
  353. DEFINITION (U"minimum place or frequency (Bark).")
  354. TAG (U"%xmax = 25.6 Bark")
  355. DEFINITION (U"maximum place or frequency (Bark).")
  356. TAG (U"%nx")
  357. DEFINITION (U"number of places or frequencies.")
  358. TAG (U"%dx = 25.6 / %nx")
  359. DEFINITION (U"Place or frequency step (Bark).")
  360. TAG (U"%x1 = %dx / 2")
  361. DEFINITION (U"centre of first place or frequency band (Bark).")
  362. TAG (U"%ymin = %ymax = %dy = %y__1_ = 1; %ny = 1")
  363. DEFINITION (U"dummies.")
  364. TAG (U"%z [1]")
  365. DEFINITION (U"intensity (sensation level) in phon.")
  366. MAN_END
  367. MAN_BEGIN (U"Excitation: Formula...", U"ppgb", 20021206)
  368. INTRO (U"A command for changing the data in all selected @Excitation objects.")
  369. NORMAL (U"See the @Formulas tutorial for examples and explanations.")
  370. MAN_END
  371. MAN_BEGIN (U"Excitation: Get loudness", U"ppgb", 19991016)
  372. INTRO (U"A @query to ask the selected @Excitation object for its loudness.")
  373. ENTRY (U"Return value")
  374. NORMAL (U"the loudness in sone units.")
  375. ENTRY (U"Algorithm")
  376. NORMAL (U"The loudness is defined as")
  377. FORMULA (U"∫%df 2^^(%e(%f) - 40 phon) / 10^")
  378. NORMAL (U"where %f is the frequency in Bark, and %e(%f) the excitation in phon. "
  379. "For our discrete Excitation object, the loudness is computed as")
  380. FORMULA (U"Δ%f ∑ 2^^(%e__%i_ - 40) / 10")
  381. NORMAL (U"where Δ%f is the distance between the excitation channels (in Bark).")
  382. MAN_END
  383. MAN_BEGIN (U"Excitation_hertzToBark", U"ppgb", 19970401)
  384. INTRO (U"A routine for converting frequency into basilar place, "
  385. "the inverse of @Excitation_barkToHertz.")
  386. ENTRY (U"Syntax")
  387. PROTOTYPE (U"##double Excitation_hertzToBark (double #%hertz##);")
  388. ENTRY (U"Algorithm")
  389. NORMAL (U"Returns 7 · ln (%hertz / 650 + √ (1 + (%hertz / 650)^2)).")
  390. MAN_END
  391. MAN_BEGIN (U"Excitation_barkToHertz", U"ppgb", 19970401)
  392. INTRO (U"A routine for converting basilar place into frequency, "
  393. "the inverse of @Excitation_hertzToBark.")
  394. ENTRY (U"Syntax")
  395. PROTOTYPE (U"##double Excitation_barkToHertz (double #%bark##);")
  396. ENTRY (U"Algorithm")
  397. NORMAL (U"Returns 650 · sinh (%bark / 7).")
  398. MAN_END
  399. /*
  400. double Excitation_soundPressureToPhon (double soundPressure, double bark);
  401. Uses auditory filter (width apx. 1 Bark) for masking.
  402. Excitation Excitation_create (double df, integer nf);
  403. Function:
  404. return a new instance of Excitation.
  405. Preconditions:
  406. df > 0.0;
  407. nf >= 1;
  408. Postconditions:
  409. result -> xmin == 0.0; result -> ymin == 1;
  410. result -> xmax == 25.6; result -> ymax == 1;
  411. result -> nx == nf; result -> ny == 1;
  412. result -> dx == df; result -> dy == 1;
  413. result -> x1 == 0.5 * df; result -> y1 == 1;
  414. result -> z [1] [1..nt] == 0.0;
  415. double Excitation_getDistance (Excitation me, Excitation thee);
  416. void Excitation_draw (Excitation me, Graphics g, double fmin, double fmax, double minimum, double maximum, int garnish);
  417. Matrix Excitation_to_Matrix (Excitation me);
  418. Function:
  419. Create a Matrix from an Excitation,
  420. with deep copy of all of its Matrix attributes, except class information and methods.
  421. Excitation Matrix_to_Excitation (Matrix me);
  422. Function:
  423. create an Excitation from a Matrix.
  424. Postconditions:
  425. thy xmin == 0.0;
  426. thy xmax == my nx / (1 / my dx);
  427. thy nx == my nx;
  428. thy dx == 1 / (1 / my dx);
  429. thy x1 == 0.5 * thy dx;
  430. thy ymin ymax ny dy y1 == 1;
  431. thy z [1] [...] == my z [1] [...];
  432. */
  433. /*"Any object of one of the types Polygon, PointProcess, Sound, Pitch, Spectrum,\n"
  434. "Spectrogram, Excitation, Cochleagram, VocalTract\n"
  435. "is convertible to and from a Matrix.\n"
  436. "This allows extra hacking and drawing possibilities.\n"
  437. "For example, to square the y values of a Polygon, do the following:\n"
  438. " select a Polygon, click on `To Matrix', click on `Formula...',\n"
  439. " type \"self * if row=1 then 1 else self fi\", click on `To Polygon'."*/
  440. MAN_BEGIN (U"Formula...", U"ppgb", 19980319)
  441. NORMAL (U"See @@Matrix: Formula...@")
  442. MAN_END
  443. MAN_BEGIN (U"Frequency selection", U"ppgb", 20010402)
  444. INTRO (U"The way to select a frequency domain in the @SpectrumEditor. "
  445. "This works completely analogously to the @@time selection@ in other editors.")
  446. MAN_END
  447. MAN_BEGIN (U"Get area...", U"ppgb", 20030216)
  448. INTRO (U"A @query to the selected tier object (@PitchTier, @IntensityTier, @DurationTier).")
  449. ENTRY (U"Return value")
  450. NORMAL (U"the area under the curve.")
  451. ENTRY (U"Settings")
  452. TAG (U"##From time (s)")
  453. TAG (U"##To time (s)")
  454. DEFINITION (U"the selected time domain. Values outside this domain are ignored. "
  455. "If ##To time# is not greater than ##From time#, the entire time domain of the tier is considered.")
  456. ENTRY (U"Algorithm")
  457. NORMAL (U"The curve consists of a sequence of line segments. The contribution of the line segment from "
  458. "(%t__1_, %f__1_) to (%t__2_, %f__2_) to the area is")
  459. FORMULA (U"1/2 (%f__1_ + %f__2_) (%t__2_ – %t__1_)")
  460. MAN_END
  461. MAN_BEGIN (U"Intensity", U"ppgb", 20030316)
  462. INTRO (U"One of the @@types of objects@ in Praat.")
  463. NORMAL (U"An Intensity object represents an intensity contour at linearly spaced time points "
  464. "%t__%i_ = %t__1_ + (%i – 1) %dt, with values in dB SPL, i.e. dB relative to 2·10^^-5^ Pascal, "
  465. "which is the normative auditory threshold for a 1000-Hz sine wave.")
  466. MAN_END
  467. MAN_BEGIN (U"Intensity: Get maximum...", U"ppgb", 20041107)
  468. INTRO (U"A @query to the selected @Intensity object.")
  469. ENTRY (U"Return value")
  470. NORMAL (U"the maximum value within the specified time domain, expressed in dB.")
  471. ENTRY (U"Settings")
  472. TAG (U"##Time range (s)")
  473. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored. "
  474. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  475. TAG (U"%%Interpolation")
  476. DEFINITION (U"the interpolation method (#None, #Parabolic, #Cubic, #Sinc) of the @@vector peak interpolation@. "
  477. "The standard is Parabolic because of the usual nonlinearity (logarithm) in the computation of intensity; "
  478. "sinc interpolation would be too stiff and may give unexpected results.")
  479. MAN_END
  480. MAN_BEGIN (U"Intensity: Get mean...", U"ppgb", 20041107)
  481. INTRO (U"A @query to the selected @Intensity object.")
  482. ENTRY (U"Return value")
  483. NORMAL (U"the mean (in dB) of the intensity values of the frames within a specified time domain.")
  484. ENTRY (U"Settings")
  485. TAG (U"##Time range (s)")
  486. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored. "
  487. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  488. TAG (U"##Averaging method")
  489. DEFINITION (U"the units in which the averaging is performed. If the method is #energy, "
  490. "the returned dB value is based on the mean power (in Pa^2/s) between %t__1_ and %t__2_. "
  491. "If the method is #dB, the returned value is the mean of the intensity curve in dB. "
  492. "If the method is #sones, the returned value is in between these two, "
  493. "and based on averaging properties of the human ear.")
  494. ENTRY (U"Algorithm")
  495. NORMAL (U"If the averaging method is #dB, the mean intensity between the times %t__1_ and %t__2_ is defined as")
  496. FORMULA (U"1/(%t__2_ - %t__1_) ∫__%%t%1_^^%%t%2^ %x(%t) %dt")
  497. NORMAL (U"where %x(%t) is the intensity as a function of time, in dB. If the method is #energy, the result is")
  498. FORMULA (U"10 log__10_ { 1/(%t__2_ - %t__1_) ∫__%%t%1_^^%%t%2^ 10^^%x(%t)/10^ %dt }")
  499. NORMAL (U"If the method is #sones, the result is")
  500. FORMULA (U"10 log__2_ { 1/(%t__2_ - %t__1_) ∫__%%t%1_^^%%t%2^ 2^^%x(%t)/10^ %dt }")
  501. ENTRY (U"Behaviour")
  502. NORMAL (U"After you do @@Sound: To Intensity...@, the mean intensity of the resulting #Intensity, "
  503. "if the averaging method is #energy, should be close to the mean SPL of the original #Sound, "
  504. "which can be found with #Info.")
  505. MAN_END
  506. MAN_BEGIN (U"Intensity: Get minimum...", U"ppgb", 20041107)
  507. INTRO (U"A @query to the selected @Intensity object.")
  508. ENTRY (U"Return value")
  509. NORMAL (U"the minimum value within a specified time domain, expressed in dB.")
  510. ENTRY (U"Settings")
  511. TAG (U"##Time range (s)")
  512. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored. "
  513. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  514. TAG (U"##Interpolation")
  515. DEFINITION (U"the interpolation method (#None, #Parabolic, #Cubic, #Sinc) of the @@vector peak interpolation@. "
  516. "The standard is Parabolic because of the usual nonlinearity (logarithm) in the computation of intensity; "
  517. "sinc interpolation would be too stiff and may give unexpected results.")
  518. MAN_END
  519. MAN_BEGIN (U"Intensity: Get standard deviation...", U"ppgb", 20041107)
  520. INTRO (U"A @query to the selected @Intensity object.")
  521. ENTRY (U"Return value")
  522. NORMAL (U"the standard deviation (in dB) of the intensity values of the frames within a specified time domain.")
  523. ENTRY (U"Settings")
  524. TAG (U"%%Time range (s)")
  525. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored. "
  526. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  527. ENTRY (U"Algorithm")
  528. NORMAL (U"The standard deviation between the times %t__1_ and %t__2_ is defined as")
  529. FORMULA (U"√ {1/(%t__2_ - %t__1_) ∫__%%t%1_^^%%t%2^ %dt (%x(%t) - %μ)^2}")
  530. NORMAL (U"where %x(%t) is the intensity (in dB) as a function of time, and %μ its mean. "
  531. "For our discrete Intensity object, the standard deviation is approximated by")
  532. FORMULA (U"√ {1/(%n-1) ∑__%i=%m..%m+%n-1_ (%x__%i_ - %μ)^2}")
  533. NORMAL (U"where %n is the number of frames between %t__1_ and %t__2_. Note the \"minus 1\".")
  534. MAN_END
  535. MAN_BEGIN (U"Intensity: Get time of maximum...", U"ppgb", 20041107)
  536. INTRO (U"A @query to the selected @Intensity object.")
  537. ENTRY (U"Return value")
  538. NORMAL (U"the time (in seconds) associated with the maximum intensity within a specified time domain.")
  539. ENTRY (U"Settings")
  540. TAG (U"%%Time range (s)")
  541. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored, except for purposes of interpolation. "
  542. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  543. TAG (U"%%Interpolation")
  544. DEFINITION (U"the interpolation method (None, Parabolic, Cubic, Sinc) of the @@vector peak interpolation@. "
  545. "The standard is Parabolic because of the usual nonlinearity (logarithm) in the computation of intensity; "
  546. "sinc interpolation would be too stiff and may give unexpected results.")
  547. MAN_END
  548. MAN_BEGIN (U"Intensity: Get time of minimum...", U"ppgb", 20041107)
  549. INTRO (U"A @query to the selected @Intensity object.")
  550. ENTRY (U"Return value")
  551. NORMAL (U"the time (in seconds) associated with the minimum intensity within a specified time domain.")
  552. ENTRY (U"Settings")
  553. TAG (U"##Time range (s)")
  554. DEFINITION (U"the time range (%t__1_, %t__2_). Values outside this range are ignored, except for purposes of interpolation. "
  555. "If %t__1_ is not less than %t__2_, the entire time domain of the Intensity is considered.")
  556. TAG (U"##Interpolation")
  557. DEFINITION (U"the interpolation method (None, Parabolic, Cubic, Sinc) of the @@vector peak interpolation@. "
  558. "The standard is Parabolic because of the usual nonlinearity (logarithm) in the computation of intensity; "
  559. "sinc interpolation would be too stiff and may give unexpected results.")
  560. MAN_END
  561. MAN_BEGIN (U"Intensity: Get value at time...", U"ppgb", 20030916)
  562. INTRO (U"A @query to the selected @Intensity object.")
  563. ENTRY (U"Return value")
  564. NORMAL (U"the intensity (in dB) at a specified time. If %time is outside the frames of the Intensity, the result is 0.")
  565. ENTRY (U"Settings")
  566. TAG (U"##Time (s)")
  567. DEFINITION (U"the time at which the value is to be evaluated.")
  568. TAG (U"##Interpolation")
  569. DEFINITION (U"the interpolation method, see @@vector value interpolation@. "
  570. "The standard is Cubic because of the usual nonlinearity (logarithm) in the computation of intensity; "
  571. "sinc interpolation would be too stiff and may give unexpected results.")
  572. MAN_END
  573. MAN_BEGIN (U"Intensity: Get value in frame...", U"ppgb", 19991016)
  574. INTRO (U"A @query to the selected @Intensity object.")
  575. ENTRY (U"Setting")
  576. TAG (U"##Frame number")
  577. DEFINITION (U"the frame whose value is to be looked up.")
  578. ENTRY (U"Return value")
  579. NORMAL (U"the intensity value (in dB) in the specified frame. "
  580. "If the index is less than 1 or greater than the number of frames, the result is 0; "
  581. "otherwise, it is %z [1] [%%frame number%].")
  582. MAN_END
  583. MAN_BEGIN (U"Intensity: To IntensityTier", U"ppgb", 19970321)
  584. INTRO (U"A command to convert each selected @Intensity object to an @IntensityTier.")
  585. ENTRY (U"Behaviour")
  586. NORMAL (U"Every sample in the @Intensity object is copied to a point on the @IntensityTier.")
  587. ENTRY (U"Postconditions")
  588. DEFINITION (U"Equal time domains:")
  589. LIST_ITEM (U"• %result. %xmin == %intensity. %xmin")
  590. LIST_ITEM (U"• %result. %xmax == %intensity. %xmax")
  591. DEFINITION (U"Equal number of points:")
  592. LIST_ITEM (U"• %result. %points. %size == %intensity. %nx")
  593. NORMAL (U"For all points %i = 1 ... %intensity. %nx:")
  594. DEFINITION (U" Explicit times:")
  595. LIST_ITEM (U" • %result. %points. %item [%i]. %time == %intensity. %x1 + (%i – 1) * %intensity. %dx")
  596. DEFINITION (U" Equal number of points:")
  597. LIST_ITEM (U" • %result. %points. %item [%i]. %value == %intensity. %z [1] [%i]")
  598. MAN_END
  599. MAN_BEGIN (U"Intensity & PointProcess: To IntensityTier...", U"ppgb", 20101230)
  600. INTRO (U"A command to copy information from an @Intensity, at times specified by a @PointProcess, "
  601. "to points on an @IntensityTier.")
  602. ENTRY (U"Behaviour")
  603. NORMAL (U"For all the times of the points in the PointProcess, an intensity is computed from the "
  604. "information in the Intensity object, by linear interpolation.")
  605. MAN_END
  606. MAN_BEGIN (U"IntensityTier", U"ppgb", 20101230)
  607. INTRO (U"One of the @@types of objects@ in Praat. "
  608. "An IntensityTier object represents a time-stamped intensity contour, i.e., it contains a series of (%time, %intensity) points. "
  609. "The intensity values are in dB.")
  610. NORMAL (U"For examples, see @@Source-filter synthesis@.")
  611. ENTRY (U"IntensityTier commands")
  612. NORMAL (U"Creation:")
  613. LIST_ITEM (U"From scratch:")
  614. LIST_ITEM (U"• @@Create IntensityTier...")
  615. LIST_ITEM (U"• @@IntensityTier: Add point...")
  616. LIST_ITEM (U"Copy from another object:")
  617. LIST_ITEM (U"• @@Intensity: To IntensityTier@: trivial copying of linearly spaced points.")
  618. LIST_ITEM (U"• @@Intensity & PointProcess: To IntensityTier...@: copying interpolated values at specified points.")
  619. LIST_ITEM (U"• @@PointProcess: Up to IntensityTier...@: equal values at specified points.")
  620. NORMAL (U"Viewing and editing:")
  621. LIST_ITEM (U"• @IntensityTierEditor")
  622. NORMAL (U"Conversion:")
  623. LIST_ITEM (U"• @@IntensityTier: Down to PointProcess@: copy times.")
  624. NORMAL (U"Synthesis (see @@Source-filter synthesis@):")
  625. LIST_ITEM (U"• @@Sound & IntensityTier: Multiply@")
  626. NORMAL (U"Queries:")
  627. LIST_ITEM (U"• @@Get low index from time...")
  628. LIST_ITEM (U"• @@Get high index from time...")
  629. LIST_ITEM (U"• @@Get nearest index from time...")
  630. NORMAL (U"Modification:")
  631. LIST_ITEM (U"• @@Remove point...")
  632. LIST_ITEM (U"• @@Remove point near...")
  633. LIST_ITEM (U"• @@Remove points between...")
  634. LIST_ITEM (U"• @@IntensityTier: Add point...@")
  635. MAN_END
  636. MAN_BEGIN (U"IntensityTier: Add point...", U"ppgb", 20010410)
  637. INTRO (U"A command to add a point to each selected @IntensityTier.")
  638. ENTRY (U"Settings")
  639. TAG (U"##Time (s)")
  640. DEFINITION (U"the time at which a point is to be added.")
  641. TAG (U"##Intensity (dB)")
  642. DEFINITION (U"the intensity value of the requested new point.")
  643. ENTRY (U"Behaviour")
  644. NORMAL (U"The tier is modified so that it contains the new point. "
  645. "If a point at the specified time was already present in the tier, nothing happens.")
  646. MAN_END
  647. MAN_BEGIN (U"IntensityTier: Down to PointProcess", U"ppgb", 20010410)
  648. INTRO (U"A command to degrade every selected @IntensityTier to a @PointProcess.")
  649. ENTRY (U"Behaviour")
  650. NORMAL (U"The times of all the points are trivially copied, and so is the time domain. The intensity information is lost.")
  651. MAN_END
  652. MAN_BEGIN (U"IntensityTierEditor", U"ppgb", 20110128)
  653. INTRO (U"One of the @editors in the Praat program, for viewing and editing an @IntensityTier object. "
  654. "To create a IntensityTierEditor window, select an IntensityTier and click ##View & Edit#.")
  655. MAN_END
  656. MAN_BEGIN (U"Keyboard shortcuts", U"ppgb", 20071016)
  657. INTRO (U"A way to accelerate the control of @Editors in Praat.")
  658. ENTRY (U"Purpose")
  659. NORMAL (U"to choose a menu command with the keyboard. All of these commands can also be chosen "
  660. "from a menu.")
  661. ENTRY (U"Command key")
  662. NORMAL (U"When mentioning the %%Command key%, this manual refers to the key that is marked with an apple on Apple keyboards "
  663. "or to the key that is marked \"Ctrl\" if you are on a Windows or Linux computer.")
  664. ENTRY (U"Option key")
  665. NORMAL (U"When mentioning the %%Option key%, this manual refers to the key marked \"alt\" or \"option\". "
  666. "In Praat, this key is sometimes used together with the Command key "
  667. "for destructive actions that are the reverse of the actions invoked by using the Command key only. "
  668. "For instance, if Command-T means \"add a target at the cursor position\", "
  669. "Option-Command-T may mean \"remove the selected targets\".")
  670. ENTRY (U"Shortcuts")
  671. LIST_ITEM (U"Command-A: Zoom all")
  672. LIST_ITEM (U"Command-C: Copy (the selected text, or the selected sound, or the selected part of the Picture window)")
  673. LIST_ITEM (U"Command-D (in Manipulation window): Insert duration point at cursor")
  674. LIST_ITEM (U"Option-Command-D (in Manipulation window): Remove selected duration points")
  675. LIST_ITEM (U"Command-E (in Picture window): Erase all")
  676. LIST_ITEM (U"Shift-Command-H: Move cursor to maximum pitch")
  677. LIST_ITEM (U"Command-I: Zoom in")
  678. LIST_ITEM (U"Command-L (in Objects window): @@Open long sound file...@")
  679. LIST_ITEM (U"Command-L (in sound windows): @@Intro 3.6. Viewing a spectral slice|View spectral slice@")
  680. LIST_ITEM (U"Shift-Command-L: Move cursor to minimum pitch")
  681. LIST_ITEM (U"Command-M: Search Praat manual...")
  682. LIST_ITEM (U"Command-N: Zoom to selection")
  683. LIST_ITEM (U"Command-O (in Objects window): @@Read from file...@")
  684. LIST_ITEM (U"Command-O (in sound windows): Zoom out")
  685. LIST_ITEM (U"Command-P (in Picture window): Print")
  686. LIST_ITEM (U"Command-P (in Manipulation window): Add pulse at cursor")
  687. LIST_ITEM (U"Option-Command-P (in Manipulation window): Remove selected pulses")
  688. LIST_ITEM (U"Command-Q: Quit")
  689. LIST_ITEM (U"Command-R: Reverse selection")
  690. LIST_ITEM (U"Command-S: Save")
  691. LIST_ITEM (U"Command-T (in Manipulation window): Add pitch point at cursor")
  692. LIST_ITEM (U"Option-Command-T (in Manipulation window): Remove selected pitch points")
  693. LIST_ITEM (U"Command-U: @@Calculator...@")
  694. LIST_ITEM (U"Command-V: Paste (insert the text or sound clipboard over the selected text or the selected sound)")
  695. LIST_ITEM (U"Command-W: Close window")
  696. LIST_ITEM (U"Command-X: Cut (the selected text or the selected sound)")
  697. LIST_ITEM (U"Command-Y: Redo")
  698. LIST_ITEM (U"Command-Z: Undo")
  699. LIST_ITEM (U"Command-0: Move cursor to nearest zero crossing")
  700. LIST_ITEM (U"Command-2 (in Manipulation window): Stylize pitch (2 semitones)")
  701. LIST_ITEM (U"Command-4 (in Manipulation window): Interpolate quadratically (4 points)")
  702. LIST_ITEM (U"Shift-Command-?: Local help")
  703. LIST_ITEM (U"Command-,: Move start of selection to nearest zero crossing")
  704. LIST_ITEM (U"Command-.: Move end of selection to nearest zero crossing")
  705. LIST_ITEM (U"F5: Get pitch")
  706. LIST_ITEM (U"Command-F5: Get minimum pitch")
  707. LIST_ITEM (U"Shift-F5: Get maximum pitch")
  708. LIST_ITEM (U"F1: Get first formant")
  709. LIST_ITEM (U"F2: Get second formant")
  710. LIST_ITEM (U"F3: Get third formant")
  711. LIST_ITEM (U"F4: Get fourth formant")
  712. LIST_ITEM (U"F5: Get pitch")
  713. LIST_ITEM (U"F6: Get cursor")
  714. LIST_ITEM (U"F7: Get spectral power at cursor cross")
  715. LIST_ITEM (U"F8: Get intensity")
  716. LIST_ITEM (U"F12: Log 1")
  717. LIST_ITEM (U"Shift-F12: Log 2")
  718. LIST_ITEM (U"Option-F12: Log script 3")
  719. LIST_ITEM (U"Command-F12: Log script 4")
  720. LIST_ITEM (U"Tab (in sound windows): Play selection")
  721. LIST_ITEM (U"Shift-Tab (in sound windows): Play window")
  722. LIST_ITEM (U"Arrow-up (in sound windows): Select earlier")
  723. LIST_ITEM (U"Arrow-down (in sound windows): Select later")
  724. LIST_ITEM (U"Shift-Arrow-up (in sound windows): Move start of selection left")
  725. LIST_ITEM (U"Shift-Arrow-down (in sound windows): Move start of selection right")
  726. LIST_ITEM (U"Command-Arrow-up (in sound windows): Move end of selection left")
  727. LIST_ITEM (U"Command-Arrow-down (in sound windows): Move end of selection right")
  728. LIST_ITEM (U"Page-up (in sound windows): Scroll page back")
  729. LIST_ITEM (U"Page-down (in sound windows): Scroll page forward")
  730. LIST_ITEM (U"Escape: Interrupt playing")
  731. MAN_END
  732. MAN_BEGIN (U"Log files", U"ppgb", 20140421)
  733. INTRO (U"With some commands in the @Query menu of the @SoundEditor and @TextGridEditor, "
  734. "you can write combined information about times, pitch values, formants, and intensities "
  735. "to the @@Info window@ and to a log file.")
  736. NORMAL (U"A log file is a text file on disk. It consists of a number of similar lines, "
  737. "whose format you determine with the log settings in the Query menu.")
  738. NORMAL (U"Every time you press F12 (or choose ##Log 1# from the Query menu, "
  739. "Praat writes a line to log file 1. If you press Shift-F12, Praat writes a line to log file 2.")
  740. NORMAL (U"With the ##log settings# command window, you determine the following:")
  741. TAG (U"##Log 1 to Info window")
  742. DEFINITION (U"this determines whether your log line will be written to the Info window or not.")
  743. TAG (U"##Log 1 to log file")
  744. DEFINITION (U"this determines whether your log line will be written to the log file or not.")
  745. TAG (U"##Log file 1")
  746. DEFINITION (U"the name of the log file. On Windows, this has to be a complete path name, such as "
  747. "$$C:\\bsWINDOWS\\bsDESKTOP\\bsPitch Log.txt$. "
  748. "On Unix and MacOS X, it can either be a complete path name, e.g. $$/home/mary/pitch_log$, "
  749. "or a home-relative name such as $$~/Desktop/Pitch log$.")
  750. TAG (U"##Log 1 format")
  751. DEFINITION (U"the format of the line that Praat will write. See below.")
  752. NORMAL (U"The same goes for log file 2.")
  753. ENTRY (U"Usage")
  754. NORMAL (U"The logging facility has been implemented in Praat especially for former users of Kay CSL, "
  755. "who have been used to doing it for years and like to continue doing it in Praat. "
  756. "Otherwise, you may prefer to use the @TextGridEditor to mark time points and run "
  757. "an automatic analysis afterwards.")
  758. NORMAL (U"If you do want to use the logging facility, you typically start by deleting any old "
  759. "log file (by choosing ##Delete log file 1# or ##Delete log file 2#), if you want to re-use "
  760. "the file name. Otherwise, you can change the log file name (with ##Log settings...#). "
  761. "After this, you will move the cursor to various time locations and press F12 (or Shift-F12) "
  762. "each time, so that information about the current time will be written to the log file.")
  763. ENTRY (U"Example 1: pitch logging")
  764. NORMAL (U"Suppose you want to log the time of the cursor and the pitch value at the cursor. "
  765. "You could use the following log format:")
  766. CODE (U"Time \'time:6\' seconds, pitch \'f0:2\' hertz")
  767. NORMAL (U"If you now click at 3.456789876 seconds, and the pitch happens to be 355.266 hertz "
  768. "at that time, the following line will be appended to the log file and/or to the Info window:")
  769. CODE (U"Time 3.456790 seconds, pitch 355.27 hertz.")
  770. NORMAL (U"The parts \":6\" and \":2\" denote the number of digits after the decimal point. "
  771. "If you leave them out, the values will be written with a precision of 17 digits.")
  772. NORMAL (U"The words \'time\' and \'f0\' mean exactly the same as the result of the commands "
  773. "##Get cursor# and ##Get pitch#. Therefore, if instead of setting a cursor line you selected a larger "
  774. "piece of the sound, \'time\' will give the centre of the selection and \'f0\' will give the mean pitch "
  775. "in the selection.")
  776. NORMAL (U"Beware of the following pitfall: if your pitch units are not hertz, but semitones, "
  777. "then \'f0\' will give the result in semitones. A format as in this example will then be misleading.")
  778. ENTRY (U"Example 2: formant logging")
  779. NORMAL (U"Suppose you want to log the start and finish of the selection, its duration, and the mean values "
  780. "of the first three formants, all separated by tab stops for easy importation into Microsoft® Excel™. "
  781. "You could use the following log format:")
  782. CODE (U"\'t1:4\'\'tab\\$ \'\'t2:4\'\'tab\\$ \'\'f1:0\'\'tab\\$ \'\'f2:0\'\'tab\\$ \'\'f3:0\'")
  783. NORMAL (U"You see that \'t1\' and \'t2\' are the start and finish of the selection, respectively, "
  784. "and that they are written with 4 digits after the decimal point. By using \":0\", the three formant values "
  785. "are rounded to whole numbers in hertz. The word \'tab\\$ \' is the tab stop.")
  786. ENTRY (U"Loggable values")
  787. NORMAL (U"The following values can be logged:")
  788. LIST_ITEM (U"\'time\': the time of the cursor, or the centre of the selection.")
  789. LIST_ITEM (U"\'t1\': the start of the selection (\"B\").")
  790. LIST_ITEM (U"\'t2\': the end of the selection (\"E\").")
  791. LIST_ITEM (U"\'dur\': the duration of the selection.")
  792. LIST_ITEM (U"\'freq\': the frequency at the frequency cursor.")
  793. LIST_ITEM (U"\'f0\': the pitch at the cursor time, or the mean pitch in the selection.")
  794. LIST_ITEM (U"\'f1\', \'f2\', \'f3\', \'f4\', \'f5\': the first/second/third/fourth/fifth formant at the cursor time, "
  795. "or the mean first/second/third/fourth/fifth formant in the selection.")
  796. LIST_ITEM (U"\'b1\', \'b2\', \'b3\', \'b4\', \'b5\': the bandwidth of the first/second/third/fourth/fifth formant "
  797. "at the cursor time or at the centre of the selection.")
  798. LIST_ITEM (U"\'intensity\': the intensity at the cursor time, or the mean intensity in the selection, in dB.")
  799. LIST_ITEM (U"\'power\': the spectral power at the cursor cross, in Pa^2/Hz.")
  800. LIST_ITEM (U"\'tab\\$ \': the tab stop.")
  801. LIST_ITEM (U"\'editor\\$ \': the title of the editor window (i.e. the name of the visible Sound or TextGrid).")
  802. ENTRY (U"More flexibility in logging")
  803. NORMAL (U"You may sometimes require information in your log file that cannot be generated directly "
  804. "by the loggable values above. Suppose, for instance, that you want to log the values for F1 and F2-F1 "
  805. "at the points where you click. You could write the following script:")
  806. CODE (U"f1 = Get first formant")
  807. CODE (U"f2 = Get second formant")
  808. CODE (U"f21 = f2 - f1")
  809. CODE (U"appendInfoLine: fixed\\$ (f1, 0), \" \", fixed\\$ (f21, 0)")
  810. CODE (U"appendFileLine: \"D:\\bsPraat logs\\bsFormant log.txt\", fixed\\$ (f1, 0), tab\\$ , fixed\\$ (f21, 0)")
  811. NORMAL (U"With this script, the information would be appended both to the Info window and to the "
  812. "file \"Formant log.txt\" on your desktop.")
  813. NORMAL (U"You can make this script accessible with Option-F12 (or Command-F12) "
  814. "by saving the script and specifying the name of the script file in the ##Log script 3# (or #4) field "
  815. "in the ##Log settings...# window.")
  816. NORMAL (U"These scripts may take arguments. Suppose, for instance, that you want to specify a vowel symbol "
  817. "as you press Option-F12. The following script will take care of that:")
  818. CODE (U"form Save vowel and formants")
  819. CODE1 (U"word Vowel a")
  820. CODE (U"endform")
  821. CODE (U"f1 = Get first formant")
  822. CODE (U"f2 = Get second formant")
  823. CODE (U"f21 = f2 - f1")
  824. CODE (U"appendInfoLine: vowel\\$ , \" \", fixed\\$ (f1, 0), \" \", fixed\\$ (f21, 0)")
  825. CODE (U"appendFileLine: \"~/Praat logs/Vowels and formants log\", vowel\\$ , tab\\$ , fixed\\$ (f1, 0), tab\\$ , fixed\\$ (f21, 0)")
  826. NORMAL (U"Beware of the following pitfall: because of the nature of scripts, you should not try to do this "
  827. "when you have two editor windows with the same name. I cannot predict which of the two windows "
  828. "will answer the #Get queries...")
  829. MAN_END
  830. MAN_BEGIN (U"Manipulation", U"ppgb", 20030316)
  831. INTRO (U"One of the @@types of objects@ in Praat, for changing the pitch and duration contours of a sound.")
  832. ENTRY (U"Inside a manipulation object")
  833. NORMAL (U"With @Inspect, you will see the following attributes:")
  834. TAG (U"##timeStep")
  835. DEFINITION (U"the time step (or %%frame length%) used in the pitch analysis. A common value is 0.010 seconds.")
  836. TAG (U"##minimumPitch")
  837. DEFINITION (U"the minimum pitch frequency considered in the pitch analysis. A common value is 75 hertz.")
  838. TAG (U"##maximumPitch")
  839. DEFINITION (U"the maximum pitch frequency considered in the pitch analysis. A common value is 600 hertz.")
  840. NORMAL (U"A Manipulation object also contains the following smaller objects:")
  841. LIST_ITEM (U"1. The original @Sound.")
  842. LIST_ITEM (U"2. A @PointProcess representing glottal pulses.")
  843. LIST_ITEM (U"3. A @PitchTier.")
  844. LIST_ITEM (U"4. A @DurationTier.")
  845. ENTRY (U"Analysis")
  846. NORMAL (U"When a Manipulation object is created from a sound, the following steps are performed:")
  847. LIST_ITEM (U"1. A pitch analysis is performed on the original sound, with the method of @@Sound: To Pitch...@. "
  848. "This uses the time step, minimum pitch, and maximum pitch parameters.")
  849. LIST_ITEM (U"2. The information of the resulting pitch contour (frequency and voiced/unvoiced decisions) "
  850. "is used to posit glottal pulses where the original sound contains much energy. "
  851. "The method is the same as in @@Sound & Pitch: To PointProcess (cc)@.")
  852. LIST_ITEM (U"3. The pitch contour is converted to a pitch tier with many points (targets), "
  853. "with the method of @@Pitch: To PitchTier@.")
  854. LIST_ITEM (U"4. An empty @DurationTier is created.")
  855. ENTRY (U"Resynthesis")
  856. TAG (U"A Manipulation object can produce Sound input. This Sound can be computed in several ways:")
  857. LIST_ITEM (U"• @@overlap-add@: from original sound + pulses + pitch tier + duration tier;")
  858. LIST_ITEM (U"• #LPC: from LPC (from original sound) + pulses + pitch tier;")
  859. LIST_ITEM (U"• from the pulses only, as a pulse train or hummed;")
  860. LIST_ITEM (U"• from the pitch tier only, as a pulse train or hummed.")
  861. MAN_END
  862. MAN_BEGIN (U"Manipulation: Extract duration tier", U"ppgb", 20010330)
  863. INTRO (U"A command to extract a copy of the duration information in each selected @Manipulation object into a new @DurationTier object.")
  864. MAN_END
  865. MAN_BEGIN (U"Manipulation: Extract original sound", U"ppgb", 20010330)
  866. INTRO (U"A command to copy the original sound in each selected @Manipulation object to a new @Sound object.")
  867. MAN_END
  868. MAN_BEGIN (U"Manipulation: Extract pitch tier", U"ppgb", 20010330)
  869. INTRO (U"A command to extract a copy of the pitch information in each selected @Manipulation object into a new @PitchTier object.")
  870. MAN_END
  871. MAN_BEGIN (U"Manipulation: Extract pulses", U"ppgb", 20010330)
  872. INTRO (U"A command to extract a copy of the vocal-pulse information in each selected @Manipulation object into a new @PointProcess object.")
  873. MAN_END
  874. MAN_BEGIN (U"Manipulation: Play (overlap-add)", U"ppgb", 20070722)
  875. INTRO (U"A command to play each selected @Manipulation object, resynthesized with the @@overlap-add@ method.")
  876. MAN_END
  877. MAN_BEGIN (U"Manipulation: Get resynthesis (overlap-add)", U"ppgb", 20070722)
  878. INTRO (U"A command to extract the sound from each selected @Manipulation object, resynthesized with the @@overlap-add@ method.")
  879. MAN_END
  880. MAN_BEGIN (U"Manipulation: Replace duration tier", U"ppgb", 20030216)
  881. INTRO (U"You can replace the duration tier that you see in your @Manipulation object "
  882. "with a separate @DurationTier object, for instance one that you extracted from another Manipulation "
  883. "or one that you created with @@Create DurationTier...@.")
  884. NORMAL (U"To do this, select your Manipulation object together with the @DurationTier object and click ##Replace duration tier#.")
  885. MAN_END
  886. MAN_BEGIN (U"Manipulation: Replace pitch tier", U"ppgb", 20030216)
  887. INTRO (U"You can replace the pitch tier that you see in your @Manipulation object "
  888. "with a separate @PitchTier object, for instance one that you extracted from another Manipulation "
  889. "or one that you created with @@Create PitchTier...@.")
  890. NORMAL (U"To do this, select your Manipulation object together with the @PitchTier object and click ##Replace pitch tier#.")
  891. MAN_END
  892. MAN_BEGIN (U"Manipulation: Replace pulses", U"ppgb", 20010330)
  893. INTRO (U"A command to replace the vocal-pulse information in the selected @Manipulation object with the selected @PointProcess object.")
  894. MAN_END
  895. MAN_BEGIN (U"Manipulation: Replace original sound", U"ppgb", 20010330)
  896. INTRO (U"A command to replace the original sound in the selected @Manipulation object with the selected @Sound object.")
  897. MAN_END
  898. MAN_BEGIN (U"ManipulationEditor", U"ppgb", 20030316)
  899. INTRO (U"One of the @Editors in Praat, for viewing and manipulating a @Manipulation object.")
  900. ENTRY (U"Objects")
  901. NORMAL (U"The editor shows:")
  902. LIST_ITEM (U"• The original @Sound.")
  903. LIST_ITEM (U"• The @PointProcess that represents the glottal %pulses. "
  904. "You can edit it for improving the pitch analysis.")
  905. LIST_ITEM (U"• A pitch contour based on the locations of the pulses, for comparison (drawn as grey dots). "
  906. "Changes shape if you edit the pulses.")
  907. LIST_ITEM (U"• The @PitchTier that determines the pitch contour of the resynthesized @Sound (drawn as blue circles). "
  908. "At the creation of the @Manipulation object, it is computed from the original pitch contour. "
  909. "You can manipulate it by simplifying it (i.e., removing targets), "
  910. "or by moving parts of it up and down, and back and forth.")
  911. LIST_ITEM (U"• A @DurationTier for manipulating the relative durations of the voiced parts of the sound.")
  912. ENTRY (U"Playing")
  913. NORMAL (U"To play (a part of) the %resynthesized sound (by any of the methods shown in the #Synth menu, "
  914. "like @@overlap-add@ and #LPC), @click on any of the 1 to 8 buttons below and above the drawing area "
  915. "or use the Play commands from the View menu.")
  916. NORMAL (U"To play the %original sound instead, use ##Shift-click#.")
  917. ENTRY (U"Pulses")
  918. TAG (U"To add:")
  919. DEFINITION (U"#click at the desired time location, and choose ##Add pulse at cursor# or type ##Command-p#.")
  920. TAG (U"To remove:")
  921. DEFINITION (U"make a @@time selection@, and choose ##Remove pulse(s)# or type ##Option-Command-p#. "
  922. "If there is no selection, the pulse nearest to the cursor is removed.")
  923. ENTRY (U"Pitch points")
  924. TAG (U"To add one at a specified %%time and frequency%:")
  925. DEFINITION (U"#click at the desired time-frequency location, and choose ##Add pitch point at cursor# or type ##Command-t#.")
  926. TAG (U"To add one at a specified %time only:")
  927. DEFINITION (U"#click at the desired time, and choose ##Add pitch point at time slice#. ManipulationEditor tries to compute the frequency from the "
  928. "intervals between the pulses, basically by a median-of-three method.")
  929. TAG (U"To remove:")
  930. DEFINITION (U"make a @@time selection@, and choose ##Remove pitch point(s)# or type ##Option-Command-t#. "
  931. "If there is no selection, the pitch point nearest to the cursor is removed.")
  932. TAG (U"To move %some:")
  933. DEFINITION (U"make a @@time selection@ (the points become red) and ##Shift-drag# the points across the window. "
  934. "You cannot drag them across adjacent points, or below 50 Hz, or above the maximum frequency. "
  935. "You can only drag them horizontally if the %%dragging strategy% is ##All# or ##Only horizontal#, "
  936. "and you can drag them vertically if the dragging strategy is not ##Only horizontal#. "
  937. "You can change the dragging strategy with ##Set pitch dragging strategy...# from the #Pitch menu.")
  938. TAG (U"To move %one:")
  939. DEFINITION (U"@drag that point across the window. "
  940. "You can only drag it horizontally if the dragging strategy is not ##Only vertical#, "
  941. "and you can drag it vertically if the dragging strategy is not ##Only horizontal#.")
  942. ENTRY (U"Duration points")
  943. NORMAL (U"Work pretty much the same as pitch points.")
  944. ENTRY (U"Stylization")
  945. NORMAL (U"Before editing the Pitch points, you may want to reduce their number by choosing any of the #Stylize "
  946. "commands from the #Pitch menu.")
  947. MAN_END
  948. MAN_BEGIN (U"Matrix", U"ppgb", 20030216)
  949. INTRO (U"One of the @@types of objects@ in Praat. "
  950. "A Matrix object represents a function %z (%x, %y) "
  951. "on the domain [%x__%min_, %x__%max_] × [%y__%min_, %y__%max_]. "
  952. "The domain has been sampled in the %x and %y directions "
  953. "with constant sampling intervals (%dx and %dy) along each direction. "
  954. "The samples are thus %z [%i__%y_] [%i__%x_], %i__%x_ = 1 ... %n__%x_, %i__%y_ = 1 ... %n__%y_. "
  955. "The samples represent the function values %z (%x__1_ + (%ix - 1) %dx, %y__1_ + (%iy - 1) %dy).")
  956. ENTRY (U"Matrix commands")
  957. NORMAL (U"Creation:")
  958. LIST_ITEM (U"• @@Create Matrix...")
  959. LIST_ITEM (U"• @@Create simple Matrix...")
  960. LIST_ITEM (U"• @@Read from file...")
  961. LIST_ITEM (U"• @@Read Matrix from raw text file...")
  962. LIST_ITEM (U"• ##Read Matrix from LVS AP file...")
  963. NORMAL (U"Drawing:")
  964. LIST_ITEM (U"• ##Matrix: Draw rows...")
  965. LIST_ITEM (U"• ##Matrix: Draw contours...")
  966. LIST_ITEM (U"• ##Matrix: Paint contours...")
  967. LIST_ITEM (U"• ##Matrix: Paint cells...")
  968. LIST_ITEM (U"• ##Matrix: Scatter plot...")
  969. LIST_ITEM (U"• @@Matrix: Draw as squares...")
  970. LIST_ITEM (U"• ##Matrix: Draw value distribution...")
  971. LIST_ITEM (U"• ##Matrix: Paint surface...")
  972. NORMAL (U"Modification:")
  973. LIST_ITEM (U"• @@Matrix: Formula...")
  974. LIST_ITEM (U"• ##Matrix: Scale...")
  975. ENTRY (U"Inside a Matrix object")
  976. NORMAL (U"With @Inspect, you will see the following attributes.")
  977. TAG (U"%xmin, %xmax ≥ %xmin")
  978. DEFINITION (U"%x domain.")
  979. TAG (U"%nx ≥ 1")
  980. DEFINITION (U"number of columns.")
  981. TAG (U"%dx > 0.0")
  982. DEFINITION (U"distance between columns.")
  983. TAG (U"%x1")
  984. DEFINITION (U"%x value associated with first column.")
  985. TAG (U"%ymin, %ymax ≥ %ymin")
  986. DEFINITION (U"%y domain.")
  987. TAG (U"%ny ≥ 1")
  988. DEFINITION (U"number of rows.")
  989. TAG (U"%dy > 0.0")
  990. DEFINITION (U"distance between rows.")
  991. TAG (U"%y1")
  992. DEFINITION (U"%y value associated with first row.")
  993. TAG (U"%z [1..%ny] [1..%nx]")
  994. DEFINITION (U"The sample values.")
  995. NORMAL (U"After creation of the #Matrix, %xmin, %xmax, %ymin, %ymax, "
  996. "%nx, %ny, %dx, %dy, %x1, and %y1 "
  997. "do not usually change. The contents of %z do.")
  998. NORMAL (U"Normally, you will want %xmin ≤ %x1 and %xmax ≥ %x1 + (%nx - 1) %dx.")
  999. ENTRY (U"Example: simple matrix")
  1000. NORMAL (U"If a simple matrix has %x equal to column number "
  1001. "and %y equal to row number, it has the following attributes:")
  1002. LIST_ITEM (U"%xmin = 1; %xmax = %nx; %dx = 1; %x1 = 1;")
  1003. LIST_ITEM (U"%ymin = 1; %ymax = %ny; %dy = 1; %y1 = 1;")
  1004. ENTRY (U"Example: sampled signal")
  1005. NORMAL (U"If the matrix represents a sampled signal of 1 second duration "
  1006. "with a sampling frequency of 10 kHz, it has the following attributes:")
  1007. LIST_ITEM (U"%xmin = 0.0; %xmax = 1.0; %nx = 10000 ; %dx = 1.0·10^^-4^; %x1 = 0.5·10^^-4^;")
  1008. LIST_ITEM (U"%ymin = 1; %ymax = 1; %ny = 1; %dy = 1; %y1 = 1;")
  1009. ENTRY (U"Example: complex signal")
  1010. NORMAL (U"If the matrix represents a complex spectrum "
  1011. "derived with an @FFT from the sound of example 2, it has the following attributes:")
  1012. LIST_ITEM (U"%xmin = 0.0; %xmax = 5000.0; %nx = 8193 ; %dx = 5000.0 / 8192; %x1 = 0.0;")
  1013. LIST_ITEM (U"%ny = 2 (real and imaginary part);")
  1014. LIST_ITEM (U"%ymin = 1 (first row, real part);")
  1015. LIST_ITEM (U"%ymax = 2 (second row, imaginary part);")
  1016. LIST_ITEM (U"%dy = 1; %y1 = 1; (so that %y is equal to row number)")
  1017. MAN_END
  1018. MAN_BEGIN (U"Matrix: Draw as squares...", U"ppgb", 19980319)
  1019. INTRO (U"A command to draw a @Matrix object into the @@Picture window@.")
  1020. ENTRY (U"Settings")
  1021. TAG (U"##Xmin")
  1022. TAG (U"##Xmax")
  1023. DEFINITION (U"the windowing domain in the %x direction. Elements outside will not be drawn. "
  1024. "%Autowindowing: if (%Xmin ≥ %Xmax), the entire %x domain [%x__%min_, %x__%max_] of the Matrix is used.")
  1025. TAG (U"##Ymin")
  1026. TAG (U"##Ymax")
  1027. DEFINITION (U"the windowing domain in the %y direction. Elements outside will not be drawn. "
  1028. "%Autowindowing: if (%Ymin ≥ %Ymax), the entire %y domain [%y__%min_, %y__%max_] of the Matrix is used.")
  1029. TAG (U"##Garnish")
  1030. DEFINITION (U"determines whether axes are drawn around the picture. "
  1031. "Turn this button off if you prefer to garnish your picture by yourself with the @Margins menu.")
  1032. ENTRY (U"Behaviour")
  1033. NORMAL (U"For every element of the Matrix inside the specified windowing domain, "
  1034. "an opaque white or black rectangle is painted (white if the value of the element is positive, "
  1035. "black if it is negative), surrounded by a thin black box. "
  1036. "The %area of the rectangle is proportional to the value of the element.")
  1037. ENTRY (U"Trick")
  1038. NORMAL (U"If you prefer the %sides of the rectangle (instead of the area) to be proportional "
  1039. "to the value of the element, you can use the formula \"$$self\\^ 2$\" before drawing (see @@Matrix: Formula...@).")
  1040. MAN_END
  1041. MAN_BEGIN (U"Matrix: Formula...", U"ppgb", 20021206)
  1042. INTRO (U"A command for changing the data in all selected @Matrix objects.")
  1043. NORMAL (U"See the @Formulas tutorial for examples and explanations.")
  1044. MAN_END
  1045. MAN_BEGIN (U"Matrix: Paint cells...", U"ppgb", 20021204)
  1046. INTRO (U"A command to draw the contents of a @Matrix to the @@Picture window@.")
  1047. NORMAL (U"Every cell of the matrix is drawn as a rectangle filled with a grey value between white (if the content "
  1048. "of the cell is small) and black (if the content is large).")
  1049. MAN_END
  1050. MAN_BEGIN (U"Matrix: Set value...", U"ppgb", 19980319)
  1051. INTRO (U"A command to change the value of one cell in each selected @Matrix object.")
  1052. ENTRY (U"Settings")
  1053. TAG (U"##Row number")
  1054. DEFINITION (U"the number of the row of the cell whose value you want to change.")
  1055. TAG (U"##Column number")
  1056. DEFINITION (U"the number of the column of the cell whose value you want to change.")
  1057. TAG (U"##New value")
  1058. DEFINITION (U"the value that you want the specified cell to have.")
  1059. MAN_END
  1060. /*
  1061. 1. The Hilbert transform.
  1062. I wondered whether my use of taking the square was worse than taking
  1063. the Hilbert envelope. My formula is
  1064. my_envelope1(t) = x(t) ^ 2
  1065. For a sampled signal, this introduces higher frequencies, so I should have
  1066. filtered the signal at half the Nyquist frequency to prevent aliasing. I wonder
  1067. how the Hilbert envelope behaves in this respect:
  1068. your_envelope1(t) = x(t) ^ 2 + Px(t) ^ 2
  1069. I think it has the same problem, since it involves squaring the real and imaginary parts.
  1070. Of course, the Hilbert transform is much smoother, but that cannot matter for
  1071. frequencies above 100 Hz or so, since we are going to filter at 30 Hz anyway.
  1072. Thus, I think these methods are comparable. Do you agree?
  1073. 2. The non-linearity.
  1074. In the second step, I take the logarithm:
  1075. my_envelope2(t) = 10 log10 (my_envelope1(t) + 1e-6)
  1076. Of course, the 1e-6 is there to guard against zero values in my_envelope1.
  1077. I took the logarithm because it can handle negative values, which will arise
  1078. in the filtering process. You take the square root instead:
  1079. your_envelope2(t) = sqrt (your_envelope1(t))
  1080. 3. Filtering between 3 and 30 Hz.
  1081. You use a second-order Butterworth filter in the time domain:
  1082. your_envelope3(t) = your_envelope2(t) * Butterworth(t)
  1083. What do you mean by "forward and backward filtering"?
  1084. Did you use the second-order filter twice, thus making it fourth-order effectively?
  1085. My alternative was to use the two Gaussians:
  1086. my_spectrum2(f) = fft (my_envelope2(t))
  1087. my_spectrum3(f) = my_spectrum2(f) (exp(-(f/35)^2)-exp(-(f/3.5)^2)
  1088. my_envelope3(t) = ifft (my_spectrum3 (f))
  1089. This is a filter with several desirable properties: no ringing, phase-preserving,
  1090. an area of zero. On the other hand, it is not causal, but I think that that is not
  1091. an issue here. Is it?
  1092. 4. The new band.
  1093. In my algorithm, I have to undo the non-linearity:
  1094. my_envelope4(t) = 10 ^ (my_envelope3(t) / 2)
  1095. You see that I divide by 2, not 10, thus effectively multiplying the dynamics,
  1096. expressed in dB, by a factor of 5. Since I am going to use the new envelope as
  1097. a multiplication factor, I will have to limit it to a factor of 10, because the
  1098. maximum enhancement is 20 dB. But this limiting factor is band-dependent:
  1099. ceiling(Fmid) = 1 + 9 (1/2 - 1/2 cos (pi Fmid / 13))
  1100. where Fmid is expressed in Bark. The limiting is done smoothly:
  1101. my_envelope5(t) = 1 / (1 / my_envelope4(t) + 1 / ceiling)
  1102. So this is the final multiplication factor for the band-filtered signal:
  1103. new_band(t) = x(t) my_envelope5(t)
  1104. Your multiplication factor is very different. Please tell me whether I am correct.
  1105. your_envelope4(t) = rectify (your_envelope3(t))
  1106. This step is needed because you cannot handle negative values. It introduces
  1107. higher-frequency components, which will have to be filtered out later.
  1108. The new signal will have to carry the new envelope, so the multiplication
  1109. factor is taken relative to the envelope of the original signal:
  1110. your_envelope5(t) = your_envelope4(t) / your_envelope2(t)
  1111. The components that were introduced by the rectification must be thrown out:
  1112. your_envelope6(t) = your_envelope5(t) * Butterworth?(t)
  1113. What were the characteristics of that filter? You did not specify them in your paper.
  1114. Well, the next step is normalization to the power of the original band:
  1115. new_band(t) = your_envelope6(t) ||x(t)|| / ||your_envelope5(t)||
  1116. At least, that's your formula (12). I suppose that it contains a mistake, and that
  1117. the norm in the denominator should refer to the filtered your_envelope6(t) instead?
  1118. By the normalization, the fast movements within each band have been strengtened,
  1119. and the slow parts have been weakened. Thus, there is dynamic expansion within
  1120. each band, whereas my algorithm has this only in the mid frequency range, am I correct?
  1121. Could you also explain figure 5 to me? Some of the thick curves show enhanced peaks,
  1122. but how about the valleys, are some of them deepened as well?
  1123. 5. The new signal.
  1124. My algorithm simply adds all the bands:
  1125. new_signal(t) = SUM new_band(Fmid,t)
  1126. The mid-frequency bands are favoured because they have stronger modulation deepening
  1127. than the other bands. In your algorithm, the favouring of the mid frequencies is
  1128. implemented in the last step:
  1129. new_signal(t) = SUM new_band(Fmid,t) gain(Fmid)
  1130. This would mean, for instance, that if the modulation is not deepened (for instance
  1131. if there are no fast movements), the mid-frequency range is still multiplied by a factor
  1132. of 10, whereas my algorithm would not change the signal at all in such a case. Is that so?
  1133. If so, could any of the learning results have been produced by the general emphasis
  1134. in the 1-4 kHz range? Have you any proof that the modulation deepening itself
  1135. is the cause of the learning results?
  1136. So the differences between the two algorithms are clear now: mine does modulation
  1137. deepening selectively in the F2 range, yours does modulation deepening everywhere
  1138. plus an independent emphasis in the F2 range. Since both algorithms will lead to
  1139. emphasis in the F2 range, that leaves the question of whether a modulation change
  1140. is necessary for the other frequency bands. Have you any idea, or was your choice
  1141. for this just one of the minor decisions while constructing your algorithm?
  1142. To sum up, I think that both algorithms perform what they were intended to do,
  1143. namely selectively enhancing fast F2 transitions. If you agree with this, I may
  1144. advise XXX to use my algorithm without change. I would, however, welcome any
  1145. suggestions as to oversights in my implementation, or other possible problems
  1146. or incorrect choices.
  1147. */
  1148. MAN_BEGIN (U"Matrix: To TableOfReal", U"ppgb", 19991030)
  1149. INTRO (U"A command to convert every selected @Matrix to a @TableOfReal.")
  1150. NORMAL (U"This command is available from the #Cast menu. The resulting TableOfReal "
  1151. "has the same number of rows and columns as the original Matrix, "
  1152. "and the same data in the cells. However, it does not yet have any row or column "
  1153. "labels; you can add those with some commands from the TableOfReal #Modify menu.")
  1154. MAN_END
  1155. MAN_BEGIN (U"Modify", U"ppgb", 20021204)
  1156. INTRO (U"The title of a submenu of the @@dynamic menu@ for many object types. "
  1157. "This submenu usually collects all the commands that can change the selected object.")
  1158. MAN_END
  1159. MAN_BEGIN (U"PairDistribution", U"ppgb", 20030316)
  1160. INTRO (U"One of the @@types of objects@ in Praat. A "
  1161. "PairDistribution object represents the relative probabilities with which "
  1162. "the specified pairs of strings occur.")
  1163. ENTRY (U"Class description")
  1164. TAG (U"##struct-list# pairs")
  1165. DEFINITION (U"a list of relative string-pair probabilities. Each element consists of:")
  1166. TAG1 (U"#string %string1")
  1167. DEFINITION1 (U"the first string.")
  1168. TAG1 (U"#string %string2")
  1169. DEFINITION1 (U"the second string.")
  1170. TAG1 (U"#real %weight")
  1171. DEFINITION1 (U"the relative probability associated with the string pair. This value cannot be negative.")
  1172. MAN_END
  1173. MAN_BEGIN (U"PairDistribution: To Stringses...", U"ppgb", 20030916)
  1174. INTRO (U"A command to generate a number of string pairs from the selected @PairDistribution object. "
  1175. "This command will create two aligned @Strings objects of equal size.")
  1176. ENTRY (U"Settings")
  1177. TAG (U"##Number# (standard: 1000)")
  1178. DEFINITION (U"the number of the strings in either resulting Strings object.")
  1179. TAG (U"##Name of first Strings# (standard: \"input\")")
  1180. DEFINITION (U"the name of the resulting Strings object associated with the first string of each pair.")
  1181. TAG (U"##Name of second Strings# (standard: \"output\")")
  1182. DEFINITION (U"the name of the resulting Strings object associated with the second string of each pair.")
  1183. ENTRY (U"Example")
  1184. NORMAL (U"Suppose the PairDistribution contains the following:")
  1185. CODE (U"4 pairs")
  1186. CODE (U"\"at+ma\" \"atma\" 100")
  1187. CODE (U"\"at+ma\" \"apma\" 0")
  1188. CODE (U"\"an+pa\" \"anpa\" 20")
  1189. CODE (U"\"an+pa\" \"ampa\" 80")
  1190. NORMAL (U"The resulting Strings object \"input\" may then contain:")
  1191. FORMULA (U"at+ma, an+pa, an+pa, at+ma, at+ma, an+pa, an+pa, an+pa, an+pa, at+ma, ...")
  1192. NORMAL (U"The Strings object \"output\" may then contain:")
  1193. FORMULA (U"atma, ampa, ampa, atma, atma, ampa, anpa, ampa, ampa, atma, ...")
  1194. MAN_END
  1195. MAN_BEGIN (U"ParamCurve", U"ppgb", 20030316)
  1196. INTRO (U"One of the @@types of objects@ in Praat.")
  1197. NORMAL (U"An object of class #ParamCurve represents a sequence of time-stamped points (%x (%%t__i_), %y (%%t__i_)) "
  1198. "in a two-dimensional space.")
  1199. MAN_END
  1200. MAN_BEGIN (U"PointEditor", U"ppgb", 20110128)
  1201. INTRO (U"One of the @Editors in Praat, for viewing and manipulating a @PointProcess object, "
  1202. "which is optionally shown together with a @Sound object.")
  1203. ENTRY (U"Objects")
  1204. NORMAL (U"The editor shows:")
  1205. LIST_ITEM (U"• The @Sound, if you selected a Sound object together with the PointProcess object "
  1206. "before you clicked ##View & Edit#.")
  1207. LIST_ITEM (U"• The @PointProcess; vertical blue lines represent the points.")
  1208. ENTRY (U"Playing")
  1209. NORMAL (U"To play (a part of) the %resynthesized sound (pulse train): "
  1210. "@click on any of the 8 buttons below and above the drawing area, or choose a Play command from the View menu.")
  1211. NORMAL (U"To play the %original sound instead, use @@Shift-click@.")
  1212. ENTRY (U"Adding a point")
  1213. NORMAL (U"@Click at the desired time location, and choose \"Add point at cursor\" or type ##Command-P#.")
  1214. ENTRY (U"Removing points")
  1215. NORMAL (U"To remove one or more points, "
  1216. "make a @@time selection@ and choose ##Remove point(s)# from the ##Point# menu. "
  1217. "If there is no selection, the point nearest to the cursor is removed.")
  1218. MAN_END
  1219. MAN_BEGIN (U"PointProcess", U"ppgb", 20110128)
  1220. INTRO (U"One of the @@types of objects@ in Praat.")
  1221. NORMAL (U"A PointProcess object represents a %%point process%, "
  1222. "which is a sequence of %points %t__%i_ in time, defined on a domain [%t__%min_, %t__%max_]. "
  1223. "The index %i runs from 1 to the number of points. The points are sorted by time, i.e. %t__%i+1_ > %t__%i_.")
  1224. ENTRY (U"PointProcess commands")
  1225. NORMAL (U"Creation from scratch:")
  1226. LIST_ITEM (U"• @@Create empty PointProcess...@")
  1227. LIST_ITEM (U"• @@Create Poisson process...@")
  1228. NORMAL (U"Creation of a pulse train from a pitch contour:")
  1229. LIST_ITEM (U"• @@PitchTier: To PointProcess@: area-1 along entire time domain.")
  1230. LIST_ITEM (U"• @@Pitch: To PointProcess@: same, but excludes voiceless intervals.")
  1231. LIST_ITEM (U"• @@Sound & Pitch: To PointProcess (cc)@: \"pitch-synchronous\": near locations of high amplitude.")
  1232. LIST_ITEM (U"• @@Sound & Pitch: To PointProcess (peaks)...@: \"pitch-synchronous\": near locations of high amplitude.")
  1233. LIST_ITEM (U"• @@Sound: To PointProcess (periodic, cc)...@: near locations of high amplitude.")
  1234. LIST_ITEM (U"• @@Sound: To PointProcess (periodic, peaks)...@: near locations of high amplitude.")
  1235. NORMAL (U"Creation from converting another object:")
  1236. LIST_ITEM (U"• ##Matrix: To PointProcess")
  1237. LIST_ITEM (U"• @@PitchTier: Down to PointProcess@")
  1238. LIST_ITEM (U"• @@IntensityTier: Down to PointProcess@")
  1239. NORMAL (U"Hearing:")
  1240. LIST_ITEM (U"• @@PointProcess: Play@: pulse train.")
  1241. LIST_ITEM (U"• @@PointProcess: Hum@: pulse train with formants.")
  1242. NORMAL (U"Drawing:")
  1243. LIST_ITEM (U"• @@PointProcess: Draw...@")
  1244. NORMAL (U"Editing:")
  1245. LIST_ITEM (U"• ##PointProcess: View & Edit#: invokes a @PointEditor.")
  1246. LIST_ITEM (U"• ##PointProcess & Sound: View & Edit#: invokes a @PointEditor.")
  1247. LIST_ITEM (U"• Inside a @ManipulationEditor.")
  1248. NORMAL (U"Queries:")
  1249. LIST_ITEM (U"• @@PointProcess: Get jitter (local)...@: periodic jitter.")
  1250. LIST_ITEM (U"• @@PointProcess: Get jitter (local, absolute)...@: periodic jitter.")
  1251. LIST_ITEM (U"• @@PointProcess: Get jitter (rap)...@: periodic jitter.")
  1252. LIST_ITEM (U"• @@PointProcess: Get jitter (ppq5)...@: periodic jitter.")
  1253. LIST_ITEM (U"• @@PointProcess: Get jitter (ddp)...@: periodic jitter.")
  1254. LIST_ITEM (U"• @@PointProcess: Get low index...@: index of nearest point not after specified time.")
  1255. LIST_ITEM (U"• @@PointProcess: Get high index...@: index of nearest point not before specified time.")
  1256. LIST_ITEM (U"• @@PointProcess: Get nearest index...@: index of point nearest to specified time.")
  1257. LIST_ITEM (U"• @@PointProcess: Get interval...@: duration of interval around specified time.")
  1258. NORMAL (U"Set calculations:")
  1259. LIST_ITEM (U"• @@PointProcesses: Union@: the union of two point processes.")
  1260. LIST_ITEM (U"• @@PointProcesses: Intersection@: the intersection of two point processes.")
  1261. LIST_ITEM (U"• @@PointProcesses: Difference@: the difference of two point processes.")
  1262. NORMAL (U"Modification:")
  1263. LIST_ITEM (U"• @@PointProcess: Add point...@: at a specified time.")
  1264. LIST_ITEM (U"• @@PointProcess: Remove point...@: at specified index.")
  1265. LIST_ITEM (U"• @@PointProcess: Remove point near...@: near specified time.")
  1266. LIST_ITEM (U"• @@PointProcess: Remove points...@: between specified indices.")
  1267. LIST_ITEM (U"• @@PointProcess: Remove points between...@: between specified times.")
  1268. NORMAL (U"Analysis:")
  1269. LIST_ITEM (U"• @@PointProcess: To PitchTier...@: pitch values in interval centres.")
  1270. LIST_ITEM (U"• ##PointProcess & Sound: To Manipulation")
  1271. NORMAL (U"Synthesis:")
  1272. LIST_ITEM (U"• @@PointProcess: To Sound (pulse train)...@")
  1273. LIST_ITEM (U"• @@PointProcess: To Sound (hum)...@")
  1274. NORMAL (U"Conversion:")
  1275. LIST_ITEM (U"• ##PointProcess: To Matrix")
  1276. LIST_ITEM (U"• @@PointProcess: Up to TextGrid...")
  1277. LIST_ITEM (U"• @@PointProcess: Up to PitchTier...")
  1278. LIST_ITEM (U"• @@PointProcess: Up to IntensityTier...")
  1279. MAN_END
  1280. MAN_BEGIN (U"PointProcess: Add point...", U"ppgb", 20010410)
  1281. INTRO (U"A command to add a point to each selected @PointProcess.")
  1282. ENTRY (U"Setting")
  1283. TAG (U"##Time (s)")
  1284. DEFINITION (U"the time at which a point is to be added.")
  1285. ENTRY (U"Behaviour")
  1286. NORMAL (U"The point process is modified so that it contains the new point. "
  1287. "If a point at the specified time was already present in the point process, nothing happens.")
  1288. MAN_END
  1289. MAN_BEGIN (U"PointProcesses: Difference", U"ppgb", 20021212)
  1290. INTRO (U"A command to compute the difference of two selected @PointProcess objects.")
  1291. ENTRY (U"Behaviour")
  1292. NORMAL (U"The resulting #PointProcess will contain only those points of the first selected original point process "
  1293. "that do not occur in the second.")
  1294. NORMAL (U"The time domain of the resulting point process is equal to the time domain of the first original point process.")
  1295. MAN_END
  1296. MAN_BEGIN (U"PointProcess: Draw...", U"ppgb", 20021212)
  1297. INTRO (U"A command to draw every selected @PointProcess into the @@Picture window@.")
  1298. MAN_END
  1299. MAN_BEGIN (U"PointProcess: Get high index...", U"ppgb", 20021212)
  1300. INTRO (U"A @query to the selected @PointProcess object.")
  1301. ENTRY (U"Return value")
  1302. NORMAL (U"the index of the nearest point at or after the specified time, "
  1303. "0 if the point process contains no points, "
  1304. "or a number higher than the number of points if the specified time is after the last point.")
  1305. ENTRY (U"Setting")
  1306. TAG (U"##Time (s)")
  1307. DEFINITION (U"the time from which a point is looked for, in seconds.")
  1308. MAN_END
  1309. MAN_BEGIN (U"PointProcess: Get interval...", U"ppgb", 20021212)
  1310. INTRO (U"A @query to the selected @PointProcess object.")
  1311. ENTRY (U"Return value")
  1312. NORMAL (U"the duration of the interval around a specified time. "
  1313. "if the point process contains no points or if the specified time falls before the first point "
  1314. "or not before the last point, the value is @undefined. Otherwise, the result is the distance between "
  1315. "the nearest points to the left and to the right of the specified time. "
  1316. "If the point process happens to contain a point at exactly the specified time, "
  1317. "the duration of the interval following this point is returned.")
  1318. ENTRY (U"Setting")
  1319. TAG (U"##Time (s)")
  1320. DEFINITION (U"the time around which a point is looked for, in seconds.")
  1321. MAN_END
  1322. MAN_BEGIN (U"PointProcess: Get jitter (local)...", U"ppgb", 20110302)
  1323. INTRO (U"A command that becomes available in the #Query submenu when you select a @PointProcess object.")
  1324. NORMAL (U"This command will write into the Info window "
  1325. "the %%local jitter%, which is the average absolute difference between consecutive intervals, "
  1326. "divided by the average interval (an interval is the time between two consecutive points).")
  1327. NORMAL (U"As %jitter is often used as a measure of voice quality (see @@Voice 2. Jitter@), "
  1328. "the intervals are often considered to be %%glottal periods%. "
  1329. "For this reason, the command has settings that can limit the possible duration of the interval (or period) "
  1330. "or the possible difference in the durations of consecutive intervals (periods).")
  1331. ENTRY (U"1. The command window")
  1332. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
  1333. Manual_DRAW_SETTINGS_WINDOW ("PointProcess: Get jitter (local)", 4)
  1334. Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
  1335. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period floor (s)", "0.0001")
  1336. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period ceiling (s)", "0.02")
  1337. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Maximum period factor", "1.3")
  1338. )
  1339. TAG (U"##Time range (s)")
  1340. DEFINITION (U"the start time and end time of the part of the PointProcess that will be measured. "
  1341. "Points outside this range will be ignored.")
  1342. TAG (U"##Period floor (s)")
  1343. DEFINITION (U"the shortest possible interval that will be used in the computation of jitter, in seconds. "
  1344. "If an interval is shorter than this, it will be ignored in the computation of jitter "
  1345. "(and the previous and next intervals will not be regarded as consecutive). "
  1346. "This setting will normally be very small, say 0.1 ms.")
  1347. TAG (U"##Period ceiling (s)")
  1348. DEFINITION (U"the longest possible interval that will be used in the computation of jitter, in seconds. "
  1349. "If an interval is longer than this, it will be ignored in the computation of jitter "
  1350. "(and the previous and next intervals will not be regarded as consecutive). "
  1351. "For example, if the minimum frequency of periodicity is 50 Hz, set this setting to 0.02 seconds; "
  1352. "intervals longer than that could be regarded as voiceless stretches and will be ignored in the computation.")
  1353. TAG (U"##Maximum period factor")
  1354. DEFINITION (U"the largest possible difference between consecutive intervals that will be used in the computation of jitter. "
  1355. "If the ratio of the durations of two consecutive intervals is greater than this, "
  1356. "this pair of intervals will be ignored in the computation of jitter "
  1357. "(each of the intervals could still take part in the computation of jitter in a comparison with its neighbour on the other side).")
  1358. ENTRY (U"2. Usage")
  1359. NORMAL (U"The local jitter can be used as a measure of voice quality; "
  1360. "it is the most common jitter measurement and is usually expressed as a percentage. See @@Voice 2. Jitter@.")
  1361. ENTRY (U"3. Algorithm")
  1362. NORMAL (U"(In the following the term %absolute means two different things: (1) the absolute (i.e. non-negative) value of a real number, "
  1363. "and (2) the opposite of %relative.)")
  1364. NORMAL (U"The local jitter is defined as the relative mean absolute "
  1365. "second-order difference of the point process (= the first-order difference of the interval process), as follows.")
  1366. NORMAL (U"First, we define the absolute (non-relative) local jitter (in seconds) as the mean absolute (non-negative) "
  1367. "difference of consecutive intervals:")
  1368. FORMULA (U"%jitter(seconds) = ∑__%i=2_^^%N^ |%T__%i_ - %T__%i-1_| / (%N - 1)")
  1369. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1370. "If an interval %T__%i-1_ or %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1371. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor#, "
  1372. "the term |%T__%i_ - %T__%i-1_| is not counted in the sum, and %N is lowered by 1 "
  1373. "(if %N ends up being less than 2, the result of the command is @undefined).")
  1374. NORMAL (U"Second, we define the mean period as")
  1375. FORMULA (U"%meanPeriod(seconds) = ∑__%i=1_^^%N^ %T__%i_ / %N")
  1376. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1377. "If an interval %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1378. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor# "
  1379. "%and %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1380. "the term %T__%i_ is not counted in the sum, and %N is lowered by 1; "
  1381. "this procedure ensures that in the computation of the mean period we use at least all the intervals "
  1382. "that had taken part in the computation of the absolute local jitter.")
  1383. NORMAL (U"Finally, we compute the (relative) local jitter as")
  1384. FORMULA (U"%jitter = %jitter(seconds) / %meanPeriod(seconds)")
  1385. NORMAL (U"The result is a value between 0 and 2, or between 0 and 200 percent.")
  1386. MAN_END
  1387. MAN_BEGIN (U"PointProcess: Get jitter (local, absolute)...", U"ppgb", 20110220)
  1388. INTRO (U"A command that becomes available in the #Query submenu when you select a @PointProcess object.")
  1389. NORMAL (U"This command will write into the Info window "
  1390. "the %%absolute local jitter%, which is the average absolute difference between consecutive intervals, "
  1391. "in seconds (an interval is the time between two consecutive points).")
  1392. NORMAL (U"As %jitter is often used as a measure of voice quality (see @@Voice 2. Jitter@), "
  1393. "the intervals are often considered to be %%glottal periods%. "
  1394. "For this reason, the command has settings that can limit the possible duration of the interval (or period) "
  1395. "or the possible difference in the durations of consecutive intervals (periods).")
  1396. ENTRY (U"1. The command window")
  1397. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
  1398. Manual_DRAW_SETTINGS_WINDOW ("PointProcess: Get jitter (local, absolute)", 4)
  1399. Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
  1400. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period floor (s)", "0.0001")
  1401. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period ceiling (s)", "0.02")
  1402. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Maximum period factor", "1.3")
  1403. )
  1404. TAG (U"##Time range (s)")
  1405. DEFINITION (U"the start time and end time of the part of the PointProcess that will be measured. "
  1406. "Points outside this range will be ignored.")
  1407. TAG (U"##Period floor (s)")
  1408. DEFINITION (U"the shortest possible interval that will be used in the computation of jitter, in seconds. "
  1409. "If an interval is shorter than this, it will be ignored in the computation of jitter "
  1410. "(and the previous and next intervals will not be regarded as consecutive). "
  1411. "This setting will normally be very small, say 0.1 ms.")
  1412. TAG (U"##Period ceiling (s)")
  1413. DEFINITION (U"the longest possible interval that will be used in the computation of jitter, in seconds. "
  1414. "If an interval is longer than this, it will be ignored in the computation of jitter "
  1415. "(and the previous and next intervals will not be regarded as consecutive). "
  1416. "For example, if the minimum frequency of periodicity is 50 Hz, set this argument to 0.02 seconds; "
  1417. "intervals longer than that could be regarded as voiceless stretches and will be ignored in the computation.")
  1418. TAG (U"##Maximum period factor")
  1419. DEFINITION (U"the largest possible difference between consecutive intervals that will be used in the computation of jitter. "
  1420. "If the ratio of the durations of two consecutive intervals is greater than this, "
  1421. "this pair of intervals will be ignored in the computation of jitter "
  1422. "(each of the intervals could still take part in the computation of jitter in a comparison with its neighbour on the other side).")
  1423. ENTRY (U"2. Usage")
  1424. NORMAL (U"The local jitter can be used as a measure of voice quality. See @@Voice 2. Jitter@.")
  1425. ENTRY (U"3. Algorithm")
  1426. NORMAL (U"The absolute local jitter is defined as the absolute (i.e. non-relative) mean absolute (i.e. non-negative) "
  1427. "second-order difference of the point process (= the first-order difference of the interval process), as follows.")
  1428. NORMAL (U"The absolute local jitter (in seconds) is the mean absolute (non-negative) "
  1429. "difference of consecutive intervals:")
  1430. FORMULA (U"%jitter(seconds) = ∑__%i=2_^^%N^ |%T__%i_ - %T__%i-1_| / (%N - 1)")
  1431. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1432. "If an interval %T__%i-1_ or %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1433. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor#, "
  1434. "the term |%T__%i_ - %T__%i-1_| is not counted in the sum, and %N is lowered by 1 "
  1435. "(if %N ends up being less than 2, the result of the command is @undefined).")
  1436. MAN_END
  1437. MAN_BEGIN (U"PointProcess: Get jitter (rap)...", U"ppgb", 20110302)
  1438. INTRO (U"A command that becomes available in the #Query submenu when you select a @PointProcess object.")
  1439. NORMAL (U"This command will write into the Info window the %%Relative Average Perturbation% (RAP), "
  1440. "a jitter measure defined as the average absolute difference between an interval and the average of it and its two neighbours, "
  1441. "divided by the average interval (an interval is the time between two consecutive points).")
  1442. NORMAL (U"As jitter is often used as a measure of voice quality (see @@Voice 2. Jitter@), "
  1443. "the intervals are often considered to be %%glottal periods%. "
  1444. "For this reason, the command has settings that can limit the possible duration of the interval (or period) "
  1445. "or the possible difference in the durations of consecutive intervals (periods).")
  1446. ENTRY (U"1. The command window")
  1447. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
  1448. Manual_DRAW_SETTINGS_WINDOW ("PointProcess: Get jitter (rap)", 4)
  1449. Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
  1450. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period floor (s)", "0.0001")
  1451. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period ceiling (s)", "0.02")
  1452. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Maximum period factor", "1.3")
  1453. )
  1454. TAG (U"##Time range (s)")
  1455. DEFINITION (U"the start time and end time of the part of the PointProcess that will be measured. "
  1456. "Points outside this range will be ignored.")
  1457. TAG (U"##Period floor (s)")
  1458. DEFINITION (U"the shortest possible interval that will be used in the computation of jitter, in seconds. "
  1459. "If an interval is shorter than this, it will be ignored in the computation of jitter "
  1460. "(and the previous and next intervals will not be regarded as consecutive). "
  1461. "This setting will normally be very small, say 0.1 ms.")
  1462. TAG (U"##Period ceiling (s)")
  1463. DEFINITION (U"the longest possible interval that will be used in the computation of jitter, in seconds. "
  1464. "If an interval is longer than this, it will be ignored in the computation of jitter "
  1465. "(and the previous and next intervals will not be regarded as consecutive). "
  1466. "For example, if the minimum frequency of periodicity is 50 Hz, set this argument to 0.02 seconds; "
  1467. "intervals longer than that could be regarded as voiceless stretches and will be ignored in the computation.")
  1468. TAG (U"##Maximum period factor")
  1469. DEFINITION (U"the largest possible difference between consecutive intervals that will be used in the computation of jitter. "
  1470. "If the ratio of the durations of two consecutive intervals is greater than this, "
  1471. "this pair of intervals will be ignored in the computation of jitter "
  1472. "(each of the intervals could still take part in the computation of jitter in a comparison with its neighbour on the other side).")
  1473. ENTRY (U"2. Usage")
  1474. NORMAL (U"The RAP can be used as a measure of voice quality; "
  1475. "it is the second most common jitter measurement (after @@PointProcess: Get jitter (local)...|local jitter@). See @@Voice 2. Jitter@.")
  1476. ENTRY (U"3. Algorithm")
  1477. NORMAL (U"Relative Average Perturbation is defined in terms of three consecutive intervals, as follows.")
  1478. NORMAL (U"First, we define the absolute (i.e. non-relative) Average Perturbation (in seconds):")
  1479. FORMULA (U"%absAP(seconds) = ∑__%i=2_^^%N-1^ |%T__%i_ - (%T__%i-1_ + %T__%i_ + %T__%i+1_) / 3| / (%N - 2)")
  1480. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1481. "If an interval %T__%i-1_ or %T__%i_ or %T__%i+1_ is not between ##Period floor# and ##Period ceiling#, "
  1482. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ or %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1483. "the term |%T__%i_ - (%T__%i-1_ + %T__%i_ + %T__%i+1_) / 3| is not counted in the sum, and %N is lowered by 1 "
  1484. "(if %N ends up being less than 3, the result of the command is @undefined).")
  1485. NORMAL (U"Second, we define the mean period as")
  1486. FORMULA (U"%meanPeriod(seconds) = ∑__%i=1_^^%N^ %T__%i_ / %N")
  1487. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1488. "If an interval %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1489. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor# "
  1490. "%and %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1491. "the term %T__%i_ is not counted in the sum, and %N is lowered by 1; "
  1492. "this procedure ensures that in the computation of the mean period we use at least all the intervals "
  1493. "that had taken part in the computation of the absolute average perturbation.")
  1494. NORMAL (U"Finally, we compute the Relative Average Perturbation as")
  1495. FORMULA (U"%RAP = %absAP(seconds) / %meanPeriod(seconds)")
  1496. NORMAL (U"The result is a value between 0 and 2, or between 0 and 200 percent.")
  1497. MAN_END
  1498. MAN_BEGIN (U"PointProcess: Get jitter (ppq5)...", U"ppgb", 20110302)
  1499. INTRO (U"A command that becomes available in the #Query submenu when you select a @PointProcess object.")
  1500. NORMAL (U"This command will write into the Info window the %%five-point Period Perturbation Quotient%, "
  1501. "a jitter measure defined as the average absolute difference between an interval and the average of it and its four closest neighbours, "
  1502. "divided by the average interval (an interval is the time between two consecutive points).")
  1503. NORMAL (U"As jitter is often used as a measure of voice quality (see @@Voice 2. Jitter@), "
  1504. "the intervals are often considered to be %%glottal periods%. "
  1505. "For this reason, the command has settings that can limit the possible duration of the interval (or period) "
  1506. "or the possible difference in the durations of consecutive intervals (periods).")
  1507. ENTRY (U"1. The command window")
  1508. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
  1509. Manual_DRAW_SETTINGS_WINDOW ("PointProcess: Get jitter (rap)", 4)
  1510. Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
  1511. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period floor (s)", "0.0001")
  1512. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period ceiling (s)", "0.02")
  1513. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Maximum period factor", "1.3")
  1514. )
  1515. TAG (U"##Time range (s)")
  1516. DEFINITION (U"the start time and end time of the part of the PointProcess that will be measured. "
  1517. "Points outside this range will be ignored.")
  1518. TAG (U"##Period floor (s)")
  1519. DEFINITION (U"the shortest possible interval that will be used in the computation of jitter, in seconds. "
  1520. "If an interval is shorter than this, it will be ignored in the computation of jitter "
  1521. "(and the previous and next intervals will not be regarded as consecutive). "
  1522. "This setting will normally be very small, say 0.1 ms.")
  1523. TAG (U"##Period ceiling (s)")
  1524. DEFINITION (U"the longest possible interval that will be used in the computation of jitter, in seconds. "
  1525. "If an interval is longer than this, it will be ignored in the computation of jitter "
  1526. "(and the previous and next intervals will not be regarded as consecutive). "
  1527. "For example, if the minimum frequency of periodicity is 50 Hz, set this argument to 0.02 seconds; "
  1528. "intervals longer than that could be regarded as voiceless stretches and will be ignored in the computation.")
  1529. TAG (U"##Maximum period factor")
  1530. DEFINITION (U"the largest possible difference between consecutive intervals that will be used in the computation of jitter. "
  1531. "If the ratio of the durations of two consecutive intervals is greater than this, "
  1532. "this pair of intervals will be ignored in the computation of jitter "
  1533. "(each of the intervals could still take part in the computation of jitter in a comparison with its neighbour on the other side).")
  1534. ENTRY (U"2. Usage")
  1535. NORMAL (U"The jitter can be used as a measure of voice quality. See @@Voice 2. Jitter@.")
  1536. ENTRY (U"3. Algorithm")
  1537. NORMAL (U"The five-point Period Perturbation Quotient (PPQ5) is defined in terms of five consecutive intervals, as follows.")
  1538. NORMAL (U"First, we define the absolute (i.e. non-relative) PPQ5 (in seconds):")
  1539. FORMULA (U"%absPPQ5(seconds) = ∑__%i=3_^^%N-2^ |%T__%i_ - (%T__%i-2_ + %T__%i-1_ + %T__%i_ + %T__%i+1_ + %T__%i+2_) / 5| / (%N - 4)")
  1540. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1541. "If an interval %T__%i-2_ or %T__%i-1_ or %T__%i_ or %T__%i+1_ or %T__%i+2_ is not between ##Period floor# and ##Period ceiling#, "
  1542. "or if %T__%i-2_/%T__%i-1_ or %T__%i-1_/%T__%i-2_ or %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ or %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ or %T__%i+2_/%T__%i+1_ or %T__%i+1_/%T__%i+2_ is greater than ##Maximum period factor#, "
  1543. "the term |%T__%i_ - (%T__%i-2_ + %T__%i-1_ + %T__%i_ + %T__%i+1_ + %T__%i+2_) / 5| is not counted in the sum, and %N is lowered by 1 "
  1544. "(if %N ends up being less than 5, the result of the command is @undefined).")
  1545. NORMAL (U"Second, we define the mean period as")
  1546. FORMULA (U"%meanPeriod(seconds) = ∑__%i=1_^^%N^ %T__%i_ / %N")
  1547. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1548. "If an interval %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1549. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor# "
  1550. "%and %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1551. "the term %T__%i_ is not counted in the sum, and %N is lowered by 1; "
  1552. "this procedure ensures that in the computation of the mean period we use at least all the intervals "
  1553. "that had taken part in the computation of the absolute PPQ5.")
  1554. NORMAL (U"Finally, we compute the five-point Period Perturbation Quotient as")
  1555. FORMULA (U"%PPQ5 = %PPQ5(seconds) / %meanPeriod(seconds)")
  1556. NORMAL (U"The result is a value between 0 and 4, or between 0 and 400 percent.")
  1557. MAN_END
  1558. MAN_BEGIN (U"PointProcess: Get jitter (ddp)...", U"ppgb", 20110302)
  1559. INTRO (U"A command that becomes available in the #Query submenu when you select a @PointProcess object.")
  1560. NORMAL (U"This command will write into the Info window the %%Difference of Differences of Periods%, "
  1561. "a jitter measure defined as the average absolute difference between the consecutives differences between consecutive intervals, "
  1562. "divided by the average interval (an interval is the time between two consecutive points).")
  1563. NORMAL (U"As jitter is often used as a measure of voice quality (see @@Voice 2. Jitter@), "
  1564. "the intervals are often considered to be %%glottal periods%. "
  1565. "For this reason, the command has settings that can limit the possible duration of the interval (or period) "
  1566. "or the possible difference in the durations of consecutive intervals (periods).")
  1567. ENTRY (U"1. The command window")
  1568. SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
  1569. Manual_DRAW_SETTINGS_WINDOW ("PointProcess: Get jitter (rap)", 4)
  1570. Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
  1571. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period floor (s)", "0.0001")
  1572. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Period ceiling (s)", "0.02")
  1573. Manual_DRAW_SETTINGS_WINDOW_FIELD ("Maximum period factor", "1.3")
  1574. )
  1575. TAG (U"##Time range (s)")
  1576. DEFINITION (U"the start time and end time of the part of the PointProcess that will be measured. "
  1577. "Points outside this range will be ignored.")
  1578. TAG (U"##Period floor (s)")
  1579. DEFINITION (U"the shortest possible interval that will be used in the computation of jitter, in seconds. "
  1580. "If an interval is shorter than this, it will be ignored in the computation of jitter "
  1581. "(and the previous and next intervals will not be regarded as consecutive). "
  1582. "This setting will normally be very small, say 0.1 ms.")
  1583. TAG (U"##Period ceiling (s)")
  1584. DEFINITION (U"the longest possible interval that will be used in the computation of jitter, in seconds. "
  1585. "If an interval is longer than this, it will be ignored in the computation of jitter "
  1586. "(and the previous and next intervals will not be regarded as consecutive). "
  1587. "For example, if the minimum frequency of periodicity is 50 Hz, set this argument to 0.02 seconds; "
  1588. "intervals longer than that could be regarded as voiceless stretches and will be ignored in the computation.")
  1589. TAG (U"##Maximum period factor")
  1590. DEFINITION (U"the largest possible difference between consecutive intervals that will be used in the computation of jitter. "
  1591. "If the ratio of the durations of two consecutive intervals is greater than this, "
  1592. "this pair of intervals will be ignored in the computation of jitter "
  1593. "(each of the intervals could still take part in the computation of jitter in a comparison with its neighbour on the other side).")
  1594. ENTRY (U"2. Usage")
  1595. NORMAL (U"The jitter can be used as a measure of voice quality. See @@Voice 2. Jitter@.")
  1596. ENTRY (U"3. Algorithm")
  1597. NORMAL (U"(In the following the term %absolute means two different things: (1) the absolute (i.e. non-negative) value of a real number, "
  1598. "and (2) the opposite of %relative.)")
  1599. NORMAL (U"DDP is defined as the relative mean absolute (i.e. non-negative) "
  1600. "third-order difference of the point process (= the second-order difference of the interval process), as follows.")
  1601. NORMAL (U"First, we define the absolute (i.e. non-relative) Average Perturbation (in seconds) as one third of the mean absolute (non-negative) "
  1602. "difference of difference of consecutive intervals:")
  1603. FORMULA (U"%absDDP(seconds) = ∑__%i=2_^^%N-1^ |(%T__%i+1_ - %T__%i_) - (%T__%i_ - %T__%i-1_)| / (%N - 2)")
  1604. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1605. "If an interval %T__%i-1_ or %T__%i_ or %T__%i+1_ is not between ###Period floor# and ##Period ceiling#, "
  1606. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ or %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1607. "the term |2%T__%i_ - %T__%i-1_ - %T__%i+1_| is not counted in the sum, and %N is lowered by 1 "
  1608. "(if %N ends up being less than 3, the result of the command is @undefined).")
  1609. NORMAL (U"Second, we define the mean period as")
  1610. FORMULA (U"%meanPeriod(seconds) = ∑__%i=1_^^%N^ %T__%i_ / %N")
  1611. NORMAL (U"where %T__%i_ is the duration of the %%i%th interval and %N is the number of intervals. "
  1612. "If an interval %T__%i_ is not between ##Period floor# and ##Period ceiling#, "
  1613. "or if %T__%i-1_/%T__%i_ or %T__%i_/%T__%i-1_ is greater than ##Maximum period factor# "
  1614. "%and %T__%i+1_/%T__%i_ or %T__%i_/%T__%i+1_ is greater than ##Maximum period factor#, "
  1615. "the term %T__%i_ is not counted in the sum, and %N is lowered by 1; "
  1616. "this procedure ensures that in the computation of the mean period we use at least all the intervals "
  1617. "that had taken part in the computation of DDP.")
  1618. NORMAL (U"Finally, we compute DDP as")
  1619. FORMULA (U"%DDP = %absDDP(seconds) / %meanPeriod(seconds)")
  1620. NORMAL (U"The result is exactly 3 times the @@PointProcess: Get jitter (rap)...|RAP@ jitter measurement: "
  1621. "a value between 0 and 6, or between 0 and 600 percent.")
  1622. MAN_END
  1623. MAN_BEGIN (U"PointProcess: Get low index...", U"ppgb", 20021212)
  1624. INTRO (U"A @query to the selected @PointProcess object.")
  1625. ENTRY (U"Return value")
  1626. NORMAL (U"the index of the nearest point before or at the specified time, "
  1627. "or 0 if the point process contains no points or the specified time is before the first point.")
  1628. ENTRY (U"Setting")
  1629. TAG (U"##Time (s)")
  1630. DEFINITION (U"the time from which a point is looked for, in seconds.")
  1631. MAN_END
  1632. MAN_BEGIN (U"PointProcess: Get nearest index...", U"ppgb", 20021212)
  1633. INTRO (U"A @query to the selected @PointProcess object.")
  1634. ENTRY (U"Return value")
  1635. NORMAL (U"the index of the point nearest to the specified time, "
  1636. "or 0 if the point process contains no points.")
  1637. ENTRY (U"Setting")
  1638. TAG (U"##Time (s)")
  1639. DEFINITION (U"the time around which a point is looked for, in seconds.")
  1640. /*
  1641. form Get nearest raising zero
  1642. real Time_(s) 0.5
  1643. endform
  1644. To PointProcess (zeroes)... yes no
  1645. index = Get nearest index... Time
  1646. if index = 0
  1647. # Geen punten gevonden: default-actie.
  1648. time = 'Time'
  1649. else
  1650. time = Get time from index... index
  1651. endif
  1652. echo 'time'
  1653. */
  1654. MAN_END
  1655. MAN_BEGIN (U"PointProcess: Hum", U"ppgb", 19970330)
  1656. INTRO (U"A command to hear a @PointProcess.")
  1657. ENTRY (U"Algorithm")
  1658. NORMAL (U"A @Sound is created with the algorithm described at @@PointProcess: To Sound (hum)...@.")
  1659. NORMAL (U"This sound is then played.")
  1660. MAN_END
  1661. MAN_BEGIN (U"PointProcesses: Intersection", U"ppgb", 20021212)
  1662. INTRO (U"A command to merge two selected @PointProcess objects into one.")
  1663. ENTRY (U"Behaviour")
  1664. NORMAL (U"The resulting #PointProcess will contain only those points that occur in both original point processes.")
  1665. NORMAL (U"The time domain of the resulting point process is the intersection of the time domains of the original point processes.")
  1666. MAN_END
  1667. MAN_BEGIN (U"PointProcess: Play", U"ppgb", 19970330)
  1668. INTRO (U"A command to hear a @PointProcess.")
  1669. ENTRY (U"Algorithm")
  1670. NORMAL (U"A @Sound is created with the algorithm described at @@PointProcess: To Sound (pulse train)...@.")
  1671. NORMAL (U"This sound is then played.")
  1672. MAN_END
  1673. MAN_BEGIN (U"PointProcess: Remove point...", U"ppgb", 20021212)
  1674. INTRO (U"A command to remove a point from every selected @PointProcess.")
  1675. ENTRY (U"Setting")
  1676. TAG (U"##Index")
  1677. DEFINITION (U"the index of the point that is to be removed.")
  1678. ENTRY (U"Behaviour")
  1679. NORMAL (U"Does nothing if %index is less than 1 or greater than the number of points %nt in the point process. "
  1680. "Otherwise, one point is removed (e.g., if %index is 3, the third point is removed), and the other points stay the same.")
  1681. MAN_END
  1682. MAN_BEGIN (U"PointProcess: Remove point near...", U"ppgb", 20021212)
  1683. INTRO (U"A command to remove a point from every selected @PointProcess.")
  1684. ENTRY (U"Setting")
  1685. TAG (U"##Time (s)")
  1686. DEFINITION (U"the time (in seconds) around which a point is to be removed.")
  1687. ENTRY (U"Behaviour")
  1688. NORMAL (U"Does nothing if there are no points in the point process. "
  1689. "Otherwise, the point nearest to %time is removed, and the other points stay the same.")
  1690. MAN_END
  1691. MAN_BEGIN (U"PointProcess: Remove points...", U"ppgb", 20021212)
  1692. INTRO (U"A command to remove a range of points from every selected @PointProcess.")
  1693. ENTRY (U"Settings")
  1694. TAG (U"##From index (≥ 1)")
  1695. DEFINITION (U"the first index of the range of points that are to be removed.")
  1696. TAG (U"##To index")
  1697. DEFINITION (U"the last index of the range of points that are to be removed.")
  1698. ENTRY (U"Behaviour")
  1699. NORMAL (U"All points that originally fell in the range [%fromIndex, %toIndex] are removed, and the other points stay the same.")
  1700. MAN_END
  1701. MAN_BEGIN (U"PointProcess: Remove points between...", U"ppgb", 20021212)
  1702. INTRO (U"A command to remove a range of points from every selected @PointProcess.")
  1703. ENTRY (U"Settings")
  1704. TAG (U"##From time (s)")
  1705. DEFINITION (U"the start of the domain from which all points are to be removed.")
  1706. TAG (U"##To time (s)")
  1707. DEFINITION (U"the end of the domain from which all points are to be removed.")
  1708. ENTRY (U"Behaviour")
  1709. NORMAL (U"All points that originally fell in the domain [%fromTime, %toTime], including the edges, are removed, "
  1710. "and the other points stay the same.")
  1711. MAN_END
  1712. MAN_BEGIN (U"PointProcess: To Sound (hum)...", U"ppgb", 19970330)
  1713. INTRO (U"A command to convert every selected @PointProcess into a @Sound.")
  1714. ENTRY (U"Algorithm")
  1715. NORMAL (U"A @Sound is created with the algorithm described at @@PointProcess: To Sound (pulse train)...@. "
  1716. "This sound is then run through a sequence of second-order filters that represent five formants.")
  1717. MAN_END
  1718. MAN_BEGIN (U"PointProcess: To Sound (phonation)...", U"ppgb", 20070225)
  1719. INTRO (U"A command to convert every selected @PointProcess into a @Sound.")
  1720. ENTRY (U"Algorithm")
  1721. NORMAL (U"A glottal waveform is generated at every point in the point process. "
  1722. "Its shape depends on the settings %power1 and %power2 according to the formula")
  1723. FORMULA (U"%U(%x) = %x^^%power1^ - %x^^%power2^")
  1724. NORMAL (U"where %x is a normalized time that runs from 0 to 1 and %U(%x) is the normalized glottal flow in arbitrary units (the real unit is m^3/s). "
  1725. "If %power1 = 2.0 and %power2 = 3.0, the glottal flow shape is that proposed by @@Rosenberg (1971)@, "
  1726. "upon which for instance the Klatt synthesizer is based (@@Klatt & Klatt (1990)@):")
  1727. SCRIPT (4.5, 3,
  1728. U"Select outer viewport... 0 4.5 -0.4 3\n"
  1729. "Axes... 0 1 -0.1 1\n"
  1730. "One mark left... 0 yes yes yes\n"
  1731. "One mark bottom... 0 yes yes no\n"
  1732. "One mark bottom... 1 yes yes no\n"
  1733. "Draw inner box\n"
  1734. "Draw function... 0 1 1000 (x^2-x^3)*6\n"
  1735. "Text bottom... yes Time (normalized)\n"
  1736. "Text left... yes Glottal flow\n"
  1737. )
  1738. NORMAL (U"If %power1 = 3.0 and %power2 = 4.0, the glottal flow shape starts somewhat smoother, "
  1739. "reflecting the idea that the glottis opens like a zipper:")
  1740. SCRIPT (4.5, 3,
  1741. U"Axes... 0 1 -0.1 1\n"
  1742. "One mark left... 0 yes yes yes\n"
  1743. "One mark bottom... 0 yes yes no\n"
  1744. "One mark bottom... 1 yes yes no\n"
  1745. "Draw inner box\n"
  1746. "Draw function... 0 1 1000 (x^3-x^4)*8\n"
  1747. "Text bottom... yes Time (normalized)\n"
  1748. "Text left... yes Glottal flow\n"
  1749. )
  1750. NORMAL (U"For the generation of speech sounds, we do not take the glottal flow itself, "
  1751. "but rather its derivative (this takes into account the influence of radiation at the lips). "
  1752. "The glottal flow derivative is given by")
  1753. FORMULA (U"%dU(%x)/%dx = %power1 %x^^(%power1-1)^ - %power2 %x^^(%power2-1)^")
  1754. NORMAL (U"The flow derivative clearly shows the influence of the smoothing mentioned above. "
  1755. "The unsmoothed curve, with %power1 = 2.0 and %power2 = 3.0, looks like:")
  1756. SCRIPT (4.5, 4,
  1757. U"Axes... 0 1 -9 3\n"
  1758. "One mark left... 0 yes yes yes\n"
  1759. "One mark bottom... 0 yes yes no\n"
  1760. "One mark bottom... 1 yes yes no\n"
  1761. "Draw inner box\n"
  1762. "Draw function... 0 1 1000 (2*x-3*x^2)*6\n"
  1763. "Text bottom... yes Time (normalized)\n"
  1764. "Text left... yes Glottal flow derivative\n"
  1765. )
  1766. NORMAL (U"Unlike the unsmoothed curve, the smoothed curve, with %power1 = 3.0 and %power2 = 4.0, starts out horizontally:")
  1767. SCRIPT (4.5, 4,
  1768. U"Axes... 0 1 -9 3\n"
  1769. "One mark left... 0 yes yes yes\n"
  1770. "One mark bottom... 0 yes yes no\n"
  1771. "One mark bottom... 1 yes yes no\n"
  1772. "Draw inner box\n"
  1773. "Draw function... 0 1 1000 (3*x^2-4*x^3)*8\n"
  1774. "Text bottom... yes Time (normalized)\n"
  1775. "Text left... yes Glottal flow derivative\n"
  1776. )
  1777. NORMAL (U"Another setting is the %%open phase%. If it is 0.70, the glottis will be open during 70 percent of a period. "
  1778. "Suppose that the PointProcess has a pulse at time 0, at time 1, at time 2, and so on. The pulses at times 1 and 2 will then be turned "
  1779. "into glottal flows starting at times 0.30 and 1.30:")
  1780. SCRIPT (4.5, 2.5,
  1781. U"Axes... 0 2 -0.1 1\n"
  1782. "One mark left... 0 yes yes yes\n"
  1783. "One mark bottom... 0 yes yes no\n"
  1784. "One mark bottom... 1 yes yes yes\n"
  1785. "One mark bottom... 2 yes yes no\n"
  1786. "Draw inner box\n"
  1787. "Draw function... 0 0.3 2 0\n"
  1788. "Draw function... 0.3 1.3 300 if x<1 then (((x-0.3)/0.7)^3-((x-0.3)/0.7)^4)*8 else 0 fi\n"
  1789. "Draw function... 1.3 2 300 (((x-1.3)/0.7)^3-((x-1.3)/0.7)^4)*8\n"
  1790. "Text bottom... yes Time (normalized)\n"
  1791. "Text left... yes Glottal flow\n"
  1792. )
  1793. SCRIPT (4.5, 2.5,
  1794. U"Axes... 0 2 -9 3\n"
  1795. "One mark left... 0 yes yes yes\n"
  1796. "One mark bottom... 0 yes yes no\n"
  1797. "One mark bottom... 1 yes yes yes\n"
  1798. "One mark bottom... 2 yes yes no\n"
  1799. "Draw inner box\n"
  1800. "Draw function... 0 0.3 2 0\n"
  1801. "Draw function... 0.3 1.3 300 if x<1 then (3*((x-0.3)/0.7)^2-4*((x-0.3)/0.7)^3)*8 else 0 fi\n"
  1802. "Draw function... 1.3 2 300 (3*((x-1.3)/0.7)^2-4*((x-1.3)/0.7)^3)*8\n"
  1803. "Text bottom... yes Time (normalized)\n"
  1804. "Text left... yes Glottal flow derivative\n"
  1805. )
  1806. NORMAL (U"The final setting that influences the shape of the glottal flow is the %%collision phase%. "
  1807. "If it is 0.03, for instance, the glottal flow derivative will not go abruptly to 0 at a pulse, "
  1808. "but will instead decay by a factor of %e (≈ 2.7183) every 3 percent of a period. "
  1809. "In order to keep the glottal flow curve smooth (and the derivative continuous), "
  1810. "the basic shape discussed above has to be shifted slightly to the right and truncated "
  1811. "at the time of the pulse, to be replaced there with the exponential decay curve; "
  1812. "this also makes sure that the average of the derivative stays zero, as it was above "
  1813. "(i.e. the area under the positive part of the curve equals the area above the negative part). "
  1814. "This is what the curves look like if %power1 = 3.0, %power2 = 4.0, %openPhase = 0.70 and %collisionPhase = 0.03:")
  1815. SCRIPT (4.5, 2.5,
  1816. U"Axes... 0 2 -0.1 1\n"
  1817. "One mark left... 0 yes yes yes\n"
  1818. "One mark bottom... 0 yes yes no\n"
  1819. "One mark bottom... 1 yes yes yes\n"
  1820. "One mark bottom... 2 yes yes no\n"
  1821. "Draw inner box\n"
  1822. "xo = 0.32646\n"
  1823. "g1 = 0.269422\n"
  1824. "Draw function... 0 xo 300 g1 * exp(-x/0.03)\n"
  1825. "Draw function... xo 1 300 (((x-xo)/0.7)^3-((x-xo)/0.7)^4)*8 + g1 * exp(-x/0.03)\n"
  1826. "Draw function... 1 1+xo 300 g1 * exp(-(x-1)/0.03)\n"
  1827. "Draw function... 1+xo 2 300 (((x-1-xo)/0.7)^3-((x-1-xo)/0.7)^4)*8 + g1 * exp(-(x-1)/0.03)\n"
  1828. "Text bottom... yes Time (normalized)\n"
  1829. "Text left... yes Glottal flow\n"
  1830. )
  1831. SCRIPT (4.5, 2.5,
  1832. U"Axes... 0 2 -9 3\n"
  1833. "One mark left... 0 yes yes yes\n"
  1834. "One mark bottom... 0 yes yes no\n"
  1835. "One mark bottom... 1 yes yes yes\n"
  1836. "One mark bottom... 2 yes yes no\n"
  1837. "Draw inner box\n"
  1838. "xo = 0.32646\n"
  1839. "g1 = -8.980736 * 0.7\n"
  1840. "Draw function... 0 xo 300 g1 * exp(-x/0.03)\n"
  1841. "Draw function... xo 1 300 (3*((x-xo)/0.7)^2-4*((x-xo)/0.7)^3)*8 + g1 * exp(-x/0.03)\n"
  1842. "Draw function... 1 1+xo 300 g1 * exp(-(x-1)/0.03)\n"
  1843. "Draw function... 1+xo 2 300 (3*((x-1-xo)/0.7)^2-4*((x-1-xo)/0.7)^3)*8 + g1 * exp(-(x-1)/0.03)\n"
  1844. "Text bottom... yes Time (normalized)\n"
  1845. "Text left... yes Glottal flow derivative\n"
  1846. )
  1847. NORMAL (U"These curves have moved 2.646 percent of a period to the right. At time 1, "
  1848. "the glottal flow curve turns from a convex polynomial into a concave exponential, "
  1849. "and the derivative still has its minimum there.")
  1850. ENTRY (U"Settings")
  1851. TAG (U"##Sampling frequency (Hz)")
  1852. DEFINITION (U"the sampling frequency of the resulting Sound object, e.g. 44100 hertz.")
  1853. TAG (U"##Adaptation factor")
  1854. DEFINITION (U"the factor by which a pulse height will be multiplied if the pulse time is not within "
  1855. "##Maximum period# from the previous pulse, and by which a pulse height will again be multiplied "
  1856. "if the previous pulse time is not within ##Maximum period# from the pre-previous pulse. This factor is against "
  1857. "abrupt starts of the pulse train after silences, and is 1.0 if you do want abrupt starts after silences.")
  1858. TAG (U"##Maximum period (s)")
  1859. DEFINITION (U"the minimal period that will be considered a silence, e.g. 0.05 seconds. "
  1860. "Example: if ##Adaptation factor# is 0.6, and ##Adaptation time# is 0.02 s, "
  1861. "then the heights of the first two pulses after silences of at least 20 ms "
  1862. "will be multiplied by 0.36 and 0.6, respectively.")
  1863. MAN_END
  1864. MAN_BEGIN (U"PointProcess: To Sound (pulse train)...", U"ppgb", 20070225)
  1865. INTRO (U"A command to convert every selected @PointProcess into a @Sound.")
  1866. ENTRY (U"Algorithm")
  1867. NORMAL (U"A pulse is generated at every point in the point process. This pulse is filtered at the Nyquist frequency "
  1868. "of the resulting #Sound by converting it into a sampled #sinc function.")
  1869. ENTRY (U"Settings")
  1870. TAG (U"##Sampling frequency (Hz)")
  1871. DEFINITION (U"the sampling frequency of the resulting Sound object, e.g. 44100 hertz.")
  1872. TAG (U"##Adaptation factor")
  1873. DEFINITION (U"the factor by which a pulse height will be multiplied if the pulse time is not within "
  1874. "##Adaptation time# from the pre-previous pulse, and by which a pulse height will again be multiplied "
  1875. "if the pulse time is not within ##Adaptation time# from the previous pulse. This factor is against "
  1876. "abrupt starts of the pulse train after silences, and is 1.0 if you do want abrupt starts after silences.")
  1877. TAG (U"##Adaptation time (s)")
  1878. DEFINITION (U"the minimal period that will be considered a silence, e.g. 0.05 seconds.")
  1879. TAG (U"##Interpolation depth")
  1880. DEFINITION (U"the extent of the sinc function to the left and to the right of the peak, e.g. 2000 samples.")
  1881. NORMAL (U"Example: if ##Adaptation factor# is 0.6, and ##Adaptation time# is 0.02 s, "
  1882. "then the heights of the first two pulses after silences of at least 20 ms "
  1883. "will be multiplied by 0.36 and 0.6, respectively.")
  1884. MAN_END
  1885. MAN_BEGIN (U"PointProcesses: Union", U"ppgb", 20021212)
  1886. INTRO (U"A command to merge two selected @PointProcess objects into one.")
  1887. ENTRY (U"Behaviour")
  1888. NORMAL (U"The resulting #PointProcess will contain all the points of the two original point processes, sorted by time. "
  1889. "Points that occur in both original point processes, will occur only once in the resulting point process.")
  1890. NORMAL (U"The time domain of the resulting point process is the union of the time domains of the original point processes.")
  1891. MAN_END
  1892. MAN_BEGIN (U"PointProcess: Up to IntensityTier...", U"ppgb", 19970329)
  1893. INTRO (U"A command to promote every selected @PointProcess to an @IntensityTier.")
  1894. ENTRY (U"Setting")
  1895. TAG (U"##Intensity (dB)")
  1896. DEFINITION (U"the intensity that will be associated with every point.")
  1897. ENTRY (U"Behaviour")
  1898. NORMAL (U"The times of all the points are trivially copied, and so is the time domain. "
  1899. "The intensity information will be the same for every point.")
  1900. MAN_END
  1901. MAN_BEGIN (U"PointProcess: Up to PitchTier...", U"ppgb", 19970329)
  1902. INTRO (U"A command to promote every selected @PointProcess to a @PitchTier.")
  1903. ENTRY (U"Setting")
  1904. TAG (U"##Frequency (Hz)")
  1905. DEFINITION (U"the pitch frequency that will be associated with every point.")
  1906. ENTRY (U"Behaviour")
  1907. NORMAL (U"The times of all the points are trivially copied, and so is the time domain. "
  1908. "The pitch information will be the same for every point.")
  1909. MAN_END
  1910. MAN_BEGIN (U"Polygon", U"ppgb", 20030316)
  1911. INTRO (U"One of the @@types of objects@ in Praat.")
  1912. NORMAL (U"A Polygon object represents a sequence of points (%%x__i_, %%y__i_) in a two-dimensional space.")
  1913. MAN_END
  1914. MAN_BEGIN (U"Read Matrix from raw text file...", U"ppgb", 19980322)
  1915. INTRO (U"A command to read a @Matrix object from a file on disk.")
  1916. ENTRY (U"File format")
  1917. NORMAL (U"The file should contain each row of the matrix on a separate line. Within each row, "
  1918. "the elements must be separated by spaces or tabs.")
  1919. NORMAL (U"For instance, the following text file will be read as a Matrix with three rows and four columns:")
  1920. CODE (U"0.19 3 245 123")
  1921. CODE (U"18e-6 -3e18 0 0.0")
  1922. CODE (U"1.5 2.5 3.5 4.5")
  1923. NORMAL (U"The resulting Matrix will have the same domain and sampling as Matrices created with "
  1924. "##Create simple Matrix...#. In the above example, this means that the Matrix will have "
  1925. "%x__%min_ = 0.5, %x__%max_ = 4.5, %n__%x_ = 4, %dx = 1.0, %x__1_ = 1.0, "
  1926. "%y__%min_ = 0.5, %y__%max_ = 3.5, %n__%y_ = 3, %dy = 1.0, %y__1_ = 1.0.")
  1927. MAN_END
  1928. MAN_BEGIN (U"Read Strings from raw text file...", U"ppgb", 19990502)
  1929. INTRO (U"A command to read a @Strings object from a simple text file. "
  1930. "Each line is read as a separate string. See @Strings for an example.")
  1931. MAN_END
  1932. MAN_BEGIN (U"Sound: To Intensity...", U"ppgb", 20100605)
  1933. INTRO (U"A command to create an @Intensity object from every selected @Sound.")
  1934. ENTRY (U"Settings")
  1935. TAG (U"##Minimum pitch (Hz)")
  1936. DEFINITION (U"the minimum periodicity frequency in your signal. If you set it too high, "
  1937. "you will end up with a pitch-synchronous intensity modulation. If you set it too low, "
  1938. "your intensity contour may appear smeared, so you should set it as high as allowed by the signal "
  1939. "if you want a sharp contour.")
  1940. TAG (U"##Time step (s)")
  1941. DEFINITION (U"the time step of the resulting intensity contour. If you set it to zero, the time step is computed as "
  1942. "one quarter of the effective window length, i.e. as 0.8 / (%minimum_pitch).")
  1943. TAG (U"##Subtract mean")
  1944. DEFINITION (U"See @@Intro 6.2. Configuring the intensity contour@.")
  1945. ENTRY (U"Algorithm")
  1946. NORMAL (U"The values in the sound are first squared, then convolved with a Gaussian analysis window (Kaiser-20; sidelobes below -190 dB). "
  1947. "The effective duration of this analysis window is 3.2 / (%minimum_pitch), which will guarantee that a periodic signal is analysed as having a "
  1948. "pitch-synchronous intensity ripple not greater than 0.00001 dB.")
  1949. MAN_END
  1950. MAN_BEGIN (U"Sound & IntensityTier: Multiply", U"ppgb", 20000724)
  1951. INTRO (U"A command to create a new Sound from the selected @Sound and @Intensity objects.")
  1952. NORMAL (U"The resulting Sound equals the original sound, multiplied by a linear interpolation of the intensity. "
  1953. "Afterwards, the resulting Sound is scaled so that its maximum absolute amplitude is 0.9.")
  1954. MAN_END
  1955. MAN_BEGIN (U"Strings", U"ppgb", 20141001)
  1956. INTRO (U"One of the @@types of objects@ in Praat. Represents an ordered list of strings.")
  1957. ENTRY (U"Creation")
  1958. NORMAL (U"The difficult way is to create a #Strings object from a generic Praat text file "
  1959. "(if there are non-ASCII symbols, use UTF-8 or UTF-16 format):")
  1960. CODE (U"\"ooTextFile\"")
  1961. CODE (U"\"Strings\"")
  1962. CODE (U"5 ! number of strings")
  1963. CODE (U"\"Hello\"")
  1964. CODE (U"\"Goodbye\"")
  1965. CODE (U"\"Auf wiedersehen\"")
  1966. CODE (U"\"Tschüss\"")
  1967. CODE (U"\"Arrivederci\"")
  1968. NORMAL (U"In this example, we see that a double quote within a string should be written twice; "
  1969. "the fourth string will therefore be read as ##Tschüss#. "
  1970. "This file can be read simply with the generic @@Read from file...@ command from the #Open menu.")
  1971. NORMAL (U"An easier way is to use the special command @@Read Strings from raw text file...@. "
  1972. "The file can then simply look like this:")
  1973. CODE (U"Hello")
  1974. CODE (U"Goodbye")
  1975. CODE (U"Auf wiedersehen")
  1976. CODE (U"Tschüss")
  1977. CODE (U"Arrivederci")
  1978. NORMAL (U"You can also create a #Strings object from a directory listing or from some other objects:")
  1979. LIST_ITEM (U"• @@Create Strings as file list...")
  1980. LIST_ITEM (U"• @@Distributions: To Strings...@")
  1981. LIST_ITEM (U"• @@OTGrammar: Generate inputs...@")
  1982. LIST_ITEM (U"• @@OTGrammar & Strings: Inputs to outputs...@")
  1983. MAN_END
  1984. MAN_BEGIN (U"Strings: To Distributions", U"ppgb", 19971025)
  1985. INTRO (U"A command to analyse each selected @Strings object into a @Distributions object.")
  1986. NORMAL (U"The resulting #Distributions will collect the occurrences of every string in the #Strings object, "
  1987. "and put the number of occurrences in its first and only column.")
  1988. ENTRY (U"Example")
  1989. NORMAL (U"We start from the following #Strings:")
  1990. CODE (U"6 (number of strings)")
  1991. CODE (U"\"hallo\"")
  1992. CODE (U"\"dag allemaal\"")
  1993. CODE (U"\"hallo\"")
  1994. CODE (U"\"tot morgen\"")
  1995. CODE (U"\"hallo\"")
  1996. CODE (U"\"tot morgen\"")
  1997. NORMAL (U"This will give us the following #Distributions:")
  1998. CODE (U"1 (number of columns) \"\" (no column name)")
  1999. CODE (U"\"hallo\" 3")
  2000. CODE (U"\"dag allemaal\" 1")
  2001. CODE (U"\"tot morgen\" 2")
  2002. MAN_END
  2003. MAN_BEGIN (U"Table", U"ppgb", 20030316)
  2004. INTRO (U"One of the @@types of objects@ in Praat. See the @Statistics tutorial.")
  2005. MAN_END
  2006. MAN_BEGIN (U"TableOfReal", U"ppgb", 20030316)
  2007. INTRO (U"One of the @@types of objects@ in Praat.")
  2008. NORMAL (U"A TableOfReal object contains a number of %cells. Each cell belongs to a %row and a %column. "
  2009. "For instance, a TableOfReal with 10 rows and 3 columns has 30 cells.")
  2010. NORMAL (U"Each row and each column may be labeled with a %title.")
  2011. ENTRY (U"Creating a TableOfReal from data in a text file")
  2012. NORMAL (U"Suppose you have F1 and F2 data for vowels. "
  2013. "You can create a simple text file like the following:")
  2014. CODE (U"\"ooTextFile\" ! The line by which Praat can recognize your file")
  2015. CODE (U"\"TableOfReal\" ! The line that tells Praat about the contents")
  2016. CODE (U"2 \"F1\" \"F2\" ! Number of columns, and column labels")
  2017. CODE (U"3 ! Number of rows")
  2018. CODE (U"\"a\" 800 1100 ! Row label (vowel), F1 value, F2 value")
  2019. CODE (U"\"i\" 280 2800 ! Row label (vowel), F1 value, F2 value")
  2020. CODE (U"\"u\" 260 560 ! Row label (vowel), F1 value, F2 value")
  2021. NORMAL (U"Praat is rather forgiving about the use of spaces, tabs, and newlines. "
  2022. "See @@Save as text file...@ for general information.")
  2023. NORMAL (U"You will often have your data in a file with a self-describing format, "
  2024. "i.e. in which the number of values on a line equals the number of columns "
  2025. "of the table:")
  2026. CODE (U"800 1100")
  2027. CODE (U"280 2800")
  2028. CODE (U"260 560")
  2029. NORMAL (U"Such a file can be read with @@Read Matrix from raw text file...@. "
  2030. "This creates a Matrix object, which can be cast to a TableOfReal object "
  2031. "by @@Matrix: To TableOfReal@. The resulting TableOfReal does not have "
  2032. "any row or column labels yet. You could add column labels with:")
  2033. CODE (U"Set column label (index)... 1 F1")
  2034. CODE (U"Set column label (index)... 2 F2")
  2035. NORMAL (U"Of course, if the row labels contain crucial information, "
  2036. "and the number of rows is large, this is not a feasible method.")
  2037. MAN_END
  2038. MAN_BEGIN (U"TableOfReal: Set value...", U"ppgb", 19980105)
  2039. INTRO (U"A command to change the value of one table cell in each selected @TableOfReal object.")
  2040. ENTRY (U"Settings")
  2041. TAG (U"##Row number")
  2042. DEFINITION (U"the number of the row of the cell whose value you want to change.")
  2043. TAG (U"##Column number")
  2044. DEFINITION (U"the number of the column of the cell whose value you want to change.")
  2045. TAG (U"##New value")
  2046. DEFINITION (U"the value that you want the specified cell to have.")
  2047. MAN_END
  2048. }
  2049. /* End of file manual_Fon.cpp */