Debian Codegraph @

dwtools/manual_dwtools.cpp

raw symbols SCIP
1 /* manual_dwtools.cpp
2 *
3 * Copyright (C) 1993-2026 David Weenink, 2025,2026 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "ManPagesM.h"
20 #include "Sound_extensions.h"
21 #include "TableOfReal_extensions.h"
22 #include "TableOfReal_and_Discriminant.h"
23 #include "Table_extensions.h"
24 #include "Configuration.h"
25 #include "Discriminant.h"
26 #include "../sensors/Electroglottogram.h"
27 #include "Sound_and_Spectrum.h"
28 #include "Sound_and_Spectrum_dft.h"
29
30
31 static autoTableOfReal getStandardizedLogFrequencyPolsData (bool includeLevels) {
32 autoTableOfReal me = TableOfReal_create_pols1973 (includeLevels);
33 for (integer i = 1; i <= my numberOfRows; i ++)
34 for (integer j = 1; j <= 3; j++)
35 my data [i] [j] = log10 (my data [i] [j]);
36 TableOfReal_standardizeColumns (me.get());
37 TableOfReal_setColumnLabel (me.get(), 1, U"standardized log (%F__1_)");
38 TableOfReal_setColumnLabel (me.get(), 2, U"standardized log (%F__2_)");
39 TableOfReal_setColumnLabel (me.get(), 3, U"standardized log (%F__3_)");
40 if (includeLevels) {
41 TableOfReal_setColumnLabel (me.get(), 4, U"standardized %L__1_");
42 TableOfReal_setColumnLabel (me.get(), 5, U"standardized %L__1_");
43 TableOfReal_setColumnLabel (me.get(), 6, U"standardized %L__3_");
44 }
45 return me;
46 }
47
48 static void drawPolsF1F2_log (Graphics g) {
49 autoTableOfReal me = getStandardizedLogFrequencyPolsData (false);
50 Graphics_setWindow (g, -2.9, 2.9, -2.9, 2.9);
51 TableOfReal_drawScatterPlot (me.get(), g, 1, 2, 0, 0, -2.9, 2.9, -2.9, 2.9, 10, true, U"+", true);
52 }
53
54 static void drawPolsF1F2ConcentrationEllipses (Graphics g) {
55 autoTableOfReal me = getStandardizedLogFrequencyPolsData (false);
56 autoDiscriminant d = TableOfReal_to_Discriminant (me.get());
57 Discriminant_drawConcentrationEllipses (d.get(), g, 1, false, nullptr, false, 1, 2, -2.9, 2.9, -2.9, 2.9, 12, true);
58 }
59
60 static void drawPolsDiscriminantConfiguration (Graphics g) {
61 autoTableOfReal me = getStandardizedLogFrequencyPolsData (false);
62 autoDiscriminant d = TableOfReal_to_Discriminant (me.get());
63 autoConfiguration c = Discriminant_TableOfReal_to_Configuration (d.get(), me.get(), 2);
64 Configuration_draw (c.get(), g, 1, 2, -2.9, 2.9, -2.9, 2.9, 0, true, U"", true);
65 }
66
67 static void drawBoxPlot (Graphics g) {
68 const double q25 = 25, q50 = 50, q75 = 60, mean = 45;
69 const double hspread = q75 - q25, r = 0.05, w = 0.2;
70 const double lowerInnerFence = q25 - 1.5 * hspread;
71 const double upperInnerFence = q75 + 1.5 * hspread;
72 const double upperOuterFence = q75 + 3.0 * hspread;
73 const double lowerWhisker = lowerInnerFence + 0.1 * hspread;
74 const double upperWhisker = upperInnerFence - 0.5 * hspread;
75 const double ymin = lowerWhisker - 0.1 * hspread, ymax = q75 + 4 * hspread;
76 const double x = 0, dx = 0.01, xar = x + 0.7, xtl = xar + dx;
77 const double xal1 = x + r + dx, xal2 = x + w + r;
78
79 Graphics_setWindow (g, -1, 2, ymin, ymax);
80 Graphics_setInner (g);
81 Graphics_setTextAlignment (g, Graphics_LEFT, Graphics_HALF);
82
83 Graphics_line (g, x - r, lowerWhisker, x + r, lowerWhisker);
84 Graphics_line (g, x, lowerWhisker, x, q25);
85 Graphics_line (g, x - w, q25, x + w, q25);
86 Graphics_line (g, x - w, q50, x + w, q50);
87 Graphics_line (g, x - w, q75, x + w, q75);
88 Graphics_line (g, x - w, q25, x - w, q75);
89 Graphics_line (g, x + w, q25, x + w, q75);
90 Graphics_line (g, x, q75, x, upperWhisker);
91 Graphics_line (g, x - r, upperWhisker, x + r, upperWhisker);
92
93 double y = q75 + 2.5 * hspread;
94 Graphics_text (g, x, y, U"*");
95 Graphics_arrow (g, xar, y, xal1, y);
96 Graphics_text (g, xtl, y, U"outlier > %%upperInnerFence%");
97 y = q75 + 3.5 * hspread;
98 Graphics_text (g, x, y, U"o");
99 Graphics_arrow (g, xar, y, xal1, y);
100 Graphics_text (g, xtl, y, U"outlier > %%upperOuterFence%");
101 y = upperOuterFence;
102 Graphics_setLineType (g, Graphics_DOTTED);
103 Graphics_line (g, -xtl, y, xtl, y);
104 Graphics_text (g, xtl, y, U"%%upperOuterFence%");
105 y = upperInnerFence;
106 Graphics_line (g, -xtl, y, xtl, y);
107 Graphics_text (g, xtl, y, U"%%upperInnerFence%");
108 Graphics_line (g, x - w, mean, x + w, mean);
109 Graphics_setLineType (g, Graphics_DRAWN);
110 y = upperWhisker;
111 Graphics_arrow (g, xar, y, xal2, y);
112 Graphics_text (g, xtl, y, U"%%upperWhisker%");
113 y = lowerWhisker;
114 Graphics_arrow (g, xar, y, xal2, y);
115 Graphics_text (g, xtl, y, U"%%lowerWhisker%");
116
117 y = q75;
118 Graphics_arrow (g, xar, y, xal2, y);
119 Graphics_text (g, xtl, y, U"%%q75%");
120 y = q25;
121 Graphics_arrow (g, xar, y, xal2, y);
122 Graphics_text (g, xtl, y, U"%%q25%");
123 y = q50;
124 Graphics_arrow (g, xar, y, xal2, y);
125 Graphics_text (g, xtl, y, U"%%q50%");
126 y = mean;
127 Graphics_arrow (g, xar, y, xal2, y);
128 Graphics_text (g, xtl, y, U"%%mean%");
129 Graphics_unsetInner (g);
130 }
131
132 static void drawPartionedMatrix (Graphics g) {
133 const double min = 0.0, max = 10.0;
134 Graphics_setWindow (g, min, max, min, max);
135 double x1 = 0.0;
136 double x2 = max;
137 double y1 = 7.0;
138 double y2 = 7.0;
139 Graphics_setLineType (g, Graphics_DOTTED);
140 Graphics_line (g, x1, y1, x2, y2);
141 x1 = x2 = 3.0;
142 y1 = 0.0;
143 y2 = max;
144 Graphics_line (g, x1, y1, x2, y2);
145 Graphics_setLineType (g, Graphics_DRAWN);
146 x1 = 1.5;
147 y1 = 7.0 + 3.0 / 2.0;
148 Graphics_setFontSize (g, 14.0);
149 Graphics_setTextAlignment (g, kGraphics_horizontalAlignment::CENTRE, Graphics_HALF);
150 Graphics_text (g, x1, y1, U"##S__yy_#");
151 x1 = 3.0 + 7.0 / 2.0;
152 Graphics_text (g, x1, y1, U"##S__yx_#");
153 y1 = 7.0 / 2.0;
154 Graphics_text (g, x1, y1, U"##S__xx_#");
155 x1 = 1.5;
156 Graphics_text (g, x1, y1, U"##S__xy_#");
157 }
158
159 static void Electroglottogram_drawStylized (Graphics g) {
160 Electroglottogram_drawStylized (g, true, false);
161 }
162
163 static void Electroglottogram_drawStylizedLevels (Graphics g) {
164 Electroglottogram_drawStylized (g, false, true);
165 }
166
167 static void drawSpectra (Graphics g) {
168 static Spectrum dft = nullptr;
169 autoSound sound = Sound_createAsPureTone (1, 0.0, 3.9799, 10000.0, 3333.0, 1.0, 0.0, 0.0);
170 if (! dft)
171 dft = Sound_to_Spectrum (sound.get(), false).releaseToAmbiguousOwner();
172 autoSpectrum fft = Sound_to_Spectrum (sound.get(), true);
173 autoSpectrum ups = Sound_to_Spectrum_resampled (sound.get(), 30);
174 const double fmin = 0.0, fmax = 5000.0, dbmin = -30.0, dbmax = 110.0;
175 const double fontSize = Graphics_inqFontSize (g);
176 Graphics_setFontSize (g, 10.0);
177 Graphics_setLineType (g, Graphics_DRAWN);
178 Graphics_setColour (g, Melder_SILVER);
179 Spectrum_draw (fft.get(), g, fmin, fmax, dbmin, dbmax, true);
180 Graphics_setColour (g, Melder_BLACK);
181 Spectrum_draw (dft, g, fmin, fmax, dbmin, dbmax, false);
182 Graphics_setColour (g, Melder_RED);
183 Spectrum_draw (ups.get(), g, fmin, fmax, dbmin, dbmax, false);
184 Graphics_setColour (g, Melder_BLACK);
185 Graphics_setFontSize (g, fontSize);
186 }
187
188 void manual_dwtools_init (ManPages me);
189 void manual_dwtools_init (ManPages me) {
190
191 MAN_BEGIN (U"AffineTransform", U"djmw", 20010927)
192 INTRO (U"One of the @@types of objects@ in Praat.")
193 NORMAL (U"An affine transform is a combination of a linear transformation #%A "
194 "and a translation #%t that transforms a vector #%x to a new vector #%y "
195 "in the following way:")
196 EQUATION (U"#%y = #%A x + #%t")
197 MAN_END
198
199 MAN_BEGIN (U"AffineTransform: Invert", U"djmw", 20011008)
200 INTRO (U"Get the inverse of the selected @AffineTransform object.")
201 NORMAL (U"The inverse from")
202 EQUATION (U"#%y = #%A x + #%t")
203 NORMAL (U"is:")
204 EQUATION (U"#%x = #%A^^-1^ - #%A^^-1^#%t.")
205 MAN_END
206
207 MAN_BEGIN (U"band filtering in the frequency domain", U"djmw", 20010404)
208 INTRO (U"We describe how band filtering in the frequency domain is performed.")
209 NORMAL (U"We start with a @Sound and end with a filter bank representation of "
210 "this sound. We assume a standard analysis context: a sound divided into "
211 "frames according to a certain %%window length% and %%time step%. We will "
212 "simulate a filterbank with %N filters.")
213 NORMAL (U"The algorithm for each sound frame proceeds in the following way:")
214 LIST_ITEM (U"1. Apply a Gaussian window to the sound frame.")
215 LIST_ITEM (U"2. Convert the windowed frame into a @Spectrum object.")
216 LIST_ITEM (U"3. Convert the spectral amplitudes to %energy values by squaring "
217 "the real and imaginary parts and multiplying by %df, the frequency "
218 "distance between two successive frequency points in the spectrum. "
219 "Since the Spectrum object only contains positive frequencies, "
220 "we have to multiply all energy values, except the first and the last "
221 "frequency, by another factor of 2 to compensate for negative frequencies.")
222 LIST_ITEM (U"4. For each of the %N filters in the filter bank: determine the "
223 "inner product of its filter function with the energies as determined in "
224 "the previous step. The result of each inner product is the energy in the "
225 "corresponding filter.")
226 LIST_ITEM (U"5. Convert the energies in each filter to power by dividing by "
227 "the %%window length%.")
228 LIST_ITEM (U"6. Correct the power, due to the windowing of the frame, by dividing "
229 "by the integral of the %squared windowing function.")
230 LIST_ITEM (U"7. Convert all power values to %dB's according to 10 * log10 "
231 "(%power / 4 10^^-10^).")
232 MAN_END
233
234 MAN_BEGIN (U"Bonferroni correction", U"djmw", 20011107)
235 NORMAL (U"In general, if we have %k independent significance tests "
236 "at the %\\al level, the probability %p that we will get no significant "
237 "differences in all these tests is simply the product of the individual "
238 "probabilities: (1 - %\\al)^^%k^. "
239 "For example, with %\\al = 0.05 and %k = 10 we get %p = 0.95^^10^ = 0.60. "
240 "This means, however, we now have a 40\\% chance that one of these 10 "
241 "tests will turn out significant, despite each individual test only being "
242 "at the 5\\% level. "
243 "In order to guarantee that the overall significance test is still at the "
244 "%\\al level, we have to adapt the significance level %\\al\\'p of the "
245 "individual test. ")
246 NORMAL (U"This results in the following relation between the overall and the "
247 "individual significance level:")
248 EQUATION (U"(1 - %\\al\\'p)^^%k%^ = 1 - %\\al.")
249 NORMAL (U"This equation can easily be solved for %\\al\\'p:")
250 EQUATION (U"%\\al\\'p = 1 - (1-%\\al)^^1/%k^,")
251 NORMAL (U"which for small %\\al reduces to:")
252 EQUATION (U"%\\al\\'p = %\\al / %k")
253 NORMAL (U"This is a very simple recipe: If you want an overall significance "
254 "level %\\al and you perform %k individual tests, simply divide %\\al "
255 "by %k to obtain the significance level for the individual tests.")
256 MAN_END
257
258 MAN_BEGIN (U"box plot", U"djmw", 20111010)
259 INTRO (U"A box plot provides a simple graphical summary of data. These plots "
260 "originate from the work of @@Tukey (1977)@.")
261 ENTRY (U"Definitions")
262 NORMAL (U"The following figure shows an annotated box plot.")
263 PICTURE (5.0, 5.0, drawBoxPlot)
264 NORMAL (U"To understand the box plot we need the following definitions:")
265 LIST_ITEM (U"%%q25% = lower quartile, 25\\% of the data lie below this value")
266 LIST_ITEM (U"%%q50% = median, 50\\% of the data lie below this value")
267 LIST_ITEM (U"%%q75% = upper quartile, 25\\% of the data lie above this value")
268 NORMAL (U"The following definitions all depend on these quantiles:")
269 LIST_ITEM (U"%%hspread% = |%%q75% \\-- %%q25%| (50\\% interval)")
270 LIST_ITEM (U"%%lowerOuterFence% = %%q25% \\-- 3.0 * %%hspread% (not in figure)")
271 LIST_ITEM (U"%%lowerInnerFence% = %%q25% \\-- 1.5 * %%hspread% (not in figure)")
272 LIST_ITEM (U"%%upperInnerFence% = %%q75% + 1.5 * %%hspread%")
273 LIST_ITEM (U"%%upperOuterFence% = %%q75% + 3.0 * %%hspread%")
274 LIST_ITEM (U"%%lowerWhisker% = smallest data value larger than %%lowerInnerFence%")
275 LIST_ITEM (U"%%upperWhisker% = largest data value smaller than %%upperInnerFence%")
276 NORMAL (U"The box plot is a summary of the data in which:")
277 LIST_ITEM (U"\\bu the horizontal lines of the rectangle correspond to "
278 " %%q25%, %%q50% and %%q75%, respectively.")
279 LIST_ITEM (U"\\bu the dotted line corresponds to the mean.")
280 LIST_ITEM (U"\\bu the outliers outside the %%outerFences% are drawn with an 'o'.")
281 LIST_ITEM (U"\\bu the outliers in the intervals (%%lowerOuterFence%, %%lowerInnerFence%) "
282 "and (%%upperInnerFence%, %%upperOuterFence%) are drawn with an '*'.")
283 LIST_ITEM (U"\\bu the whisker lines outside the rectangle connect %%q25% with %%lowerWhisker%, and, "
284 "%%q75% with %%upperWhisker%, respectively. With no outliers present, the "
285 "whiskers mark minimum and/or maximum of the data.")
286 MAN_END
287
288
289 MAN_BEGIN (U"BarkFilter", U"djmw", 20141023)
290 INTRO (U"A #deprecated @@types of objects|type of object@ in Praat. It has been replaced by @@BarkSpectrogram@.")
291 NORMAL (U"An object of type BarkFilter represents an acoustic time-frequency "
292 "representation of a sound: the power spectral density %P(%z, %t), expressed "
293 "in dB's as 10*log10(power/4e-10)). In the now preferred BarkSpectrogram the power is represented instead of its dB value."
294 "It is sampled into a number of points around equally spaced times %t__%i_ "
295 "and frequencies %z__%j_ (on a Bark scale).")
296 ENTRY (U"Inside a BarkFilter")
297 NORMAL (U"With @Inspect you will see that this type contains the same attributes a @Matrix object.")
298 MAN_END
299
300
301 MAN_BEGIN (U"BarkSpectrogram", U"djmw", 20141023)
302 INTRO (U"One of the @@types of objects@ in Praat.")
303 NORMAL (U"An object of type BarkSpectrogram represents an acoustic time-frequency "
304 "representation of a sound: the power spectral density %P(%z, %t). "
305 "It is sampled into a number of points around equally spaced times %t__%i_ "
306 "and frequencies %z__%j_ (on a Bark scale).")
307 NORMAL (U" The bark to hertz transformation is defined as:")
308 EQUATION (U"hertz = 650.0 * sinh (bark / 7.0),")
309 NORMAL (U"while its inverse is defined as:")
310 EQUATION (U"bark = 7.0 * log (hertz/650 + sqrt (1 + (hertz/650)^^2^).")
311 ENTRY (U"Inside a BarkSpectrogram")
312 NORMAL (U"With @Inspect you will see that this type contains the same attributes a @Matrix object.")
313 MAN_END
314
315 MAN_BEGIN (U"BarkSpectrogram: Draw Sekey-Hanson auditory filters...", U"djmw", 20141023)
316 INTRO (U"A command to draw the auditory filters defined in @@Sekey & Hanson (1984)@.")
317 MAN_END
318
319 MAN_BEGIN (U"BarkSpectrogram: Paint image...", U"djmw", 20141023)
320 INTRO (U"A command to draw the selected @BarkSpectrogram into the @@Picture window@ in shades of grey.")
321 MAN_END
322
323 MAN_BEGIN (U"biharmonic spline interpolation", U"djmw", 20170915)
324 INTRO (U"A biharmonic spline interpolation is an interpolation of irregularly spaced two-dimensional data points. "
325 "The interpolating surface is a linear combination of Green functions centered at each data point. The amplitudes of "
326 "the Green functions are found by solving a linear system of equations.")
327 NORMAL (U"The surface %s(#%x) is expressed as")
328 EQUATION (U"%s(#%x)=\\Si__%j%=1_^^n^ %w__%j_ %g(#%x, #%x__%j_),")
329 NORMAL (U"where %n is the number of data points #%x__%j_ = (%x__%j_, %y__%j_), %g(#%x, #%x__%j_) is Green's function and %w__%j_ is the weight of data point %j. The weights %w__%j_ are determined by requiring that the surface %s(#%x) passes exactly through the %n data points, i.e.")
330 EQUATION (U"%s(#%x__%i_)=\\Si__%j%=1_^^n^ %w__%j_ %g(#%x__%i_, #%x__%j_), %i = 1, 2, ..., %n.")
331 NORMAL (U"This yields an %n\\xx%n square linear system of equations which can be solved for the %w__%j_.")
332 NORMAL (U"For twodimensional data Green's function is:")
333 EQUATION (U"%g(#%x__%i_, #%x__%j_) = |#%x__%i_ - #%x__%j_|^^2^ (ln |#%x__%i_ - #%x__%j_| - 1.0).")
334 NORMAL (U"See @@Sandwell (1987)@ and @@Deng & Tang (2011)@ for more information.")
335 MAN_END
336
337 MAN_BEGIN (U"bootstrap", U"djmw", 20141101)
338 INTRO (U"The bootstrap data set is a random sample of size %n "
339 "drawn %%with% replacement from the sample (%x__1_,...%x__n_). This "
340 "means that the bootstrap data set consists of members of the original "
341 "data set, some appearing zero times, some appearing once, some appearing "
342 "twice, etc.")
343 NORMAL (U"More information can be found in @@Efron & Tibshirani (1993)@.")
344 MAN_END
345
346 MAN_BEGIN (U"canonical variate", U"djmw", 20230801)
347 NORMAL (U"A ##canonical variate# is a new variable (variate) formed by making a linear combination of two "
348 "or more variates (variables) from a data set. "
349 "A linear combination of variables is the same as a weighted sum of variables. "
350 "Because we can in infinitely many ways choose combinations of weights between variables in a data set, "
351 "there are also infinitely many canonical variates possible. ")
352 NORMAL (U"In general additional constraints should be satisfied by the weights to get a meaningful canonical variate. "
353 "For example, in @@Canonical correlation analysis|canonical correlation analysis@ a data set is split up into two parts, a %%dependent% and an %%independent% part. "
354 "In both parts we can form a canonical variate and we choose weights that maximize the correlation between these canonical variates "
355 "(there is an @@TableOfReal: To CCA...|algorithm@ that calculates these weights).")
356 MAN_END
357
358 MAN_BEGIN (U"Categories", U"djmw", 19960918)
359 INTRO (U"One of the @@types of objects@ in Praat.")
360 NORMAL (U"An object of type Categories represents an ordered collection of categories. Each "
361 "category is a simple text string.")
362 ENTRY (U"Categories commands")
363 NORMAL (U"Creation:")
364 LIST_ITEM (U"\\bu ##Create an empty Categories#")
365 LIST_ITEM (U"\\bu @@FFNet & PatternList: To Categories...@")
366 NORMAL (U"Viewing and editing:")
367 LIST_ITEM (U"\\bu @CategoriesEditor")
368 NORMAL (U"Analysis:")
369 LIST_ITEM (U"\\bu @@Categories: To Confusion@")
370 LIST_ITEM (U"\\bu @@Categories: Difference@")
371 NORMAL (U"Synthesis")
372 LIST_ITEM (U"\\bu @@Categories: Append@")
373 LIST_ITEM (U"\\bu ##Categories: Permute...#")
374 LIST_ITEM (U"\\bu ##Categories: To unique Categories#")
375 ENTRY (U"Inside a Categories")
376 NORMAL (U"With @Inspect you will see the following attributes:")
377 TERM (U"%size")
378 DEFINITION (U"the number of simple categories.")
379 TERM (U"%item[]")
380 DEFINITION (U"the categories. Each category is an object of type #SimpleString.")
381 MAN_END
382
383 MAN_BEGIN (U"Categories: Difference", U"djmw", 19960918)
384 INTRO (U"A command to compute the difference between two selected @Categories objects.")
385 ENTRY (U"Behaviour")
386 NORMAL (U"Each element in the first object is compared with the corresponding "
387 "object in the second object according to its compare method. "
388 "The number of different %categories will be shown in the @@Info window@.")
389 MAN_END
390
391 MAN_BEGIN (U"Categories: To Confusion", U"djmw", 19960918)
392 INTRO (U"A command to compute the @Confusion matrix from two selected "
393 "@Categories objects.")
394 ENTRY (U"Algorithm")
395 NORMAL (U"A confusion matrix is constructed from both #Categories objects in "
396 "the following way: The first Categories object is considered the stimulus "
397 "Categories and its unique (sorted) categories "
398 "form the row indices of the confusion matrix, the unique (sorted) "
399 "categories of the second object form the column indices of this matrix.")
400 NORMAL (U"Next, each element in the first #Categories object is compared with "
401 "the corresponding object in the second object and the element in the "
402 "confusion matrix addressed by this pair is incremented by 1.")
403 MAN_END
404
405 MAN_BEGIN (U"Categories: Append", U"djmw", 19960918)
406 INTRO (U"You can choose this command after selecting 2 objects of type @Categories. "
407 "A new object is created that contains the second object appended after the first.")
408 MAN_END
409
410 MAN_BEGIN (U"Categories: Edit", U"djmw", 19960918)
411 INTRO (U"You can choose this command after selecting one #Categories. "
412 "A @CategoriesEditor will appear on the screen, with the selected #Categories in it.")
413 MAN_END
414
415 MAN_BEGIN (U"CategoriesEditor", U"djmw", 20210228)
416 ENTRY (U"An editor for manipulating @Categories.")
417 NORMAL (U"To make a selection, use the left mouse button.")
418 NORMAL (U"@@Command-click@ extends a selection (discontinuously).")
419 NORMAL (U"Shift-click extends a selection contiguously.")
420 MAN_END
421
422 MAN_BEGIN (U"CC", U"djmw", 20010219)
423 INTRO (U"One of the @@types of objects@ in Praat.")
424 NORMAL (U"Any object that represents cepstral coefficients as a function of "
425 "time.")
426 MAN_END
427
428 MAN_BEGIN (U"CC: Get value in frame...", U"djmw", 20140926)
429 INTRO (U"Get the cepstral coefficient value at a specified position in a specified frame.")
430 MAN_END
431
432 MAN_BEGIN (U"CC: Get c0 value in frame...", U"djmw", 20140926)
433 INTRO (U"Get the zeroth cepstral coefficient value in the specified frame. For a @MFCC object this value relates to energy.")
434 MAN_END
435
436 MAN_BEGIN (U"CCA", U"djmw", 20020323)
437 INTRO (U"One of the @@types of objects@ in Praat. ")
438 NORMAL (U"An object of type CCA represents the @@Canonical correlation "
439 "analysis@ of two multivariate datasets.")
440 ENTRY (U"Commands")
441 NORMAL (U"Creation:")
442 LIST_ITEM (U"\\bu @@TableOfReal: To CCA...@")
443 MAN_END
444
445 MAN_BEGIN (U"CCA: Get zero correlation probability...", U"djmw", 20040407)
446 INTRO (U"Get the probability that for the selected @CCA object the chosen "
447 "canonical correlation coefficient is different from zero.")
448 ENTRY (U"Setting")
449 TERM (U"##Index")
450 DEFINITION (U"is the index of the canonical correlation coefficient that "
451 "you want to test.")
452 ENTRY (U"Algorithm")
453 NORMAL (U"Wilks' statistic: the probability that coefficient \\ro__%index_ "
454 "differs from zero is ")
455 EQUATION (U" %probability = chiSquareQ (\\ci^2, %ndf),")
456 NORMAL (U"where the %%number of degrees of freedom% parameter equals")
457 EQUATION (U"%ndf = (%n__y_ - %index +1)(%n__x_ - %index +1)")
458 NORMAL (U"and the chi-squared parameter is")
459 EQUATION (U"\\ci^2 = \\--(%numberOfObservations - (%n__y_ + %n__x_ +3)/2) "
460 "log (\\La__%index_),")
461 NORMAL (U"In the formulas above the variables %n__y_ and %n__x_ are the "
462 "dimensions of the dependent and the independent data sets whose "
463 "canonical correlations have been "
464 "obtained, and Wilks' lambda is:")
465 EQUATION (U"\\La__index_ = \\Pi__%i=%index..min(%ny,%nx)_ (1 \\-- \\ro__%i_^^2^)")
466 MAN_END
467
468 MAN_BEGIN (U"CCA & Correlation: To TableOfReal (loadings)", U"djmw", 20020525)
469 INTRO (U"Determine from the selected @CCA and @Correlation objects the correlations "
470 "of the canonical variables with the original variables. These correlations are "
471 "called %%canonical factor loadings%, or also %%structure correlation "
472 "coefficients%.")
473 MAN_END
474
475 MAN_BEGIN (U"CCA & Correlation: Get variance fraction...", U"djmw", 20181112)
476 INTRO (U"Determine from the selected @CCA and @Correlation objects the fraction of the variance "
477 "explained by the selected @@canonical variate@ range.")
478 ENTRY (U"Settings")
479 TERM (U"##X or Y#")
480 DEFINITION (U"determines whether you select the dependent (y) or the independent (x) set.")
481 TERM (U"##Canonical variate range")
482 DEFINITION (U"determines the canonical variates (or canonical variables).")
483 ENTRY (U"Remarks")
484 NORMAL (U"1. In general the variance fractions for a particular canonical variate in the "
485 "dependent and in the independent set are not the same.")
486 NORMAL (U"2. In general, the variance fractions for all canonical variates do not sum to 1. \n(The technical reason is that for canonical correlation analysis in general the eigenvectors are not orthogonal, i.e. they overlap and therefore, necessarily, also the variance fractions overlap.) ")
487 ENTRY (U"Algorithm")
488 NORMAL (U"The formulas can be found on page 170 of @@Cooley & Lohnes (1971)@.")
489 NORMAL (U"For example, the fraction of the variance explained by the %i^^th^ canonical "
490 "variable in the dependent set is:")
491 EQUATION (U"%%fractionVariance% = ((#y__i_\\'p #R__yy_\\'p #R__yy_ #y__i_) / (#y__i_\\'p #R__yy_ #y__i_)) / %n__%y_,")
492 NORMAL (U"where #y__%i_ is the eigenvector for dependent canonical variable %i and #R__%%yy%_ is the correlation matrix for the %n__%y_ variables in the dependent set.")
493 MAN_END
494
495 MAN_BEGIN (U"CCA & Correlation: Get redundancy (sl)...", U"djmw", 20060323)
496 INTRO (U"Determine from the selected @CCA and @Correlation objects the Stewart-Love redundancy for the "
497 "selected canonical variates.")
498 NORMAL (U"The Stewart-Love redundancy for a single @@canonical variate@ is the fraction of variance explained by the selected "
499 "canonical variate in a set times the fraction of shared variance between the corresponding canonical variates in the two sets.")
500 NORMAL (U"The Stewart-Love redundancy for a canonical variate range is the sum of the individual redundancies.")
501 ENTRY (U"Settings")
502 TERM (U"##X or Y#")
503 DEFINITION (U"determines whether you select the dependent (y) or the independent (x) set.")
504 TERM (U"##Canonical variate range#")
505 DEFINITION (U"determines the canonical variates (or canonical variables).")
506 ENTRY (U"Algorithm")
507 NORMAL (U"The formulas can be found on page 170 of @@Cooley & Lohnes (1971)@.")
508 NORMAL (U"For example, the redundancy of the dependent set (y) given the independent set (x) for the %i^^%%th%^ canonical "
509 "variate can be expressed as:")
510 EQUATION (U"%R__%i_(y) = %%varianceFraction%__%i_(y) * \\ro__%i_^2, ")
511 NORMAL (U"where %%varianceFraction%__%i_(y) is the @@CCA & Correlation: Get variance fraction...|variance fraction@ explained "
512 "by the %i^^%%th%^ canonical variate of the dependent set, and \\ro__%i_ is the %i^^%%th%^ canonical correlation coefficient.")
513 NORMAL (U"The redundancy for the selected canonical variate in the dependent set shows what "
514 "fraction of the variance in the %%dependent% set is already \"explained\" by "
515 "the variance in the %%independent% set, i.e. this fraction could be considered as redundant.")
516 NORMAL (U"In the same way we can measure the redundancy of the independent (x) set giving the dependent set (y).")
517 ENTRY (U"Remark")
518 NORMAL (U"In general %R__%i_(y) \\=/ %R__%i_(x).")
519 MAN_END
520
521 MAN_BEGIN (U"CCA & TableOfReal: To TableOfReal (loadings)", U"djmw", 20020525)
522 INTRO (U"Determine from the selected @CCA and @TableOfReal objects the correlations "
523 "of the canonical variables with the original variables. These correlations are "
524 "called %%canonical factor loadings%, or also %%structure correlation "
525 "coefficients%.")
526 MAN_END
527
528 MAN_BEGIN (U"CCA & TableOfReal: To TableOfReal (scores)...", U"djmw", 20040407)
529 INTRO (U"Determines the scores on the dependent and the independent canonical "
530 "variates from the selected @CCA and @TableOfReal objects.")
531 ENTRY (U"Settings")
532 TERM (U"##Number of canonical correlations#")
533 DEFINITION (U"determines the dimension, i.e., the number of elements of the resulting "
534 "canonical score vectors. The newly created table will have twice this number of "
535 "columns because we have calculated score vectors for the dependent and the "
536 "independent variates.")
537 ENTRY (U"Behaviour")
538 NORMAL (U"The scores on the dependent set are determined as #T__%y_ #Y, where "
539 "#T__%y_ is the dependent part in the table and #Y is a matrix with "
540 "%numberOfCanonicalCorrelations eigenvectors for the dependent variate.")
541 NORMAL (U"The scores for the independent variates are then determined in an analogous "
542 "way as #T__%x_ #X.")
543 NORMAL (U"The scores for the dependent data will be in the lower numbered columns, "
544 "the scores for the independent part will be in the higher numbered columns of "
545 "the newly created object.")
546 MAN_END
547
548
549 MAN_BEGIN (U"Canonical correlation analysis", U"djmw", 20181118)
550 INTRO (U"This tutorial will show you how to perform canonical correlation "
551 "analysis with Praat.")
552 ENTRY (U"1. Objective of canonical correlation analysis")
553 NORMAL (U"In canonical correlation analysis we try to find the correlations between "
554 "two data sets. One data set is called the %dependent set, the other the "
555 "%independent set. In Praat these two sets must reside in one "
556 "@TableOfReal object. The lower numbered columns of this table will then be "
557 "interpreted as the dependent part, the rest of the columns as the "
558 "independent part. "
559 "The dimension of (i.e. the number of columns in) the dependent part may not "
560 "exceed the dimension of the independent part.")
561 NORMAL (U"As an example, we will use the dataset from @@Pols et al. (1973)@ "
562 "with the frequencies and levels of the first three formants from the 12 "
563 "Dutch monophthongal vowels as spoken in a /h\\_ t/ context by 50 male speakers. "
564 "We will try to find the canonical correlation between formant frequencies "
565 "(the %dependent part) and levels (the %independent part). "
566 "The dimension of both groups of variates is 3. "
567 "In the introduction of the "
568 "@@discriminant analysis@ tutorial you can find how to get these data, "
569 "how to take the logarithm of the formant frequency values and how to "
570 "standardize them. The following script summarizes:")
571 CODE (U"pols50m = Create TableOfReal (Pols 1973): \"yes\"")
572 CODE (U"Formula: ~ if col < 4 then log10 (self) else self endif")
573 CODE (U"Standardize columns")
574 NORMAL (U"Before we start with the %canonical correlation analysis we will first have "
575 "a look at the %Pearson correlations of this table and "
576 "calculate the @Correlation matrix. It is given by:")
577 CODE (U" F1 F2 F3 L1 L2 L3")
578 CODE (U"F1 1 -0.338 0.191 0.384 -0.505 -0.014")
579 CODE (U"F2 -0.338 1 0.190 -0.106 0.526 -0.568")
580 CODE (U"F3 0.191 0.190 1 0.113 -0.038 0.019")
581 CODE (U"L1 0.384 -0.106 0.113 1 -0.038 0.085")
582 CODE (U"L2 -0.505 0.526 -0.038 -0.038 1 0.128")
583 CODE (U"L3 -0.014 -0.568 0.019 0.085 0.128 1")
584 NORMAL (U"The following script summarizes:")
585 CODE (U"selectObject: pols50m")
586 CODE (U"To Correlation")
587 CODE (U"Draw as numbers: 1, 0, \"decimal\", 3")
588 NORMAL (U"The correlation matrix shows that high correlations exist between some "
589 "formant frequencies and some levels. For example, the correlation "
590 "coefficient between F2 and L2 equals 0.526.")
591 NORMAL (U"In a canonical correlation analysis of the dataset above, we try "
592 "to find the linear "
593 "combination %u__1_ of %F__1_, %F__2_ and %F__3_ that correlates maximally "
594 "with the linear combination %v__1_ of %L__1_, %L__2_ and %L__3_. "
595 "When we have found these %u__1_ and %v__1_ we next try to find a new "
596 "combination %u__2_ of the formant frequencies and a new combination "
597 "%v__2_ of the levels that have maximum correlation. These %u__2_ and "
598 "%v__2_ should be uncorrelated with %u__1_ and %v__1_. "
599 "When we express the above with formulas we have:")
600 EQUATION (U"%u__1_ = %y__11_%F__1_+%y__12_%F__2_ + %y__13_%F__3_")
601 EQUATION (U"%v__1_ = %x__11_%L__1_+%x__12_%L__2_ + %x__13_%L__3_")
602 EQUATION (U"\\ro(%u__1_, %v__1_) = maximum, \\ro(%u__2_, %v__2_) = submaximum, ")
603 EQUATION (U"\\ro(%u__2_, %u__1_) = \\ro (%u__2_, %v__1_) = \\ro (%v__2_, %v__1_) "
604 "= \\ro (%v__2_, %u__1_) = 0,")
605 NORMAL (U"where the \\ro(%u__i_, %v__i_) are the correlations between the "
606 "@@canonical variate@s %u__i_ and %v__i_ and the %y__%ij_'s and %x__%ij_'s are"
607 " the ##canonical coefficients# for the dependent and the independent "
608 "variates, respectively.")
609 ENTRY (U"2. How to perform a canonical correlation analysis")
610 NORMAL (U"Select the TableOfReal and choose from the dynamic menu the option "
611 "@@TableOfReal: To CCA...|To CCA...@. This command is available in the "
612 "\"Multivariate statistics\" action button. We fill out the form and supply "
613 "3 for %%Dimension of dependent variate%. The resulting CCA object will bear "
614 "the same name as the TableOfReal object. The following script summarizes:")
615 CODE (U"selectObject: pols50m")
616 CODE (U"cca = To CCA: 3")
617 ENTRY (U"3. How to get the canonical correlation coefficients")
618 NORMAL (U"You can get the canonical correlation coefficients by querying the CCA "
619 "object. You will find that the three canonical correlation coefficients, "
620 "\\ro(%u__1_, %v__1_), \\ro(%u__2_, %v__2_) and \\ro(%u__3_, %v__3_) are "
621 " approximately 0.86, 0.53 and 0.07, respectively. "
622 "The following script summarizes:")
623 CODE (U"cc1 = Get correlation: 1")
624 CODE (U"cc2 = Get correlation: 2")
625 CODE (U"cc3 = Get correlation: 3")
626 CODE (U"writeInfoLine: \"cc1 = \", cc1, \", cc2 = \", cc2, \", cc3 = \", cc3")
627 ENTRY (U"4. How to obtain canonical scores")
628 NORMAL (U"Canonical #scores, also named @@canonical variate@s, are the linear combinations:")
629 EQUATION (U"%u__%i_ = %y__%i1_%F__1_+%y__%i2_%F__2_ + %y__%i3_%F__3_, and,")
630 EQUATION (U"%v__%i_ = %x__%i1_%L__1_+%x__%i2_%L__2_ + %x__%i3_%L__3_,")
631 NORMAL (U"where the index %i runs from 1 to the number of correlation coefficients.")
632 NORMAL (U"You can get the canonical scores by selecting a CCA object together with "
633 "the TableOfReal object and choose "
634 "@@CCA & TableOfReal: To TableOfReal (scores)...|To TableOfReal (scores)...@")
635 NORMAL (U"When we now calculate the ##Correlation# matrix of these canonical variates we "
636 "get the following table:")
637 CODE (U" u1 u2 u3 v1 v2 v3")
638 CODE (U"u1 1 . . 0.860 . .")
639 CODE (U"u2 . 1 . . 0.531 .")
640 CODE (U"u3 . . 1 . . 0.070")
641 CODE (U"v1 0.860 . . 1 . .")
642 CODE (U"v2 . 0.531 . . 1 .")
643 CODE (U"v3 . . 0.070 . . 1")
644 NORMAL (U"The scores with a dot are zero to numerical precision. In this table the "
645 "only correlations that differ from zero are the canonical correlations. "
646 "The following script summarizes:")
647 CODE (U"selectObject: cca, pols50m")
648 CODE (U"To TableOfReal (scores): 3")
649 CODE (U"To Correlation")
650 CODE (U"Draw as numbers if: 1, 0, \"decimal\", 2, ~ abs(self) > 1e-14")
651 ENTRY (U"5. How to predict one dataset from the other")
652 NORMAL (U"@@CCA & TableOfReal: Predict...@")
653 NORMAL (U"Additional information can be found in @@Weenink (2003)@.")
654 MAN_END
655
656 MAN_BEGIN (U"CCA & TableOfReal: Predict...", U"djmw", 20020503)
657 INTRO (U"")
658 MAN_END
659
660 MAN_BEGIN (U"Chebyshev polynomials", U"djmw", 19990620)
661 INTRO (U"The Chebyshev polynomials %T__%n_(%x) of degree %n are special orthogonal polynomial functions "
662 "defined on the domain [-1, 1].")
663 NORMAL (U"Orthogonality:")
664 EQUATION (U"__-1_\\in^^1^ %W(%x) %T__%i_(%x) %T__%j_(%x) %dx = \\de__%ij_")
665 EQUATION (U"%W(%x) = (1 \\-- %x^^2^)^^\\--1/2^ (-1 < x < 1)")
666 NORMAL (U"They obey certain recurrence relations:")
667 EQUATION (U"%T__%n_(%x) = 2 %x %T__%n-1_(%x) \\-- %T__%n-2_(%x)")
668 EQUATION (U"%T__0_(%x) = 1")
669 EQUATION (U"%T__1_(%x) = %x")
670 MAN_END
671
672 MAN_BEGIN (U"ChebyshevSeries", U"djmw", 19990620)
673 INTRO (U"One of the @@types of objects@ in Praat.")
674 NORMAL (U"An object of type ChebyshevSeries represents a linear combination of @@Chebyshev polynomials@ "
675 "%T__%k_(%x).")
676 EQUATION (U"ChebyshevSeries (%x) = \\Si__%k=1..%numberOfCoefficients_ %c__%k_ %T__%k_(%x)")
677 MAN_END
678
679 MAN_BEGIN (U"ChebyshevSeries: To Polynomial", U"djmw", 19990620)
680 INTRO (U"A command to transform the selected @ChebyshevSeries object into a @@Polynomial@ object.")
681 NORMAL (U"We find polynomial coefficients %c__%k_ such that")
682 EQUATION (U"\\Si__%k=1..%numberOfCoefficients_ %c__%k_ %x^^%k^ = \\Si__%k=1.."
683 "%numberOfCoefficients_ %l__%k_ %T__%k_(%x)")
684 NORMAL (U"We use the recurrence relation for @@Chebyshev polynomials@ to calculate these coefficients.")
685 MAN_END
686
687 MAN_BEGIN (U"ClassificationTable: To Confusion...", U"djmw", 20141030)
688 INTRO (U"A command to create a @Confusion object from the selected @ClassificationTable object.")
689 ENTRY (U"Settings")
690 TERM (U"##Only class labels#")
691 DEFINITION (U"defines whether the class labels from the ClassificationTable object will be used not only as response labels but also as stimulus labels. If checked the resulting Confusion will always have equal stimulus and response labels. If not checked the stimulus labels will be determined from the row labels of the ClassificationTable object. ")
692 ENTRY (U"Behaviour")
693 NORMAL (U"In obtaining a Confusion object from a ClassificationTable we explicitly use its row labels as stimulus labels.")
694 MAN_END
695
696 MAN_BEGIN (U"ClassificationTable", U"djmw", 19990525)
697 INTRO (U"One of the @@types of objects@ in Praat.")
698 NORMAL (U"An object of type ClassificationTable represents the result of a classification experiment. "
699 "The numbers in a row show how well a particular input matches the classes represented by the "
700 "column labels. The higher the number the better the match.")
701 MAN_END
702
703 MAN_BEGIN (U"concentration ellipse", U"djmw", 20071113)
704 INTRO (U"The percentage of bivariate normally distributed data covered by an ellipse "
705 "whose axes have a length of %numberOfSigmas \\.c %\\si can be obtained by integration of the probability distribution function "
706 "over an elliptical area. This results in the following equation, as can be "
707 "verified from equation 26.3.21 in @@Abramowitz & Stegun (1970)@:")
708 EQUATION (U"%percentage = (1 - exp (-%numberOfSigmas^^2^/2)) \\.c 100\\% ,")
709 NORMAL (U"where the %numberOfSigmas is the radius of the \"ellipse\":")
710 EQUATION (U"(%x/%\\si__x_)^2 + (%y/%\\si__y_)^2 = %numberOfSigmas^2.")
711 NORMAL (U"The %numberOfSigmas=1 ellipse covers 39.3\\% of the data, "
712 "the %numberOfSigmas=2 ellipse 86.5\\% , and "
713 "the %numberOfSigmas=3 ellipse 98.9\\% .")
714 NORMAL (U"From the formula above we can show that if we want to cover %p percent of the data, we have to "
715 "choose %numberOfSigmas as:")
716 EQUATION (U"%numberOfSigmas = \\Vr(-2 ln(1-%p/100)).")
717 NORMAL (U"For covering 95\\% of the data we calculate %numberOfSigmas = 2.45.")
718 MAN_END
719
720 MAN_BEGIN (U"confidence interval", U"djmw", 20151109)
721 INTRO (U"The confidence interval gives an estimated range of values which "
722 "is likely to include a true but unknown population parameter. "
723 "The estimated range is calculated from a given set of observations.")
724 ENTRY (U"Examples")
725 NORMAL (U"At the %\\al level of significance, a two-sided confidence interval "
726 "for the true mean %\\mu for normally distributed data with %observed mean %m and "
727 "%true standard deviation %\\si can be constructed as:")
728 EQUATION (U"%%mean% - %z__\\al/2_ %\\si / \\Vr%N \\<_ %\\mu \\<_ "
729 "%%mean% + %z__%\\al/2_ %\\si / \\Vr%N,")
730 NORMAL (U"where %z__%\\al/2_ = invGaussQ (%\\al/2) and %N is the number of observations.")
731 NORMAL (U"If the standard deviation is %not known, we have to estimate its value (%s) "
732 "from the data and the formula above becomes:")
733 EQUATION (U"%%mean% - %t__%%\\al/2;N%_ %s / \\Vr%N \\<_ %\\mu \\<_ "
734 "%%mean% + %t__%\\al/2;%N_ %s / \\Vr%N,")
735 NORMAL (U"where %t__%\\al/2;%N_ = invStudentQ (%\\al/2, %N-1).")
736 NORMAL (U"For %\\al=0.05 and %N=20 we get %z__0.025_=1.96 and %t__0.025;20_=2.093. "
737 "This shows that for a fixed value of the standard deviation the confidence interval will always be wider if we had to estimate the standard deviation's value from the data instead of its value being known beforehand.")
738 MAN_END
739
740 MAN_BEGIN (U"confidence level", U"djmw", 20011105)
741 NORMAL (U"The confidence level is the probability value 1-\\al associated "
742 "with a @@confidence interval@, where \\al is the level of significance. "
743 "It can also be expressed as a percentage 100(1-\\al)\\% and is then "
744 "sometimes called the %%confidence coefficient%.")
745 MAN_END
746
747 MAN_BEGIN (U"Confusion", U"djmw", 20110517)
748 INTRO (U"One of the @@types of objects@ in Praat.")
749 NORMAL (U"An object of type Confusions represents a confusion matrix, with "
750 "stimuli as row labels and responses as column labels. The entry at "
751 "position [%i] [%j] represents the number of times response %j "
752 "was given to the stimulus %i.")
753 ENTRY (U"Creating a Confusion from data in a text file")
754 NORMAL (U"Suppose you have two objects A and B. "
755 "In one way or another, you have acquired the following "
756 "confusions: %\\de__%AA_ = 6, %\\de__%AB_ = 2 , %\\de__%BA_ = 1, "
757 "and %\\de__%BB_ = 7.")
758 NORMAL (U"You can create a simple text file like the following:")
759 CODE (U"\"ooTextFile\" ! to make Praat recognize your file")
760 CODE (U"\"Confusion\" ! The line that tells Praat about the contents")
761 CODE (U"2 \"A\" \"B\" ! Number of columns, and column labels")
762 CODE (U"2 ! Number of rows")
763 CODE (U"\"A\" 6 2 ! Row label A, A-A value, A-B value")
764 CODE (U"\"B\" 1 7 ! Row label B, B-A value, B-B value")
765 NORMAL (U"This text file can be read with the @@Read from file...@ command. ")
766 ENTRY (U"Commands")
767 NORMAL (U"Creation:")
768 LIST_ITEM (U"\\bu @@Categories: To Confusion")
769 LIST_ITEM (U"\\bu @@Create simple Confusion...")
770 NORMAL (U"Drawing")
771 LIST_ITEM (U"\\bu ##Draw as numbers...")
772 LIST_ITEM (U"\\bu ##Draw as squares...")
773 NORMAL (U"Query")
774 LIST_ITEM (U"\\bu @@Confusion: Get fraction correct|Get fraction correct")
775 LIST_ITEM (U"\\bu @@Confusion: Get stimulus sum...")
776 LIST_ITEM (U"\\bu @@Confusion: Get response sum...")
777 LIST_ITEM (U"\\bu ##Get grand sum")
778 NORMAL (U"Modification")
779 LIST_ITEM (U"\\bu ##Formula...")
780 LIST_ITEM (U"\\bu @@Confusion: Increase...")
781 NORMAL (U"Grouping")
782 LIST_ITEM (U"\\bu @@Confusion: Group stimuli...@")
783 LIST_ITEM (U"\\bu @@Confusion: Group responses...@")
784 NORMAL (U"Analysis:")
785 LIST_ITEM (U"\\bu @@Confusion: To Similarity...@")
786 LIST_ITEM (U"\\bu @@Confusion: To Dissimilarity (pdf)...@")
787 ENTRY (U"Inside a Confusion")
788 NORMAL (U"With @Inspect you will see the following attributes:")
789 TERM (U"%numberOfRows")
790 DEFINITION (U"the number of stimuli.")
791 TERM (U"%numberOfColumns")
792 DEFINITION (U"the number of responses.")
793 TERM (U"%rowLabels")
794 DEFINITION (U"the names of the stimuli.")
795 TERM (U"columnLabels")
796 DEFINITION (U"the names of the responses.")
797 MAN_END
798
799 MAN_BEGIN (U"Create simple Confusion...", U"djmw", 20140117)
800 INTRO (U"Creates a square @@Confusion|confusion matrix@ with equal stimulus labels and response labels.")
801 ENTRY (U"Example")
802 NORMAL (U"The command ##Create simple Confusion: \"simple\", \"u i a\"# results in the following Confusion:")
803 CODE (U" u i a ! The response labels")
804 CODE (U"u 0 0 0 ! Responses on stimulus u,")
805 CODE (U"i 0 0 0 ! Responses on stimulus i")
806 CODE (U"a 0 0 0 ! Responses on stimulus a")
807 MAN_END
808
809 MAN_BEGIN (U"Confusion: Increase...", U"djmw", 20140117)
810 INTRO (U"Increases the contents of the corresponding cell in the selected @@Confusion@ by one.")
811 ENTRY (U"Settings")
812 TERM (U"##Stimulus# and ##Response#")
813 DEFINITION (U"define the cell whose value will be increased by one.")
814 ENTRY (U"Example")
815 NORMAL (U"Given the following Confusion:")
816 CODE (U" u i a ! The response labels")
817 CODE (U" u 6 2 1 ! Responses on stimulus u,")
818 CODE (U" i 3 4 2 ! Responses on stimulus i")
819 CODE (U" a 1 4 4 ! Responses on stimulus a")
820 NORMAL (U"The command ##Increase: \"u\", \"i\"# results in:")
821 CODE (U" u i a ! The responses")
822 CODE (U" u 6 3 1 ! Responses on stimulus u,")
823 CODE (U" i 3 4 2 ! Responses on stimulus i")
824 CODE (U" a 1 4 4 ! Responses on stimulus a")
825 MAN_END
826
827 MAN_BEGIN (U"Confusion: Group...", U"djmw", 20140117)
828 INTRO (U"Groups a number of stimuli and responses into one new category.")
829 ENTRY (U"Settings")
830 TERM (U"##Stimuli & Responses")
831 DEFINITION (U"defines the labels that will be grouped.")
832 TERM (U"##New label")
833 DEFINITION (U"defines the new label for the grouped labels.")
834 TERM (U"##New label position")
835 DEFINITION (U"the row/column number for the new group label.")
836 ENTRY (U"Example")
837 NORMAL (U"Given the following selected Confusion:")
838 CODE (U" u i a ! The response labels")
839 CODE (U" u 6 2 1 ! Responses on stimulus `u`")
840 CODE (U" i 3 4 2 ! Responses on stimulus `i`")
841 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
842 NORMAL (U"After the command ##Group stimuli: \"u i\", \"high\", 0#, the new Confusion will be:")
843 CODE (U" high a ! The new response labels")
844 CODE (U" high 15 3 ! Responses on group `high`")
845 CODE (U" a 5 4 ! Responses on stimulus `a`")
846 NORMAL (U"Instead after the command ##Group stimuli: \"u i\", \"high\", 2#, the new Confusion will be:")
847 CODE (U" a high ! The new response labels")
848 CODE (U" a 4 5 ! Responses on stimulus `a`")
849 CODE (U" high 3 15 ! Responses on group `high`")
850 MAN_END
851
852 MAN_BEGIN (U"Confusion: Group stimuli...", U"djmw", 20140117)
853 INTRO (U"Groups a number of stimuli into one new category.")
854 ENTRY (U"Settings")
855 TERM (U"##Stimuli")
856 DEFINITION (U"defines the stimuli that will be grouped.")
857 TERM (U"##New label")
858 DEFINITION (U"defines the new label for the grouped stimuli.")
859 TERM (U"##New label position")
860 DEFINITION (U"the row number for the new group label.")
861 ENTRY (U"Example")
862 NORMAL (U"Given the following selected Confusion:")
863 CODE (U" u i a ! The response labels")
864 CODE (U" u 6 2 1 ! Responses on stimulus `u`")
865 CODE (U" i 3 4 2 ! Responses on stimulus `i`")
866 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
867 NORMAL (U"After the command ##Group stimuli: \"u i\", \"high\", 1#, the new Confusion will be:")
868 CODE (U" u i a ! The response labels")
869 CODE (U" high 9 6 3 ! Responses on stimulus group `high`")
870 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
871 MAN_END
872
873 MAN_BEGIN (U"Confusion: Group responses...", U"djmw", 20140117)
874 INTRO (U"Groups a number of responses into one new category.")
875 ENTRY (U"Settings")
876 TERM (U"##Responses")
877 DEFINITION (U"defines the responses that will be grouped.")
878 TERM (U"##New label")
879 DEFINITION (U"defines the new label for the grouped responses.")
880 TERM (U"##New label position")
881 DEFINITION (U"the column number for the new group label.")
882 ENTRY (U"Example")
883 NORMAL (U"Given the following selected Confusion:")
884 CODE (U" u i a ! The response labels")
885 CODE (U" u 6 2 1 ! Responses on stimulus `u`")
886 CODE (U" i 3 4 2 ! Responses on stimulus `i`")
887 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
888 NORMAL (U"After the command ##Group responses: \"a i\", \"front\", 1#, the new Confusion will be:")
889 CODE (U" front i ! The new response labels")
890 CODE (U" u 7 2 ! Responses on stimulus `u`")
891 CODE (U" i 5 4 ! Responses on stimulus `i`")
892 CODE (U" a 5 4 ! Responses on stimulus `a`")
893 MAN_END
894
895 MAN_BEGIN (U"Confusion: Get stimulus sum...", U"djmw", 20140117)
896 INTRO (U"Returns the number of responses for the chosen stimulus (the sum of all the numbers in the row with this stimulus label). ")
897 ENTRY (U"Example")
898 NORMAL (U"Given the following selected Confusion:")
899 CODE (U" u i a ! The response labels")
900 CODE (U" u 6 2 1 ! Responses on stimulus `u`")
901 CODE (U" i 3 4 2 ! Responses on stimulus `i`")
902 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
903 NORMAL (U"The command ##Get stimulus sum: \"a\"# will return the number 9.")
904 MAN_END
905
906 MAN_BEGIN (U"Confusion: Get response sum...", U"djmw", 20140117)
907 INTRO (U"Returns the number of times the chosen response was given (the sum of all the numbers in the column with this response label).")
908 ENTRY (U"Example")
909 NORMAL (U"Given the following selected Confusion:")
910 CODE (U" u i a ! The response labelss")
911 CODE (U" u 6 2 1 ! Responses on stimulus `u`")
912 CODE (U" i 3 4 2 ! Responses on stimulus `i`")
913 CODE (U" a 1 4 4 ! Responses on stimulus `a`")
914 NORMAL (U"The command ##Get response sum: \"a\"# will return the number 7.")
915 MAN_END
916
917 MAN_BEGIN (U"Confusion: Condense...", U"djmw", 20130410)
918 INTRO (U"Groups row and column labels of the selected @Confusion object in "
919 "order to reduce its dimension. ")
920 ENTRY (U"Settings")
921 TERM (U"##Search")
922 DEFINITION (U"the pattern to match.")
923 TERM (U"##Replace")
924 DEFINITION (U"the pattern that replaces the match(es).")
925 TERM (U"##Replace limit")
926 DEFINITION (U"limits the maximum number of times that a match/replace cycle "
927 "may occur within each label.")
928 TERM (U"##Search and replace are")
929 DEFINITION (U"defines whether the search and replace strings are taken "
930 "literally or as a @@Regular expressions|regular expression@.")
931 ENTRY (U"Behaviour")
932 NORMAL (U"First all row and column labels are changed according to the search "
933 "and replace specification. Next all rows or columns that have the same "
934 "labels are summed. ")
935 MAN_END
936
937 MAN_BEGIN (U"Confusion: Get fraction correct", U"djmw", 20000225)
938 INTRO (U"A @@Query submenu|query@ to ask the selected @Confusion matrix for the fraction of "
939 "correct classifications.")
940 NORMAL (U"The \"fraction correct\" is defined as the quotient of the number "
941 "of correct classifications and the sum of the entries in the matrix.")
942 NORMAL (U"Correct classifications have identical row and column labels.")
943 MAN_END
944
945 MAN_BEGIN (U"Confusion & ClassificationTable: Increase confusion count", U"djmw", 20230801)
946 INTRO (U"Increases the contents of cell(s) in the selected @@Confusion@. The cells to increase are determined by the selected "
947 "@ClassificationTable.")
948 ENTRY (U"Behaviour")
949 NORMAL (U"For each row in the ClassificationTable object the contents of one cell in the Confusion we be increased by one. "
950 "This cell is determined as follows: we start by finding the label of the column which the largest number in it. "
951 "This label is defined as the ##response label#. We use the corresponding row label as the ##stimulus label#. The content "
952 "of the cell in the Confusion object whose row and column are labeled with ##stimulus label# and ##response label#, "
953 "respectively, is increased by one.")
954 MAN_END
955
956 MAN_BEGIN (U"Confusion: To TableOfReal (marginals)", U"djmw", 20011031)
957 INTRO (U"A new @TableOfReal object is created from the selected @Confusion "
958 "object with one extra row and column. ")
959 NORMAL (U"The first element of the extra row will contain the sum of the "
960 "confusions in the the first %column, the first element of the extra "
961 "column will contain the sum of the confusions in the the first %row, "
962 "etc... The bottom-right element will contain the sum of all confusions.")
963 MAN_END
964
965 MAN_BEGIN (U"Correlation", U"djmw", 19990105)
966 INTRO (U"One of the @@types of objects@ in Praat.")
967 NORMAL (U"An object of type Correlation represents the correlation coefficients "
968 "of a multivariate data set.")
969 MAN_END
970
971 MAN_BEGIN (U"Correlation: Confidence intervals...", U"djmw", 20040407)
972 INTRO (U"Calculates @@confidence interval@s for the correlation coefficients "
973 "from the selected @Correlation object(s) and saves these intervals in a "
974 "new @TableOfReal object.")
975 ENTRY (U"Settings")
976 TERM (U"##Confidence level")
977 DEFINITION (U"the @@confidence level@ you want for the confidence intervals.")
978 TERM (U"##Number of tests")
979 DEFINITION (U"determines the @@Bonferroni correction@ for the significance "
980 "level. If the default value (zero) is chosen, it will be set equal "
981 "to the number of correlations involved (a matrix of dimension %n "
982 "has %n\\.c(%n-1)/2 correlations).")
983 TERM (U"##Approximation")
984 DEFINITION (U"defines the approximation that will be used to calculate the "
985 "confidence intervals. It is either Fisher's z transformation or Ruben's "
986 "transformation. According to @@Boomsma (1977)@, Ruben's approximation is "
987 "more accurate than Fisher's.")
988 ENTRY (U"Algorithm")
989 NORMAL (U"We obtain intervals by the large-sample conservative multiple tests "
990 "with Bonferroni inequality and the Fisher or Ruben transformation. "
991 "We put the upper values of the confidence intervals in the upper "
992 "triangular part of the matrix and the lower values of the confidence "
993 "intervals in lower triangular part of the resulting TableOfReal object.")
994 NORMAL (U"In %%Fisher's approximation%, for each element %r__%ij_ of the "
995 "correlation matrix the confidence interval is:")
996 EQUATION (U"#[ tanh (%z__%ij_ - %z__%\\al\\'p_ / \\Vr(%N - 3)) , "
997 "tanh (%z__%ij_ + %z__%\\al\\'p_ / \\Vr(%N - 3)) #],")
998 NORMAL (U"where %z__%ij_ is the Fisher z-transform of the correlation %r__%ij_:")
999 EQUATION (U"%z__%ij_ = 1/2 ln ((1 + %r__%ij_) / (1 - %r__%ij_)), ")
1000 NORMAL (U"%z__%\\al\\'p_ the Bonferroni corrected %z-value "
1001 "%z__%\\al/(2\\.c%numberOfTests)_, ")
1002 EQUATION (U"%\\al = 1 - %confidenceLevel,")
1003 NORMAL (U"and %N the number of observations that the correlation matrix is "
1004 "based on.")
1005 NORMAL (U"In %%Ruben's approximation% the confidence interval for element %r__%ij_ "
1006 "is:")
1007 EQUATION (U"#[ %x__1_ / \\Vr(1 - %x__1_^2), %x__2_ / \\Vr(1 - %x__2_^2) #]")
1008 NORMAL (U"in which %x__1_ and %x__2_ are the smallest and the largest root from")
1009 EQUATION (U"%a %x^^2^ + %b %x + %c = 0, with")
1010 EQUATION (U"%a = 2%N - 3 - %z__%\\al\\'p_^^2^")
1011 EQUATION (U"%b = - 2 %r\\'p \\Vr((2%N - 3)(2%N - 5))")
1012 EQUATION (U"%c = (2%N - 5 - %z__%\\al\\'p_^^2^) %r\\'p^^2^ - 2%z__%\\al\\'p_^^2^, and")
1013 EQUATION (U"%r\\'p = %r__%ij_ / \\Vr(1 - %r__%ij_^2),")
1014 MAN_END
1015
1016 MAN_BEGIN (U"Covariance", U"djmw", 19990105)
1017 INTRO (U"One of the @@types of objects@ in Praat.")
1018 NORMAL (U"An object of type Covariance represents the sums of squares and cross "
1019 "products of a multivariate data set divided by the number of observations.")
1020 NORMAL (U"An object of type Covariance contains the same attributes as an object of "
1021 "type @SSCP.")
1022 NORMAL (U"Since an object of type Covariance contains the mean values (the "
1023 "centroids), the covariances as well as the number of observations it has "
1024 "all the information necessary to be the subject of all kinds of statistical "
1025 "tests on means and variances.")
1026 MAN_END
1027
1028 MAN_BEGIN (U"Create simple Correlation...", U"djmw", 20151230)
1029 INTRO (U"Create a @@Correlation@ matrix with its centroid.")
1030 ENTRY (U"Settings")
1031 TERM (U"##Correlations")
1032 DEFINITION (U"define the correlations. Because a correlation matrix is a symmetric matrix, only the upper triangular "
1033 "part of the matrix needs to be input (row-wise). If your correlation matrix is "
1034 "of dimension %d, your input needs %d(%d+1)/2 elements. The first %d input elements are the elements of the first "
1035 "row of the correaltion matrix, the next %d-1 input elements are for the second row, then %d-2 for the third row, etc.")
1036 TERM (U"##Centroid")
1037 DEFINITION (U"defines the centroid. ")
1038 TERM (U"##Number of observations")
1039 DEFINITION (U"defines the number of observations.")
1040 MAN_END
1041
1042 MAN_BEGIN (U"Create simple Covariance...", U"djmw", 20101125)
1043 INTRO (U"Create a @@Covariance@ matrix with its centroid.")
1044 ENTRY (U"Settings")
1045 TERM (U"##Covariances")
1046 DEFINITION (U"define the covariances. Because a covariance matrix is a symmetric matrix, only the upper triangular "
1047 "part of the matrix needs to be input (row-wise). If your covariance matrix is "
1048 "of dimension %d, your input needs %d(%d+1)/2 elements. The first %d input elements are the elements of the first "
1049 "row of the covariance matrix, the next %d-1 input elements are for the second row, then %d-2 for the third row, etc.")
1050 TERM (U"##Centroid")
1051 DEFINITION (U"defines the centroid. ")
1052 TERM (U"##Number of observations")
1053 DEFINITION (U"defines the number of observations. ")
1054 MAN_END
1055
1056 MAN_BEGIN (U"Covariance: Set value...", U"djmw", 20101124)
1057 INTRO (U"Input @@Covariance@ matrix cell values.")
1058 ENTRY (U"Constraints on input values")
1059 TERM (U"A covariance matrix is a %%symmetric% matrix: values input at cell [%i,%j] will be automatically input at "
1060 "cell [%j,%i] too.")
1061 TERM (U"All values on the diagonal should be positive numbers.")
1062 TERM (U"The absolute value of an off-diagonal element at cell [%i,%j] should be smaller than the corresponding diagonal "
1063 "elements at cells [%i,%i] and [%j,%j].")
1064 MAN_END
1065
1066 MAN_BEGIN (U"Covariance: Difference", U"djmw", 20090624)
1067 INTRO (U"You can choose this command after selecting two objects of type @Covariance. ")
1068 NORMAL (U"We test the hypothesis that the samples that gave rise to the two "
1069 "covariance matrices #%M__1_ and #%M__2_, have equal covariances. "
1070 "The test statistic is %L\\'p which is distributed as "
1071 "a \\ci^2 variate with %p(%p+1)/2 degrees of freedom.")
1072 EQUATION (U"%L\\'p = %L \\.c (1 \\-- (2%p + 1 \\-- 2 / (%p + 1)) / (6 \\.c ( %N \\-- 1))),")
1073 NORMAL (U"where, ")
1074 EQUATION (U"%L = (%N \\-- 1) \\.c (ln determinant (#%M__1_) \\-- ln determinant "
1075 "(#%M__2_)) + trace (#%M__2_ \\.c #%M__1_^^\\--1^) \\-- %p), ")
1076 NORMAL (U"%p is dimension of covariance matrix and "
1077 "%N is the number of observations underlying the covariance matrix. ")
1078 NORMAL (U"For more details on this test, see e.g. page 292 of @@Morrison (1990)@.")
1079 MAN_END
1080
1081 MAN_BEGIN (U"Covariance: Get significance of one mean...", U"djmw", 20040407)
1082 INTRO (U"Gets the level of significance for one mean from the selected "
1083 "@Covariance object being different from a hypothesized mean.")
1084 ENTRY (U"Settings")
1085 TERM (U"##Index")
1086 DEFINITION (U"the position of the element in the means vector (centroid) that "
1087 "you want to test. ")
1088 TERM (U"##Value")
1089 DEFINITION (U"the hypothesized mean %\\mu (see below).")
1090 ENTRY (U"Behaviour")
1091 NORMAL (U"This is the standard test on means when the variance is unknown. "
1092 "The test statistic is")
1093 EQUATION (U"%t = (%mean - %\\mu) \\Vr%(N / %s^2),")
1094 NORMAL (U"which has the Student %t distribution with %ndf = %N-1 degrees of freedom.")
1095 NORMAL (U"In the formulas above, %mean is the element of the mean vector at "
1096 "position %index, %\\mu is the hypothesized mean, "
1097 "%N is the number of observations, %s^2 "
1098 "is the variance at position [%index] [%index] in the covariance matrix.")
1099 NORMAL (U"The returned probability %p is the %%two-sided% probability")
1100 EQUATION (U"%p = 2 * studentQ (%t, %ndf)")
1101 NORMAL (U"A low probability %p means that the difference is significant.")
1102 MAN_END
1103
1104 MAN_BEGIN (U"Covariance: Get fraction variance...", U"djmw", 20040407)
1105 INTRO (U"A command to ask the selected @Covariance object for the fraction "
1106 "of the total variance that is accounted for by the selected dimension(s).")
1107 ENTRY (U"Settings")
1108 TERM (U"##From dimension#, ##To dimension#")
1109 DEFINITION (U"define the range of components. By choosing both numbers equal, "
1110 "you get the fraction of the variance \"explained\" by that dimension.")
1111 ENTRY (U"Details")
1112 NORMAL (U"The total variance is the sum of the diagonal elements of the covariance "
1113 "matrix #C, i.e., its trace. "
1114 "The fraction is defined as:")
1115 EQUATION (U"\\Si__%i=%from..%to_ %%C__ii_% / \\Si__%i=1..%numberOfRows_ %%C__ii_%")
1116 MAN_END
1117
1118 MAN_BEGIN (U"Covariance: Get significance of means difference...", U"djmw", 20160102)
1119 INTRO (U"Gets the level of significance for the %difference of two means "
1120 "from the selected @Covariance object being different from a hypothesized "
1121 "value.")
1122 ENTRY (U"Settings")
1123 TERM (U"##Index1#, ##Index2#")
1124 DEFINITION (U"the positions of the two elements of the means vector whose "
1125 "difference is compared to the hypothesized difference.")
1126 TERM (U"##Value")
1127 DEFINITION (U"the hypothesized difference (%\\mu).")
1128 TERM (U"##Paired")
1129 DEFINITION (U"determines whether we treat the two means as being dependent. ")
1130 TERM (U"##Equal variances")
1131 DEFINITION (U"determines whether the distribution of the difference of the means "
1132 "is a Student t-distribution (see below).")
1133 ENTRY (U"Behaviour")
1134 NORMAL (U"This is Student's t-test for the significance of a difference of means. "
1135 "The test statistic is:")
1136 EQUATION (U"%t = (%x\\-^__1_ - %x\\-^__2_ - %\\mu) \\Vr (%N / %s^2) with %ndf "
1137 "degrees of freedom.")
1138 NORMAL (U"In the formula above %x\\-^__1_ and %x\\-^__2_ are the elements of the "
1139 "means vector, %\\mu is the hypothesized difference and %N is the number of "
1140 "observations. The value that we use for the (combined) variance %s^2 is:")
1141 EQUATION (U"%s^2 = %var__1_ + %var__2_ - 2 * %covar__12_,")
1142 NORMAL (U"when the samples are %paired, and ")
1143 EQUATION (U"%s^2 = %var__1_ + %var__2_ ")
1144 NORMAL (U"when they are not.")
1145 NORMAL (U"The %var__1_ and %var__2_ are the variance components for "
1146 "%x\\-^__1_ and %x\\-^__2_, respectively, and %covar__12_ is their covariance."
1147 " When we have %%paired samples% we assume that the two variances are "
1148 "not independent and their covariance is subtracted, otherwise their "
1149 "covariance is not taken into account. Degrees of freedom parameter %ndf "
1150 "usually equals 2(%N-1). ")
1151 NORMAL (U"If the two variances are significantly different, the statistic %t "
1152 "above is only %approximately distributed as Student's %t with "
1153 "degrees of freedom equal to:")
1154 EQUATION (U"%ndf = (%N-1) \\.c (%var__1_ + %var__2_)^2 / (%var__1_^2 + "
1155 "%var__2_^2).")
1156 NORMAL (U"The returned probability %p will be the %%two-sided% probability")
1157 EQUATION (U"%p = 2 * studentQ (%t, %ndf)")
1158 NORMAL (U"A low probability %p means that the difference is significant.")
1159 MAN_END
1160
1161 MAN_BEGIN (U"Covariance: Get significance of one variance...", U"djmw", 20160102)
1162 INTRO (U"Gets the probability for one variance from the selected "
1163 "@Covariance object being different from a hypothesized variance.")
1164 ENTRY (U"Settings")
1165 TERM (U"##Index")
1166 DEFINITION (U"the position of the variance element %s^2.")
1167 TERM (U"##Value")
1168 DEFINITION (U"the hypothesized variance %\\si^2")
1169 ENTRY (U"Behaviour")
1170 NORMAL (U"The test statistic")
1171 EQUATION (U"%\\ci^2 = (%N-1)%s^2 / %\\si^2,")
1172 NORMAL (U"is distributed as a chi-squared variate with %ndf = %N-1 degrees of freedom.")
1173 NORMAL (U"The returned probability %p will be ")
1174 EQUATION (U"%p = chiSquareQ (%\\ci^2, %ndf)")
1175 MAN_END
1176
1177 MAN_BEGIN (U"Covariance: Get significance of variance ratio...", U"djmw", 20040407)
1178 INTRO (U"Gets the probability for the ratio of two variances "
1179 "from the selected @Covariance object being different from a hypothesized "
1180 "ratio.")
1181 ENTRY (U"Settings")
1182 TERM (U"##Index1#, ##Index2#")
1183 DEFINITION (U"determine the variances.")
1184 TERM (U"##Hypothesized ratio")
1185 DEFINITION (U"the hypothesized ratio %F.")
1186 ENTRY (U"Behaviour")
1187 NORMAL (U"The test statistic")
1188 EQUATION (U"%f = %s__1_^2 / %s__2_^2 / %ratio")
1189 NORMAL (U"is distributed as Fisher's F distribution with %ndf__1_ = %N-1 and "
1190 "%ndf__2_ = %N-1 degrees of freedom for the numerator and denominator terms, "
1191 "respectively.")
1192 NORMAL (U"The returned probability %p will be the %%two-sided% probability")
1193 EQUATION (U"%p = 2 * fisherQ (%f, %ndf__1_, %ndf__2_)")
1194 NORMAL (U"If %s__2_^2 > %s__1_^2 we use 1/%f to determine the probability.")
1195 MAN_END
1196
1197 MAN_BEGIN (U"Covariances: Report multivariate mean difference...", U"djmw", 20090627)
1198 INTRO (U"Reports the probability that the two multivariate means of the selected @@Covariance@s are equal.")
1199 ENTRY (U"Settings")
1200 TERM (U"##Covariances are equal")
1201 DEFINITION (U"determines whether the test is performed as if the two covariance matrices are equal or not.")
1202 ENTRY (U"Algorithm")
1203 NORMAL (U"For equal covariance matrices the test is via Hotelling's T^^2^ as described in @@Morrison (1990)|Morrison (1990,@ page 141). "
1204 "The test statistic is %F = (%N__1_+%N__2_-%p-1)/((%N__1_+%N__2_-2)%p)\\.c T^^2^, with %p and %N__1_+%N__2_-%p-1 degrees of freedom.")
1205 NORMAL (U"If the covariance matrices are not equal, we apply a correction on the number of degrees of freedom as "
1206 "proposed by @@Krishnamoorthy & Yu (2004)@. The test statistic in this case is %F = (\\nu-%p+1)/(%p\\nu)\\.c T^^2^, "
1207 "with %p and \\nu degrees of freedom. Here \\nu is a corrected number of degrees of freedom. ")
1208 NORMAL (U"(The test for unequal covariances simplifies to Welch's approximate solution for the univariate t-test with unequal variances.) ")
1209 MAN_END
1210
1211 MAN_BEGIN (U"Covariances: Report equality", U"djmw", 20090701)
1212 INTRO (U"Reports the probability that the selected @@Covariance@ matrices are equal.")
1213 NORMAL (U"We use the Bartlett test and the Wald test. According to @@Schott (2001)@, "
1214 "both tests are overly sensitive to violations of normality.")
1215 MAN_END
1216
1217 MAN_BEGIN (U"Covariance: To TableOfReal (random sampling)...", U"djmw", 20101101)
1218 INTRO (U"Generate a @TableOfReal object by random sampling from a multi-variate "
1219 "normal distribution whose @Covariance matrix is the selected object.")
1220 ENTRY (U"Setting")
1221 TERM (U"##Number of data points")
1222 DEFINITION (U"determines the number of data points that will be generated. Each "
1223 "data point occupies one row in the generated table.")
1224 ENTRY (U"Algorithm")
1225 NORMAL (U"The algorithm proceeds as follows:")
1226 LIST_ITEM (U"1. Diagonalize the covariance matrix: calculate the eigenvalues $v__%i_ and "
1227 "eigenvectors %#e__%i_ of the %m \\xx %m Covariance matrix. "
1228 "In general there will also be %m of these. Let #%E be the %m \\xx %m matrix "
1229 "with eigenvector %#e__%j_ in column %j (%j=1..%m).")
1230 LIST_ITEM (U"2. Generate a vector #x whose elements %x__%k_ equal %x__%k_ = "
1231 "randomGauss (0, \\Vr (%v__%k_)). "
1232 "Each %x__%k_ is a random deviate drawn from a Gaussian distribution with "
1233 "mean zero and standard deviation equal to the square root of the corresponding "
1234 "eigenvalue %v__%k_.")
1235 LIST_ITEM (U"3. Rotate back: calculate the vector #y = #%E #x, obtained by multiplying the vector "
1236 "#x with the matrix #%E.")
1237 LIST_ITEM (U"4. Add the centroid to #y and copy the elements of #y to the corresponding row of "
1238 "the TableOfReal object.")
1239 LIST_ITEM (U"5. Repeat steps 2, 3 and 4 until the desired number of data points "
1240 "has been reached.")
1241 LIST_ITEM (U"6. Copy the column labels from the Covariance object to the "
1242 "TableOfReal object.")
1243 NORMAL (U"In case the covariance matrix is diagonal, the algorithm is much simpler: we can skip "
1244 "the first and third step.")
1245 MAN_END
1246
1247 MAN_BEGIN (U"Covariance & TableOfReal: Extract quantile range...", U"djmw", 20040225)
1248 INTRO (U"Extract those rows from the selected @TableOfReal object whose @@Mahalanobis "
1249 "distance@, with respect to the selected @Covariance object, are within the "
1250 "quantile range.")
1251 MAN_END
1252
1253 MAN_BEGIN (U"Covariance & TableOfReal: To TableOfReal (mahalanobis)...", U"djmw", 20170828)
1254 INTRO (U"Calculate @@Mahalanobis distance@ for the selected @TableOfReal with respect to the "
1255 "selected @Covariance object.")
1256 ENTRY (U"Setting")
1257 TERM (U"##Use table centroid")
1258 DEFINITION (U"Use the mean vector calculated from the columns in the selected TableOfReal instead of the means in the selected Covariance.")
1259 ENTRY (U"Example")
1260 NORMAL (U"Count the number of items that are within 1, 2, 3, 4 and 5 standard deviations from the mean.")
1261 NORMAL (U"We first create a table with only one column and 10000 rows and fill it with numbers drawn from "
1262 "a normal distribution with mean zero and standard deviation one. Its covariance matrix, of course, is "
1263 "one dimensional. We next create a table with Mahalanobis distances.")
1264 CODE (U"n = 100000")
1265 CODE (U"t0 = Create TableOfReal: \"table\", n, 1")
1266 CODE (U"Formula: ~ randomGauss (0, 1)")
1267 CODE (U"c = To Covariance")
1268 CODE (U"selectObject: c, t0")
1269 CODE (U"ts = To TableOfReal (mahalanobis): \"no\"")
1270 CODE (U"")
1271 CODE (U"for nsigma to 5")
1272 CODE1 (U"selectObject: ts")
1273 CODE1 (U"extraction = Extract rows where: ~ self < nsigma")
1274 CODE1 (U"nr = Get number of rows")
1275 CODE1 (U"nrp = nr / n * 100")
1276 CODE1 (U"expect = (1 - 2 * gaussQ (nsigma)) * 100")
1277 CODE1 (U"writeInfoLine: nsigma, \"-sigma: \", nrp, \"%, \", expect, \"%\"")
1278 CODE1 (U"removeObject: extraction")
1279 CODE (U"endfor")
1280 MAN_END
1281
1282 MAN_BEGIN (U"Create ChebyshevSeries...", U"djmw", 20040407)
1283 INTRO (U"A command to create a @ChebyshevSeries from a list of coefficients.")
1284 ENTRY (U"Settings")
1285 TERM (U"##Xmin# and ##Xmax#")
1286 DEFINITION (U"define the domain of the polynomials.")
1287 TERM (U"%Coefficients")
1288 DEFINITION (U"define the coefficients of each @@Chebyshev polynomials|Chebyshev polynomial@. "
1289 "The coefficient of the polynomial with the highest degree comes last.")
1290 MAN_END
1291
1292 MAN_BEGIN (U"Create ISpline...", U"djmw", 20181224)
1293 INTRO (U"A command to create an @ISpline from a list of coefficients.")
1294 ENTRY (U"Settings")
1295 TERM (U"##Xmin# and ##Xmax#")
1296 DEFINITION (U"define the domain of the polynomial @spline.")
1297 TERM (U"##Degree")
1298 DEFINITION (U"defines the degree of the polynomial @spline.")
1299 TERM (U"##Coefficients")
1300 DEFINITION (U"define the coefficients of the basis polynomials.")
1301 TERM (U"##Interior knots")
1302 DEFINITION (U"define the positions in the domain where continuity conditions are defined.")
1303 ENTRY (U"Behaviour")
1304 NORMAL (U"The number of coefficients and the number of interior knots must satisfy "
1305 "the following relation:")
1306 EQUATION (U"%numberOfCoefficients = %numberOfInteriorKnots + %degree")
1307 NORMAL (U"")
1308 MAN_END
1309
1310 MAN_BEGIN (U"Create MSpline...", U"djmw", 20040407)
1311 INTRO (U"A command to create an @MSpline from a list of coefficients.")
1312 ENTRY (U"Settings")
1313 TERM (U"##Xmin# and ##Xmax#")
1314 DEFINITION (U"define the domain of the polynomial @spline.")
1315 TERM (U"##Degree")
1316 DEFINITION (U"defines the degree of the polynomial @spline.")
1317 TERM (U"##Coefficients")
1318 DEFINITION (U"define the coefficients of the basis polynomials.")
1319 TERM (U"##Interior knots")
1320 DEFINITION (U"define the positions in the domain where continuity conditions are defined.")
1321 ENTRY (U"Behaviour")
1322 NORMAL (U"The number of coefficients and the number of interior knots must satisfy "
1323 "the following relation:")
1324 EQUATION (U"%numberOfCoefficients = %numberOfInteriorKnots + %degree + 1")
1325 NORMAL (U"")
1326 MAN_END
1327
1328 MAN_BEGIN (U"Create Polynomial...", U"djmw", 20040407)
1329 INTRO (U"A command to create an @Polynomial from a list of coefficients.")
1330 ENTRY (U"Settings")
1331 TERM (U"##Xmin# and ##Xmax#")
1332 DEFINITION (U"define the domain of the polynomial.")
1333 TERM (U"##Degree")
1334 DEFINITION (U"defines the degree of the basis polynomials.")
1335 TERM (U"##Coefficients")
1336 DEFINITION (U"define the coefficients of the polynomial. The coefficient of the "
1337 "highest power of %x comes last.")
1338 MAN_END
1339
1340 MAN_BEGIN (U"Create LegendreSeries...", U"djmw", 20040407)
1341 INTRO (U"A command to create a @LegendreSeries from a list of coefficients.")
1342 ENTRY (U"Settings")
1343 TERM (U"##Xmin# and ##Xmax#")
1344 DEFINITION (U"define the domain of the polynomials.")
1345 TERM (U"##Coefficients")
1346 DEFINITION (U"define the coefficients of each @@Legendre polynomials|Legendre polynomial@. "
1347 "The coefficient of the polynomial with the highest degree comes last.")
1348 MAN_END
1349
1350 MAN_BEGIN (U"Create Sound as gammatone...", U"djmw", 20161013)
1351 INTRO (U"A command to create a @Sound as a @@gammatone@.")
1352 ENTRY (U"Settings")
1353 TERM (U"##Name")
1354 DEFINITION (U"the name of the resulting Sound object.")
1355 TERM (U"##Minimum time (s)# and ##Maximum time (s)#")
1356 DEFINITION (U"the start and end time of the resulting Sound.")
1357 TERM (U"##Sampling frequency (Hz)")
1358 DEFINITION (U"the @@sampling frequency@ of the resulting Sound.")
1359 TERM (U"##Gamma")
1360 DEFINITION (U"determines the exponent of the polynomial.")
1361 TERM (U"##Frequency (Hz)# and ##Bandwidth (Hz)#")
1362 DEFINITION (U"determine the frequency and damping of the cosine wave in the gammatone.")
1363 TERM (U"##Initial phase (radians)")
1364 DEFINITION (U"the initial phase of the cosine wave.")
1365 TERM (U"##Addition factor# (standard value: 0)")
1366 DEFINITION (U"determines the degree of asymmetry in the spectrum of the gammatone. "
1367 "The zero default value gives a gammatone. A value unequal to zero results in a "
1368 "so called %gammachirp. A negative value is used in auditory filter modelling to "
1369 "guarantee the usual direction of filter asymmetry, which corresponds to an upward "
1370 "glide in instantaneous frequency.")
1371 TERM (U"##Scale amplitudes")
1372 DEFINITION (U"determines whether the amplitudes will be scaled to fit in the range (-1, 1).")
1373 ENTRY (U"Purpose")
1374 NORMAL (U"to create a Sound according to the following formula:")
1375 EQUATION (U"%t^^%\\ga\\--1^ e^^\\--2%\\pi\\.c%bandwidth\\.c%t^ "
1376 "cos (2%%\\pi\\.cfrequency\\.ct% + %additionFactor\\.cln(%t) + %initialPhase),")
1377 NORMAL (U"The %gammachirp function has a monotonically frequency-modulated carrier (the chirp) with "
1378 "instantaneous frequency ")
1379 EQUATION (U"%instantaneousFrequency(%t) = %frequency + %additionFactor / (2\\.c\\pi\\.c%t)")
1380 NORMAL (U"and an envelope that is a gamma distribution function. It is a theoretically optimal "
1381 "auditory filter, in the sense that it leads to minimal uncertainty in the joint time and "
1382 "scale representation of auditory signal analysis.")
1383 NORMAL (U"For faithful modelling of the inner ear, "
1384 "@@Irino & Patterson (1997)@ conclude that a value of approximately 1.5 * ERB (%frequency) "
1385 "is appropriate for %bandwidth. "
1386 "ERB stands for @@equivalent rectangular bandwidth@. Their formula for ERB is:")
1387 EQUATION (U"ERB(%f) = 6.23 10^^\\--6^ %f^2 + 93.39 10^^\\--3^ %f + 28.52.")
1388 NORMAL (U"To avoid @aliasing in the chirp sound, a sound is only generated during times where the "
1389 "instantaneous frequency is greater than zero and smaller than the @@Nyquist frequency@.")
1390 MAN_END
1391
1392 MAN_BEGIN (U"Create Sound as Shepard tone...", U"djmw", 20230801)
1393 INTRO (U"One of the commands that create a @Sound.")
1394 ENTRY (U"Settings")
1395 TERM (U"##Name")
1396 DEFINITION (U"the name of the resulting Sound object.")
1397 TERM (U"##Minimum time (s)# and ##Maximum time (s)")
1398 DEFINITION (U"the start and end time of the resulting Sound.")
1399 TERM (U"##Sampling frequency (Hz)")
1400 DEFINITION (U"the @@sampling frequency@ of the resulting Sound.")
1401 TERM (U"##Lowest frequency (Hz)")
1402 DEFINITION (U"the frequency of the lowest component in the tone complex.")
1403 TERM (U"##Number of components")
1404 DEFINITION (U"the number of frequency components in the tone complex.")
1405 TERM (U"##Frequency change (semitones/s)")
1406 DEFINITION (U"determines how many semitones the frequency of each component will change in one second. "
1407 "The number of seconds needed to change one octave will then be 12 divided by ##Frequency change#. "
1408 "You can make rising, falling and monotonous tone complexes by choosing a positive, negative or zero value.")
1409 TERM (U"##Amplitude range% (dB)")
1410 DEFINITION (U"determines the relative size in decibels of the maximum and the minimum amplitude of the components in a tone complex. These relative amplitudes will then be 10^^\\--%amplitudeRange/20^. ")
1411 TERM (U"##Octave shift fraction (0-1)")
1412 DEFINITION (U"shifts all frequency components by this fraction at the start. You will probably only need this "
1413 "if you want to generate static tone complexes as the example script below shows.")
1414 ENTRY (U"Purpose")
1415 NORMAL (U"To create a Sound that is a continuous variant of the sound sequences "
1416 "used by @@Shepard (1964)@ in his "
1417 "experiment about the circularity in judgments of relative pitch.")
1418 NORMAL (U"The tone consists of many sinusoidal components whose frequencies "
1419 "might increase exponentially in time. "
1420 "All frequencies are always at successive intervals of an octave and sounded simultaneously. "
1421 "Thus the frequency of each component above the lowest is at each moment in time exactly twice "
1422 "the frequency of the one just below. The amplitudes are large for the components of intermediate "
1423 "frequency only, and tapered off gradually to subthreshold levels for the components at the "
1424 "highest and lowest extremes of frequency.")
1425 NORMAL (U"For a rising tone complex, the Sound is generated according to the following specification:")
1426 EQUATION (U"%s(%t) = \\su__%i=1..%numberOfComponents_ %A__%i_(%t) sin (arg__%i_(%t)), where")
1427 EQUATION (U"arg__%i_(%t) = \\in 2%\\pi f__%i_(%\\ta) %d\\ta , and")
1428 EQUATION (U"f__%i_(%t) = %lowestFrequency \\.c 2^^(%i \\-m 1 + octaveShiftFraction + %t/(12/%frequencyChange\\_ st)^, with")
1429 EQUATION (U"%A__%i_(%t) = 10^^((%L__min_ + (%L__max_ \\-m %L__min_) (1 \\-- cos 2%\\pi%\\te__%i_(%t)) / 2) / 20)^, where,")
1430 EQUATION (U"%L__max_ = 0, %L__min_ = 10^^\\--%amplitudeRange/20^, and,")
1431 EQUATION (U"%\\te__%i_(%t) = 2\\pi log2 (%f(%t) / %lowestFrequency) / %numberOfComponents.")
1432 NORMAL (U"The maximum frequency that can be reached during a sweep by any single tone is:")
1433 EQUATION (U"%maximumFrequency = %lowestFrequency\\.c2^^%numberOfComponents^.")
1434 NORMAL (U"A component that reaches the maximum frequency falls instantaneously to the lowest frequency and then starts rising again.")
1435 NORMAL (U"The absolute @@sound pressure level@ of the resulting sound will not be set, it is only guaranteed that the peak value "
1436 "is just below 1. You can always scale the intensity with the ##Scale Intensity...# command.")
1437 ENTRY (U"Example")
1438 NORMAL (U"The following script generates 12 static Shepard tone complexes, 1 semitone 'apart', "
1439 "with a cosine window to temper the abrupt start and finish.")
1440 CODE (U"fadeTime = 0.010")
1441 CODE (U"for i to 12")
1442 CODE1 (U"fraction = (i-1)/12")
1443 CODE1 (U"Create Sound as Shepard tone: \"s\" + string$ (i), 0, 0.1, 22050, 4.863, 10, 0, 34, fraction")
1444 CODE1 (U"Fade in: 0, 0, fadeTime, \"no\"")
1445 CODE1 (U"Fade out: 0, 0.1, -fadeTime, \"no\"")
1446 CODE (U"endfor")
1447 MAN_END
1448
1449 MAN_BEGIN (U"Create formant table (Peterson & Barney 1952)", U"djmw", 20080509)
1450 INTRO (U"A command to create a @Table object filled with the "
1451 "fundamental frequency and the first three formant frequency values from 10 "
1452 "American-English monophthongal vowels as spoken in a /h\\_ d/ context by 76 speakers "
1453 "(33 men, 28 women and 15 children). Every vowel was pronounced twice, so that there are "
1454 "1520 recorded vowels in total.")
1455 ENTRY (U"Table layout")
1456 NORMAL (U"The created table will contain 9 columns:")
1457 TERM (U"Column 1, labelled as %Type")
1458 DEFINITION (U"speaker type: \"m\", \"w\" or \"c\" (for %man, %woman or %child).")
1459 TERM (U"Column 2, labelled as %Sex")
1460 DEFINITION (U"speaker sex: either \"m\" or \"f\" (for %male or %female).")
1461 TERM (U"Column 3, labelled as %Speaker")
1462 DEFINITION (U"speaker id: a number from 1 to 76.")
1463 TERM (U"Column 4, labelled as %Vowel")
1464 DEFINITION (U"the vowel name. The following list gives the vowel in a %%h\\_ d% context word "
1465 "together with its representation in this column: (%heed, iy), (%hid, ih), "
1466 "(%head, eh), (%had, ae), (%hod, aa), (%hawed, ao), (%hood, uh), (%%who'd%, uw), "
1467 "(%hud, ah), (%heard, er).")
1468 TERM (U"Column 5, labelled as %IPA")
1469 DEFINITION (U"the IPA notation for the vowels as defined in @@Peterson & Barney (1952)@. ")
1470 TERM (U"Column 6, labelled as %F0")
1471 DEFINITION (U"the fundamental frequency in Hertz.")
1472 TERM (U"Column 7, 8 and 9, labelled as %F1, %F2 and %F3")
1473 DEFINITION (U"the frequencies in Hertz of the first three formants.")
1474 ENTRY (U"Remarks")
1475 NORMAL (U"We originally downloaded the data from the University of Pennsylvania FTP site, "
1476 "where they were reportedly based on a printed version supplied by Ignatius Mattingly. ")
1477 NORMAL (U"About the IPA notation. We used the original notation from the Peterson & Barney article. "
1478 "The notation in @@Watrous (1991)@ differs for three vowels: Watrous uses /e, o, \\er/ where Peterson & Barney use /\\ef, \\ct, \\er\\hr/.")
1479 NORMAL (U"More details about these data and how they were measured can be found in the articles"
1480 "@@Watrous (1991)@ and in @@Peterson & Barney (1952)@.")
1481 MAN_END
1482
1483 MAN_BEGIN (U"Create formant table (Pols & Van Nierop 1973)", U"djmw", 20020620)
1484 INTRO (U"A command to create a @Table object filled with the frequencies and the levels "
1485 "of the first three formants from the 12 Dutch monophthong "
1486 "vowels as spoken in /h\\_ t/ context by 50 male and 25 female speakers.")
1487 ENTRY (U"Table layout")
1488 NORMAL (U"The created table will contain 10 columns")
1489 TERM (U"Column 1, labeled as %Sex")
1490 DEFINITION (U"speaker sex: Either \"m\" or \"f\" (for %male or %female).")
1491 TERM (U"Column 2, labeled as %Speaker")
1492 DEFINITION (U"speaker id: a number from 1 to 75.")
1493 TERM (U"Column 3, labeled as %Vowel")
1494 DEFINITION (U"the vowel name. The following list gives the vowel in [p\\_ t] context words "
1495 "together with its representation in this column: (%poet, oe), (%paat, aa), "
1496 "(%poot, oo), (%pat, a), (%peut, eu), (%piet, ie), (%puut, uu), (%peet, ee), "
1497 "(%put, u), (%pet, e), (%pot, o), (%pit, i).")
1498 TERM (U"Column 4, labeled as %IPA")
1499 DEFINITION (U"the IPA-notation for the vowels")
1500 TERM (U"Column 5, 6 and 7, labeled as %F1, %F2 and %F3")
1501 DEFINITION (U"the frequencies in Hertz of the first three formants.")
1502 TERM (U"Column 8, 9 and 10, labeled as %L1, %L2 and %L3")
1503 DEFINITION (U"the levels in decibel below overall SPL of the first three formants.")
1504 NORMAL (U"More details about these data and how they were measured can be found "
1505 "in @@Pols et al. (1973)@ and @@Van Nierop et al. (1973)@.")
1506 MAN_END
1507
1508 MAN_BEGIN (U"Create formant table (Weenink 1985)", U"djmw", 20041217)
1509 INTRO (U"A command to create a @Table object filled with the "
1510 "fundamental frequency and the first three formant frequency values from 12 "
1511 "Dutch monophthongal vowels as spoken in isolation by 30 speakers "
1512 "(10 men, 10 women and 10 children). Every vowel was pronounced only once, so that there are "
1513 "360 recorded vowels in total. A reduced form, with only the formant frequecy values, is also available "
1514 "as a @@Create TableOfReal (Weenink 1985)...|TableOfReal@.")
1515 ENTRY (U"Table layout")
1516 NORMAL (U"The created table will contain 9 columns:")
1517 TERM (U"Column 1, labelled as %Type")
1518 DEFINITION (U"speaker type: \"m\", \"w\" or \"c\" (for %man, %woman or %child).")
1519 TERM (U"Column 2, labelled as %Sex")
1520 DEFINITION (U"speaker sex: either \"m\" or \"f\" (for %male or %female).")
1521 TERM (U"Column 3, labelled as %Speaker")
1522 DEFINITION (U"speaker id: a number from 1 to 76.")
1523 TERM (U"Column 4, labelled as %Vowel")
1524 DEFINITION (U"the vowel name. The following list gives the vowel in Dutch [p\\_ t] context words "
1525 "together with its representation in this column: (%poet, oe), (%paat, aa), "
1526 "(%poot, oo), (%pat, a), (%peut, eu), (%piet, ie), (%puut, uu), (%peet, ee), "
1527 "(%put, u), (%pet, e), (%pot, o), (%pit, i).")
1528 TERM (U"Column 5, labelled as %IPA")
1529 DEFINITION (U"the IPA notation for the vowels.")
1530 TERM (U"Column 6, labelled as %F0")
1531 DEFINITION (U"the fundamental frequency in Hertz.")
1532 TERM (U"Column 7, 8 and 9, labelled as %F1, %F2 and %F3")
1533 DEFINITION (U"the frequencies in Hertz of the first three formants. ")
1534 NORMAL (U"The formant frequency values have been determined by means of LPC analysis with a "
1535 "varying prediction order. See @@Weenink (1985)@.")
1536 MAN_END
1537
1538 MAN_BEGIN (U"Create TableOfReal (Pols 1973)...", U"djmw", 19990426)
1539 INTRO (U"A command to create a @TableOfReal filled with the first three formant "
1540 "frequency values and (optionally) the levels from the 12 Dutch monophthongal "
1541 "vowels as spoken in /h\\_ t/ context by 50 male speakers.")
1542 NORMAL (U"The first three columns will contain the frequencies in Hz, the next three columns "
1543 "the levels in decibels below the overall SPL of the measured vowel segment. Each row will "
1544 "be labelled with its corresponding vowel symbol.")
1545 NORMAL (U"More details about these data and how they were measured can be found in the paper of "
1546 "@@Pols et al. (1973)@.")
1547 MAN_END
1548
1549 MAN_BEGIN (U"Create TableOfReal (Sandwell 1987)", U"djmw", 20170917)
1550 INTRO (U"A command to create a @TableOfReal filled with the data point of Fig. 2 in the article of @@Sandwell (1987)@.")
1551 NORMAL (U"These arbitrary sampled data points are often used in testing interpolation algorithms.")
1552 SCRIPT (6, 6, U" "
1553 "tor = Create TableOfReal (Sandwell 1987)\n"
1554 "Draw scatter plot: 1, 2, 0, 0, -0.5, 10.5, -6, 16, 10, \"no\", \"0\", \"no\"\n"
1555 "Draw inner box\n"
1556 "Marks bottom every: 1, 2, \"yes\", \"yes\", \"no\"\n"
1557 "Marks left every: 1, 4, \"yes\", \"yes\", \"no\"\n"
1558 "removeObject: tor")
1559 MAN_END
1560
1561 MAN_BEGIN (U"Create TableOfReal (Van Nierop 1973)...", U"djmw", 20041217)
1562 INTRO (U"A command to create a @TableOfReal filled with the first three formant "
1563 "frequency values and (optionally) the levels from the 12 Dutch monophthongal "
1564 "vowels as spoken in /h\\_ t/ context by 25 female speakers.")
1565 NORMAL (U"The first three columns will contain the frequencies in Hz, the next three columns "
1566 "the levels in decibels below the overall SPL of the measured vowel segment. Each row will "
1567 "be labelled with its corresponding vowel symbol.")
1568 NORMAL (U"More details about these data and how they were measured can be found in the paper of "
1569 "@@Van Nierop et al. (1973)@.")
1570 MAN_END
1571
1572 MAN_BEGIN (U"Create TableOfReal (Weenink 1985)...", U"djmw", 19990426)
1573 INTRO (U"A command to create a @TableOfReal filled with the first three formant "
1574 "frequency values from the 12 Dutch monophthongal "
1575 "vowels as spoken in isolation by either 10 men or 10 women or 10 children.")
1576 NORMAL (U"The three columns will contain the formant frequencies in Hz. Each row will "
1577 "be labelled with its corresponding vowel symbol.")
1578 NORMAL (U"More details about these data and how they were measured can be found in the paper of "
1579 "@@Weenink (1985)@.")
1580 MAN_END
1581
1582 MAN_BEGIN (U"Discriminant", U"djmw", 20160128)
1583 INTRO (U"One of the @@types of objects@ in Praat.")
1584 NORMAL (U"An object of type Discriminant represents the discriminant structure of a multivariate "
1585 "data set, i.e. a %%numberOfObservations%\\xx%%dimension% matrix. Each row in this data set belongs to one of %%numberOfGroups% groups (or %%classes% or %categories%, whatever terminology you prefer). "
1586 "A Discriminant can be used as a classifier to discriminate between these %%numberOfGroups% groups.")
1587 ENTRY (U"##Inside a Discriminant")
1588 NORMAL (U"With @@Inspect@, you will see that a Discriminant contains the following data:")
1589 LIST_ITEM (U"##eigen#")
1590 DEFINITION (U"the @@Eigen|eigen@ structure, i.e. the eigenvalues and eigenvectors.")
1591 LIST_ITEM (U"##numberOfGroups")
1592 DEFINITION (U"the number of groups between which we can discriminate.")
1593 LIST_ITEM (U"##groups")
1594 DEFINITION (U"a list of %%dimension%\\xx%%dimension% @SSCP matrices, one for each group, %numberOfGroups in total.")
1595 LIST_ITEM (U"##aprioriProbabilities")
1596 DEFINITION (U"an array with %numberOfGroups apriori probabilities of group membership")
1597 ENTRY (U"Commands")
1598 NORMAL (U"Creation:")
1599 LIST_ITEM (U"\\bu @@Discriminant analysis@ tutorial")
1600 LIST_ITEM (U"\\bu @@TableOfReal: To Discriminant@")
1601 NORMAL (U"Drawing")
1602 LIST_ITEM (U"\\bu Draw eigenvalues...")
1603 LIST_ITEM (U"\\bu Draw eigenvector...")
1604 LIST_ITEM (U"\\bu @@Discriminant: Draw sigma ellipses...|Draw sigma ellipses...@")
1605 MAN_END
1606
1607 MAN_BEGIN (U"Discriminant analysis", U"djmw", 20170829)
1608 INTRO (U"This tutorial will show you how to perform discriminant analysis with Praat.")
1609 NORMAL (U"As an example, we will use the dataset from @@Pols et al. (1973)@ "
1610 "with the frequencies and levels of the first three formants from the 12 "
1611 "Dutch monophthongal vowels as spoken in /h\\_ t/ context by 50 male speakers. "
1612 "This data set has been incorporated into "
1613 "Praat and can be called into play with the @@Create TableOfReal "
1614 "(Pols 1973)...@ command that can be found under #New \\-> #Tables \\-> ##Data sets from the literature#.")
1615 NORMAL (U"In the list of objects a new TableOfReal object will appear with 6 "
1616 "columns and 600 rows "
1617 "(50 speakers \\xx 12 vowels). The first three columns contain "
1618 "the formant frequencies in Hz, the last three columns contain the levels "
1619 "of the first three formants "
1620 "given in decibels below the overall sound pressure level of the measured "
1621 "vowel segment. Each row is labelled with a vowel label.")
1622 NORMAL (U"Pols et al. use logarithms of frequency values, we will too. Because "
1623 "the measurement units in the first three columns are in Hz and in the last "
1624 "three columns in dB, it is probably better to standardize the columns. "
1625 "The following script summarizes our achievements up till now:")
1626 CODE (U"table = Create TableOfReal (Pols 1973): \"yes\"")
1627 CODE (U"Formula: ~ if col < 4 then log10 (self) else self fi")
1628 CODE (U"Standardize columns")
1629 CODE (U"# change the column labels too, for nice plot labels.")
1630 CODE (U"Set column label (index): 1, \"standardized log (%F__1_)\"")
1631 CODE (U"Set column label (index): 2, \"standardized log (%F__2_)\"")
1632 CODE (U"Set column label (index): 3, \"standardized log (%F__3_)\"")
1633 CODE (U"Set column label (index): 4, \"standardized %L__1_\"")
1634 CODE (U"Set column label (index): 5, \"standardized %L__2_\"")
1635 CODE (U"Set column label (index): 6, \"standardized %L__3_\"")
1636 NORMAL (U"To get an indication of what these data look like, we make a scatter "
1637 "plot of the "
1638 "first standardized log-formant-frequency against the second standardized "
1639 "log-formant-frequency. With the next script fragment you can reproduce the "
1640 "following picture.")
1641 CODE (U"Select outer viewport: 0, 5, 0, 5")
1642 CODE (U"selectObject: table")
1643 CODE (U"Draw scatter plot: 1, 2, 0, 0, -2.9, 2.9, -2.9, 2.9, 10, \"yes\", \"+\", \"yes\"")
1644 PICTURE (5, 5, drawPolsF1F2_log)
1645 NORMAL (U"Apart from a difference in scale this plot is the same as fig. 3 in the "
1646 "Pols et al. article.")
1647 ENTRY (U"1. How to perform a discriminant analysis")
1648 NORMAL (U"Select the TableOfReal and choose from the dynamic menu the option "
1649 "@@TableOfReal: To Discriminant|To Discriminant@. This command is available "
1650 "in the \"Multivariate statistics\" action button. The resulting Discriminant "
1651 "object will bear the same name as the TableOfReal object. The following "
1652 "script summarizes:")
1653 CODE (U"selectObject: table")
1654 CODE (U"discriminant = To Discriminant")
1655 ENTRY (U"2. How to project data on the discriminant space")
1656 NORMAL (U"You select a TableOfReal and a Discriminant object together and choose: "
1657 "@@Discriminant & TableOfReal: To Configuration...|To Configuration...@. "
1658 "One of the options of the newly created Configuration object is to draw it. "
1659 "The following picture shows how the data look in the plane spanned by the "
1660 "first two dimensions of this Configuration. The directions in this "
1661 "configuration are the eigenvectors from the Discriminant.")
1662 PICTURE (5, 5, drawPolsDiscriminantConfiguration)
1663 NORMAL (U"The following script summarizes:")
1664 CODE (U"selectObject: table, discriminant")
1665 CODE (U"To Configuration: 2")
1666 CODE (U"Select outer viewport: 0, 5, 0, 5")
1667 CODE (U"Draw: 1, 2, -2.9, 2.9, -2.9, 2.9, 12, \"yes\", \"+\", \"yes\"")
1668 NORMAL (U"If you are only interested in this projection, there also is a shortcut "
1669 "without an intermediate Discriminant object: "
1670 "select the TableOfReal object and choose @@TableOfReal: To Configuration "
1671 "(lda)...|To Configuration (lda)...@.")
1672 ENTRY (U"3. How to draw concentration ellipses")
1673 NORMAL (U"Select the Discriminant object and choose @@Discriminant: Draw sigma "
1674 "ellipses...|Draw sigma ellipses...@. In the form you can fill out the "
1675 "coverage of the ellipse by way of the %%Number of sigmas% parameter. "
1676 "You can also select the projection "
1677 "plane. The next figure shows the 1-%\\si concentration ellipses in the "
1678 "standardized log %F__1_ vs log %F__2_ plane. When the data are multinormally distributed, "
1679 "a 1-%\\si ellipse will cover approximately 39.3\\% of the data. "
1680 "The following code summarizes:")
1681 CODE (U"selectObject: discriminant")
1682 CODE (U"Draw sigma ellipses: 1.0, \"no\", 1, 2, -2.9, 2.9, -2.9, 2.9, 12, \"yes\"")
1683 PICTURE (5, 5, drawPolsF1F2ConcentrationEllipses)
1684 ENTRY (U"4. How to classify")
1685 NORMAL (U"Select together the Discriminant object (the classifier), and "
1686 "a TableOfReal object (the data to be classified). Next you choose "
1687 "@@Discriminant & TableOfReal: To ClassificationTable...|To "
1688 "ClassificationTable@. "
1689 "Normally you will enable the option %%Pool covariance matrices% and "
1690 "the pooled covariance matrix will be used for classification.")
1691 NORMAL (U"The ClassificationTable can be converted to a @Confusion object "
1692 "and its fraction correct can be queried with: "
1693 "@@Confusion: Get fraction correct@.")
1694 NORMAL (U"In general you would separate your data into two independent sets, "
1695 "\\s{TRAIN} and \\s{TEST}. You would use \\s{TRAIN} to train the "
1696 "discriminant classifier and \\s{TEST} to test how well it classifies. "
1697 "Several possibilities for splitting a dataset into two sets exist. "
1698 "We mention the @@jackknife@ (\"leave-one-out\") and the "
1699 "@@bootstrap@ methods (\"resampling\").")
1700 ENTRY (U"5.1 Jackknife classification")
1701 NORMAL (U"The following script summarizes #jackknife classification of the dataset:")
1702 CODE (U"selectObject: table")
1703 CODE (U"numberOfRows = Get number of rows")
1704 CODE (U"for irow to numberOfRows")
1705 CODE1 (U"selectObject: table")
1706 CODE1 (U"rowi = Extract rows where: ~ row = irow")
1707 CODE1 (U"selectObject: table")
1708 CODE1 (U"rest = Extract rows where: ~ row <> irow")
1709 CODE1 (U"discriminant = To Discriminant")
1710 CODE1 (U"plusObject: rowi")
1711 CODE1 (U"classification = To ClassificationTable: \"yes\", \"yes\"")
1712 CODE1 (U"if irow = 1")
1713 CODE2 (U"confusion = To Confusion: \"yes\"")
1714 CODE1 (U"else")
1715 CODE2 (U"plusObject: confusion")
1716 CODE2 (U"Increase confusion count")
1717 CODE1 (U"endif")
1718 CODE1 (U"removeObject: rowi, rest, discriminant, classification")
1719 CODE (U"endfor")
1720 CODE (U"selectObject: confusion")
1721 CODE (U"fractionCorrect = Get fraction correct")
1722 CODE (U"appendInfoLine: fractionCorrect, \" (fraction correct, jackknifed \", numberOfRows, \" times).\"")
1723 CODE (U"removeObject: confusion")
1724 ENTRY (U"5.2 Bootstrap classification")
1725 NORMAL (U"The following script summarizes bootstrap classification.")
1726 CODE (U"fractionCorrect = 0")
1727 CODE (U"for i to numberOfBootstraps")
1728 CODE1 (U"selectObject: table")
1729 CODE1 (U"resampled = To TableOfReal (bootstrap)")
1730 CODE1 (U"discriminant = To Discriminant")
1731 CODE1 (U"plusObject: resampled")
1732 CODE1 (U"classification = To ClassificationTable: \"yes\", \"yes\"")
1733 CODE1 (U"confusion = To Confusion: \"yes\"")
1734 CODE1 (U"fc = Get fraction correct")
1735 CODE1 (U"fractionCorrect += fc")
1736 CODE1 (U"removeObject: resampled, discriminant, classification, confusion")
1737 CODE (U"endfor")
1738 CODE (U"fractionCorrect /= numberOfBootstraps")
1739 CODE (U"appendInfoLine: fractionCorrect, \" (fraction correct, bootstrapped \", numberOfBootstraps, \" times).\"")
1740 MAN_END
1741
1742 MAN_BEGIN (U"Discriminant: Draw sigma ellipses...", U"djmw", 20040407)
1743 INTRO (U"A command to draw for each group from the selected @Discriminant an ellipse "
1744 "that covers part of the multivariate data.")
1745 ENTRY (U"Settings")
1746 TERM (U"##Number of sigmas")
1747 DEFINITION (U"determines the @@concentration ellipse|data coverage@.")
1748 TERM (U"##Discriminant plane")
1749 DEFINITION (U"When on, the selected %X and %Y-dimension will refer to the eigenvectors "
1750 "of the discriminant space, and, consequently, the projection of the hyper ellipsoid "
1751 "onto the space spanned by these eigenvectors will be drawn. When off, the selected "
1752 "%X and Y-dimension will refer to the original dimensions.")
1753 TERM (U"##Xmin#, ##Xmax#, ##Ymin#, ##Ymax#")
1754 DEFINITION (U"determine the limits of the drawing area.")
1755 TERM (U"##Label size")
1756 DEFINITION (U"determines the size of the labels at the centre of the ellipse. No "
1757 "labels will be drawn when a value less than or equal to zero is chosen.")
1758 MAN_END
1759
1760 MAN_BEGIN (U"Discriminant: Extract within-group SSCP...", U"djmw", 20020314)
1761 INTRO (U"Extract the @SSCP for group %%index% from the selected @Discriminant "
1762 "object.")
1763 MAN_END
1764
1765 MAN_BEGIN (U"Discriminant: Extract pooled within-groups SSCP", U"djmw", 20020314)
1766 INTRO (U"Extract the pooled within-group @SSCP from the selected @Discriminant "
1767 "object.")
1768 MAN_END
1769
1770 MAN_BEGIN (U"Discriminant: Get partial discrimination probability...", U"djmw", 19981102)
1771 INTRO (U"A command to test the selected @Discriminant for the significance of "
1772 "discrimination afforded by the remaining %n\\--%k eigenvectors after the acceptance of "
1773 "the first %k eigenvectors.")
1774 ENTRY (U"Details")
1775 NORMAL (U"The test statistic is:")
1776 EQUATION (U"%\\ci^2 = \\--(%degreesOfFreedom\\--(%numberOfGroups+%dimension)/2) ln \\La\\'p, where")
1777 EQUATION (U"%degreesOfFreedom = (%dimension\\--%k)(%numberOfGroups\\--%k\\--1), and, ")
1778 EQUATION (U"\\La\\'p = \\Pi__%j=%k+1..%numberOfEigenvalues_ 1 / (1 + %%eigenvalue[j]%)")
1779 MAN_END
1780
1781 MAN_BEGIN (U"Discriminant: Get contribution of component...", U"djmw", 19981106)
1782 INTRO (U"A command to ask the selected @Discriminant for the contribution of the %j^^th^ "
1783 "discriminant function (component) to the total variance.")
1784 ENTRY (U"Details")
1785 NORMAL (U"The contribution is defined as:")
1786 EQUATION (U"%%eigenvalue[j]% / \\Si__%i=1..%numberOfEigenvalues_ %%eigenvalue[i]%")
1787 MAN_END
1788
1789 MAN_BEGIN (U"Discriminant: Get Wilks' lambda...", U"djmw", 20040407)
1790 INTRO (U"A command to ask the selected @Discriminant for the value of Wilks' lamda (a "
1791 "multivariate measure of group differences over several variables).")
1792 ENTRY (U"Settings")
1793 TERM (U"##From")
1794 DEFINITION (U"the first eigenvalue number from which the value for lambda has to be calculated.")
1795 ENTRY (U"Details")
1796 NORMAL (U"Wilks' lambda is defined as:")
1797 EQUATION (U"%\\La = \\Pi__%i=%from..%numberOfEigenvalues_ 1 / (1 + %eigenvalue[%i])")
1798 NORMAL (U"Because lambda is a kind of %inverse measure, values of lambda which are near zero "
1799 "denote high discrimination between groups.")
1800 MAN_END
1801
1802 MAN_BEGIN (U"Discriminant: Get concentration ellipse area...", U"djmw", 20040407)
1803 INTRO (U"A command to query the @Discriminant object for the area of the concentration "
1804 "ellipse of one of its groups.")
1805 ENTRY (U"Settings")
1806 TERM (U"##Number of sigmas")
1807 DEFINITION (U"determines the @@concentration ellipse|data coverage@.")
1808 TERM (U"##Discriminant plane")
1809 DEFINITION (U"When on, the selected %X and %Y-dimension will refer to the eigenvectors "
1810 "of the discriminant space, and, consequently, the area of the projection of the hyper ellipsoid "
1811 "onto the space spanned by these eigenvectors will be calculated. When off, the selected "
1812 "%X and Y-dimension will refer to the original dimensions.")
1813 ENTRY (U"Algorithm")
1814 NORMAL (U"See @@SSCP: Get sigma ellipse area...")
1815 MAN_END
1816
1817 MAN_BEGIN (U"Discriminant: Get confidence ellipse area...", U"djmw", 20040407)
1818 INTRO (U"A command to query the @Discriminant object for the area of the confidence "
1819 "ellipse of one of its groups.")
1820 ENTRY (U"Settings")
1821 TERM (U"##Discriminant plane")
1822 DEFINITION (U"When on, the selected %X and %Y-dimension will refer to the eigenvectors "
1823 "of the discriminant space, and, consequently, the area of the projection of the hyper ellipsoid "
1824 "onto the space spanned by these eigenvectors will be calculated. When off, the selected "
1825 "%X and Y-dimension will refer to the original dimensions.")
1826 ENTRY (U"Algorithm")
1827 NORMAL (U"See @@SSCP: Get confidence ellipse area...")
1828 MAN_END
1829
1830 MAN_BEGIN (U"Discriminant & PatternList: To Categories...", U"djmw", 20040422)
1831 INTRO (U"A command to use the selected @Discriminant to classify each pattern from the "
1832 "selected @PatternList into a category.")
1833 NORMAL (U"Arguments as in @@Discriminant & TableOfReal: To ClassificationTable...@.")
1834 MAN_END
1835
1836 MAN_BEGIN (U"Discriminant & SSCP: Project", U"djmw", 20020313)
1837 INTRO (U"A command to project the selected @SSCP object on the eigenspace "
1838 "defined by the selected @Discriminant object.")
1839 NORMAL (U"Further details can be found in @@Eigen & SSCP: Project@")
1840 MAN_END
1841
1842 MAN_BEGIN (U"Discriminant & TableOfReal: To ClassificationTable...", U"djmw", 20040407)
1843 INTRO (U"A command to use the selected @Discriminant to classify each row from the "
1844 "selected @TableOfReal. The newly created @ClassificationTable will then contain the posterior "
1845 "probabilities of group membership.")
1846 ENTRY (U"Settings")
1847 TERM (U"##Pool covariance matrices")
1848 DEFINITION (U"when on, all group covariance matrices are pooled and distances will be determined "
1849 "on the basis of only this pooled covariance matrix (see below).")
1850 ENTRY (U"Details")
1851 NORMAL (U"The posterior probabilities of group membership %p__%j_ for a vector #x are defined as:")
1852 EQUATION (U"%p__%j_ = %p(%j\\| #%x) = exp (\\--%d__%j_^^2^(#%x) / 2) / "
1853 "\\su__%k=1..%numberOfGroups_ exp (\\--%d__%k_^^2^(#%x) / 2),")
1854 NORMAL (U"where %d__%i_^^2^ is the generalized squared distance function:")
1855 EQUATION (U"%d__%i_^^2^(#%x) = ((#%x\\--#%\\mu__%i_)\\'p #\\Si__%i_^^-1^ (#%x\\--#%\\mu__%i_) + "
1856 "ln determinant (#\\Si__%i_)) / 2 \\-- ln %aprioriProbability__%i_")
1857 NORMAL (U"that depends on the individual covariance matrix #\\Si__%i_ and the mean "
1858 "#%\\mu__%i_ for group %i.")
1859 NORMAL (U"When the covariances matrices are %pooled, the squared distance function can be reduced to:")
1860 EQUATION (U"%d__%i_^^2^(#%x) = ((#%x\\--#%\\mu__%i_)\\'p #\\Si^^-1^ (#%x\\--#%\\mu__%i_) "
1861 "\\-- ln %aprioriProbability__%i_,")
1862 NORMAL (U"and #\\Si is now the pooled covariance matrix.")
1863 NORMAL (U"The a priori probabilities normally will have values that are related to the number of "
1864 "%training vectors %n__%i_ in each group:")
1865 EQUATION (U"%aprioriProbability__%i_ = %n__%i_ / \\Si__%k=1..%numberOfGroups_ %n__%k_")
1866 MAN_END
1867
1868 MAN_BEGIN (U"Discriminant & TableOfReal: To Configuration...", U"djmw", 20160119)
1869 INTRO (U"A command to project each row in the selected @TableOfReal onto "
1870 "a subspace spanned by the eigenvectors of the selected @Discriminant. ")
1871 ENTRY (U"Settings")
1872 TERM (U"##Number of dimensions")
1873 DEFINITION (U"specifies the dimension of the resulting @Configuration. This dimension cannot exceed a maximum dimension that is implicitly determined by the selected Discriminant. When the default value (0) is "
1874 "given the resulting Configuration will have the maximum dimension as allowed by Discrimininant. "
1875 "(Technically speaking: the number of eigenvectors (or eigenvalues) in the selected Discriminant is equal to the maximum allowed dimension.)")
1876 ENTRY (U"Precondition")
1877 NORMAL (U"The dimension of the Discriminant and the Configuration must conform in the sense that the number of columns in the TableOfReal and the length of an eigenvector in the Discriminant should be equal.")
1878 NORMAL (U"See also @@Eigen & TableOfReal: Project...@.")
1879 MAN_END
1880
1881 MAN_BEGIN (U"Discriminant & TableOfReal: To TableOfReal (mahalanobis)...", U"djmw", 20170828)
1882 INTRO (U"Calculate @@Mahalanobis distance@s for the selected @TableOfReal with respect to one group in the "
1883 "selected @Discriminant object.")
1884 ENTRY (U"Settings")
1885 TERM (U"##Group label")
1886 DEFINITION (U"defines which group mean to use for the distance calculation.")
1887 TERM (U"##Pool covariance matrices")
1888 DEFINITION (U"when on, use a pooled covariance matrix instead of the group covariance matrix.")
1889 ENTRY (U"Algorithm")
1890 NORMAL (U"See @@Covariance & TableOfReal: To TableOfReal (mahalanobis)...@.")
1891 ENTRY (U"Example")
1892 NORMAL (U"Calculate the number of datapoints that are within the one-sigma elipses of two different groups, i.e. "
1893 "the number of data points that are in the overlapping area. ")
1894 NORMAL (U"Suppose the group labels are \\o/ and \\yc.")
1895 CODE (U"pols50m = Create TableOfReal (Pols 1973): \"no\"")
1896 CODE (U"Formula: ~ log10 (self)")
1897 CODE (U"discriminant = To Discriminant")
1898 CODE (U"selectObject: pols50m, discriminant")
1899 CODE (U"t1 = To TableOfReal (mahalanobis): \"\\o/\", \"no\"")
1900 CODE (U"selectObject: pols50m, discriminant")
1901 CODE (U"t2 = To TableOfReal (mahalanobis): \"\\yc\", \"no\"")
1902 NORMAL (U"Now we count when both the t1 and t2 values are smaller than 1 (sigma):")
1903 CODE (U"Copy: \"tr\"")
1904 CODE (U"Formula: ~ object [t1] < 1 and object [t2] < 1")
1905 CODE (U"Extract rows where column: 1, \"equal to\", 1")
1906 CODE (U"no = Get number of rows\"")
1907 MAN_END
1908
1909 MAN_BEGIN (U"DTW", U"djmw", 20110603)
1910 INTRO (U"One of the @@types of objects@ in Praat.")
1911 NORMAL (U"An object of type DTW represents the dynamic time warp structure of "
1912 "two objects.")
1913 ENTRY (U"Commands")
1914 NORMAL (U"Creation:")
1915 LIST_ITEM (U"\\bu @@CC: To DTW...@ (from 2 objects with cepstral coefficients)")
1916 LIST_ITEM (U"\\bu ##Spectrogram: To DTW...# (from 2 Spectrogram objects)")
1917 NORMAL (U"Query:")
1918 LIST_ITEM (U"\\bu @@DTW: Get y time from x time...@")
1919 LIST_ITEM (U"\\bu @@DTW: Get x time from y time...@")
1920 MAN_END
1921
1922 MAN_BEGIN (U"DTW: Draw warp (x)...", U"djmw", 20071204)
1923 INTRO (U"Draws the warp given a time on the \"x-direction\"")
1924 MAN_END
1925
1926 MAN_BEGIN (U"DTW: Find path (band & slope)...", U"djmw", 20120223)
1927 INTRO (U"Finds the optimal path for the selected @DTW that lies within the union of the sakoe-chiba band and local slope limits.")
1928 ENTRY (U"Settings")
1929 TERM (U"##Sakoe-Chiba band (s)#,")
1930 DEFINITION (U"The maximum distance from the start/end of the sound where a path may start/finish.")
1931 TERM (U"##Slope constraint#,")
1932 DEFINITION (U"determines the maximum and minimum local slopes in the optimal path. For example, the constraint "
1933 "1/3 < slope < 3 forces the path locally after having taken three steps in the same direction direction to take the next step in the other direction, or after having taken two steps in the same direction to take the next step in the diagonal direction. At the same time the global consequences of the \"1/3 < slope < 3\" constraint mandates that the durations of the two domains do not differ by more than a factor of three. ")
1934 NORMAL (U"For more information see the article of @@Sakoe & Chiba (1978)@.")
1935 MAN_END
1936
1937 MAN_BEGIN (U"DTW: Get maximum consecutive steps...", U"djmw", 20050307)
1938 INTRO (U"Get the maximum number of consecutive steps in the chosen direction along the optimal path from the selected @DTW.")
1939 MAN_END
1940
1941 MAN_BEGIN (U"DTW: Get distance (weighted)", U"djmw", 20100628)
1942 INTRO (U"Queries the selected @DTW object for the weighted distance along the minimum path.")
1943 ENTRY (U"Algorithm")
1944 NORMAL (U"If the distance matrix has %%nx% cells along the %%x%-direction, %%ny% cells along the %%y%-direction and the "
1945 "sum of the distances along the minimum path is %%S%, the weighted distance is given by %%S%/(%nx+%ny). ")
1946 MAN_END
1947
1948 MAN_BEGIN (U"DTW: Get time along path...", U"djmw", 20110603)
1949 INTRO (U"Queries the selected @DTW object for the time along the minimal path "
1950 "given the time along the \"%x-direction\". This command is deprecated, the new commands for querying are "
1951 "@@DTW: Get y time from x time...@ and @@DTW: Get x time from y time...@.")
1952 ENTRY (U"Setting")
1953 TERM (U"##Time (s)")
1954 DEFINITION (U"the time along the %x-direction.")
1955 ENTRY (U"Behaviour")
1956 NORMAL (U"When the %input time is in the interval [%xmin, %xmax], the %returned "
1957 "time will be in the interval [%ymin, %ymax], where [%xmin, %xmax] and "
1958 "[%ymin, %ymax] are the domains of the two \"objects\" from which the "
1959 "DTW-object was constructed."
1960 "For all other input times we assume that the two object are aligned.")
1961 NORMAL (U"We like to have a \"continuous\" interpretation of time for the quantized times in the %x and "
1962 "%y direction; we make the path piecewise linear. There are two special cases:")
1963 NORMAL (U"1. The local path is horizontal. We calculate the %y-time from the line that connects the "
1964 "lower-left position of the leftmost horizontal time block to the upper-right position of the "
1965 "rightmost horizontal time block.")
1966 NORMAL (U"2. The local path is vertical. We calculate the %y-time from the line that connects the "
1967 "lower-left position of the bottommost vertical time block to the upper-right position of the "
1968 "topmost horizontal time block.")
1969 MAN_END
1970
1971 MAN_BEGIN (U"DTW: Get y time from x time...", U"djmw", 20110603)
1972 INTRO (U"Queries the selected @DTW object for the time along the %y-direction "
1973 "given the time along the \"%x-direction\". ")
1974 ENTRY (U"Setting")
1975 TERM (U"##Time (s)")
1976 DEFINITION (U"the time along the %x-direction.")
1977 ENTRY (U"Behaviour")
1978 NORMAL (U"When the %input time is in the interval [%xmin, %xmax], the %returned "
1979 "time will be in the interval [%ymin, %ymax], where [%xmin, %xmax] and "
1980 "[%ymin, %ymax] are the domains of the two \"objects\" from which the "
1981 "DTW-object was constructed."
1982 "For input times outside the domain we assume that the two object were aligned.")
1983 NORMAL (U"We like to have a \"continuous\" interpretation of time for the quantized times in the %x and "
1984 "%y direction; we make the path a piecewise linear monotonically increasing function. "
1985 "There are special cases:")
1986 NORMAL (U"1. The local path is in the %x-direction only. We calculate the %y-time from the line "
1987 "that connects the lower-left position of the begin cell of this path to the "
1988 "upper-right position of the last cell.")
1989 NORMAL (U"2. The local path is in the x-direction only. We calculate the %y-time from the line "
1990 "that connects the lower-left position of lowest cell to the upper-right position of the "
1991 "highest cell.")
1992 NORMAL (U"3. A cell is both part of a path in the %x- and the %y-direction. "
1993 "We then calculate the intersection point of the paths in the %x- and the %y-directions. "
1994 "The %y-times in this cell are now calculated from the two line segments that originate "
1995 "from this intersection point.")
1996 MAN_END
1997
1998 MAN_BEGIN (U"DTW: Get x time from y time...", U"djmw", 20110603)
1999 INTRO (U"Queries the selected @DTW object for the time along the %x-direction "
2000 "given the time along the \"%y-direction\". ")
2001 ENTRY (U"Setting")
2002 TERM (U"##Time (s)")
2003 DEFINITION (U"the time along the %y-direction.")
2004 ENTRY (U"Behaviour")
2005 NORMAL (U"The behaviour is like @@DTW: Get y time from x time...@")
2006 MAN_END
2007
2008 MAN_BEGIN (U"DTW: Swap axes", U"djmw", 20050306)
2009 INTRO (U"Swap the x and y-axes of the selected @DTW.")
2010 MAN_END
2011
2012 MAN_BEGIN (U"DTW: To Polygon...", U"djmw", 20120223)
2013 INTRO (U"A command to convert for a selected @DTW the Sakoe-Chiba band and the local slope constraint "
2014 "to a @Polygon object. The polygon will show the boundaries of the search domain for the optimal path.")
2015 MAN_END
2016
2017 MAN_BEGIN (U"DTW & TextGrid: To TextGrid (warp times)", U"djmw", 20110603)
2018 INTRO (U"Create a new TextGrid from the selected @DTW and @TextGrid by warping the "
2019 "times from the selected TextGrid to the newly created TextGrid.")
2020 ENTRY (U"Algorithm")
2021 NORMAL (U"First we check whether the y-domain of the DTW and the domain of the TextGrid are "
2022 "equal. If they are, a new TextGrid is created by copying the selected one. "
2023 "We then change its domain and make it equal to the x-domain of the DTW. "
2024 "Then for each tier we change the domain and @@DTW: Get x time from y time...|calculate new times@ by using the path.")
2025 MAN_END
2026
2027 MAN_BEGIN (U"DTW & Sounds: Draw...", U"djmw", 20071204)
2028 INTRO (U"Draws the distances, the path and the sounds for the selected @DTW and the two selected @@Sound|Sounds@.")
2029 MAN_END
2030
2031 MAN_BEGIN (U"DTW & Sounds: Draw warp (x)...", U"djmw", 20071204)
2032 INTRO (U"Draws the warp given a time on the \"x-direction\" for the selected @DTW and the two selected @@Sound|Sounds@.")
2033 MAN_END
2034
2035 MAN_BEGIN (U"Create empty EditCostsTable...", U"djmw", 20120524)
2036 INTRO (U"Creates an empty @@EditCostsTable@.")
2037 ENTRY (U"Settings")
2038 TERM (U"##Name#")
2039 DEFINITION (U"the name of the resulting EditCostsTable object.")
2040 TERM (U"##Number of target symbols#")
2041 DEFINITION (U"the number of different symbols in the target symbol set that you want to give special edit cost values in the EditCostTable. "
2042 "The number you specify may be smaller than the actual target symbol set size because the EditCostTable has an entry for target symbols "
2043 "that fall in a %%rest% category. If you don't want to treat any target symbol is a special way you may set this value to 0.")
2044 TERM (U"##Number of source symbols#")
2045 DEFINITION (U"the number of different symbols in the source symbol set that you want to give special edit cost values in the EditCostTable. "
2046 "The number you specify may be smaller than the actual source symbol set size because the EditCostTable has an entry for source symbols "
2047 "that fall in a %rest% category. If you don't want to treat any source symbol is a special way you may set this value 0.")
2048 MAN_END
2049
2050 MAN_BEGIN (U"EditCostsTable", U"djmw", 20140509)
2051 INTRO (U"One of the @@types of objects@ in Praat.")
2052 NORMAL (U"The EditCostsTable determines the %%string edit costs%, i.e. the costs involved in changing one string of "
2053 "symbols (the %%source%) into another one (the %%target%). "
2054 "String edit costs are generally divided into %%insertion%, %%deletion% and %%substitution% costs. "
2055 "The latter terms refer to the operations that may be performed on a source string to transform it to a target "
2056 "string. For example, to change the source string \"execution\" to the target string \"intention\" we would need "
2057 "one insertion (i), one deletion (d) and three substitutions (s) as the following figure shows.")
2058 SCRIPT (4, 1.0, U"target = Create Strings as characters: \"intention\"\n"
2059 "source = Create Strings as characters: \"execution\"\n"
2060 "selectObject: source, target\n"
2061 "edt = To EditDistanceTable\n"
2062 "Draw edit operations\n"
2063 "removeObject: edt, target, source\n")
2064 NORMAL (U"The figure above was produced with default values for the costs, i.e. the insertion and deletion costs were 1.0 while the "
2065 "substitution cost was 2.0. The actual edit distance between the target and source strings is calculated by the @@EditDistanceTable@ "
2066 "which uses an EditCostsTable to access the specific string edit costs. The figure above was produced by the following commands:")
2067 CODE (U"target = Create Strings as characters: \"intention\"")
2068 CODE (U"source = Create Strings as characters: \"execution\"")
2069 CODE (U"plusObject: target")
2070 CODE (U"edt = To EditDistanceTable")
2071 CODE (U"Draw edit operations")
2072 NORMAL (U"The default EditCostsTable which is in every new EditDistanceTable object has only two rows and two columns, "
2073 "where the cells in this EditCostsTable have the following interpretation:\n")
2074 TERM (U"Cell [1] [2]:")
2075 DEFINITION (U"defines the cost for the insertion of a target symbol in the source string. The default insertion cost is 1.0.")
2076 TERM (U"Cell [2] [1]:")
2077 DEFINITION (U"defines the cost of the deletion of a source symbol. The default value is 1.0.")
2078 TERM (U"Cell [1] [1]:")
2079 DEFINITION (U"defines the cost of substituting a target symbol for a source symbol where the target and source symbols don't match. The default substitution cost is 2.0.")
2080 TERM (U"Cell [2] [2]:")
2081 DEFINITION (U"defines the cost of substituting a target symbol for a source symbol where the target and source symbols do match. The deault value is 0.0.")
2082 ENTRY (U"How to create a non-default EditCostsTable")
2083 NORMAL (U"In general we can define a table for %%numberOfTargets% target symbols and %%numberOfSources% source symbols. These numbers "
2084 "do not necessarily have to be equal to the number of different symbols that may occur in the target and source strings. They only represent the number of symbols that you like to give special edit costs. "
2085 "The EditCostTable will provide one extra dimension to accommodate target symbol insertion costs and source symbol deletion costs and another extra dimension to represent other target and source symbols that don't have separate entries and can therefore be treated as one group. "
2086 "The actual dimension of the table will therefore be (%%numberOfTargets% + 2) \\xx (%%numberOfSources% + 2). This is what the cells in the non-default table mean: ")
2087 LIST_ITEM (U"\\bu The upper matrix part of dimension %%numberOfTargets% \\xx %%numberOfSources% will show at cell [%i] [%j] the costs "
2088 "of substituting the %i-th target symbol for the %j-th source symbol.")
2089 LIST_ITEM (U"\\bu The first %%numberOfSources% values in row (%%numberOfTargets% + 1) represent the costs of substituting one of the target "
2090 "symbols from the target %%rest% category for the source symbol in the corresponding column. The target rest category is the group of "
2091 "targets that do not belong to the %%numberOfTargets% targets represented in the upper part of the matrix.")
2092 LIST_ITEM (U"\\bu The first %%numberOfTargets% values in the column (%%numberOfSources% + 1) represent the costs of substituting the target "
2093 "symbol in the corresponding row for one of the source symbols from the source %%rest% category. The source rest category is the group "
2094 "of source symbols that do not belong to the %%numberOfSources% source symbols represented in the upper part of the matrix.")
2095 LIST_ITEM (U"\\bu The first %%numberOfSources% cells in the last row represent the deletion cost of the corresponding source symbols.")
2096 LIST_ITEM (U"\\bu The first %%numberOfTargets% cells in the last column represent the insertion costs of the corresponding target symbols.")
2097 LIST_ITEM (U"\\bu Finally the four numbers in the cells at the bottom-right corner have an interpretation analogous to the four numbers in "
2098 "the basic EditCostTable we discussed above (but now for the %%rest% symbols).")
2099 ENTRY (U"Example")
2100 NORMAL (U"If we extend the basic table with one extra target and one extra source symbol, then the EditCostTable will "
2101 "be a 3 by 3 table. The numbers in the following table have been chosen to be distinctive and therefore probably "
2102 "will not correspond to any practical situation.")
2103 CODE (U" s ")
2104 CODE (U"t 1.1 1.2 1.3")
2105 CODE (U" 1.4 1.5 1.6")
2106 CODE (U" 1.7 1.8 0.0")
2107 NORMAL (U"By issuing the following series of commands this particular table can be created:")
2108 CODE (U"Create empty EditCostsTable: \"editCosts\", 1, 1")
2109 CODE (U"Set target symbol (index): 1, \"t\"")
2110 CODE (U"Set source symbol (index): 1, \"s\"")
2111 CODE (U"Set insertion costs: \"t\", 1.3")
2112 CODE (U"Set deletion costs: \"s\", 1.7")
2113 CODE (U"Set substitution costs: \"t\", \"s\", 1.1")
2114 CODE (U"Set substitution costs: \"\", \"s\", 1.4")
2115 CODE (U"Set substitution costs: \"t\", \"\", 1.2")
2116 CODE (U"Set costs (others): 1.6, 1.8, 0, 1.5")
2117 NORMAL (U"In the first line we create the (empty) table, we name it %%editCosts% and it creates space for one target "
2118 "and one source symbol. The next line defines the target symbol which becomes the label of the first row of the table. "
2119 "Line 3 defines the source symbol which will become the label of the first column of the table. "
2120 "We next define the insertion and deletion costs, they fill cells [1] [3] and [3] [1], respectively. "
2121 "Cell [1] [1] is filled by the command in line 6. The command in line 7 fills cell [2] [1] which defines the cost "
2122 "of substituting any target symbol unequal to \"t\" for \"s\". The next line fills cell [1] [2] which defines "
2123 "the substitution costs of \"t\" for any source symbol unequal to \"s\". "
2124 "Finally, the command in the last line defines the little 2\\xx2 matrix at the bottom-right that "
2125 "is analogous to the default cost matrix explained above. Therefore cell [2] [2] defines the cost of substituting a "
2126 "target symbol unequal to \"t\" for a source symbol unequal to \"s\" where the target and source symbols don't match, while cell [3] [3] "
2127 "defines the costs when they do match. "
2128 "Cell [3] [2] defines the cost of the deletion of a source symbol unequal \"s\", while cell [2] [3] defines the cost "
2129 "for the insertion of a target symbol unequal \"t\" in the source string. ")
2130 ENTRY (U"How to use a special EditCostsTable")
2131 NORMAL (U"After creating the special EditCostsTable you select it together with the EditDistanceTable and issue the command @@EditDistanceTable & EditCostsTable: Set new edit costs|Set new edit costs@. The EditDistanceTable will then find the minimum edit distance based on the new cost values.")
2132 MAN_END
2133
2134 MAN_BEGIN (U"EditDistanceTable", U"djmw", 20140509)
2135 INTRO (U"One of the @@types of objects@ in Praat.")
2136 NORMAL (U"An EditDistanceTable shows the accumulated distances between a target string and a source string. "
2137 "For example, the accumulated distances between the target string \"intention\" and the source string "
2138 "\"execution\" can be expressed by the following EditDistanceTable:")
2139 SCRIPT (5, 3.5, U"target = Create Strings as characters: \"intention\"\n"
2140 "source = Create Strings as characters: \"execution\"\n"
2141 "selectObject: source, target\n"
2142 "edt = To EditDistanceTable\n"
2143 "Draw: \"decimal\", 1, 0\n"
2144 "removeObject: edt, target, source\n")
2145 NORMAL (U"This figure was created by issuing the following commands:")
2146 CODE (U"target = Create Strings as characters: \"intention\"")
2147 CODE (U"source = Create Strings as characters: \"execution\"")
2148 CODE (U"plusObject: target")
2149 CODE (U"edt = To EditDistanceTable")
2150 CODE (U"Draw: \"decimal\", 1, 0")
2151 NORMAL (U"The target string is always displayed vertically while the source string is displayed horizontally and the origin is at the bottom-left corner of the table. "
2152 "Each cell of this table, dist[%i, %j], contains the accumulated distance between the first %i characters of the target and the first %j characters of the source. The cells on the path through this table which have the "
2153 "minimum accumulated cost are shown with boxes around them. Below we will explain how this path is calculated.")
2154 NORMAL (U"The local directional steps in this path show which %%edit operations% we have to perform on the source string symbols to obtain the target string symbols. "
2155 "Three edit operations exist: (1) %%insertion% of a target symbol in the source string. This happens each time we take a step in the vertical direction along the path. (2) %%deletion% of a symbol in the source string. This happens each time we take a step in horizontal direction along the path. (3) %%substitution% of a source symbol by a target symbol happens at each diagonal step along the path.")
2156 NORMAL (U"If we trace the path from its start at the origin to its end, we see that it first moves up, indicating the insertion of an \"i\" symbol in the source string. "
2157 "In the next step which is in the diagonal direction, the \"n\" target is substituted for the \"e\" source symbol. Next follows another substitution, \"t\" for \"x\". "
2158 "The next diagonal step substitutes \"e\" for an identical \"e\". This step is followed by a horizontal step in which the source symbol \"c\" is deleted. "
2159 "The next diagonal step substitutes an \"n\" for a \"u\". The path now continues in the diagonal direction until the end point and only identical substitutions occur in the last part. The following figure shows these operations more explicitly.")
2160 SCRIPT (4, 1.5, U"target = Create Strings as characters: \"intention\"\n"
2161 "source = Create Strings as characters: \"execution\"\n"
2162 "plusObject: target\n"
2163 "edt = To EditDistanceTable\n"
2164 "Draw edit operations\n"
2165 "removeObject: edt, target, source\n")
2166 NORMAL (U"The value of the accumulated costs in a cell of the table is computed by taking the minimum of the accumulated distances from three possible paths that end in the current cell, i.e. the paths that come from the %%left%, from the %%diagonal% and from %%below%.")
2167 CODE (U"dist[i,j] = min (d__left_, d__diag_, d__below_), ")
2168 NORMAL (U"where ")
2169 CODE (U" d__left _ = dist[i-1,j] + insertionCost(target[i])")
2170 CODE (U" d__diag _ = dist[i-1,j-1] + substitutionCost(source[j],target[i])")
2171 CODE (U" d__below_ = dist[i,j-1] + deletionCost(source[j])")
2172 NORMAL (U"Since the calculation is recursive we start at the origin. After calculating the accumulative distances for each cell in the table as based on the algorithm above, the cell at the top-right position will contain the accumulated edit distance. "
2173 "This distance happens to be 8 for the given example. The value 8 results from using the target-indepent value of 1.0 for the insertion cost, the source-independent value of 1.0 for the deletion costs and a constant value of 2.0 for the substitution costs. "
2174 "If target and source symbol happen to be equal no costs are assigned, or, equivalently the substitution costs are zero if target and source symbol match. If you want more control over these costs you can create an @@EditCostsTable@ and specify your special costs and then @@EditDistanceTable & EditCostsTable: Set new edit costs|set the new edit costs@.")
2175 NORMAL (U"If during the calculations we also keep track of which of the three cells resulted in the local minimum accumulated distance, we can use this directional "
2176 "information to backtrack from the cell at the top-right position to the cell at the bottom-right position and obtain the minimum path.")
2177 MAN_END
2178
2179 MAN_BEGIN (U"EditDistanceTable & EditCostsTable: Set new edit costs", U"djmw", 20120522)
2180 INTRO (U"A command available in the dynamic menu if an @@EditDistanceTable@ and an @@EditCostsTable@ are chosen together.")
2181 NORMAL (U"New accumulated cost values will be calculated and a new path based on these values will be calculated.")
2182 MAN_END
2183
2184 MAN_BEGIN (U"Eigen", U"djmw", 20260317)
2185 INTRO (U"One of the @@types of objects@ in Praat. "
2186 "An object of type #Eigen represents the eigen structure of a square matrix, i.e. it contains "
2187 "the eigenvalues and their corresponding eigenvectors.")
2188 NORMAL (U"If the eigenvalues are real, which is mostly the case, the eigenvalues and their corresponding eigenvectors "
2189 "are always sorted. The default sorting order is descending, i.e. from large to small. The sorting order can be "
2190 "changed to ascending order by using the @@Eigen: Sort...|Sort@ command. ")
2191 NORMAL (U"For complex eigenvalues there is no preferred sorting order. However, because "
2192 "complex eigenvalues always occur in pairs with equal real and opposite imaginary parts, i.e. %a + %i %b and %a - %i %b, "
2193 "the one with positive imaginary value always occurs first. ")
2194 ENTRY (U"Inside an Eigen")
2195 NORMAL (U"With @Inspect you will see the following attributes:")
2196 TERM (U"%numberOfEigenvalues")
2197 DEFINITION (U"the number of eigenvalues and eigenvectors")
2198 TERM (U"%dimension")
2199 DEFINITION (U"the dimension of an eigenvector.")
2200 TERM (U"%eigenvalues[1..%numberOfEigenvalues]")
2201 DEFINITION (U"the real part of the eigenvalues.")
2202 TERM (U"%eigenvectors[1..%numberOfEigenvalues] [1..%dimension]")
2203 DEFINITION (U"the real parts of the eigenvectors, stored by row.")
2204 TERM (U"%onlyReals")
2205 DEFINITION (U"is %true if all eigenvalues are real and %false if not.")
2206 TERM (U"%eigenvalues\\_ im[1..%numberOfEigenvalues]")
2207 DEFINITION (U"the imaginary part of the eigenvalues.")
2208 TERM (U"%eigenvectors\\_ im[1..%numberOfEigenvalues] [1..%dimension]")
2209 DEFINITION (U"the imaginary parts of the eigenvectors, stored by row.")
2210 MAN_END
2211
2212 MAN_BEGIN (U"Eigen: Draw eigenvalues...", U"djmw", 20040407)
2213 INTRO (U"A command to draw the eigenvalues of the selected @Eigen object(s).")
2214 ENTRY (U"Settings")
2215 TERM (U"##Fraction of eigenvalues summed")
2216 DEFINITION (U"defines whether or not fractions are plotted. Fractions %f__%i_ "
2217 "will be calculated for each number %e__%i_ by dividing this number by the sum of all "
2218 "numbers %e__%j_: %f__%i_ = %e__%i_ / \\su__%j=1..%numberOfEigenvalues_ %e__%j_.")
2219 TERM (U"##Cumulative")
2220 DEFINITION (U"defines whether or not cumulative values are plotted. Cumulative "
2221 "values %c__%i_ will be calculated for each number %e__%i_ by summing the first %i "
2222 "numbers %e__%j_: %c__%i_ = \\su__%j=1..%i_ %e__%j_).")
2223 NORMAL (U"A @@Scree plot|scree@ plot can be obtained if both %%Fraction of eigenvalues summed% "
2224 "and %%Cumulative% are unchecked.")
2225 MAN_END
2226
2227 MAN_BEGIN (U"Eigen: Draw eigenvector...", U"djmw", 20160223)
2228 INTRO (U"A command to draw an eigenvector from the selected @Eigen.")
2229 ENTRY (U"Settings")
2230 TERM (U"##Eigenvector number")
2231 DEFINITION (U"determines the eigenvector to be drawn.")
2232 TERM (U"%Component %loadings")
2233 DEFINITION (U"when on, the eigenvector is multiplied with the square root of the corresponding "
2234 "eigenvalue. (For @@PCA@-analysis this means that you will draw the so called "
2235 "%%component loading vector%. You will be able to compare "
2236 "quantitatively the elements in different component loading vectors because "
2237 "the %i-th element in the %j-th component loading vector gives the covariance between the %i-th "
2238 "original variable and the %j-th principal component.)")
2239 TERM (U"##Element range#")
2240 DEFINITION (U"determine the first and last element of the vector that should be drawn.")
2241 TERM (U"##Minimum# and ##Maximum#")
2242 DEFINITION (U"determine the lower and upper bounds of the plot (choosing #Maximum smaller than #Minimum "
2243 "will draw the %%inverted% eigenvector). ")
2244 TERM (U"##Mark size#, ##Mark string#")
2245 DEFINITION (U"determine size and type of the marks that will be drawn.")
2246 TERM (U"##Garnish")
2247 DEFINITION (U"determines whether a bounding box and margins will be drawn.")
2248 MAN_END
2249
2250 MAN_BEGIN (U"Eigen: Get contribution of component...", U"djmw", 19981109)
2251 INTRO (U"A command to ask the selected @Eigen for the contribution of the %j^^th^ "
2252 "eigenvalue to the total sum of eigenvalues.")
2253 ENTRY (U"Details")
2254 NORMAL (U"The contribution is defined as:")
2255 EQUATION (U"%%eigenvalue[j]% / \\Si__%i=1..%numberOfEigenvalues_ %%eigenvalue[i]%")
2256 MAN_END
2257
2258 MAN_BEGIN (U"Eigen: Get cumulative contribution of components...", U"djmw", 19981109)
2259 INTRO (U"A command to ask the selected @Eigen for the contribution of the sum of the "
2260 "eigenvalues[%from..%to] to the total sum of eigenvalues.")
2261 ENTRY (U"Details")
2262 NORMAL (U"The contribution is defined as:")
2263 EQUATION (U"\\Si__%i=%from..%to_ %%eigenvalue[i]% / \\Si__%i=1..%numberOfEigenvalues_ %%eigenvalue[i]%")
2264 MAN_END
2265
2266 MAN_BEGIN (U"Eigen: Get eigenvalue...", U"djmw", 20260228)
2267 INTRO (U"A command to query the selected @Eigen for one of its eigenvalues.")
2268 MAN_END
2269
2270 MAN_BEGIN (U"Eigen: Get eigenvector element...", U"djmw", 20040225)
2271 INTRO (U"A command to query the selected @Eigen for the %j^^th^ element of the "
2272 "%i^^th^ eigenvector.")
2273 MAN_END
2274
2275 MAN_BEGIN (U"Eigen: Get eigenvector...", U"djmw", 20260228)
2276 INTRO (U"A command to query the selected @Eigen for one of its eigenvectors.")
2277 MAN_END
2278
2279 MAN_BEGIN (U"Eigen: Sort...", U"djmw", 20260317)
2280 INTRO (U"A command to sort the eigenvalues and corresponding eigenvectors of the selected @Eigen.")
2281 NORMAL (U"If some of the eigenvalues are complex this command is ineffective.")
2282 ENTRY (U"Settings")
2283 TERM (U"##Sort ascending")
2284 DEFINITION (U"determines the sorting order: if %true the sorting is in ascending order, "
2285 "if %false the sorting is in descending order.")
2286 MAN_END
2287
2288 MAN_BEGIN (U"Eigen: Extract eigenvector...", U"djmw", 20160617)
2289 INTRO (U"Extract a specified eigenvector from the @Eigen as a @Matrix.")
2290 ENTRY (U"Settings")
2291 TERM (U"##Eigenvector number")
2292 DEFINITION (U"determines the eigenvector.")
2293 TERM (U"##Number of rows")
2294 DEFINITION (U"determines the number of rows of the newly created Matrix. If left 0, the number of rows is determined from the dimension, i.e. the number of elements, of the eigenvector and the #numberOfColumns argument as the %dimension / %numberOfColumns, rounded to the next larger integer.")
2295 TERM (U"##Number of columns")
2296 DEFINITION (U"determines the number of columns of the newly created Matrix. If left 0, the number of columns is determined by from the dimension, i.e. the number of elements, of the eigenvector and the #numberOfRows argument as %dimension / %numberOfRows, rounded to the next larger integer.\nIf both ##Number of rows# and ##Number of columns# are zero, a Matrix with only one row and %dimension columns will be created.")
2297 ENTRY (U"Examples")
2298 NORMAL (U"Suppose we have an eigenvector of dimension 3 with elements {0.705, 0.424, 0.566}, then the newly created Matrix will depend on the ##Number of rows# and ##Number of columns# argument as follows:")
2299 NORMAL (U"If %numberOfRows=0 and %numberOfColumns=0, then the Matrix will have 1 row and 3 columns:")
2300 CODE (U"0.705 0.424 0.566")
2301 NORMAL (U"If %numberOfRows=3 and %numberOfColumns=0, then the Matrix will have 3 rows and 1 column:")
2302 CODE (U"0.705")
2303 CODE (U"0.424")
2304 CODE (U"0.566")
2305 NORMAL (U"If %numberOfRows=2 and %numberOfColumns=2, then the Matrix will have 2 rows and 2 columns:")
2306 CODE (U"0.705 0.424")
2307 CODE (U"0.566 0.0")
2308 NORMAL (U"If %numberOfRows=4 and %numberOfColumns=3, then the we get:")
2309 CODE (U"0.705 0.424 0.566")
2310 CODE (U"0.0 0.0 0.0 ")
2311 CODE (U"0.0 0.0 0.0 ")
2312 CODE (U"0.0 0.0 0.0 ")
2313 MAN_END
2314
2315 MAN_BEGIN (U"Eigen & Matrix: To Matrix (project columns)...", U"djmw", 20160223)
2316 INTRO (U"A command to project the columns of the @Matrix object onto the "
2317 "eigenspace of the @Eigen object.")
2318 ENTRY (U"Setting")
2319 TERM (U"##Number of dimensions")
2320 DEFINITION (U"defines the dimension, i.e., the number of rows, of the "
2321 "resulting Matrix object.")
2322 ENTRY (U"Algorithm")
2323 NORMAL (U"Project each column of the Matrix on the coordinate "
2324 "system given by the eigenvectors of the Eigen object. This can be done "
2325 "as follows:")
2326 EQUATION (U"%y__%ij_ = \\Si__%k=1..%dimension_ %e__ik_ %z__%kj_, where")
2327 NORMAL (U"%y__%ij_ is the %j-th element of the %i-th row of the result, "
2328 "%e__%ik_ is the %k-th element of the %i-th eigenvector, "
2329 "%z__%kj_ is the %k-th element of the %j-th column of the selected "
2330 "Matrix object, and %%dimension% is the number of elements in an eigenvector.")
2331 MAN_END
2332
2333 MAN_BEGIN (U"Eigen & Matrix: To Matrix (project rows)...", U"djmw", 20160223)
2334 INTRO (U"A command to project the rows of the @Matrix object onto the "
2335 "eigenspace of the @Eigen object.")
2336 ENTRY (U"Setting")
2337 TERM (U"##Number of dimensions")
2338 DEFINITION (U"defines the dimension, i.e., the number of columns, of the "
2339 "resulting Matrix object.")
2340 ENTRY (U"Algorithm")
2341 NORMAL (U"Project each row of the Matrix on the coordinate "
2342 "system given by the eigenvectors of the Eigen object. This can be done "
2343 "as follows:")
2344 EQUATION (U"%y__%ij_ = \\Si__%k=1..%dimension_ %e__jk_ %z__%ik_, where")
2345 NORMAL (U"%y__%ij_ is the %j-th element of the %i-th row of the result, "
2346 "%e__%jk_ is the %k-th element of the %j-th eigenvector, "
2347 "%z__%ik_ is the %k-th element of the %i-th row of the selected "
2348 "Matrix object, and %%dimension% is the number of elements in an eigenvector.")
2349 MAN_END
2350
2351 MAN_BEGIN (U"Eigen & SSCP: Project", U"djmw", 20020328)
2352 INTRO (U"A command to project the @SSCP object onto the eigenspace of "
2353 "the @Eigen object.")
2354 ENTRY (U"Behaviour")
2355 NORMAL (U"Transform the SSCP object as if it was calculated in a coordinate "
2356 "system given by the eigenvectors of the Eigen object. This can be done "
2357 "as follows:")
2358 EQUATION (U"#%S__%t_ = #%E\\'p #%S #%E, where")
2359 NORMAL (U"where #%E\\'p is the transpose of the matrix with eigenvectors #%E, "
2360 "#%S is the square matrix with sums of squares and crossproducts, and "
2361 "#%S__%t_ the newly created square matrix. The dimension of #%S__%t_ may "
2362 "be smaller than the dimension of #%S.")
2363 MAN_END
2364
2365 MAN_BEGIN (U"Eigen & TableOfReal: Project...", U"djmw", 20040407)
2366 INTRO (U"A command to project the rows of the @TableOfReal object onto the "
2367 "eigenspace of the @Eigen object.")
2368 ENTRY (U"Setting")
2369 TERM (U"##Number of dimensions")
2370 DEFINITION (U"defines the number of dimensions, i.e., the number of columns, of the "
2371 "resulting object.")
2372 ENTRY (U"Algorithm")
2373 NORMAL (U"Project each row of the TableOfReal on the coordinate "
2374 "system given by the eigenvectors of the Eigen object. This can be done "
2375 "as follows:")
2376 EQUATION (U"%y__%ij_ = \\Si__%k=1..%numberOfColums_ %e__jk_ %x__%ik_, where")
2377 NORMAL (U"%e__%jk_ is the %k-th element of the %j-th eigenvector, %x__%ik_ is "
2378 "the %k-th element of the %i-th row and %y__%ij_ is the %j-th element at "
2379 "the %i-th row of the matrix part of the resulting object.")
2380 MAN_END
2381
2382 MAN_BEGIN (U"Electroglottogram", U"djmw", 20190829)
2383 INTRO (U"One of the @@types of objects@ in Praat. The ##Electroglottogram# represents changes in vocal fold contact area during vocal fold vibration.")
2384 ENTRY (U"The Electroglottogram waveform")
2385 NORMAL (U"The following picture shows part of one cycle of a stereotypical (stylized) waveform, with landmarks.")
2386 PICTURE (5,3, Electroglottogram_drawStylized)
2387 NORMAL (U"The orientation of the signal is in the (now) conventional way where the positive y-direction signals larger %%vocal fold contact area% (VFCA). The landmarks refer to:")
2388 LIST_ITEM (U"\\bu a \\-- initial contact of the lower vocal fold margins;")
2389 LIST_ITEM (U"\\bu b \\-- the upper vocal fold margins make initial (but not full) contact;")
2390 LIST_ITEM (U"\\bu c \\-- maximum vocal fold contact reached;")
2391 LIST_ITEM (U"\\bu d \\-- de-contacting phase initiated by separation of the lower vocal fold margins;")
2392 LIST_ITEM (U"\\bu e \\-- upper margins start to separate;")
2393 LIST_ITEM (U"\\bu f \\-- glottis is open, with minimal contact area.")
2394 ENTRY (U"How to get an Electroglottogram?")
2395 NORMAL (U"From standard electroglottography measurements generally a multi-channel sound file results. One channel of this file contains the recorded electroglottogram, the other the recorded sound. You can extract the electroglottogram with the @@Sound: Extract Electroglottogram...|Extract Electroglottogram...@ command that you will find under the ##Sound: Convert -# menu.")
2396 ENTRY (U"Glottal opening and closure times")
2397 NORMAL (U"Getting exact timing of the %%glottal closure instants%% (GCI) and %%glottal opening "
2398 "instants% (GOI) from the Electroglottogram is problematic because as @@Herbst (2019)@ "
2399 "notes: the vocal folds do not vibrate as a uniform mass. Rather, "
2400 "their vibration is characterized by phase differences along both the inferior–superior and "
2401 "anterior–posterior dimensions. These phase differences cause time-delayed contacting and "
2402 "de-contacting of the vocal folds along the respective axes. There is thus no specific instant "
2403 "of glottal closing and opening, but rather an interval during which the closing and opening, "
2404 "respectively, occur. ")
2405 MAN_END
2406
2407 MAN_BEGIN (U"Electroglottogram: High-pass filter...", U"djmw", 20190827)
2408 INTRO (U"Applies a high-pass filter to the Electroglottogram to filter away signal artifacts like baseline and amplitude drifts.")
2409 ENTRY (U"Settings")
2410 TERM (U"##From frequency (Hz)#")
2411 DEFINITION (U"Frequencies lower than this frequency are suppressed.")
2412 TERM (U"##Smoothing (Hz)")
2413 DEFINITION (U"defines the width of the transition area between fully suppressed and fully passed "
2414 "frequencies. Frequencies below %%fromFrequency% will be fully suppressed, frequencies larger "
2415 "than %%fromFrequency%+%%smoothing% will be fully passed.")
2416 MAN_END
2417
2418 MAN_BEGIN (U"Electroglottogram: First central difference...", U"djmw", 20230323)
2419 INTRO (U"Calculates an approximation of the derivative of the @@Electroglottogram@.")
2420 ENTRY (U"Settings")
2421 TERM (U"##New absolute peak")
2422 DEFINITION (U"defines the absolute peak of the approximate derivative. A value of 0.0 prevents scaling.")
2423 ENTRY (U"Algorithm")
2424 NORMAL (U"We take the first central difference, "
2425 "(d%%x%(%%t%)/d%%t%)[%%i%] = (%%x%[%%i%+1] - %%x%[%%i%-1])/(2\\De%%t%).")
2426 NORMAL (U"The real derivative can be found by using the @@Electroglottogram: Derivative...|Derivative...@ method.")
2427 MAN_END
2428
2429 MAN_BEGIN (U"Electroglottogram: To TextGrid (closed glottis)...", U"djmw", 20221115)
2430 INTRO (U"Calculates the intervals where the glottis is closed from the selected @@Electroglottogram@.")
2431 ENTRY (U"Settings")
2432 TERM (U"##Pitch floor (Hz)#")
2433 DEFINITION (U"intervals with a lower pitch will not be considered. ")
2434 TERM (U"##Pitch ceiling (Hz)#")
2435 DEFINITION (U"intervals with a higher pitch will not be considered.")
2436 TERM (U"##Closing threshold#")
2437 DEFINITION (U"the moment of closing of the vocal folds will be taken at a fixed point between a cycle's peak and valley amplitude level.")
2438 PICTURE (4.0, 3.0, Electroglottogram_drawStylizedLevels)
2439 DEFINITION (U"The picture shows, for a %%closingThreshold% value of 0.3, the Closed Glottis Interval that starts at time %t__1_ and ends at time %t__2_. These times were found by calculating the two level crossings at amplitude %%valley+closingThreshold(peak\\--valley)%.")
2440 TERM (U"##Peak threshold#")
2441 DEFINITION (U"cycles with peaks whose relative amplitudes with respect to the maximum peak are lower than this value are not considered.")
2442 ENTRY (U"Algorithm")
2443 NORMAL (U"The algorithm first tries to find peaks and valleys, guided by the settings for the pitch floor and ceiling. From the level crossings before and after a peak the times of glottal closing and opening are determined.")
2444 ENTRY (U"Warning")
2445 NORMAL (U"Getting exact timing of the %%glottal closure instants%% (GCI) and %%glottal opening "
2446 "instants% (GOI) from the Electroglottogram is problematic because as @@Herbst (2019)@ "
2447 "notes: the vocal folds do not vibrate as a uniform mass. Rather, "
2448 "their vibration is characterized by phase differences along both the inferior–superior and "
2449 "anterior–posterior dimensions. These phase differences cause time-delayed contacting and "
2450 "de-contacting of the vocal folds along the respective axes. There is thus no specific instant "
2451 "of glottal closing and opening, but rather an interval during which the closing and opening, "
2452 "respectively, occur. ")
2453 MAN_END
2454
2455 MAN_BEGIN (U"Electroglottogram: Derivative...", U"djmw", 20230323)
2456 INTRO (U"Calculates the derivative of the @@Electroglottogram@.")
2457 ENTRY (U"Algorithm")
2458 NORMAL (U"The settings and the algorithm are explained in @@Sound: To Sound (derivative)...@")
2459 ENTRY (U"About dEGG")
2460 NORMAL (U"The derivative of the Electroglottogram is often indicated as dEGG or DEGG. @@Henrich et al. (2004)@ used the peaks in the derivative to find the %%glottal closure instants% and sometimes also the %%glottal opening instants%. "
2461 "However, in their paper and also in other papers like, for example, @@Herbst et al. (2014)@, the derivative they use is not the exact derivative as calculated in the way explained above. "
2462 "Instead they calculate an approximation of the derivative by taking either the first difference, "
2463 "(d%%x%(%%t%)/d%%t%)[%%i%] = (%%x%[%%i%] - %%x%[%%i%-1])/\\De%%t%, or by taking the first central difference, "
2464 "(d%%x%(%%t%)/d%%t%)[%%i%] = (%%x%[%%i%+1] - %%x%[%%i%-1])/(2\\De%%t%).")
2465 MAN_END
2466
2467 MAN_BEGIN (U"Electroglottogram: To AmplitudeTier (levels)...", U"djmw", 20190831)
2468 INTRO (U"For the selected @@Electroglottogram@, according to the chosen value of the %%closing threshold%, the amplitude at the moment of glottal closure in each glottal cycle is calculated as a proportion of the difference between the values at the peak and the valley of each cycle.")
2469 ENTRY (U"Settings")
2470 TERM (U"##Pitch floor (Hz)#")
2471 DEFINITION (U"defines the lowest pitch we want to consider.")
2472 TERM (U"##Pitch ceiling (Hz)#")
2473 DEFINITION (U"defines the highest pitch we want to consider.")
2474 TERM (U"##Closing threshold (0-1)#")
2475 DEFINITION (U"defines the relative amplitude in each glottal cycle where the moment of glottal closure will be chosen. ")
2476 MAN_END
2477
2478 MAN_BEGIN (U"electroglottography", U"djmw", 20190929)
2479 INTRO (U"Electroglottography (EGG) is a low-cost, noninvasive technology for measuring changes of relative vocal fold contact area during laryngeal voice production @@Herbst (2019)|(Herbst, 2019)@.")
2480 NORMAL (U"In electroglottography (EGG) a high-frequency, low-amperage current is passed between two "
2481 "electrodes placed on each side of the thyroid cartilage. Changes in vocal fold contact area "
2482 "(VFCA) during vocal fold vibration result in admittance variation, and the resulting "
2483 "(demodulated) EGG signal is proportional to the relative VFCA.")
2484 NORMAL (U"In Praat the EGG signal is represented by the @@Electroglottogram@.")
2485 NORMAL (U"From standard electroglottography measurements generally a multi-channel sound file results. One channel of this file contains the recorded electroglottogram, the other the recorded sound. You can extract the electroglottogram with the @@Sound: Extract Electroglottogram...|Extract Electroglottogram...@ command that you will find under the ##Sound: Convert -# menu.")
2486 MAN_END
2487
2488 MAN_BEGIN (U"equivalent rectangular bandwidth", U"djmw", 19980713)
2489 INTRO (U"The %%equivalent rectangular bandwidth% (ERB) of a filter is defined "
2490 "as the width of a rectangular filter whose height equals the peak gain of "
2491 "the filter and which passes the same total power as the filter (given a flat "
2492 "spectrum input such as white noise or an impulse).")
2493 MAN_END
2494
2495 MAN_BEGIN (U"Excitations", U"djmw", 19960918)
2496 INTRO (U"A collection of objects of type @Excitation. "
2497 "You can create an #Excitations by selecting one or more #Excitation's and "
2498 "selecting ##To Excitations#. You can add one or more #Excitation's to an "
2499 "#Excitations by selecting one #Excitations and one or more "
2500 "#Excitation's and selecting ##Add to Excitations# (the #Excitation's will "
2501 "be removed from the list of objects).")
2502 MAN_END
2503
2504 MAN_BEGIN (U"Excitations: Append", U"djmw", 19960918)
2505 INTRO (U"You can choose this command after selecting two objects of type @Excitations. ")
2506 NORMAL (U"A new object is created that contains the second object appended after the first.")
2507 MAN_END
2508
2509 MAN_BEGIN (U"Excitations: To PatternList...", U"djmw", 19960918)
2510 INTRO (U"A command to convert every selected @Excitations to a @PatternList object.")
2511 ENTRY (U"Setting")
2512 TERM (U"##Join")
2513 DEFINITION (U"the number of subsequent @Excitation objects to combine into one row of @PatternList. "
2514 "E.g. if an #Excitation has length 26 and %join = 2 then each row of #PatternList "
2515 "contains 52 elements. The number of rows in #PatternList will be %%my size% / 2. "
2516 "In the conversion process the elements of an #Excitation will be divided by 100.0 in order "
2517 "to guarantee that all patterns have values between 0 and 1.")
2518 MAN_END
2519
2520 MAN_BEGIN (U"FilterBank: Draw filter functions...", U"djmw", 20030901)
2521 INTRO (U"")
2522 MAN_END
2523
2524 MAN_BEGIN (U"FilterBank: Draw frequency scales...", U"djmw", 20030901)
2525 MAN_END
2526
2527 MAN_BEGIN (U"FilterBank: Get frequency in Hertz...", U"djmw", 20030901)
2528 INTRO (U"A @@Query submenu|query@ to the selected FilterBank object.")
2529 ENTRY (U"Return value")
2530 NORMAL (U"a frequency value in Hertz.")
2531 MAN_END
2532
2533 MAN_BEGIN (U"FilterBank: Get frequency in Bark...", U"djmw", 20030901)
2534 MAN_END
2535
2536 MAN_BEGIN (U"FilterBank: Get frequency in mel...", U"djmw", 20030901)
2537 MAN_END
2538
2539 MAN_BEGIN (U"FormantFilter", U"djmw", 20141022)
2540 INTRO (U"A #deprecated @@types of objects|type of object@ in Praat. It has been replaced by @@Spectrogram@.")
2541 NORMAL (U"An object of type FormantFilter represents an acoustic time-frequency "
2542 "representation of a sound: the power spectral density %P(%f, %t), expressed "
2543 "in dB as 10*log10(power/4e-10)). In the now preferred Spectrogram the power is represented instead of its dB value. "
2544 "It is sampled into a number of points around equally spaced times %t__%i_ "
2545 "and frequencies %f__%j_ (on a linear frequency scale).")
2546 ENTRY (U"Inside a FormantFilter")
2547 NORMAL (U"With @Inspect you will see that this type contains the same "
2548 "attributes a @Matrix.")
2549 MAN_END
2550
2551 MAN_BEGIN (U"gammatone", U"djmw", 20100517)
2552 INTRO (U"A gammatone is the product of a rising polynomial, a decaying exponential function, and a "
2553 "cosine wave.")
2554 NORMAL (U"It can be described with the following formula:")
2555 EQUATION (U"gammaTone (%t) = %a %t^^%\\ga\\--1^ e^^\\--2%\\pi\\.c%bandwidth\\.c%t^ "
2556 "cos (2%%\\pi\\.cfrequency\\.ct% + %initialPhase),")
2557 NORMAL (U"where %\\ga determines the order of the gammatone.")
2558 NORMAL (U"The gammatone function has a monotone carrier (the tone) with an "
2559 "envelope that is a gamma distribution function. The amplitude spectrum is essentially "
2560 "symmetric on a linear frequency scale. This function is used in some time-domain "
2561 "auditory models to simulate the spectral analysis performed by the basilar membrane. "
2562 "It was popularized in auditory modelling by @@Johannesma (1972)@. @@Flanagan (1960)@ "
2563 "already used it to model basilar membrane motion.")
2564 MAN_END
2565
2566 MAN_BEGIN (U"generalized singular value decomposition", U"djmw", 20220111)
2567 INTRO (U"For %m > %n, the %%generalized singular value decomposition% (gsvd) of an %m \\xx %n matrix #%A and "
2568 "a %p \\xx %n matrix #%B is given by the pair of factorizations")
2569 EQUATION (U"#%A = #%U #%D__1_ [#%0, #%R] #%Q\\'p and #%B = #%V #%D__2_ [#%0, #%R] #%Q\\'p")
2570 NORMAL (U"The matrices in these factorizations have the following properties:")
2571 TERM (U"\\bu #%U [%m \\xx %m], #%V [%p \\xx %p] and #%Q [%n \\xx %n]")
2572 DEFINITION (U" are orthogonal matrices. In the reconstruction formulas above we maximally need "
2573 "only the first %n columns of matrices #%U and #%V (when %m and/or %p are greater than %n).")
2574 TERM (U"\\bu #%R [%r \\xx %r],")
2575 DEFINITION (U"is an upper triangular nonsingular matrix. %r is the rank of [#%A\\'p, #%B\\'p]\\'p "
2576 "and %r \\<_ %n. The matrix [#%0, #%R] is %r \\xx %n and its first %n \\xx (%n \\-- %r) part "
2577 "is a zero matrix.")
2578 TERM (U"\\bu #%D__1_ [%m \\xx %r] and #%D__2_ [%p \\xx %r]")
2579 DEFINITION (U"are real, nonnegative and \"diagonal\".")
2580 NORMAL (U"In practice, the matrices #%D__1_ and #%D__2_ are never used. Instead a shorter "
2581 "representation with numbers %\\al__%i_ and %\\be__%i_ is used. These numbers obey "
2582 "0 \\<_ \\al__%i_ \\<_ 1 and \\al__%i_^^2^ + \\be__%i_^^2^ = 1. The following relations exist:")
2583 EQUATION (U"#%D__1_\\'p #%D__1_ + #%D__2_\\'p #%D__2_ = #%I, ")
2584 EQUATION (U"#%D__1_\\'p #%D__1_ = #diag (%\\al__1_^^2^, ..., %\\al__%r_^^2^), and, ")
2585 EQUATION (U"#%D__2_\\'p #%D__2_ = #diag (%\\be__1_^^2^, ..., %\\be__%r_^^2^).")
2586 NORMAL (U"The ratios \\al__%i_ / \\be__%i_ are called the %%generalized singular values% of the "
2587 "pair #%A, #%B. Let %l be the rank of #%B and %k + %l (= %r) the rank of [#%A\\'p, #%B\\'p]\\'p. "
2588 "Then the first %k generalized singular values are infinite and the remaining %l are finite. "
2589 "(When %#B is of full rank then, of course, %k = 0).")
2590 ENTRY (U"Special cases")
2591 NORMAL (U"\\bu If #%B is a square nonsingular matrix, the gsvd of #%A and #%B is equivalent to the "
2592 "singular value decomposition of #%A #%B^^\\--1^.")
2593 NORMAL (U"\\bu The generalized eigenvalues and eigenvectors of #%A\\'p #%A - %\\la #%B\\'p #%B "
2594 "can be expressed in terms of the gsvd. The columns of the matrix #%X, constructed as")
2595 CODE (U"X = Q*( I 0 )")
2596 CODE (U" ( 0 inv(R) ),")
2597 NORMAL (U"form the eigenvectors. The important eigenvectors, of course, correspond "
2598 "to the positions where the %l eigenvalues are not infinite.")
2599 MAN_END
2600
2601 MAN_BEGIN (U"Get incomplete gamma...", U"djmw", 20170531)
2602 INTRO (U"Get the value of the @@incomplete gamma function@ for particular values of \\al and %x.")
2603 ENTRY (U"Algorithm")
2604 NORMAL (U"The algorithm is taken from @@Kostlan & Gokhman (1987)@.")
2605 MAN_END
2606
2607 MAN_BEGIN (U"incomplete gamma function", U"djmw", 20170531)
2608 INTRO (U"The incomplete gamma function is defined as:")
2609 EQUATION (U"\\Ga(\\al, %x) = \\in__%x_^^\\oo^ %t^^\\al−1^e^^-%t^dt, \\Ga(\\al) = \\Ga(\\al, 0),")
2610 NORMAL (U"where \\al and %x are complex numbers and Re(\\al) > 0.")
2611 NORMAL (U"The complementary incomplete gamma function is defined as:")
2612 EQUATION (U"\\ga(\\al, %x) = \\in__%0_^^%x^ %t^^\\al−1^e^^-%t^dt = \\Ga(\\al)−\\Ga(\\al, %x).")
2613 MAN_END
2614
2615 MAN_BEGIN (U"IDX file format", U"djmw", 20160220)
2616 INTRO (U"The IDX file format is a simple format for vectors and multidimensional matrices of various numerical types. ")
2617 NORMAL (U"The basic format according to %%http://yann.lecun.com/exdb/mnist/% is:")
2618 CODE (U"magic number")
2619 CODE (U"size in dimension 1")
2620 CODE (U"size in dimension 2")
2621 CODE (U"size in dimension 3")
2622 CODE (U"....")
2623 CODE (U"size in dimension N")
2624 CODE (U"data")
2625 NORMAL (U"The magic number is four bytes long. The first 2 bytes are always 0.")
2626 NORMAL (U"The third byte codes the type of the data:")
2627 CODE (U"0x08: unsigned byte")
2628 CODE (U"0x09: signed byte")
2629 CODE (U"0x0B: short (2 bytes)")
2630 CODE (U"0x0C: int (4 bytes)")
2631 CODE (U"0x0D: float (4 bytes)")
2632 CODE (U"0x0E: double (8 bytes)")
2633 NORMAL (U"The fourth byte codes the number of dimensions of the vector/matrix: 1 for vectors, 2 for matrices....")
2634 NORMAL (U"The sizes in each dimension are 4-byte integers (big-endian, like in most non-Intel processors).")
2635 NORMAL (U"The data is stored like in a C array, i.e. the index in the last dimension changes the fastest.")
2636 ENTRY (U"Behaviour")
2637 NORMAL (U"If the storage format indicates that there are more than 2 dimensions, the resulting Matrix accumulates dimensions 2 and higher in the columns. For example, with three dimensions of size n1, n2 and n3, respectively, the resulting Matrix object will have n1 rows and %%n2\\xxn3% columns.")
2638
2639 ENTRY (U"Example")
2640 NORMAL (U"The training and testing data of the MNIST database of handwritten digits at http://yann.lecun.com/exdb/mnist/ is stored in %%compressed% IDX formatted files. ")
2641 NORMAL (U"Reading the uncompressed file %%train-images-idx3-ubyte% available at http://yann.lecun.com/exdb/mnist/ with 60000 images of 28\\xx28 pixel data, will result in a new Matrix object with 60000 rows and 784 (=28\\xx28) columns. Each cell will contain a number in the interval from 0 to 255.")
2642 NORMAL (U"Reading the uncompressed file %%train-labels-idx1-ubyte% with 60000 labels will result in a new Matrix object with 1 row and 60000 columns. Each cell will contain a number in the interval from 0 to 9.")
2643 MAN_END
2644
2645 MAN_BEGIN (U"ISpline", U"djmw", 19990627)
2646 INTRO (U"One of the @@types of objects@ in Praat. ")
2647 NORMAL (U"An object of type ISpline represents a linear combination of basis "
2648 "i@spline functions. Each basis %ispline is a monotonically increasing "
2649 "polynomial function of degree %p.")
2650 EQUATION (U"ISpline (%x) = \\Si__%k=1..%numberOfCoefficients_ %c__%k_ %ispline__%k_(%x)")
2651 MAN_END
2652
2653 MAN_BEGIN (U"Itakura-Saito divergence", U"djmw", 20190619)
2654 INTRO (U"The ##Itakura-Saito divergence# is one of the many measures used to measure the similarity between an object %x and a reference %y.")
2655 NORMAL (U"It is defined as %d(%x|%y)= %x/%y - log(%x/%y) - 1. Only if %x = %y the divergence is zero.")
2656 NORMAL (U"It is called a divergence and not a distance, technically speaking, because it is not symmetric: %d(%x|%y) is not the same as %d(%y|%x).")
2657 NORMAL (U"One of the advantages of the Itakura-Saito divergence is its scale invariance which means that %d(%\\lax|%\\lay)=%d(%x|%y), "
2658 "for any number \\la. This makes it a very suitable measure for the comparison of audio spectra.")
2659 MAN_END
2660
2661 MAN_BEGIN (U"jackknife", U"djmw", 20141101)
2662 INTRO (U"A technique for estimating the bias and standard deviation of an estimate.")
2663 NORMAL (U"Suppose we have a sample #%x = (%x__1_, %x__2_,...%x__n_) and wish to estimate "
2664 "the bias and standard error of an estimator \\Te. The jackknife "
2665 "focuses on the samples that leave out one observation at a time: "
2666 "the %i-th jackknife sample consists of the data with the %i-th observation "
2667 "removed.")
2668 MAN_END
2669
2670 MAN_BEGIN (U"Kirshenbaum phonetic encoding", U"djmw", 20120413)
2671 INTRO (U"The Kirshenbaum phonetic encoding represents International Phonetic Alphabet symbols using ascii characters. See: http://www.kirshenbaum.net/IPA/ascii-ipa.pdf. The @@eSpeak@ speech synthesizer on which our synthesizer is based accepts this encoding as text input. ")
2672 MAN_END
2673
2674 MAN_BEGIN (U"LAPACK", U"djmw", 20200131)
2675 NORMAL (U"From %%http://www.netlib.org/lapack%:")
2676 DEFINITION (U"\"LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems and singular value problems. All the necessary matrix factorizations are also provided.\"")
2677 NORMAL (U"LAPACK is written in the computer language FORTRAN. In Praat we use CLAPACK, a version which was automatically translated from FORTRAN to C.")
2678 NORMAL (U"More information can be found in the @@Anderson et al. (1999)|LAPACK's user guide@.")
2679 MAN_END
2680
2681 MAN_BEGIN (U"Legendre polynomials", U"djmw", 19990620)
2682 INTRO (U"The Legendre polynomials %P__%n_(%x) of degree %n are special "
2683 "orthogonal polynomial functions defined on the domain [-1, 1].")
2684 NORMAL (U"Orthogonality:")
2685 EQUATION (U"__-1_\\in^^1^ %W(%x) %P__%i_(%x) %P__%j_(%x) %dx = \\de__%ij_")
2686 EQUATION (U"%W(%x) = 1 (-1 < x < 1)")
2687 NORMAL (U"They obey certain recurrence relations:")
2688 EQUATION (U"%n %P__%n_(%x) = (2%n \\-- 1) %x %P__%n-1_(%x) \\-- (%n \\-- 1) %P__%n-2_(%x)")
2689 EQUATION (U"%P__0_(%x) = 1")
2690 EQUATION (U"%P__1_(%x) = %x")
2691 NORMAL (U"We may %change the domain of these polynomials to [%xmin, %xmax] by "
2692 "using the following transformation:")
2693 EQUATION (U"%x\\'p = (2%x \\-- (%xmax + %xmin)) / (%xmax - %xmin).")
2694 NORMAL (U"We subsequently use %P__%k_(%x\\'p) instead of %P__%k_(%x).")
2695 MAN_END
2696
2697 MAN_BEGIN (U"LegendreSeries", U"djmw", 19990620)
2698 INTRO (U"One of the @@types of objects@ in Praat.")
2699 NORMAL (U"An object of type LegendreSeries represents a linear combination of @@Legendre polynomials@ "
2700 "%P__%k_(%x).")
2701 EQUATION (U"LegendreSeries (%x) = \\Si__%k=1..%numberOfCoefficients_ %c__%k_ %P__%k_(%x)")
2702 MAN_END
2703
2704 MAN_BEGIN (U"LegendreSeries: To Polynomial", U"djmw", 19990620)
2705 INTRO (U"A command to transform the selected @LegendreSeries object into a @@Polynomial@ object.")
2706 NORMAL (U"We find polynomial coefficients %c__%k_ such that")
2707 EQUATION (U"\\Si__%k=1..%numberOfCoefficients_ %c__%k_ %x^^%k^ = "
2708 "\\Si__%k=1..%numberOfCoefficients_ %l__%k_ %P__%k_(%x)")
2709 NORMAL (U"We use the recurrence relation for @@Legendre polynomials@ to calculate these coefficients.")
2710 MAN_END
2711
2712 MAN_BEGIN (U"Mahalanobis distance", U"djmw", 20160120)
2713 INTRO (U"The Mahalanobis distance is defined as the distance between a (multidimensional) point and a distribution. "
2714 "It is the multivariate form of the distance measured in units of standard deviation and is "
2715 "named after the famous Indian statistician R.P. Mahalanobis (1893 \\-- 1972).")
2716 NORMAL (U"Given a normal distribution with covariance matrix ##S# and mean ##\\mu#, the squared Mahalanobis distance of a point "
2717 "##x## to the mean of this distribution is given by %d^^2^(##x#)=(##x#-##\\mu#)##\\'p###S#^^-1^(##x#-##\\mu#), where "
2718 "(##x#-##\\mu#)##\\'p# is the transpose of (##x#-##\\mu#).")
2719 NORMAL (U"The distance formula above says that we have to weigh dimensions according to their covariances. If the covariance matrix ##S# "
2720 "happens to be diagonal the formula above reduces to %d^^2^(##x#)=\\Si__%i=1_^^N^ (%x__%i_-%\\mu__%i_)^^2^/%\\si__%i_.")
2721 MAN_END
2722
2723 MAN_BEGIN (U"Matrix: Draw distribution...", U"djmw", 20041110)
2724 INTRO (U"A command to draw the distribution histogram of the values in the selected part of a @Matrix.")
2725 ENTRY (U"Settings")
2726 TERM (U"##Horizontal range#, ##Vertical range#")
2727 DEFINITION (U"determine the part of the matrix whose distribution will be drawn.")
2728 TERM (U"##Minimum value#, ##Maximum value#")
2729 DEFINITION (U"determine the range of values that will be considered in the distribution. "
2730 "To treat all bin widths equally, the range will include the %%Minimum value% and exclude the "
2731 "%%Maximum value% (see below).")
2732 TERM (U"##Number of bins")
2733 DEFINITION (U"determines the number of bars in the distribution histogram.")
2734 TERM (U"##Minimum frequency#, ##Maximum frequency#")
2735 DEFINITION (U"determine the limits of the vertical axis.")
2736 ENTRY (U"Algorithm")
2737 NORMAL (U"For a particular matrix element %z, the histogram bin number %%i% that will be incremented obeys the following relation:")
2738 EQUATION (U"%%lowerBinBorder%__%i_ \\<_ %z < %%lowerBinBorder%__%i_+ %%binWidth%,")
2739 NORMAL (U"where")
2740 EQUATION (U"%%binWidth% = (%%maximumValue% - %%minimumValue%)/%%numberOfBins%,")
2741 NORMAL (U"and")
2742 EQUATION (U"%%lowerBinBorder%__%i_ = %%minimumValue% + (%i - 1)\\.c%%binWidth%.")
2743 NORMAL (U"In this way all bins will be based on exactly the same width, as each binning interval includes its lower border "
2744 "and excludes its upper border "
2745 "(i.e., each interval is closed to the left and open to the right). ")
2746 MAN_END
2747
2748 MAN_BEGIN (U"Matrix: Solve equation...", U"djmw", 19961006)
2749 INTRO (U"Solve the general matrix equation #A #x = #b for #x.")
2750 NORMAL (U"The matrix #A can be any general %m \\xx %n matrix, #b is a %m-dimensional "
2751 "and #x a %n-dimensional vector. The @Matrix contains #A as its first %n columns "
2752 "and #b as its last column. The %n-dimensional solution is returned as a #Matrix "
2753 "with %n columns.")
2754 NORMAL (U"When the number of equations (%m) is %greater than the number of unknowns (%n) the "
2755 "algorithm gives the best least-squares solution. If on the contrary you "
2756 "have %fewer equations than unknowns the solution will not be unique.")
2757 ENTRY (U"Method")
2758 NORMAL (U"Singular value decomposition with backsubstitution. "
2759 "Zero will be substituted for eigenvalues smaller than %tolerance \\.c "
2760 "%%maximumEigenvalue% (when the user-supplied %tolerance equals 0.0 a "
2761 "value of 2.2 \\.c 10^^-16^ \\.c %%numberOfUnknowns% "
2762 "will be used as %tolerance).")
2763 NORMAL (U"See for more details: @@Golub & van Loan (1996)@ chapters 2 and 3.")
2764 MAN_END
2765
2766 MAN_BEGIN (U"Matrix: To Eigen (special)...", U"djmw", 20260328)
2767 INTRO (U"A command to get the @Eigen structure of a square matrix.")
2768 ENTRY (U"Settings")
2769 TERM (U"##Matrix type#")
2770 DEFINITION (U"determines the matrix type. Symmetric matrices always have real eigenvalues and eigenvectors,"
2771 " while a general matrix can have complex eigenvalues and eigenvectors. For a general matrix"
2772 " the complex eigenvalues always occur in pairs with equal real parts and complex parts"
2773 " with opposite signs. ")
2774 TERM (U"##Number of eigenvalues#")
2775 DEFINITION (U"The number of eigenvalues you need. If you choose the default, 0, the number of eigenvalues"
2776 " will be equal to the dimension of the square matrix. If the number you choose is less than"
2777 " the dimension of the matrix then if the sort is %ascending the smallest eigenvalues are selected."
2778 " If the sort is %descending the largest eigenvalues are selected.")
2779 TERM (U"##Sort ascending")
2780 DEFINITION (U"if true, the eigenvalues and corresponding eigenvectors are sorted from smallest to largest,"
2781 " if false the values are sorted from largest to smallest. For a general matrix the eigenvalues/vectors"
2782 " are not sorted.")
2783 MAN_END
2784
2785 MAN_BEGIN (U"Matrix: To NMF (m.u.)...", U"djmw", 20190409)
2786 INTRO (U"A command to get the @@non-negative matrix factorization@ of a matrix by means of a multiplicative update algorithm.")
2787 MAN_END
2788
2789 MAN_BEGIN (U"Matrix: To NMF (ALS)...", U"djmw", 20190409)
2790 INTRO (U"A command to get the @@non-negative matrix factorization@ of a matrix by means of an Alternating Least Squares algorithm.")
2791 MAN_END
2792
2793 MAN_BEGIN (U"Matrix: To NMF (IS)...", U"djmw", 20191025)
2794 INTRO (U"A command to get the @@non-negative matrix factorization@ of a matrix based on the Itakura-Saito distance as was described in @@Févotte, Bertin & Durrieu (2009)@.")
2795 MAN_END
2796
2797 MAN_BEGIN (U"MelFilter", U"djmw", 20141022)
2798 INTRO (U"A #deprecated @@types of objects|type of object@ in Praat. It has been replaced by the @@MelSpectrogram@.")
2799 NORMAL (U"An object of type MelFilter represents an acoustic time-frequency "
2800 "representation of a sound: the power spectral density %P(%f, %t), "
2801 "expressed in dB's. "
2802 "It is sampled into a number of points around equally spaced times %t__%i_ "
2803 "and frequencies %f__%j_ (on a Mel frequency scale).")
2804 NORMAL (U"The frequency in mels is:")
2805 EQUATION (U"mels = 2595 * log10 (1 + hertz / 700),")
2806 NORMAL (U"and its inverse is:")
2807 EQUATION (U"hertz = 700 * (10.0^^mel / 2595.0^ - 1).")
2808 MAN_END
2809
2810 MAN_BEGIN (U"MelSpectrogram", U"djmw", 20141209)
2811 INTRO (U"One of the @@types of objects@ in Praat.")
2812 NORMAL (U"An object of type MelSpectrogram represents an acoustic time-frequency "
2813 "representation of a sound: the power spectral density %P(%f, %t)."
2814 "It is sampled into a number of points around equally spaced times %t__%i_ "
2815 "and frequencies %f__%j_ (on a Mel frequency scale).")
2816 NORMAL (U"The mel frequency scale is defined as:")
2817 EQUATION (U"mel = 2595 * log10 (1 + hertz / 700),")
2818 NORMAL (U"and its inverse is:")
2819 EQUATION (U"hertz = 700 * (10.0^^mel / 2595.0^ - 1).")
2820 ENTRY (U"Inside a MelSpectrogram")
2821 NORMAL (U"With @Inspect you will see that this type contains the same "
2822 "attributes a @Matrix.")
2823 MAN_END
2824
2825 MAN_BEGIN (U"MelSpectrogram: Paint image...", U"djmw", 20141023)
2826 INTRO (U"A command to draw the selected @MelSpectrogram into the @@Picture window@ in shades of grey.")
2827 MAN_END
2828
2829 MAN_BEGIN (U"MelSpectrogram: To MFCC...", U"djmw", 20141023)
2830 INTRO (U"A command to create a @MFCC object from each selected @MelSpectrogram "
2831 "object.")
2832 NORMAL (U"Mel frequency cepstral coefficients %c__%k_ in each frame of the MFCC object result from the output of a Discrete Cosine "
2833 "Transform on spectral values %P__%j_ in the corresponding frame of the MelSpectrogram. The following formula "
2834 "shows the relation between the values in each frame:")
2835 EQUATION (U"%c__%k-1_ = \\Si__%j=1_^^%N^ %P__%j_ cos (\\pi(%k-1)(%j-0.5)/%N)),")
2836 NORMAL (U"where %N represents the number of spectral values and %P__%j_ the power in dB "
2837 "of the %j^^%th^ spectral value (%k runs from 1 to %N).")
2838 NORMAL (U"This transformation was first used by @@Davis & Mermelstein (1980)@.")
2839 MAN_END
2840
2841 MAN_BEGIN (U"MFCC: To TableOfReal...", U"djmw", 20120504)
2842 INTRO (U"Convert the selected @@MFCC@ object to a @@TableOfReal@ object. Each MFCC frame results "
2843 "in one row in the TableOfReal. If the \"Include energy\" option is chosen, the zeroth MFCC "
2844 "coefficient will be saved in the first column.")
2845 MAN_END
2846
2847 MAN_BEGIN (U"MSpline", U"djmw", 19990627)
2848 INTRO (U"One of the @@types of objects@ in Praat. ")
2849 NORMAL (U"An object of type MSpline represents a linear combination of basis "
2850 "m@spline functions. Each basis %mspline is a positive polynomial function "
2851 "of degree %p.")
2852 EQUATION (U"MSpline (%x) = \\Si__%k=1..%numberOfCoefficients_ %c__%k_ %mspline__%k_(%x)")
2853 MAN_END
2854
2855 MAN_BEGIN (U"NMF", U"djmw", 20190312)
2856 INTRO (U"An object of type ##NMF# represents the @@non-negative matrix factorization@ of a matrix.")
2857 MAN_END
2858
2859 MAN_BEGIN (U"non-negative matrix factorization", U"djmw", 20230801)
2860 INTRO (U"The ##non-negative matrix factorization## or ##NMF# is a factorization of a data matrix #%D, whose elements are all non-negative, into a feature matrix #%F and a weights matrix #%W such that #%D \\~~ #%F #%W, where the elements of #%F and #%W are also all non-negative.")
2861 ENTRY (U"Algorithms for computing NMF")
2862 NORMAL (U"More background on the algorithms used can be found in @@Berry et al. (2007)@")
2863 NORMAL (U"The algorithms fall into three general classes:")
2864 TERM (U"##1. Multiplicative updates#,")
2865 TERM (U"##2. Alternating Least squares#,")
2866 TERM (U"##3. Projected Gradient.#")
2867 ENTRY (U"Multiplicative Updates")
2868 CODE (U"initialize F and W")
2869 CODE (U"while iter < maxinter and not convergence")
2870 CODE1 (U"(MU) W = W .* (F'*D) ./ (F'*F*W + 10^^−9^)")
2871 CODE1 (U"(MU) F = F .* (D*W') ./ (F*W*W' + 10^^−9^)")
2872 CODE1 (U"test for convergence")
2873 CODE (U"endwhile")
2874 NORMAL (U"In the multiplicative update (MU) steps above \"*\" means ordinary matrix multiplication while \".*\" and \"./\" mean elementwise matrix operations. The factors 10^^-9^ guard against division by zero.")
2875 ENTRY (U"Alternating Least Squares")
2876 NORMAL (U"The optimization of ##D \\~~ F*W# is not convex in both ##F# and ##W# it is convex in either ##F# or ##W#. Therefor given one, "
2877 "the other can be found by a simple least squares (LS) algorithm. This can be done in an alternating fashion.")
2878 NORMAL (U"The Aternating Least Squares (ALS) algorithm is as follows:")
2879 CODE (U"initialize F")
2880 CODE (U"while iter < maxinter and not convergence")
2881 CODE1 (U"(LS) Solve for W in matrix equation F'*F*W = F'*D")
2882 CODE1 (U"(NONNEG) Set all negative elements in W to 0")
2883 CODE1 (U"(LS) Solve for F in matrix equation W*W'*F' = W*D'")
2884 CODE1 (U"(NONNEG) Set all negative elements in F to 0")
2885 CODE1 (U"test for convergence")
2886 CODE (U"endwhile")
2887 NORMAL (U"")
2888 MAN_END
2889
2890 MAN_BEGIN (U"pairwise algorithm for computing sample variances", U"djmw", 20170806)
2891 INTRO (U"An algorithm to compute the mean and the variance of an array of numbers. By pairwise combining array elements, "
2892 "the total number of arithmetic operations is reduced and therefore also the noise due to finite precision arithmetic. "
2893 "The algorithm is described in @@Chan, Golub & LeVeque (1979)@ and a comparison with other algorithms is presented in "
2894 "@@Chan, Golub & LeVeque (1983)@.")
2895 MAN_END
2896
2897 MAN_BEGIN (U"PatternList", U"djmw", 20160524) // 2026
2898 INTRO (U"One of the @@types of objects@ in Praat.")
2899 INTRO (U"An object of type PatternList is a list of patterns that can serve as "
2900 "inputs for a neural net. All elements in a PatternList have to be in the interval [0, 1].")
2901 ENTRY (U"PatternList commands")
2902 NORMAL (U"Creation:")
2903 LIST_ITEM (U"\\bu ##Create PatternList with zeroes...#")
2904 LIST_ITEM (U"\\bu @@TableOfReal: To PatternList and Categories...@")
2905 NORMAL (U"Synthesis:")
2906 LIST_ITEM (U"\\bu @@FFNet & PatternList: To Categories...@")
2907 LIST_ITEM (U"\\bu @@PatternList & Categories: To FFNet...@")
2908 ENTRY (U"Inside a PatternList")
2909 NORMAL (U"With @Inspect you will see that this type contains the same "
2910 "attributes as a @Matrix.")
2911 MAN_END
2912
2913 MAN_BEGIN (U"PCA", U"djmw", 19990323)
2914 INTRO (U"One of the @@types of objects@ in Praat. "
2915 "See the @@Principal component analysis@ tutorial.")
2916 NORMAL (U"An object of type PCA represents the principal components analysis "
2917 "of a multivariate dataset.")
2918 ENTRY (U"Commands")
2919 NORMAL (U"Creation:")
2920 LIST_ITEM (U"\\bu @@Principal component analysis@ tutorial")
2921 LIST_ITEM (U"\\bu @@TableOfReal: To PCA@")
2922 ENTRY (U"Inside a PCA")
2923 NORMAL (U"With @Inspect you will see that this type contains the same "
2924 "attributes as an @Eigen with the following extras:")
2925 TERM (U"%numberOfObservations")
2926 DEFINITION (U"the number of observations in the multivariate dataset that originated the PCA, "
2927 "usually equal to the dataset's number of rows.")
2928 TERM (U"%labels[1..%dimension]")
2929 DEFINITION (U"the label that corresponds to each dimension.")
2930 TERM (U"%centroid")
2931 DEFINITION (U"the centroids of the originating multivariate data set.")
2932 MAN_END
2933
2934 MAN_BEGIN (U"PCA: Get fraction variance accounted for...", U"djmw", 19990106)
2935 INTRO (U"A command to query the selected @PCA for the fraction %%variance "
2936 "accounted for% by the selected components.")
2937 ENTRY (U"Setting")
2938 TERM (U"##Principal component range")
2939 DEFINITION (U"defines the range of the principal components. If you choose both numbers equal, "
2940 "you get the fraction of the \"variance\" explained by that one component.")
2941 ENTRY (U"Details")
2942 NORMAL (U"The contribution is defined as:")
2943 EQUATION (U"\\Si__%i=%from..%to_ %%eigenvalue[i]% / \\Si__%i=1..%numberOfEigenvalues_ %%eigenvalue[i]%")
2944 MAN_END
2945
2946 MAN_BEGIN (U"PCA: Get eigenvalue...", U"djmw", 20040225)
2947 INTRO (U"A command to query the selected @PCA for the %i^^th^ "
2948 "eigenvalue.")
2949 MAN_END
2950
2951 MAN_BEGIN (U"PCA: Get eigenvector element...", U"djmw", 20040225)
2952 INTRO (U"A command to query the selected @PCA for the %j^^th^ element of the "
2953 "%i^^th^ eigenvector.")
2954 MAN_END
2955
2956 MAN_BEGIN (U"PCA: Get equality of eigenvalues...", U"djmw", 19981102)
2957 INTRO (U"A command to get the probability that some of the eigenvalues of the "
2958 "selected @PCA object are equal. A low probability means that it is not "
2959 "very likely that that these numbers are equal.")
2960 NORMAL (U"We test the hypothesis %H__0_: %\\la__%from_ = ... = %\\la__%to_ "
2961 "that %r (= %to\\--%from+1) of the eigenvalues \\la of the covariance "
2962 "matrix are equal. The remaining eigenvalues are unrestricted as to their "
2963 "values and multiplicities. The alternative hypothesis to %H__0_ is that "
2964 "some of the eigenvalues in the set are distinct.")
2965 ENTRY (U"Settings")
2966 TERM (U"##Eigenvalue range")
2967 DEFINITION (U"define the range of eigenvalues to be tested for equality.")
2968 TERM (U"##Conservative test")
2969 DEFINITION (U"when on, a more conservative estimate for %n is chosen (see below).")
2970 ENTRY (U"Details")
2971 NORMAL (U"The test statistic is:")
2972 EQUATION (U"\\ci^2 = \\--%n \\Si__%j=%from..%to_ ln %eigenvalue[%j] + %n %r "
2973 "ln (\\Si__%j=%from..%to_ %eigenvalue[%j] / %r),")
2974 NORMAL (U"with %r(%r+1)/2 \\--1 degrees of freedom. Here %n = %totalNumberOfCases \\-- 1.")
2975 NORMAL (U"A special case occurs when the variation in the last %r dimensions is spherical. In a "
2976 "slightly more conservative test we may replace %n by %n\\--%from\\--(2%r^2+%r+2)/6%r.")
2977 NORMAL (U"Also see @@Morrison (1990)@, page 336.")
2978 MAN_END
2979
2980 MAN_BEGIN (U"PCA: Get number of components (VAF)...", U"djmw", 19990111)
2981 INTRO (U"A command to ask the selected @PCA for the minimum number of "
2982 "components that are necessary "
2983 "to explain the given fraction %%variance accounted for%.")
2984 ENTRY (U"Setting")
2985 TERM (U"##Variance accounted for (fraction)")
2986 DEFINITION (U"the fraction variance accounted for that should be explained.")
2987 MAN_END
2988
2989 MAN_BEGIN (U"PCA: To TableOfReal (reconstruct 1)...", U"djmw", 20030108)
2990 INTRO (U"A command to reconstruct a single data item. The result is stored as "
2991 "a @TableOfReal with only one row.")
2992 ENTRY (U"Settings")
2993 TERM (U"##Coefficients")
2994 DEFINITION (U"the weight for the eigenvectors.")
2995 NORMAL (U"The algorithm is explained in @@PCA & Configuration: To TableOfReal "
2996 "(reconstruct)@.")
2997 MAN_END
2998
2999 MAN_BEGIN (U"PCA & Configuration: To TableOfReal (reconstruct)", U"djmw", 20030108)
3000 INTRO (U"A command to reconstruct a @TableOfReal from the selected @Configuration"
3001 " and @PCA.")
3002 NORMAL (U"The TableOfReal is reconstructed from the eigenvectors of the PCA and "
3003 "elements of the Configuration are the weight factors: ")
3004 EQUATION (U"%#t__%i_ = \\Si__%k_ %c__%ik_ #%e__%k_,")
3005 NORMAL (U"where %#t__%i_ is the %i-th row in the resulting TableOfReal object, %c__%ik_ is "
3006 "the element at row %i and column %k in the Configuration object and #%e__%k_ "
3007 "the %k-th eigenvector from the PCA object.")
3008 MAN_END
3009
3010 MAN_BEGIN (U"PCA & PCA: Get angle between pc1-pc2 planes", U"djmw", 20220111)
3011 INTRO (U"A command to calculate the angle between two planes. Each plane is spanned by the first "
3012 "two eigenvectors from the corresponding @@PCA@.")
3013 ENTRY (U"Algorithm")
3014 NORMAL (U"The algorithm is described in section 12.4.3 of @@Golub & van Loan (1996)@:")
3015 NORMAL (U"First we form the projection of one set of eigenvectors on the other set. "
3016 "This results in a 2\\xx2 matrix #C:")
3017 EQUATION (U"#C = #E__1_\\'p #E__2_,")
3018 NORMAL (U"where #E__1_ and #E__2_ are 2\\xx%%dimension% and %%dimension%\\xx2 matrices "
3019 "that contain the first two eigenvectors of the PCA's, respectively.")
3020 NORMAL (U"Next, we compute the @@singular value decomposition@ of #C:")
3021 EQUATION (U"#C = #U #D #V\\'p")
3022 NORMAL (U"Now the cosine of the angle between the two planes is given by the second singular value \\si__2_ and "
3023 "the angle in degrees is therefore:")
3024 EQUATION (U"arccos (\\si__2_)\\.c180/\\pi")
3025 MAN_END
3026
3027 MAN_BEGIN (U"PCA & PCA: To Procrustes...", U"djmw", 20041028)
3028 INTRO (U"A command to calculate a @Procrustes from the two selected @@PCA@'s.")
3029 NORMAL (U"Determines the orthogonal @@Procrustes transform@.")
3030 NORMAL (U"Algorithm 12.4.1 in @@Golub & van Loan (1996)@.")
3031 MAN_END
3032
3033 MAN_BEGIN (U"PCA & TableOfReal: To Configuration...", U"djmw", 19990111)
3034 INTRO (U"A command to construct a @Configuration from the selected @TableOfReal"
3035 " and @PCA.")
3036 ENTRY (U"Setting")
3037 TERM (U"##Number of dimensions")
3038 DEFINITION (U"determines the number of dimensions of the resulting Configuration.")
3039 ENTRY (U"Algorithm")
3040 NORMAL (U"The TableOfReal is projected on the eigenspace of the PCA, i.e., "
3041 "each row of the TableOfReal is treated as a vector, and the inner product "
3042 "with the eigenvectors of the PCA determine its coordinates in the Configuration.")
3043 NORMAL (U"Because the algorithm performs a projection, the resulting Configuration will "
3044 "##only be centered#, i.e., its centroid will be at ##0#, if the data in the "
3045 "TableOfReal object are centered too. ")
3046 NORMAL (U"See also @@Eigen & TableOfReal: Project...@.")
3047 MAN_END
3048
3049 MAN_BEGIN (U"PCA & TableOfReal: To TableOfReal (z-scores)...", U"djmw", 20211129)
3050 INTRO (U"A command to construct a @TableOfReal with z-scores from the selected @TableOfReal"
3051 " and @PCA.")
3052 ENTRY (U"Setting")
3053 TERM (U"##Number of dimensions")
3054 DEFINITION (U"determines how many eigenvectors to use in the calculation of the z-scores and therefore the number "
3055 "of columns of the resulting TableOfReal.")
3056 ENTRY (U"Algorithm")
3057 NORMAL (U"The values %d__%ij_ in the new TableOfReal are calculated as")
3058 EQUATION (U"%d__%ij_ = ##eigenvector#__j_\\.c ##z#__%i_,")
3059 NORMAL (U"which is the inproduct of the %j-th eigenvector and the z-score vector ##z#__%i_ of the %i-th row whose elements %z__%ij_ are defined as")
3060 EQUATION (U"%z__%ij_ = (%x__%ij_ - x\\-^__%j_) / sqrt (eigenvalue__%j_),")
3061 NORMAL (U"in which %x__%ij_ is the data value at row %i and column %j of the selected TableOfReal and x\\-^__%j_ is the "
3062 "%j-th centroid value of the PCA. The square root of the %j-th eigenvalue is the standard deviation in "
3063 " the %j-th principal direction.")
3064 MAN_END
3065
3066 MAN_BEGIN (U"PCA & TableOfReal: Get fraction variance...", U"djmw", 20040324)
3067 INTRO (U"A command to query the selected @PCA and @TableOfReal object for the explained "
3068 "fraction of the variance if the TableOfReal object were projected onto the PCA space.")
3069 ENTRY (U"Algorithm")
3070 LIST_ITEM (U"1. The TableOfReal is @@TableOfReal: To Covariance|converted@ to a "
3071 "Covariance object.")
3072 LIST_ITEM (U"2. The Covariance object is @@PCA & Covariance: Project|projected@ on "
3073 "the PCA eigenspace and the newly obtained projected Covariance object is "
3074 "@@Covariance: Get fraction variance...|queried@ for the fraction variance.")
3075 MAN_END
3076
3077 MAN_BEGIN (U"PitchTier: To Pitch...", U"djmw", 20061128)
3078 INTRO (U"Synthesizes a new @Pitch from the selected @PitchTier.")
3079 MAN_END
3080
3081 MAN_BEGIN (U"PitchTier: Modify interval...", U"djmw", 20230801)
3082 INTRO (U"Modifies a selected interval from the chosen @PitchTier by replacing the contents of the interval by newly defined pitch points.")
3083 ENTRY (U"Settings")
3084 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (11), U""
3085 Manual_DRAW_SETTINGS_WINDOW (U"PitchTier: Modify interval", 11)
3086 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Time range (s)", U"0.0", U"0.0")
3087 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"Relative times", U"0.0 0.5 1.0")
3088 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"...are...", U"fractions")
3089 "Text... 50 left y half ...of the interval duration which will be added...\n" \
3090 "y += 40\n" \
3091 "Text... 50 left y half ...to the start time of the interval.\n" \
3092 "y += 40\n" \
3093 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"The \"pitch\" values", U"100.0 200.0 100.0")
3094 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"...are...", U"frequencies")
3095 "Text... 50 left y half ...to be added to the anchor value (if used)...\n" \
3096 "y += 40\n" \
3097 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"...which is the...",U"not used")
3098 "Text... 50 left y half ...frequency value in the interval.\n" \
3099 "y += 40\n" \
3100 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"Pitch frequency unit",U"Hertz")
3101 )
3102 TERM (U"##Time range (s)")
3103 DEFINITION (U"the start and end time of the interval where the changes will be applied.")
3104 TERM (U"##Relative times")
3105 DEFINITION (U"determine, together with the following option, the times of the new pitch points with respect to the start time of the interval.")
3106 TERM (U"##...are...")
3107 DEFINITION (U"determines how the times %t__%i_ of the new pitch points are calculated. The time of each new pitch point is determined "
3108 "by adding to the start time of the interval a time calculated from the relative time value. If %%t%__min_ and %%t%__max_ are "
3109 "the start and end time of the interval and %%r%__i_ is the %%i%^^th^ relative time, the times %t__%i_ are calculated according "
3110 "to the options as:")
3111 TERM1 (U"%%fractions%")
3112 DEFINITION1 (U"%%t%__%i_ = %t__min_ + %r__%i_ (%t__max_ \\-- %t__min_). The relative time values are fractions of the interval duration. Normally fractions are numbers in the range 0.0 to 1.0, although smaller and larger numbers are allowed.")
3113 TERM1 (U"%%percentages%")
3114 DEFINITION1 (U"%%t%__%i_ = %t__min_+ 0.01 %r__%i_ (%t__max_ \\-- %t__min_). The relative time values are percentages of the interval duration. Normally percentages are numbers in the range 0.0 to 100.0, although smaller and larger numbers are allowed.")
3115 TERM1 (U"%%independent%")
3116 DEFINITION1 (U"%%t%__%i_ = %t__min_ + %r__%i_. The relative time values specify an offset in seconds here. ")
3117 TERM (U"##The \"pitch\" values")
3118 DEFINITION (U"determine, together with the next two options, the frequency value of the new pitch points. Each value here must link to the corresponding time value.")
3119 TERM (U"##...are...")
3120 DEFINITION (U"determines the interpretation of the \"pitch\" value. Possible choices are")
3121 TERM1 (U"%%frequencies%")
3122 DEFINITION1 (U"the values are frequencies in hertz.")
3123 TERM1 (U"%%fractions%")
3124 DEFINITION1 (U"the values are fractions of a pitch value that is specified by the next option. Normally fractions are numbers in "
3125 "the range 0.0 to 1.0, although smaller and larger numbers are allowed.")
3126 TERM1 (U"%%percentages%")
3127 DEFINITION1 (U"the values are percentages of a pitch value that is specified by the next option. Normally percentages are numbers "
3128 "in the range 0.0 to 100.0, although smaller and larger numbers are allowed.")
3129 TERM1 (U"%%start and slopes%")
3130 DEFINITION1 (U"the values are a start frequency followed by slopes in Herz per second.")
3131 TERM1 (U"%%slopes and end%")
3132 DEFINITION1 (U"the values are slopes in herz per second followed by an end frequency in herz.")
3133 TERM1 (U"%%music notes%")
3134 DEFINITION1 (U"the values are music notes specified on the twelve tone scale as a0, a\\# 0, b0, c0, c\\# 0, d0, d\\# 0, e0, f0, "
3135 "f\\# 0, g0, g\\# 0, a1, a\\# 1, ... a4, ..., or g\\# 9. Here the octave is indicated by the number, 0 being the lowest octave "
3136 "and 9 the highest. The a4 is chosen to be at 440 Hz. Therefore, a0 is the note with the lowest frequency, four octaves below "
3137 "the a4 and corresponds to a frequency of 27.5 Hz. As a scale of reference we give a0 = 27.5 Hz, a1 = 55 Hz, a2 = 110 Hz, "
3138 "a3 = 220 Hz, a4 = 440 Hz, a5 = 880 Hz, a6 = 1760 Hz, a7 = 3520 Hz, a8 = 7040 Hz and a9 = 14080 Hz.")
3139 TERM (U"##...which is the...")
3140 DEFINITION (U"the anchor point value, if used. The following options may be given for the anchor point frequency value:")
3141 TERM1 (U"%%not used%")
3142 DEFINITION1 (U"no anchor point frequency value is necessary. The previous two options are sufficient to determine the new pitch "
3143 "frequencies. This means that the \"pitch\" values given cannot be %%fractions% or %%percentages%.")
3144 TERM1 (U"%%current%")
3145 DEFINITION1 (U"the current pitch frequency at the corresponding time.")
3146 TERM1 (U"%%start%")
3147 DEFINITION1 (U"the pitch frequency at the start of the interval.")
3148 TERM1 (U"%%end%")
3149 DEFINITION1 (U"the pitch frequency at the end of the interval.")
3150 TERM1 (U"%%mean of the curve%")
3151 DEFINITION1 (U"the @@PitchTier: Get mean (curve)...|mean of the curve@ within the interval.")
3152 TERM1 (U" %%mean of the points%")
3153 DEFINITION1 (U"the @@PitchTier: Get mean (points)...|mean of the points@ within the interval.")
3154 TERM1 (U"%%maximum%")
3155 DEFINITION1 (U"the maximum pitch frequency in the interval.")
3156 TERM1 (U"%%minimum%")
3157 DEFINITION1 (U"the minimum pitch frequency in the interval.")
3158 TERM (U"##Pitch frequency unit")
3159 DEFINITION (U"Hertz")
3160 MAN_END
3161
3162 MAN_BEGIN (U"PitchTier: Modify interval (tone levels)...", U"djmw", 20170801)
3163 INTRO (U"Modifies a selected interval from the chosen @PitchTier by replacing the contents of the interval by newly defined pitch points.")
3164 NORMAL (U"For tone languages the pitch contours of the tones are often expressed as a sequence of tone levels instead of a sequence of real frequency values in hertz because tone levels abstract away from the possibly different pitch ranges of individual speakers.")
3165 NORMAL (U"The tone levels %T are calculated from a given pitch %%frequency% in hertz as:")
3166 EQUATION (U"%T = %%numberOfToneLevels% \\.c log (%%frequency% / %F__min_) / log (%F__max_ / %F__min_),")
3167 NORMAL (U"where %F__min_ and %F__max_ are the minimum and the maximum frequency of a speaker's pitch range and %%numberOfToneLevels% "
3168 "is the number of levels into which the pitch range is divided. "
3169 "This formula maps any frequency between %F__min_ and %F__max_ to a number between 0 and %%numberOfToneLevels%.")
3170 NORMAL (U"To get the frequency in hertz from a specified tone level %T we have to use the inverse formula:")
3171 EQUATION (U"%%frequency% = %F__min_ \\.c 10^^(%T \\.c log (%F__max_ / %F__min_)) / %%numberOfToneLevels%)^.")
3172 ENTRY (U"Settings")
3173 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (8), U""
3174 Manual_DRAW_SETTINGS_WINDOW (U"PitchTier: Modify interval (tone levels)", 8)
3175 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Time range (s)", U"0.0", U"0.0")
3176 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Pitch range (Hz)", U"80.0", U"200.0")
3177 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"Number of tone levels", U"5")
3178 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"Relative times", U"0.0 0.5 1.0")
3179 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"...are...",U"fractions")
3180 "Text... 50 left y half ...of the interval duration which will be added...\n" \
3181 "y += 40\n" \
3182 "Text... 50 left y half ...to the start time of the interval.\n" \
3183 "y += 40\n" \
3184 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"Tone levels", U"2.1 2.1 5.0")
3185 )
3186 TERM (U"##Time range (s)")
3187 DEFINITION (U"the start and end time of the interval where the changes will be applied.")
3188 TERM (U"##Pitch range (Hz)")
3189 DEFINITION (U"The minimum and maximum frequency to which the tone levels refer.")
3190 TERM (U"##Number of tone levels")
3191 DEFINITION (U"The number of levels into which the pitch range is divided.")
3192 TERM (U"##Relative times")
3193 DEFINITION (U"determine, together with the following option, the times of the new pitch points with respect to the start time of the interval.")
3194 DEFINITION (U"determines how the times %t__%i_ of the new pitch points are calculated. The time of each new pitch point is "
3195 "determined by adding to the start time of the interval a time calculated from the relative time value. If %%t%__min_ and "
3196 "%%t%__max_ are the start and end time of the interval and %%r%__i_ is the %%i%^^th^ relative time, the times %t__%i_ are "
3197 "calculated according to the options as:")
3198 TERM1 (U"%%fractions%")
3199 DEFINITION1 (U"%%t%__%i_ = %t__min_ + %r__%i_ (%t__max_ \\-- %t__min_). The relative time values are fractions of the interval "
3200 "duration. Normally fractions are numbers in the range 0.0 to 1.0, although smaller and larger numbers are allowed.")
3201 TERM1 (U"%%percentages%")
3202 DEFINITION1 (U"%%t%__%i_ = %t__min_+ 0.01 %r__%i_ (%t__max_ \\-- %t__min_). The relative time values are percentages of the "
3203 "interval duration. Normally percentages are numbers in the range 0.0 to 100.0, although smaller and larger numbers are allowed.")
3204 TERM1 (U"%%independent%")
3205 DEFINITION1 (U"%%t%__%i_ = %t__min_ + %r__%i_. The relative time values specify an offset in seconds here. ")
3206
3207 TERM (U"##Tone levels")
3208 DEFINITION (U"specify the frequencies at the corresponding time points as tone levels.")
3209 ENTRY (U"Algorithm")
3210 NORMAL (U"1. The real times are calculated from the relative times.")
3211 NORMAL (U"2. The frequencies are calculated from the tone levels.")
3212 NORMAL (U"3. The real times and the frequencies are sorted together by time.")
3213 NORMAL (U"4. All pitch points in the PitchTier between the first and the last time of the sorted time array are removed.")
3214 NORMAL (U"5. The newly calculated pitch points are added to the PitchTier.")
3215 MAN_END
3216
3217 MAN_BEGIN (U"Polygon: Rotate...", U"djmw", 20100418)
3218 INTRO (U"Rotates the selected @@Polygon@ counterclockwise with respect to the given coordinates.")
3219 MAN_END
3220
3221 MAN_BEGIN (U"Polygon: Get location of point...", U"djmw", 20120220)
3222 INTRO (U"Determines whether a given point is on the ##I#nside, the ##O#utside, on an ##E#dge or on a ##V#ertex of the selected Polygon.")
3223 ENTRY (U"Algorithm")
3224 NORMAL (U"We determine how often a horizontal line extending from the point crosses the polygon. If the number of crossings is even, "
3225 "the point is on the outside, else on the inside. Special care is taken to be able to detect if a point is on the boundary of "
3226 "the polygon. The used algorithm is from @@Hormann & Agathos (2001)@.")
3227 MAN_END
3228
3229 MAN_BEGIN (U"Polygon: Simplify", U"djmw", 20140509)
3230 INTRO (U"Removes collinear vertices from a @@Polygon@.")
3231 ENTRY (U"Example")
3232 SCRIPT (4, 4,
3233 U"p1 = Create simple Polygon: \"p\", \"0.0 0.0 0.0 1.0 0.5 0.5 1.0 0.0 0.5 0 0 -0.5 0 -0.25\"\n"
3234 "Draw closed: 0, 0, 0, 0\n"
3235 "Colour: \"Red\"\n"
3236 "Draw circles: 0, 0, 0, 0, 3\n"
3237 "p2 = Simplify\n"
3238 "Colour: \"Black\"\n"
3239 "Paint circles: 0, 0, 0, 0, 1.5\n"
3240 "removeObject: p1, p2\n"
3241 )
3242 NORMAL (U"Given the Polygon with the seven vertices indicated by the red open circles, the Simplify action results in the Polygon "
3243 "with four vertices indicated by the filled black circles.")
3244 MAN_END
3245
3246 MAN_BEGIN (U"Polygon: Translate...", U"djmw", 20100418)
3247 INTRO (U"Translates the selected @@Polygon@ over the given vector.")
3248 NORMAL (U"Given the old coordinates (%x__%i_, %y__%i_) and the translation (%x__%t_, %y__%t_), the new coordinates are:")
3249 EQUATION (U"%x__%i_\\'p = %x__%i_ + %x__%t_")
3250 EQUATION (U"%y__%i_\\'p = %y__%i_ + %y__%t_")
3251 MAN_END
3252
3253 MAN_BEGIN (U"Polynomial", U"djmw", 19990608)
3254 INTRO (U"One of the @@types of objects@ in Praat.")
3255 NORMAL (U"An object of type "
3256 "Polynomial represents a polynomial function on a domain.")
3257 NORMAL (U"A polynomial of degree %n is defined as:")
3258 EQUATION (U"%p(%x) = %c__1_ + %c__2_ %x + %c__3_ %x^^2^ + ... c__%n+1_ %x^^%n^.")
3259 NORMAL (U"The real numbers %c__%k_ are called the polynomial %coefficients.")
3260 ENTRY (U"Commands")
3261 NORMAL (U"Creation")
3262 LIST_ITEM (U"\\bu @@Create Polynomial...@ (in the ##New menu#)")
3263 LIST_ITEM (U"\\bu @@LPC: To Polynomial (slice)...@ (from prediction coefficients)")
3264 LIST_ITEM (U"\\bu @@LegendreSeries: To Polynomial@")
3265 LIST_ITEM (U"\\bu @@ChebyshevSeries: To Polynomial@")
3266 NORMAL (U"Drawing")
3267 LIST_ITEM (U"\\bu ##Draw...#")
3268 NORMAL (U"Queries")
3269 LIST_ITEM (U"\\bu @@Polynomial: Get function value...|Get function value...@: get %p(%x)")
3270 LIST_ITEM (U"\\bu ##Get coefficient value...#: get %c__%i_")
3271 LIST_ITEM (U"\\bu @@Polynomial: Get minimum...|Get minimum...@: minimum of %p(%x) on an interval")
3272 LIST_ITEM (U"\\bu @@Polynomial: Get x of minimum...|Get x of minimum...@")
3273 LIST_ITEM (U"\\bu @@Polynomial: Get maximum...|Get maximum...@: maximum of %p(%x) on an interval")
3274 LIST_ITEM (U"\\bu @@Polynomial: Get x of maximum...|Get x of maximum...@")
3275 LIST_ITEM (U"\\bu @@Polynomial: Get area...|Get area...@")
3276 NORMAL (U"Modification")
3277 LIST_ITEM (U"\\bu ##Set domain...#: new domain")
3278 LIST_ITEM (U"\\bu ##Set coefficient value...#: change one coefficient")
3279 NORMAL (U"Conversion")
3280 LIST_ITEM (U"\\bu @@Polynomial: To Spectrum...|To Spectrum...@ (evaluation over unit-circle)")
3281 LIST_ITEM (U"\\bu @@Polynomial: To Polynomial (derivative)|To Polynomial (derivative)@")
3282 LIST_ITEM (U"\\bu @@Polynomial: To Polynomial (primitive)|To Polynomial (primitive)@")
3283 LIST_ITEM (U"\\bu @@Polynomial: To Roots|To Roots@: roots of polynomial")
3284 MAN_END
3285
3286 MAN_BEGIN (U"Polynomial: Get area...", U"djmw", 19990610)
3287 INTRO (U"A command to compute the area below the selected @Polynomial object.")
3288 ENTRY (U"Settings")
3289 TERM (U"##Xmin#, ##Xmax#")
3290 DEFINITION (U"define the interval.")
3291 NORMAL (U"The area is defined as __%xmin_\\in^^xmax^ %p(%x) %dx.")
3292 MAN_END
3293
3294 MAN_BEGIN (U"Polynomial: Get function value...", U"djmw", 19990610)
3295 INTRO (U"A command to compute %p(%x) for the selected @Polynomial object.")
3296 MAN_END
3297
3298 MAN_BEGIN (U"Polynomial: Get maximum...", U"djmw", 19990610)
3299 INTRO (U"A command to compute, on a specified interval, the maximum value of the selected "
3300 "@Polynomial object.")
3301 MAN_END
3302
3303 MAN_BEGIN (U"Polynomial: Get x of maximum...", U"djmw", 19990610)
3304 INTRO (U"A command to compute, on a specified interval, the location of the maximum of the "
3305 "selected @Polynomial object.")
3306 MAN_END
3307
3308 MAN_BEGIN (U"Polynomial: Get minimum...", U"djmw", 19990610)
3309 INTRO (U"A command to compute, on a specified interval, the minimum value of the selected "
3310 "@Polynomial object.")
3311 MAN_END
3312
3313 MAN_BEGIN (U"Polynomial: Get x of minimum...", U"djmw", 19990610)
3314 INTRO (U"A command to compute, on a specified interval, the location of the minimum of the "
3315 "selected @Polynomial object.")
3316 MAN_END
3317
3318 MAN_BEGIN (U"Polynomials: Multiply", U"djmw", 19990616)
3319 INTRO (U"A command to multiply two @@Polynomial|polynomials@ with each other.")
3320 NORMAL (U"The result of multiplying 1 + 2 %x and 2 \\-- %x^2 will be the polynomial:")
3321 EQUATION (U"2 + 4 %x \\-- %x^2 \\-- 2 %x^3.")
3322 MAN_END
3323
3324 MAN_BEGIN (U"Polynomial: To Polynomial (derivative)", U"djmw", 19990610)
3325 INTRO (U"A command to compute the derivative of the selected @Polynomial object.")
3326 MAN_END
3327
3328 MAN_BEGIN (U"Polynomial: To Polynomial (primitive)", U"djmw", 19990610)
3329 INTRO (U"A command to compute the primitive of the selected @Polynomial object.")
3330 MAN_END
3331
3332 MAN_BEGIN (U"Polynomial: Scale x...", U"djmw", 19990610)
3333 INTRO (U"A command to transform the selected @Polynomial object to a new domain.")
3334 TERM (U"##Xmin# and ##Xmax#")
3335 DEFINITION (U"define the new domain.")
3336 ENTRY (U"Behaviour")
3337 NORMAL (U"The polynomial is transformed from domain [%x__min_, %x__max_] to "
3338 "domain [%Xmin, %Xmax] in such a way that its form stays the same. "
3339 "This is accomplished by first calculating:")
3340 EQUATION (U"%f(%x\\'p) = \\Si__%k=1..%numberOfCoefficients_ %c__%k_ %x\\'p^^%k^, where")
3341 EQUATION (U"%x\\'p = %a %x + %b,")
3342 NORMAL (U"and then collecting terms of equal degree. The %a and %b are defined as")
3343 EQUATION (U"%a = (%x__min_ \\-- %x__max_) / (%Xmin \\-- %Xmax)")
3344 EQUATION (U"%b = %x__min_ \\-- %a %Xmin")
3345 MAN_END
3346
3347 MAN_BEGIN (U"Polynomial: To Roots", U"djmw", 19990608)
3348 INTRO (U"A command to compute the @@Roots|roots@ of the selected @Polynomial objects.")
3349 ENTRY (U"Algorithm")
3350 NORMAL (U"The roots are found from the polished eigenvalues of a special companion matrix. "
3351 "For further explanation on these methods see @@Press et al. (1992)@.")
3352 MAN_END
3353
3354 MAN_BEGIN (U"Polynomial: To Spectrum...", U"djmw", 19990616)
3355 INTRO (U"A command to compute the @@Spectrum|spectrum@ of the selected @Polynomial objects.")
3356 ENTRY (U"Settings")
3357 TERM (U"##Nyquist frequency (Hz)")
3358 DEFINITION (U"defines the highest frequency in the spectrum. The lowest frequency of the spectrum "
3359 "will be 0 Hz.")
3360 TERM (U"##Number of frequencies")
3361 DEFINITION (U"defines the number of frequencies in the spectrum.")
3362 ENTRY (U"Algorithm")
3363 NORMAL (U"We calculate the spectrum by evaluating the polynomial at regularly spaced points %z__%k_ "
3364 "on the upper half of a circle with radius %r = 1 in the complex plane. The upperhalf of the "
3365 "unit circle, where %k\\.c%\\fi is in the interval [0, %\\pi], will be mapped to frequencies "
3366 "[0, @@Nyquist frequency@] in the spectrum. ")
3367 NORMAL (U"The complex values %z__%k_ (%k=1..%numberOfFrequencies) are defined as:")
3368 EQUATION (U"%z__%k_ = %r e^^%i %k %\\fi^, where,")
3369 EQUATION (U"%\\fi = \\pi / (%numberOfFrequencies \\-- 1) and %r = 1.")
3370 MAN_END
3371
3372 MAN_BEGIN (U"Principal component analysis", U"djmw", 20160222)
3373 INTRO (U"This tutorial describes how you can perform principal component "
3374 "analysis with Praat.")
3375 NORMAL (U"Principal component analysis (PCA) involves a mathematical procedure "
3376 "that transforms a number of (possibly) correlated variables into a "
3377 "(smaller) number of uncorrelated variables called %%principal "
3378 "components%. The first principal component accounts for as much of the "
3379 "variability in the data as possible, and each succeeding component "
3380 "accounts for as much of the remaining variability as possible.")
3381 ENTRY (U"1. Objectives of principal component analysis")
3382 LIST_ITEM (U"\\bu To discover or to reduce the dimensionality of the data set.")
3383 LIST_ITEM (U"\\bu To identify new meaningful underlying variables.")
3384 ENTRY (U"2. How to start")
3385 NORMAL (U"We assume that the multi-dimensional data have been collected in a @TableOfReal data matrix, "
3386 "in which the rows are associated with the cases and the columns with the variables. The TableOfReal is therefore interpreted as %%numberOfRows% data vectors, each data vector has %%numberofColumns% elements.")
3387 NORMAL (U"Traditionally, principal component analysis is performed on the "
3388 "@@Covariance|Covariance@ matrix or on the @@correlation|Correlation@ matrix. "
3389 "These matrices can be calculated from the data matrix. "
3390 "The covariance matrix contains scaled @@SSCP|sums of squares and cross products@. "
3391 "A correlation matrix is like a covariance matrix but first the variables, i.e. the columns, have been standardized. "
3392 "We will have to standardize the data first if the variances of "
3393 "variables differ much, or if the units of measurement of the "
3394 "variables differ. You can standardize the data in the TableOfReal by choosing @@TableOfReal: Standardize columns|Standardize columns@.")
3395 NORMAL (U"To perform the analysis, we select the TabelOfReal data matrix in the list of objects and choose "
3396 "@@TableOfReal: To PCA|To PCA@. This will result in a new PCA object in the "
3397 "list of objects.")
3398 NORMAL (U"We can now make a @@Scree plot|scree@ plot of the eigenvalues, @@Eigen: Draw "
3399 "eigenvalues...|Draw eigenvalues...@ "
3400 "to get an indication of the importance of each eigenvalue. The exact "
3401 "contribution of each eigenvalue (or a range of eigenvalues) to the "
3402 "\"explained variance\" can also be queried: "
3403 "@@PCA: Get fraction variance accounted for...|Get fraction variance "
3404 "accounted for...@. You might also check for the equality of a "
3405 "number of eigenvalues: @@PCA: Get equality of eigenvalues...|Get equality "
3406 "of eigenvalues...@.")
3407 ENTRY (U"3. Determining the number of components to keep")
3408 NORMAL (U"There are two methods to help you to choose the number of components to keep. "
3409 "Both methods are based on relations between the eigenvalues.")
3410 LIST_ITEM (U"\\bu Plot the eigenvalues, @@Eigen: Draw eigenvalues...|"
3411 "Draw eigenvalues...@. If the points on the graph tend to level out (show an \"elbow\"), "
3412 "these eigenvalues are usually close enough to zero that they can be "
3413 "ignored.")
3414 LIST_ITEM (U"\\bu Limit the number of components to that number that accounts for a certain fraction of the total variance. For example, "
3415 "if you are satisfied with 95\\% of the total variance explained, then use the number you get by the query @@PCA: Get number of components (VAF)...|Get number of components (VAF)...@ 0.95#.")
3416 ENTRY (U"4. Getting the principal components")
3417 NORMAL (U"Principal components are obtained by projecting the multivariate "
3418 "datavectors on the space spanned by the eigenvectors. This can be done "
3419 "in two ways:")
3420 LIST_ITEM (U"1. Directly from the TableOfReal without first forming a "
3421 "@PCA object: "
3422 "@@TableOfReal: To Configuration (pca)...|To Configuration (pca)...@. "
3423 "You can then draw the Configuration or display its numbers. ")
3424 LIST_ITEM (U"2. Select a PCA and a TableOfReal object together and choose "
3425 "@@PCA & TableOfReal: To Configuration...|To Configuration...@. "
3426 "In this way you project the TableOfReal onto the PCA's eigenspace.")
3427 ENTRY (U"5. Mathematical background on principal component analysis")
3428 NORMAL (U"The mathematical technique used in PCA is called eigen analysis: "
3429 "we solve for the eigenvalues and eigenvectors of a square symmetric "
3430 "matrix with sums of squares and cross products. "
3431 "The eigenvector associated with the largest eigenvalue has the same "
3432 "direction as the first principal component. The eigenvector associated "
3433 "with the second largest eigenvalue determines the direction of the second "
3434 "principal component. "
3435 "The sum of the eigenvalues equals the trace of the square matrix and the "
3436 "maximum number of eigenvectors equals the number of rows (or columns) of "
3437 "this matrix.")
3438 ENTRY (U"6. Algorithms")
3439 NORMAL (U"If our starting point happens to be a symmetric matrix like the covariance matrix, "
3440 "we solve for the eigenvalue and eigenvectors "
3441 "by first performing a Householder reduction to tridiagonal form, followed"
3442 " by the QL algorithm with implicit shifts.")
3443 NORMAL (U"If, conversely, our starting point is the data matrix #%A , "
3444 "we do not have to form explicitly the matrix with sums of squares and "
3445 "cross products, #%A\\'p#%A. Instead, we proceed by a numerically more "
3446 "stable method, and form the @@singular value decomposition@ of #%A, "
3447 "#%U #%D #%V\\'p. The matrix #%V then contains the eigenvectors, "
3448 "and the squared diagonal elements of #%D contain the eigenvalues.")
3449 MAN_END
3450
3451 MAN_BEGIN (U"PCA & Covariance: Project", U"djmw", 20040225)
3452 INTRO (U"A command to project the @Covariance object onto the eigenspace of "
3453 "the @PCA object. ")
3454 NORMAL (U"Further details can be found in @@Eigen & SSCP: Project@.")
3455 MAN_END
3456
3457 MAN_BEGIN (U"PCA & SSCP: Project", U"djmw", 20040225)
3458 INTRO (U"A command to project the @SSCP object onto the eigenspace of "
3459 "the @PCA object. ")
3460 NORMAL (U"Further details can be found in @@Eigen & SSCP: Project@.")
3461 MAN_END
3462
3463 MAN_BEGIN (U"Regular expressions", U"David Weenink & Paul Boersma", 20180401)
3464 INTRO (U"This tutorial describes the syntax of regular expressions in Praat. ")
3465 ENTRY (U"Introduction")
3466 NORMAL (U"A %%regular expression% (%regex) is a text string that describes a %set "
3467 "of strings. Regular expressions are useful as a way to search "
3468 "for patterns in text strings and, optionally, replace them by another "
3469 "pattern.")
3470 NORMAL (U"Some regular expressions match only one string, i.e., the set they describe has "
3471 "only one member. For example, the regex \"ab\" matches the string \"ab\" "
3472 "and no others. Other regular expressions match more than one string, i.e., the set "
3473 "they describe has more than one member. For example, the regex \"a*\" "
3474 "matches the string made up of any number (including zero) of \"a\"s. "
3475 "As you can see, some characters match themselves (such as \"a\" and "
3476 "\"b\"), and these characters are called %ordinary characters. The "
3477 "characters that do not match themselves, such as \"*\", are called "
3478 "%special characters or %metacharacters. Many special characters are only "
3479 "special characters in the %search regex and are ordinary characters in "
3480 "the substitution regex.")
3481 NORMAL (U"You can read the rest of this tutorial sequentially with the help of "
3482 "the \"<1\" and \">1\" buttons.")
3483 LIST_ITEM (U"1. @@Regular expressions 1. Special characters|Special characters@ "
3484 "(\\bs \\^ \\$ { } [ ] ( ) . + ? \\| - &)")
3485 LIST_ITEM (U"2. @@Regular expressions 2. Quantifiers|Quantifiers@ "
3486 "(how often do we match).")
3487 LIST_ITEM (U"3. @@Regular expressions 3. Anchors|Anchors@ (where do we match)")
3488 LIST_ITEM (U"4. @@Regular expressions 4. Special constructs with parentheses|"
3489 "Special constructs with parentheses@ (grouping constructs)")
3490 LIST_ITEM (U"5. @@Regular expressions 5. Special control characters|"
3491 "Special control characters@ (difficult-to-type characters like \\bsn)")
3492 LIST_ITEM (U"6. @@Regular expressions 6. Convenience escape sequences|"
3493 "Convenience escape sequences@ "
3494 "(\\bsd \\bsD \\bsl \\bsL \\bss \\bsS \\bsw \\bsW \\bsB)")
3495 LIST_ITEM (U"7. @@Regular expressions 7. Octal and hexadecimal escapes|"
3496 "Octal and hexadecimal escapes@ (things like \\bs053 or \\bsX2B)")
3497 LIST_ITEM (U"8. @@Regular expressions 8. Substitution special characters|"
3498 "Substitution special characters@ (\\bs1..\\bs9 \\bsU \\bsu \\bsL \\bsl &)")
3499 NORMAL (U"More in-depth coverage of regular expressions can be found in "
3500 "@@Friedl (1997)@.")
3501 MAN_END
3502
3503 MAN_BEGIN (U"Regular expressions 1. Special characters", U"djmw", 20010718)
3504 INTRO (U"The following characters are the %meta characters that give special "
3505 "meaning to the regular expression search syntax:")
3506 TERM (U"#\\bs# the backslash %escape character.")
3507 DEFINITION (U"The backslash gives special meaning to the character "
3508 "following it. For example, the combination \"\\bsn\" stands for the "
3509 "%newline, one of the @@Regular expressions 5. Special control characters"
3510 "|control characters@. The combination \"\\bsw\" stands for a \"word\" "
3511 "character, one of the @@Regular expressions 6. Convenience escape "
3512 "sequences|"
3513 "convenience escape sequences@ while \"\\bs1\" is one of the @@Regular "
3514 "expressions 8. Substitution special characters|substitution special "
3515 "characters@.")
3516 LIST_ITEM1 (U"Example: The regex \"aa\\bsn\" tries to match two consecutive "
3517 "\"a\"s at the end of a line, inclusive the newline character itself.")
3518 LIST_ITEM1 (U"Example: \"a\\bs+\" matches \"a+\" and not a series of one or "
3519 "\"a\"s.")
3520 TERM (U"##\\^ # the caret is the @@Regular expressions 3. "
3521 "Anchors|anchor@ for the start of the string, or the negation symbol.")
3522 LIST_ITEM1 (U"Example: \"\\^ a\" matches \"a\" at the start of the string.")
3523 LIST_ITEM1 (U"Example: \"[\\^ 0-9]\" matches any non digit.")
3524 TERM (U"##\\$ # the dollar sign is the @@Regular expressions 3. "
3525 "Anchors|anchor@ for the end of the string.")
3526 LIST_ITEM1 (U"Example: \"b\\$ \" matches a \"b\" at the end of a line.")
3527 LIST_ITEM1 (U"Example: \"\\^ \\$ \" matches the empty string.")
3528 TERM (U"##{ }# the opening and closing curly brackets are used as range @@Regular "
3529 "expressions 2. Quantifiers|quantifiers@.")
3530 LIST_ITEM1 (U"Example: \"a{2,3}\" matches \"aa\" or \"aaa\".")
3531 TERM (U"##[ ]# the opening and closing square brackets define a character class to "
3532 "match a %single character.")
3533 DEFINITION (U"The \"\\^ \" as the first character following the \"[\" negates, "
3534 "and the match is for the characters %not listed. "
3535 "The \"-\" denotes a range of characters. Inside a \"[ ]\" character "
3536 "class construction, most special characters are interpreted as ordinary "
3537 "characters.")
3538 LIST_ITEM1 (U"Example: \"[d-f]\" is the same as \"[def]\" and matches \"d\", "
3539 "\"e\" or \"f\".")
3540 LIST_ITEM1 (U"Example: \"[a-z]\" matches any lower-case characters in the "
3541 "alphabet.")
3542 LIST_ITEM1 (U"Example: \"[\\^ 0-9]\" matches any character that is not an ASCII digit.")
3543 LIST_ITEM1 (U"Example: A search for \"[][()?<>\\$ \\^ .*?\\^ ]\" in the string "
3544 "\"[]()?<>\\$ \\^ .*?\\^ \" followed by a replace string \"r\" has the result "
3545 "\"rrrrrrrrrrrrr\". Here the search string is %one character class and "
3546 "all the meta characters are interpreted as ordinary characters without "
3547 "the need to escape them.")
3548 TERM (U"##( )# the opening and closing parenthes3s are used for grouping "
3549 "characters (or other regexes).")
3550 DEFINITION (U"The groups can be referenced in "
3551 "both the search and the @@Regular expressions 8. Substitution special "
3552 "characters|substitution@ phase. There also exist some @@Regular "
3553 "expressions 4. Special constructs with parentheses|special constructs "
3554 "with parentheses@.")
3555 LIST_ITEM1 (U"Example: \"(ab)\\bs1\" matches \"abab\".")
3556 TERM (U"##.# the dot matches any character except the newline symbol.")
3557 LIST_ITEM1 (U"Example: \".a\" matches two consecutive characters where "
3558 "the last one is \"a\".")
3559 LIST_ITEM1 (U"Example: \".*\\bs.txt\\$ \" matches all strings that end in "
3560 "\".txt\".")
3561 TERM (U"##*# the asterisk is the match-zero-or-more @@Regular expressions 2. "
3562 "Quantifiers|quantifier@.")
3563 LIST_ITEM1 (U"Example: \"\\^ .*\\$ \" matches an entire line. ")
3564 TERM (U"##+# the plus sign is the match-one-or-more quantifier.")
3565 TERM (U"##?# the question mark is the match-zero-or-one "
3566 "quantifier. The question mark is also used in "
3567 "@@Regular expressions 4. Special constructs with parentheses|special "
3568 "constructs with parentheses@ and in @@Regular expressions 2. "
3569 "Quantifiers|changing match behaviour@.")
3570 TERM (U"##\\| # the vertical pipe separates a series of alternatives.")
3571 LIST_ITEM1 (U"Example: \"(a|b|c)a\" matches \"aa\" or \"ba\" or \"ca\".")
3572 TERM (U"##< ># the smaller and greater signs are @@Regular expressions 3. "
3573 "Anchors|anchors@ that specify a left or right word boundary.")
3574 TERM (U"##-# the minus sign indicates a range in a character class (when it is "
3575 "not at the first position after the \"[\" opening bracket or the last "
3576 "position before the \"]\" closing bracket.")
3577 LIST_ITEM1 (U"Example: \"[A-Z]\" matches any uppercase character.")
3578 LIST_ITEM1 (U"Example: \"[A-Z-]\" or \"[-A-Z]\" match any uppercase character "
3579 "or \"-\".")
3580 TERM (U"##&# the ampersand is the \"substitute complete match\" symbol.")
3581 MAN_END
3582
3583 MAN_BEGIN (U"Regular expressions 2. Quantifiers", U"djmw", 20010708)
3584 INTRO (U"Quantifiers specify how often the preceding @@Regular expressions|"
3585 "regular expression@ should match.")
3586 TERM (U"##*# Try to match the preceding regular expression zero or more times.")
3587 LIST_ITEM1 (U"Example: \"(ab)c*\" matches \"ab\" followed by zero or more "
3588 "\"c\"s, i.e., \"ab\", \"abc\", \"abcc\", \"abccc\" ...")
3589 TERM (U"##+# Try to match the preceding regular expression one or more times.")
3590 LIST_ITEM1 (U"Example: \"(ab)c+\" matches \"ab\" followed by one or more "
3591 "\"c\"s, i.e., \"abc\", \"abcc\", \"abccc\" ...")
3592 TERM (U"##{%m, %n}# Try to match the preceding regular expression between %m "
3593 "and %n times.")
3594 DEFINITION (U"If you leave %m out, it is assumed to be zero. If you leave "
3595 "%n out it is assumed to be infinity. I.e., \"{,%n}\" matches from %zero "
3596 "to %n times, \"{%m,}\" matches a minimum of %m times, \"{,}\" matches "
3597 "the same as \"*\" and \"{n}\" is shorthand for \"{n, n\"} and matches "
3598 "exactly %n times.")
3599 LIST_ITEM1 (U"Example: \"(ab){1,2}\" matches \"ab\" and \"abab\".")
3600 TERM (U"##?# Try to match zero or one time.")
3601 ENTRY (U"Changing match behaviour")
3602 NORMAL (U"Default the quantifiers above try to match as much as possible, they "
3603 "are %greedy. "
3604 "You can change greedy behaviour to %lazy behaviour by adding an "
3605 "extra \"?\" after the quantifier.")
3606 LIST_ITEM1 (U"Example: In the string \"cabddde\", the search \"abd{1,2}\" "
3607 "matches \"abdd\", while the search for \"abd{1,2}?\" matches \"abd\".")
3608 LIST_ITEM1 (U"Example: In the string \"cabddde\", the search \"abd+\" "
3609 "matches \"abddd\", while the search for \"abd+?\" matches \"abd\".")
3610 MAN_END
3611
3612 MAN_BEGIN (U"Regular expressions 3. Anchors", U"DAvid Weenink & Paul Boersma", 20180401)
3613 INTRO (U"Anchors let you specify a very specific position within the search "
3614 "text.")
3615 TERM (U"##\\^ # Try to match the (following) regex at the beginning of the string.")
3616 LIST_ITEM1 (U"Example: \"\\^ ab\" matches \"ab\" only at the beginning of a "
3617 "line and not, for example, in the line \"cab\".")
3618 TERM (U"##\\$ # Try to match the (following) regex at the end of the string.")
3619 TERM (U"##<# Try to match the regex at the %start of a word.")
3620 DEFINITION (U"The character class that defines a %word can be found at the "
3621 "@@Regular expressions 6. Convenience escape sequences|convenience escape "
3622 "sequences@ page.")
3623 TERM (U"##># Try to match the regex at the %end of a word.")
3624 TERM (U"##\\bsB# Not a word boundary")
3625 MAN_END
3626
3627 MAN_BEGIN (U"Regular expressions 4. Special constructs with parentheses", U"djmw",
3628 20010710)
3629 INTRO (U"Some special constructs exist with parentheses. ")
3630 TERM (U"##(?:#%regex#)# is a grouping-only construct.")
3631 DEFINITION (U"They exist merely for efficiency reasons and facilitate grouping.")
3632 TERM (U"##(?=#%regex#)# is a positive look-ahead.")
3633 DEFINITION (U"A match of the regular expression contained in the positive "
3634 "look-ahead construct is attempted. If the match succeeds, control is "
3635 "passed to the regex following this construct and the text consumed by "
3636 "this look-ahead construct is first unmatched. ")
3637 TERM (U"##(?!#%regex#)# is a negative look-ahead.")
3638 DEFINITION (U"Functions like a positive look-ahead, only the "
3639 "%regex must %not match.")
3640 LIST_ITEM (U"Example: \"abc(?!.*abc.*)\" searches for the %last "
3641 "occurrence of \"abc\" in a string.")
3642 TERM (U"##(?i#%regex#)# is a case insensitive regex.")
3643 TERM (U"##(?I#%regex#)# is a case sensitive regex.")
3644 DEFINITION (U"Default a regex is case sensitive. ")
3645 LIST_ITEM1 (U"Example: \"(?iaa)\" matches \"aa\", \"aA\", \"Aa\" and \"AA\".")
3646 TERM (U"##(?n#%regex#)# matches newlines.")
3647 TERM (U"##(?N#%regex#)# doesn't match newlines.")
3648 NORMAL (U"All the constructs above do not capture text and cannot be "
3649 "referenced, i.e., the parentheses are not counted. However, you "
3650 "can make them capture text by surrounding them with %ordinary "
3651 "parentheses.")
3652 MAN_END
3653
3654 MAN_BEGIN (U"Regular expressions 5. Special control characters", U"djmw", 20010708)
3655 INTRO (U"Special control characters in a @@Regular expressions|regular "
3656 "expression@ specify characters that are difficult to type.")
3657 TERM (U"#\\bsa alert (bell).")
3658 TERM (U"#\\bsb backspace.")
3659 TERM (U"#\\bse ASCII escape character.")
3660 TERM (U"#\\bsf form feed (new page).")
3661 TERM (U"#\\bsn newline.")
3662 TERM (U"#\\bsr carriage return.")
3663 LIST_ITEM1 (U"Example : a search for \"\\bsr\\bsn\" followed by a replace "
3664 "\"\\bsr\" changes Windows text files to Macintosh text files.")
3665 LIST_ITEM1 (U"Example : a search for \"\\bsr\" followed by a replace "
3666 "\"\\bsn\" changes Macintosh text files to Unix text files.")
3667 LIST_ITEM1 (U"Example : a search for \"\\bsr\\bsn\" followed by a replace "
3668 "\"\\bsn\" changes Windows text files to Unix text files.")
3669 TERM (U"#\\bst horizontal tab.")
3670 TERM (U"#\\bsv vertical tab.")
3671 MAN_END
3672
3673 MAN_BEGIN (U"Regular expressions 6. Convenience escape sequences", U"djmw", 20010708)
3674 INTRO (U"Convenience escape sequences in a @@Regular expressions|regular "
3675 "expression@ present a shorthand for some character classes.")
3676 TERM (U"#\\bsd matches a digit: [0-9].")
3677 LIST_ITEM1 (U"Example: \"-?\\bsd+\" matches any integer.")
3678 TERM (U"#\\bsD %not a digit: [\\^ 0-9].")
3679 TERM (U"#\\bsl a letter: [a-zA-Z].")
3680 TERM (U"#\\bsL %not a letter: [\\^ a-zA-Z].")
3681 TERM (U"#\\bss whitespace: [ \\bst\\bsn\\bsr\\bsf\\bsv].")
3682 TERM (U"#\\bsS %not whitespace: [\\^ \\bst\\bsn\\bsr\\bsf\\bsv].")
3683 TERM (U"#\\bsw \"word\" character: [a-zA-Z0-9\\_ ].")
3684 LIST_ITEM1 (U"Example: \"\\bsw+\" matches a \"word\", i.e., a string of one "
3685 "or more characters that may consist of letters, digits and underscores.")
3686 TERM (U"#\\bsW %not a \"word\" character: [\\^ a-zA-Z0-9\\_ ].")
3687 TERM (U"#\\bsB any character that is %not a word-delimiter.")
3688 MAN_END
3689
3690 MAN_BEGIN (U"Regular expressions 7. Octal and hexadecimal escapes", U"djmw", 20010709)
3691 INTRO (U"An octal number can be represented by the octal escape \"\\bs0\" "
3692 "and maximally three digits from the digit class [0-7]. "
3693 "The octal number should not exceed \\bs0377. ")
3694 NORMAL (U"A hexadecimal number can be represented by the octal escape "
3695 "\"\\bsx\" or \"\\bsX\"and maximally two characters from the class "
3696 "[0-9A-F]. The maximum hexadecimal number should not exceed \\bsxFF. ")
3697 LIST_ITEM1 (U"Example: \\bs053 and \\bsX2B both specify the \"+\" character.")
3698 MAN_END
3699
3700 MAN_BEGIN (U"Regular expressions 8. Substitution special characters", U"djmw", 20010708)
3701 INTRO (U"The substitution string is mostly interpreted as ordinary text except "
3702 "for the @@Regular expressions 5. Special control characters|"
3703 "special control characters@, the @@Regular expressions 7. Octal and "
3704 "hexadecimal escapes|octal and hexadecimal escapes@ and the following "
3705 "character combinations:")
3706 TERM (U"#\\bs1 ... #\\bs9 are backreferences at sub-expressions 1 ... 9 in the match.")
3707 DEFINITION (U"Any of the first nine sub-expressions of the match string can "
3708 "be inserted into the replacement string by inserting a “\\bs” followed "
3709 "by a digit from 1 to 9 that represents the string matched by a "
3710 "parenthesized expression within the regular expression. The numbering "
3711 "is left to right.")
3712 LIST_ITEM1 (U"Example: A search for \"(a)(b)\" in the string \"abc\", "
3713 "followed by a replace \"\\bs2\\bs1\" results in \"bac\".")
3714 TERM (U"#& reference at entire match.")
3715 DEFINITION (U"The entire string that was matched by the search operation will "
3716 "be substituted.")
3717 LIST_ITEM1 (U"Example: a search for \".\" in the string \"abcd\" followed by "
3718 "the replace \"&&\" doubles every character in the result "
3719 "\"aabbccdd\".")
3720 TERM (U"#\\bsU #\\bsu to uppercase.")
3721 DEFINITION (U"The text inserted by \"&\" or \"\\bs1\" ... \"\\bs9\" is "
3722 "converted to %uppercase (\"\\bsu\" only changes the %first character to "
3723 "uppercase).")
3724 LIST_ITEM1 (U"Example: A search for \"(aa)\" in the string \"aabb\", "
3725 "followed by a replace \"\\bsU\\bs1bc\" results in the string \"AAbcbb\".")
3726 TERM (U"#\\bsL #\\bsl to lowercase.")
3727 DEFINITION (U"The text inserted by \"&\" or \"\\bs1\" ... \"\\bs9\" is "
3728 "converted to %lowercase (\"\\bsl\" only changes the %first character to "
3729 "lowercase).")
3730 LIST_ITEM1 (U"Example: A search for \"(AA)\" with a replace \"\\bsl\\bs1bc\" "
3731 "in the string \"AAbb\" results in the string \"aAbcbb\".")
3732 MAN_END
3733
3734 MAN_BEGIN (U"Roots", U"djmw", 19990608)
3735 INTRO (U"One of the @@types of objects@ in Praat.")
3736 NORMAL (U"An object of type Roots "
3737 "represents the (complex) roots of a @@Polynomial|polynomial@ function.")
3738 ENTRY (U"Commands")
3739 NORMAL (U"Creation")
3740 LIST_ITEM (U"\\bu @@Polynomial: To Roots@")
3741 NORMAL (U"Drawing")
3742 LIST_ITEM (U"\\bu ##Draw...# (in the complex plane)")
3743 NORMAL (U"Queries")
3744 LIST_ITEM (U"\\bu ##Get root...#: get complex root")
3745 LIST_ITEM (U"\\bu ##Get real part of root...#")
3746 LIST_ITEM (U"\\bu ##Get imaginary part of root...#")
3747 MAN_END
3748
3749 MAN_BEGIN (U"Debug multi-threading...", U"David Weenink & Paul Boersma", 20250721) // 20250813
3750 INTRO (U"These settings determine how fast parallelized procedures, such as analyses of sound, will be performed on your computer. "
3751 "You can use these settings for tuning e.g. a specific analysis procedure. "
3752 "These settings are \"debug settings\" that are not remembered across Praat sessions.")
3753 ENTRY (U"Settings")
3754 TERM (U"##Use multi-threading#")
3755 DEFINITION (U"Only if you choose %on, the computing load will be equally divided among a number of different processors "
3756 "on your computer. If it’s off, you will get single-threading.")
3757 TERM (U"##Maximum number of threads#")
3758 DEFINITION (U"determines the number of threads that you would like to use. Most modern computers have multiple "
3759 "processors. One some computers (e.g. AMD64/Intel64) each processor can process two threads; "
3760 "on some other computers (e.g. ARM64) each processor can process one thread. "
3761 "If you supply 0 for this setting, then Praat will use all physical threads once.")
3762 TERM (U"##Minimum number of frames per thread#")
3763 DEFINITION (U"as starting up a new thread costs time, it is rarely worthwhile to distribute "
3764 "small numbers of frames over lots of threads. To achieve an optimal speed gain, "
3765 "this number should be tuned via a script, for each type of analysis separately, "
3766 "and perhaps for different sets of analysis settings separately.")
3767 TERM (U"##Trace multi-threading#")
3768 DEFINITION (U"returns extra information for each analysed frame in the Info window.")
3769 ENTRY (U"Example")
3770 NORMAL (U"Suppose the \"maximum number of threads\" is 10, and you want to analyse 500 frames. "
3771 "If the \"minimum number of frames per thread\" is 20, "
3772 "Praat will divide up those 500 frames over 10 threads of 50 frames each. "
3773 "The first thread will analyse frames 1 to 50, the second thread will analyse "
3774 "frames 51 till 100, the third thread will analyse frames 101 till 150, etc. The tenth thread will analyse "
3775 "frames 451 till 500. All these threads will be executed, in parallel, almost at the same time, which guarantees "
3776 "a significant decrease in analysis time as compared to single-threading.")
3777 NORMAL (U"If the \"minimum number of frames per thread\" is 100 instead, "
3778 "Praat will divide up the 500 frames over 5 threads of 100 frames each.")
3779 NORMAL (U"The amount of speed-up depends on a number of factors: starting up a thread costs time, "
3780 "and allocating per-thread analysis buffers costs time.")
3781 MAN_END
3782
3783 MAN_BEGIN (U"Scree plot", U"djmw", 20040331)
3784 NORMAL (U"A scree plot shows the sorted eigenvalues, from large to "
3785 "small, as a function of the eigenvalue index.")
3786 MAN_END
3787
3788 MAN_BEGIN (U"singular value decomposition", U"djmw", 20171217)
3789 INTRO (U"The %%singular value decomposition% (SVD) is a matrix factorization algorithm.")
3790 NORMAL (U"For %m >= %n, the singular value decomposition of a real %m \\xx %n matrix #A is the "
3791 "factorization")
3792 EQUATION (U"#A = #U #D #V\\'p,")
3793 NORMAL (U"The matrices in this factorization have the following properties:")
3794 TERM (U"#U [%m \\xx %n] and #V [%n \\xx %n]")
3795 DEFINITION (U"are orthogonal matrices. The columns #u__%i_ of #U =[#u__1_, ..., #u__%n_] "
3796 "are the %%left singular vectors%, and the columns #v__%i_ of #V [#v__1_, ..., #v__%n_] "
3797 "are the %%right singular vectors%.")
3798 TERM (U"#D [%n \\xx %n] = diag (%\\si__1_, ..., %\\si__%n_)")
3799 DEFINITION (U"is a real, nonnegative, and diagonal matrix. Its diagonal contains the so called "
3800 "%%singular values% %\\si__%i_, where %\\si__1_ \\>_ ... \\>_ %\\si__%n_ \\>_ 0.")
3801 MAN_END
3802
3803 MAN_BEGIN (U"solving matrix equations", U"djmw", 20230801)
3804 INTRO (U"In this manual you will learn how to solve different kinds of equations involving matrices and vectors.")
3805 NORMAL (U"Given a matrix #A and a vector #y, the types of equations we like to solve are of the form #y=#A\\.c#x, where #A "
3806 "and #y are given. The task is to find the vector #x. The first two subsections show how to deal with this equation with "
3807 "no constraints on the solution vector #x. Section 4 will show how to deal with the situation when the solution vector #x is constrained.")
3808 NORMAL (U"In the equation above, the matrix and the vectors have to conform. This means that the number of rows of #A should "
3809 "equal the size of the #y vector and the size of the solution vector #x will always equal the number of colums of #A.")
3810 NORMAL (U"Note: In Praat scripting we don't distinguish in notation between a vector and its transpose.")
3811 ENTRY (U"1. Matrix A is square")
3812 NORMAL (U"In this case an exact solution for #x is possible because if #A is \"well behaved\" we can calculate its inverse and "
3813 "the solution will be #x = #A^^\\-m1^\\.c#y. The function #`solve#` (%`a##`, %`y#`)# is for this type of problem.")
3814 NORMAL (U"The following example shows an exactly solvable system because #A is a square matrix and \"well behaved\":")
3815 CODE (U"a## = {{0, 2, 0, 1},")
3816 CODE (U"... {2, 2, 3, 2},")
3817 CODE (U"... {4,-3, 0, 1},")
3818 CODE (U"... {6, 1,-6,-5}}")
3819 CODE (U"y# = {0,-2,-7,6}")
3820 CODE (U"x# = solve# (a##, y#)")
3821 CODE (U"writeInfoLine: x#")
3822 NORMAL (U"My info window shows:")
3823 NORMAL (U"-0.49999999999999967 1.000000000000001 0.3333333333333344 -2.0000000000000027")
3824 NORMAL (U"As a check we can calculate the norm of the difference between #y and ##A\\.cx#, which should be zero for a perfect solution.")
3825 CODE (U"appendInfoLine: norm (y# - mul# (a##, x#))")
3826 NORMAL (U"My info window shows 1.0777744118960794e-14, which is almost zero (it is not exactly zero due to rounding errors because "
3827 "real numbers cannot be represented exactly in a computer.")
3828
3829 ENTRY (U"2. Matrix A has more rows than columns")
3830 NORMAL (U"If the matrix has more rows than colums an exact solution is generally not possible and the best thing we can do is to "
3831 "find a solution vector #x that %%minimizes% the squared distance between the vectors #y and #A\\.c#x. The problem now can be "
3832 "posed as: find the vector #x that minimizes ||#y \\-m #A\\.c#x||^2. This is a regression problem which can be solved using "
3833 "@@singular value decomposition@.")
3834 NORMAL (U"The following example shows a 5\\xx2 matrix #A. The solution therefore is a vector with two elements.")
3835 CODE (U"a## = {{-0.84,-0.184},")
3836 CODE (U"... { 0.09, 1.26},")
3837 CODE (U"... { 0.62,-0.20},")
3838 CODE (U"... {-1.48,-1.03},")
3839 CODE (U"... { 1.29, 0.03}}")
3840 CODE (U"y# = {-0.19, -0.90, -1.53, -2.30, 0.58}")
3841 CODE (U"x# = solve# (a##, y#)")
3842 CODE (U"writeInfoLine: x#")
3843 NORMAL (U"My info window shows:")
3844 NORMAL (U"0.5881230621928452 0.21643159712237164")
3845 NORMAL (U"We can calculate the norm of the difference:")
3846 CODE (U"appendInfoLine: norm (y# - mul# (a##, x#))")
3847 NORMAL (U"My info window shows:")
3848 NORMAL (U"2.556992185298919")
3849 NORMAL (U"This means that no other vector #x can be found that has ||#y \\-m #A\\.c#x|| < 2.556992185298919!")
3850
3851 ENTRY (U"3. Matrix A has more columns than rows")
3852 NORMAL (U"If the number of colums is larger than the number of rows the system in general is underdetermined, i.e. we can not "
3853 "determine a complete solution vector.")
3854
3855 ENTRY (U"4. The x# vector is constrained")
3856 NORMAL (U"If there are additional constraints on the vector #x we can handle three different cases:")
3857
3858 ENTRY (U"4.1 Constraints on the squared norm of the solution #x")
3859 NORMAL (U"These can be expressed in the following form: %minimize ||#y \\-m #A\\.c#x||^2 + %\\al(#x\\'p#x \\-m %\\de) for some "
3860 "%\\al > 0 and %\\de \\>_ 0. Here the constraint on the squared norm #x\\'p#x of #x is enforced by adding a penalty function "
3861 "with weighing factor %\\al.")
3862 NORMAL (U"The function to use is #`solveWeaklyConstrained#` (%`a##`, %`y#`, %`alpha`, %`delta`)")
3863 NORMAL (U"The function is called \"weakly constrained\" because the penalty function prohibits a relatively large departure of "
3864 "#x\\'p#x from %\\de. If we let \\al go to infinity we have a constrained least squares regression problem of minimizing "
3865 "||#y \\-m #A\\.c#x||^^2^ subject to #x\\'p#x = %\\de. The algorithm we have implemented is described by @@Ten Berge (1991)@.")
3866
3867 ENTRY (U"4.1.1 An example from the cited paper with an 6\\xx2 matrix #A")
3868 CODE (U"a## = {{ 4, 1, 0.5},")
3869 CODE (U"... { 4,-1,-0.5},")
3870 CODE (U"... {-4, 1,-0.5},")
3871 CODE (U"... {-4,-1, 0.5},")
3872 CODE (U"... { 2, 0, 0},")
3873 CODE (U"... {-2, 0, 0}}")
3874 CODE (U"y# = {-1,-1,-1,-1,-1,1}")
3875 CODE (U"alpha = 6.0")
3876 CODE (U"delta = 2 / 3")
3877 CODE (U"x# = solveWeaklyConstrained# (a##, y#, alpha, delta)")
3878 CODE (U"writeInfoLine: x#")
3879 NORMAL (U"My info window shows:")
3880 NORMAL (U"-0.0563380281690141 -3.341667830688472e-17 0.7616819283108669")
3881
3882 ENTRY (U"4.1.2 The solution of the regression without the constraint")
3883 NORMAL (U"No constraints are involved if we set %\\al = 0")
3884 CODE (U"x# = solveWeaklyConstrained# (a##, y#, 0.0, delta)")
3885 CODE (U"writeInfoLine: x#")
3886 NORMAL (U"My info window shows:")
3887 NORMAL (U"-0.05555555555555557 -5.696494054485392e-17 3.0458443711512004e-16")
3888 NORMAL (U"The same solution would have appeared if we had used the following code:")
3889 CODE (U"x# = solve# (a##, y#)")
3890 CODE (U"writeInfoLine: x#")
3891 ENTRY (U"4.1.3. To enforce a solution where the norm of the solution equals one")
3892 NORMAL (U"We choose a very large value for %\\al and set %\\de to 1.0.")
3893 CODE (U"x# = solveWeaklyConstrained# (a##, y#, 1e100, 1.0)")
3894 CODE (U"writeInfoLine: x#")
3895 NORMAL (U"My info window shows: ")
3896 NORMAL (U"-0.05633802816901411 -3.341667830688472e-17 0.9984117520251988")
3897
3898 ENTRY (U"4.2. Constraint of nonnegativity of the solution")
3899 NORMAL (U"Here we constrain the elements of the solution to be nonnegative. The problem is stated as %minimize ||#y \\-m #A\\.c#x||^2 "
3900 "where all %x__%i_ \\>_ 0.")
3901 NORMAL (U"This problem can be solved by an iterative alternating least squares method as described by @@Borg & Groenen (1997)@. "
3902 "The function to use is #`solveNonnegative#` (%`a##`, %`y#` [, %`x#`], %`maximumNumberOfIterations`, %`tolerance`, %`infoLevel`)")
3903 NORMAL (U"The parameters have the following meaning:")
3904 TERM (U"%`a##`, %`y#`")
3905 DEFINITION (U"the #A matrix and the #y vector.")
3906 TERM (U"[, %`x#`]")
3907 DEFINITION (U"the optional vector to start the iterations. If not given the procedure starts with the zero vector.")
3908 TERM (U"%`maximumNumberOfIterations`")
3909 DEFINITION (U"the maximum number of iterations that should be run if the tolerance criterion is not met.")
3910 TERM (U"%`tolerance`")
3911 DEFINITION (U"is a criterion value that is needed to decide when to stop the iterations. If %d(%n) is the squared approximation error "
3912 "in the %n-th step of the iteration, i.e. %d(%n) = ||#y \\-m #A\\.c#x(%n)||^^2^, where #x(%n) is the approximation of #x at step %n, "
3913 "then the iteration stops if either d(n) == 0 or")
3914 DEFINITION (U"|%d(%n) - %d(%n-1)| / ||#y||^2 < %tolerance.")
3915 TERM (U"%`infoLevel`")
3916 DEFINITION (U"determines the amount of information that is written to the info window during iterations. No info is written if the value is zero.")
3917 NORMAL (U"As an example consider:")
3918 CODE (U"a## = {{-4, 2, 2}, ")
3919 CODE (U" { 2, 4, 2}, ")
3920 CODE (U" { 1, 1, 1},")
3921 CODE (U" { 2,-1, 3}}")
3922 CODE (U"y# = {1,2,1,3}")
3923 CODE (U"result# = solveNonnegative# (a##, y#, 100, 1e-17, 0)")
3924 CODE (U"writeInfoLine: result#")
3925 NORMAL (U"My info window shows:")
3926 NORMAL (U"0.17687074830212887 0 0.8594104308385341")
3927 NORMAL (U"")
3928 NORMAL (U"The same %`a##` and %`y#` with extra output and only three iterations:")
3929 CODE (U"result# = solveNonnegative# (a##, y#, 3, 1e-17, 2)")
3930 CODE (U"writeInfoLine: result#")
3931 NORMAL (U"Now my info window shows:")
3932 NORMAL (U"Iteration: 1, error: 2.7083144168962345")
3933 NORMAL (U"Iteration: 2, error: 0.22835187182198863")
3934 NORMAL (U"Iteration: 3, error: 0.019415103584264275")
3935 NORMAL (U"Number of iterations: 3; Minimum: 0.019415103584264275")
3936 NORMAL (U"0.18686771227425772 0.0063553925295192215 0.8542134965490019")
3937 NORMAL (U"The solution is not reached after only 3 iterations. We use the found solution to start a new iteration:")
3938 CODE (U"result# = solveNonnegative# (a##, y#, result#, 100, 1e-17, 1)")
3939 CODE (U"writeInfoLine: result#")
3940 NORMAL (U"My info window shows")
3941 NORMAL (U"Number of iterations: 6; Minimum: 0.011337868480725613")
3942 NORMAL (U"0.17687074830212887 0 0.8594104308385341")
3943 NORMAL (U"The final solution has been reached after 6 extra iterations.")
3944
3945 ENTRY (U"4.3 Constraints on the sparseness of the solution")
3946 NORMAL (U"As we have seen above, if the number of columns is larger than the number of rows then a unique solution does not exist "
3947 "in general because the number of unknowns is larger than the number of equations. However, there is an exception:")
3948 NORMAL (U"If the matrix #A has some special properties %and the solution vector has to be sparse, i.e. most of its values are zero, "
3949 "then we can find the #x that minimizes ||#y \\-m #A\\.c#x||^2.")
3950 NORMAL (U"In general an iterative procedure is needed for the minimization. We have implemented one based on %%iterative hard "
3951 "thresholding% which is described by @@Blumensath & Davies (2010)@. ")
3952 NORMAL (U"#`solveSparse#` (%`a##`, %`y#` [, %`x#`], %`maximumNumberOfNonzeros`, %`maximumNumberOfIterations`, %`tolerance`, %`infoLevel`)")
3953 NORMAL (U"The parameters have the following meaning:")
3954 TERM (U"%`a##`, %`y#`")
3955 DEFINITION (U"the #A matrix and the #y vector.")
3956 TERM (U"[, %`x#`]")
3957 DEFINITION (U"the optional vector to start the iterations. If not given the procedure starts with the zero vector.")
3958 TERM (U"%`maximumNumberOfNonzeros`")
3959 DEFINITION (U"the maximum number of nonzero elements in the solution vector, i.e. the sparsity.")
3960 TERM (U"%`maximumNumberOfIterations`")
3961 DEFINITION (U"the maximum number of iterations that should be run if the tolerance criterion is not met.")
3962 TERM (U"%`tolerance`")
3963 DEFINITION (U"is a criterion value that is needed to decide when to stop the iterations. If %d(%n) is the squared approximation error "
3964 "in the %n-th step of the iteration, i.e. %d(%n) = ||#y \\-m ##A\\.cx#(%n)||^^2^, where #x(%n) is the approximation of #x at step %n, "
3965 "then the iteration stops if")
3966 DEFINITION (U"|%d(%n) \\-m %d(%n\\-m1)| / ||#y||^2 < %tolerance.")
3967 TERM (U"%`infoLevel`")
3968 DEFINITION (U"determines the amount of information that is written to the info window during iterations. No info is written if the value is zero.")
3969 NORMAL (U"In the following example we first construct a sparse vector #x, with random numbers between 0.1 and 10, and a random "
3970 "Gaussian matrix #A. From these two we construct our #y. We then solve the sparse system and compare its solution #xs to "
3971 "the constructed #x.")
3972 CODE (U"nrow = 100")
3973 CODE (U"ncol = 1000")
3974 CODE (U"x# = zero# (ncol)")
3975 CODE (U"for i to size (x#)")
3976 CODE1 (U"x# [i] = if randomUniform (0,1) < 0.005 then randomUniform (0.1, 10) else 0.0 fi")
3977 CODE (U"endfor")
3978 CODE (U"# On average in x# 5 out of 1000 will be unequal zero.")
3979 CODE (U"a# = randomGauss## (nrow, ncol, 0.0, 1.0 / nrow)")
3980 CODE (U"y# = mul# (a##, x#)")
3981 CODE (U"maximumNumberOfNonzeros = 10")
3982 CODE (U"maximumNumberOfIterations = 200")
3983 CODE (U"tolerance = 1e-17")
3984 CODE (U"info = 0 ; no info")
3985 CODE (U"xs# = solveSparse# (a##, y#, maximumNumberOfNonzeros, maximumNumberOfIterations, tolerance, info)")
3986 CODE (U"# We have found the solution now check")
3987 CODE (U"dif# = x# - xs#")
3988 CODE (U"inner = inner (dif#, dif#)")
3989 CODE (U"writeInfoLine: if inner > 1e-7 then \"error\" else \"OK\" endif")
3990 NORMAL (U"My info window shows: OK.")
3991 MAN_END
3992
3993 MAN_BEGIN (U"SVD", U"djmw", 20220111)
3994 INTRO (U"An object of type ##SVD# represents the @@singular value decomposition@ of a matrix.")
3995 ENTRY (U"SVD internals")
3996 NORMAL (U"Given #A, an %m \\xx %n matrix with %m >= %n, the decomposition will be #A = #U #D #V\\'p. ")
3997 NORMAL (U"In the SVD object we store the %m \\xx %n matrix #U, the %n \\xx %n matrix #V and the %%n%-dimensional vector with the singular values. ")
3998 NORMAL (U"If it happens that for the #A matrix %m < %n, i.e. the number of rows is less than the number of columns, then we store "
3999 "the SVD of the transpose of #A and flag this internally. "
4000 "In this way we can make sure that for the matrix #U the number of columns never exceeds the number of rows and at the same time that the dimension of the matrix #V never exceeds the dimension of the matrix #U. ")
4001 NORMAL (U"For example the SVD of a 100 \\xx 20 matrix will result in a 100 \\xx 20 matrix #U, a 20 \\xx 20 matrix #V and 20 singular values, "
4002 "the SVD of a 20 \\xx 100 matrix will also result in a 100 \\xx 20 matrix #U, a 20 \\xx 20 matrix #V and 20 singular values, however it will be internally flagged as being transposed.")
4003 MAN_END
4004
4005 MAN_BEGIN (U"SVD: Get minimum number of singular values...", U"djmw", 20171214)
4006 INTRO (U"A command to get the minimum number of singular values (s.v.'s) whose sum, divided by the sum of all singular values, is smaller than the given fraction.")
4007 ENTRY (U"Examples")
4008 NORMAL (U"Given an SVD with four s.v's 10.0, 6.0, 3.0 and 1.0. The sum of the s.v's is 20.0.")
4009 CODE (U"Get minimum number of singular values: 0.5")
4010 DEFINITION (U"The returned value would be 1. The first s.v. divided by the sum is 0.5 (= 10.0 / 20.0). "
4011 "For any fraction lower than 0.5 the query would also return 1, because the first s.v. already covers half of the total sum.")
4012 CODE (U"Get minimum number of singular values: 0.8")
4013 DEFINITION (U"The returned value would be 2. The sum of first two s.v.'s divided by the sum is 0.8 (= (10.0 + 6.0) / 20.0). "
4014 " For any fraction between 0.5 and 0.8 the query would also return 2.")
4015 CODE (U"Get minimum number of singular values: 0.95")
4016 DEFINITION (U"The returned value would be 3. The sum of first three s.v.'s divided by the sum is 0.95 (= (10.0 + 6.0 + 3.0) / 20.0)."
4017 " For any fraction between 0.8 and 0.95 the query would also return 3.")
4018 CODE (U"Get minimum number of singular values: 0.96")
4019 DEFINITION (U"The returned value would be 4.")
4020 CODE (U"Get minimum number of singular values: 0.99")
4021 DEFINITION (U"The returned value would be 4.")
4022 MAN_END
4023
4024 MAN_BEGIN (U"Sound & Pitch: Change speaker...", U"djmw", 20070722)
4025 INTRO (U"A command to create a new Sound object with manipulated characteristics "
4026 "from the selected @Sound and @Pitch.")
4027 NORMAL (U"With this command you can have finer grained control over the "
4028 "pitch than with the @@Sound: Change speaker...@ command. "
4029 "Accurate pitch measurement determines the quality of the "
4030 "@@overlap-add@ synthesis." )
4031 ENTRY (U"Settings")
4032 NORMAL (U"The settings are described in @@Sound: Change speaker...@. ")
4033 MAN_END
4034
4035 MAN_BEGIN (U"Sound & Pitch: Change gender...", U"djmw", 20070722)
4036 /* INTRO (U"Deprecated: use @@Sound & Pitch: Change speaker...@") */
4037 NORMAL (U"A command to create a new Sound object with manipulated characteristics "
4038 "from the selected @Sound and @Pitch.")
4039 NORMAL (U"With this command you can have finer grained control over the "
4040 "pitch than with the @@Sound: Change gender...@ command. "
4041 "Accurate pitch measurement determines the quality of the "
4042 "@@overlap-add@ synthesis." )
4043 ENTRY (U"Settings")
4044 NORMAL (U"The settings are described in @@Sound: Change gender...@. ")
4045 MAN_END
4046
4047 MAN_BEGIN (U"Sound: Change gender...", U"djmw", 20030205) // 2023
4048 /* INTRO (U"Deprecated: use @@Sound: Change speaker...@") */
4049 NORMAL (U"A command to create a new @Sound with manipulated characteristics.")
4050 ENTRY (U"Settings")
4051 NORMAL (U"The quality of the @@overlap-add|manipulation@ depends on the pitch measurement.")
4052 NORMAL (U"The arguments that control the pitch measurement are:")
4053 TERM (U"##Pitch floor (Hz)# (standard value: 75 Hz)")
4054 DEFINITION (U"pitch candidates below this frequency will not be considered.")
4055 TERM (U"##Pitch ceiling (Hz)# (standard value: 600 Hz)")
4056 DEFINITION (U"pitch candidates above this frequency will be ignored.")
4057 NORMAL (U"The arguments that control the manipulation are:")
4058 TERM (U"##Formant shift ratio")
4059 DEFINITION (U"determines the frequencies of the formants in the newly created "
4060 "Sound. If this ratio equals 1 no frequency shift will occur and "
4061 "the formant frequencies will not change. A ratio of 1.1 will change "
4062 "a male voice to a voice with approximate female formant characteristics. "
4063 "A ratio of 1/1.1 will change a female voice to a voice with approximate male formant "
4064 "characteristics.")
4065 TERM (U"##New pitch median (Hz)# (standard value: 0.0 Hz, i.e. same as original)")
4066 DEFINITION (U"determines what the median pitch of the new Sound will be. "
4067 "The pitch values in the newly created Sound will be calculated from the pitch "
4068 "values in the selected Sound by multiplying them by a factor "
4069 "%%newPitchMedian / oldPitchMedian%. This factor equals 1.0 if the default "
4070 "value for the new pitch median (0.0) is chosen. ")
4071 TERM (U"##Pitch range factor# (standard value: 1.0)")
4072 DEFINITION (U"determines an %extra% scaling of the new pitch values around the %new% "
4073 "pitch median. A factor of 1.0 means that no additional pitch modification will occur "
4074 "(except the obvious one described above). A factor of 0.0 monotonizes the new "
4075 "sound to the new pitch median.")
4076 TERM (U"##Duration factor# (standard value: 1.0)")
4077 DEFINITION (U"The factor with which the sound will be lengthened. The default is 1.0. "
4078 "If you take a value less than 1.0, the resulting sound will be shorter than "
4079 "the original. A value larger than 3.0 will not work.")
4080 NORMAL (U"If you want more control over the synthesis you can supply your own "
4081 "Pitch object and use the @@Sound & Pitch: Change gender...@ command. ")
4082 ENTRY (U"Algorithm")
4083 NORMAL (U"The shifting of frequencies is done via manipulation of the sampling frequency. "
4084 "Pitch and duration changes are generated with @@overlap-add@ synthesis.")
4085 NORMAL (U"The new pitch values are calculated in a two step process. We first multiply all "
4086 "the pitches with the factor %%newPitchMedian / oldPitchMedian% according to:")
4087 EQUATION (U"%newPitch = %pitch * %newPitchMedian / %oldPitchMedian.")
4088 NORMAL (U"It follows that if the %newPitchMedian equals the %oldPitchMedian no "
4089 "change in pitch values will occur in the first step.")
4090 NORMAL (U"Subsequently, the pitch range scale factor determines the final pitch values "
4091 "in the following linear manner:")
4092 EQUATION (U"%finalPitch = %newPitchMedian + (%newPitch \\-- %newPitchMedian) * %pitchRangeScaleFactor")
4093 NORMAL (U"Hence, it follows that no further scaling occurs if %pitchRangeScaleFactor "
4094 "equals 1.0.")
4095 MAN_END
4096
4097 MAN_BEGIN (U"Sound: Change speaker...", U"djmw", 20080515)
4098 INTRO (U"A command to create a new @Sound with manipulated characteristics.")
4099 ENTRY (U"Settings")
4100 NORMAL (U"The quality of the @@overlap-add|manipulation@ depends on the pitch measurement.")
4101 NORMAL (U"The arguments that control the pitch measurement are:")
4102 TERM (U"##Pitch floor (Hz)# (standard value: 75 Hz)")
4103 DEFINITION (U"pitch candidates below this frequency will not be considered.")
4104 TERM (U"##Pitch ceiling (Hz)# (standard value: 600 Hz)")
4105 DEFINITION (U"pitch candidates above this frequency will be ignored.")
4106 NORMAL (U"The arguments that control the manipulation are:")
4107 TERM (U"##Multiply formants by")
4108 DEFINITION (U"determines the formant frequencies of the newly created sound. "
4109 "The formant frequency of the new sound will equal the formant frequencies of the selected sound multiplied by this number. "
4110 "If this number equals 1, formant frequencies will not change. A number of 1.1 will change "
4111 "a male voice to a voice with approximate female formant characteristics. "
4112 "A ratio of 1/1.1 will change a female voice to a voice with approximate male formant "
4113 "characteristics.")
4114 TERM (U"##Multiply pitch by")
4115 DEFINITION (U"determines what the pitch of the new Sound will be. "
4116 "The pitch values of the new sound will equal the pitch values of the selected sound multiplied by this number. A value of 1.8 will approximately change a male's pitch to a female's pitch.")
4117 TERM (U"##Multiply pitch range by# (standard value: 1.0)")
4118 DEFINITION (U"determines the pitch range of the newly created sound. "
4119 "A factor of 1.0 means that no additional pitch modification will occur "
4120 "(except the obvious one described above). A factor of 0.0 monotonizes the new "
4121 "sound to the new pitch median. A negative number inverses the pitch range with respect to the median.")
4122 TERM (U"##Multiply duration by# (standard value: 1.0)")
4123 DEFINITION (U"determines how to modify the duration of the newly created sound. "
4124 "A value of 1.0 means that the new sound will have the same duration as the selected sound. "
4125 "A value less than 1.0 will result in a shortened new sound. A value larger than 2.5 will not work.")
4126 NORMAL (U"If you want more control over the synthesis you can supply your own "
4127 "Pitch object and use the @@Sound & Pitch: Change speaker...@ command. ")
4128 ENTRY (U"Algorithm")
4129 NORMAL (U"The shifting of formant frequencies is done via manipulation of the sampling frequency. "
4130 "To multiply all formants by a factor of 1.10 (i.e. raising them by 10 percent), a sampling "
4131 "frequency of 44100 Hz is first raised to 48510 Hz (without changing "
4132 "the samples). After this, the sound is lengthened by a factor of 1.10 "
4133 "and the pitch is lowered by a factor of 1.10, so that the original "
4134 "duration and pitch are restored. After this, the sound is resampled "
4135 "to 44100 Hz (by sinc interpolation)."
4136 "Pitch and duration changes are generated with @@overlap-add@ synthesis.")
4137 MAN_END
4138
4139 MAN_BEGIN (U"Sound: Remove noise...", U"djmw", 20121122)
4140 INTRO (U"A command to suppress noise in the selected @Sound.")
4141 ENTRY (U"Settings")
4142 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (5), U""
4143 Manual_DRAW_SETTINGS_WINDOW ("Sound: Remove noise...", 5)
4144 Manual_DRAW_SETTINGS_WINDOW_RANGE(U"Noise time range (s)", U"0.0", U"0.0")
4145 Manual_DRAW_SETTINGS_WINDOW_FIELD(U"Window length (s)", U"0.025")
4146 Manual_DRAW_SETTINGS_WINDOW_RANGE(U"Filter frequency range (Hz)", U"80.0", U"10000.0")
4147 Manual_DRAW_SETTINGS_WINDOW_FIELD(U"Smoothing (Hz)", U"40.0")
4148 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU(U"Noise reduction method", U"Spectral subtraction")
4149 )
4150 TERM (U"##Noise time range (s)")
4151 DEFINITION (U"the start and end time of a noise part in the sound whose characteristics will be used in the denoising. "
4152 "If the end time is chosen before the start time, the noise fragment will be chosen automatically around a position "
4153 "where the intensity is minimal. For good noise suppression it is important that the noise fragment's duration is chosen "
4154 "several times the length of the window.")
4155 TERM (U"##Window length (s)")
4156 DEFINITION (U"denoising takes place in (overlapping) windows of this length.")
4157 TERM (U"##Filter frequency range (Hz)")
4158 DEFINITION (U"before denoising the sound will be @@Sound: Filter (pass Hann band)...|band-pass filtered@. ")
4159 TERM (U"##Noise reduction method")
4160 DEFINITION (U"The method of %%spectral subtraction% was defined in @@Boll (1979)@. The variant implemented is modelled "
4161 "after a script by Ton Wempe.")
4162 MAN_END
4163
4164 MAN_BEGIN (U"Sound: Draw where...", U"djmw", 20170829)
4165 INTRO (U"A command to draw only those parts of a @Sound where a condition holds.")
4166 ENTRY (U"Settings")
4167 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (5.6), U""
4168 Manual_DRAW_SETTINGS_WINDOW ("Sound: Draw where...", 5.6) // 0.6 extra for the text
4169 Manual_DRAW_SETTINGS_WINDOW_RANGE("Time range (s)", "0.0", "0.0 (= all)")
4170 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= all)")
4171 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish", 1)
4172 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU("Drawing method", "Curve")
4173 Manual_DRAW_SETTINGS_WINDOW_TEXT ("Draw only those parts where the following condition holds",
4174 "x < xmin + (xmax - xmin) / 2; first half")
4175 )
4176 TERM (U"##Time range (s)")
4177 DEFINITION (U"selects the time domain for the drawing.")
4178 TERM (U"##Vertical range")
4179 DEFINITION (U"defines the vertical limits; larger amplitudes will be clipped.")
4180 TERM (U"##Draw only those parts where the following condition holds#")
4181 DEFINITION (U"determines the part of the sound that will be drawn. All parts where the formula evaluates to true will be drawn. "
4182 "This formula may ##not# contain references to the sampling of the sound, i.e. don't use 'col', 'x1', 'dx' and 'ncol' in it.")
4183 ENTRY (U"Example 1")
4184 NORMAL (U"The following script draws all amplitudes larger than one in red.")
4185 CODE (U"Create Sound from formula: \"s\", \"Mono\", 0, 1, 2000, ~ 1.8*sin(2*pi*5*x)+randomGauss(0,0.1)")
4186 CODE (U"Colour: \"Red\"")
4187 CODE (U"Draw where: 0, 0, -2, 2, \"no\", \"Curve\", ~ abs(self)>1")
4188 CODE (U"Colour: \"Black\"")
4189 CODE (U"Draw where: 0, 0, -2, 2, \"yes\", \"Curve\", ~ not (abs(self)>1)")
4190 SCRIPT (8, 3,
4191 U"Create Sound from formula: \"s\", \"Mono\", 0, 1, 2000, ~ 1.8*sin(2*pi*5*x)+randomGauss(0,0.1)\n"
4192 "Colour: \"Red\"\n"
4193 "Draw where: 0, 0, -2, 2, \"no\", \"Curve\", ~ abs(self)>1\n"
4194 "Colour: \"Black\"\n"
4195 "Draw where: 0, 0, -2, 2, \"yes\", \"Curve\", ~ not (abs(self)>1)\n"
4196 "Remove\n"
4197 )
4198 ENTRY (U"Example 2")
4199 NORMAL (U"Draw the second half of a sound:")
4200 CODE (U"Draw where: 0, 0, -1, 1, \"no\", \"Curve\", ~ x > xmin + (xmax - xmin) / 2")
4201 ENTRY (U"Example 3")
4202 NORMAL (U"Draw only positive amplitudes:")
4203 CODE (U"Draw where: 0, 0, -1, 1, \"no\", \"Curve\", ~ self > 0")
4204 ENTRY (U"Example 4")
4205 NORMAL (U"Draw parts where pitch is larger than 300 Hz in red:")
4206 CODE (U"s = selected (\"Sound\")")
4207 CODE (U"p = To Pitch: 0, 75, 600")
4208 CODE (U"pt = Down to PitchTier")
4209 CODE (U"selectObject: s")
4210 CODE (U"Colour: ~ Red")
4211 CODE (U"Draw where: 0, 0, -1, 1, \"yes\", \"Curve\", ~ object (pt, x) > 300")
4212 CODE (U"Colour: ~ Black")
4213 CODE (U"Draw where: 0, 0, -1, 1, \"yes\", \"Curve\", ~ not (object (pt, x) > 300)")
4214 MAN_END
4215
4216 MAN_BEGIN (U"Sound: Fade in...", U"djmw", 20170829)
4217 INTRO (U"A command to gradually increase the amplitude of a selected @Sound.")
4218 ENTRY (U"Settings")
4219 TERM (U"##Channel")
4220 DEFINITION (U"determines whether you want to fade all channels or only a selected channel.")
4221 TERM (U"##Time (s)")
4222 DEFINITION (U"determines where the fade-in will take place. If %time is earlier than the start time of the sound, "
4223 "the start time of the sound wil be used.")
4224 TERM (U"##Fade time (s)")
4225 DEFINITION (U"determines the start point and the endpoint of the fade-in with respect to the %time argument. "
4226 "Depending on the sign of %%fadeTime%, %time is either the start or the end position of the fade-in. If %%fadeTime% "
4227 "is positive, fade-in will take place between %%time% and %%time+fadeTime%. If %%fadeTime% is negative, "
4228 "fade-in wil take place between %%time+fadeTime% and %time.")
4229 TERM (U"##Silent from start")
4230 DEFINITION (U"when on, makes the sound silent before the fade-in starts. "
4231 "When off, the sound before the fade-in starts will not be changed. ")
4232 ENTRY (U"Algorithm")
4233 NORMAL (U"Multiplication with the first half period of a (1-cos(x))/2 function. ")
4234 ENTRY (U"Cross-fading two sounds")
4235 NORMAL (U"The following script cross-fades two sounds s1 and s2 at time 1 second and leaves the result in s2.")
4236 CODE1 (U"crossFTime = 0.5")
4237 CODE1 (U"t = 1")
4238 CODE1 (U"s = Create Sound from formula: \"s1\", 1, 0, 2, 44100, ~ sin(2*pi*500*x)")
4239 CODE1 (U"Fade out: 0, t-crossFTime/2, crossFTime, \"yes\"")
4240 CODE1 (U"Create Sound from formula: \"s2\", 1, 0, 2, 44100, ~ sin(2*pi*1000*x)")
4241 CODE1 (U"Fade in.: 0, t-crossFTime/2, crossFTime, \"yes\"")
4242 CODE1 (U"Formula: ~ self + object [s]")
4243 MAN_END
4244
4245 MAN_BEGIN (U"Sound: Fade out...", U"djmw", 20121010)
4246 INTRO (U"A command to gradually decrease the amplitude of a selected @Sound.")
4247 ENTRY (U"Settings")
4248 TERM (U"##Channel")
4249 DEFINITION (U"determines whether you want to fade all channels or only a selected channel.")
4250 TERM (U"##Time (s)")
4251 DEFINITION (U"determines where the fade-out will take place. If %time is later than the end time of the sound, "
4252 "the end time of the sound wil be used.")
4253 TERM (U"##Fade time (s)")
4254 DEFINITION (U"determines the start point and the endpoint of the fade-out with respect to the %time argument. "
4255 "Depending on the sign of %%fadeTime%, %time is either the start or the end position of the fade-out. If %%fadeTime% "
4256 "is positive, fade-out will take place between %%time% and %%time+fadeTime%. If %%fadeTime% is negative, "
4257 "fade-out wil take place between %%time+fadeTime% and %time.")
4258 TERM (U"##Silent to end")
4259 DEFINITION (U"Make the sound silent after the fade-out finishes. ")
4260 ENTRY (U"Algorithm")
4261 NORMAL (U"Multiplication with the first half period of a (1+cos(%%x%))/2 function.")
4262 MAN_END
4263
4264 MAN_BEGIN (U"Sound: Filter (gammatone)...", U"djmw", 20170829)
4265 INTRO (U"A command to filter a Sound by a fourth-order gammatone bandpass filter.")
4266 ENTRY (U"Settings")
4267 TERM (U"##Centre frequency (Hz)#, ##Bandwidth (Hz)#")
4268 DEFINITION (U"determine the passband of the filter.")
4269 ENTRY (U"Algorithm")
4270 NORMAL (U"The impulse response of the filter is a 4-th order @@gammatone@. The "
4271 "filter is implemented as the convolution of the gammatone with the sound. "
4272 "The gain of the filter is scaled to unity at the centre frequency.")
4273 ENTRY (U"Remark")
4274 NORMAL (U"The old implementation with a simple 8-th order recursive digital filter with "
4275 "4 zeros and 8 poles (these 8 poles consist of one conjugate pole pair to the "
4276 "4-th power) as suggested by @@Slaney (1993)@ was not stable for low frequencies. ")
4277 MAN_END
4278
4279 MAN_BEGIN (U"Sound: Play as frequency shifted...", U"djmw", 20230801)
4280 INTRO (U"Plays the selected @Sound with all frequencies shifted by the same amount. This trick can be used to make "
4281 "audible those sounds that are normally not audible at all by human beings, like for example ultrasounds or infrasounds.")
4282 ENTRY (U"Settings")
4283 TERM (U"##Shift by (Hz)")
4284 DEFINITION (U"the amount by which frequencies are shifted. A positive number shifts frequencies up, a negative number "
4285 "shifts frequencies down. ")
4286 ENTRY (U"##Example")
4287 NORMAL (U"Rodents produce sounds with frequencies far outside the human audible range. Some meaningfull squeaks of these animals "
4288 "are present in the frequency range from 54 kHz up to sometimes 100kHz. By choosing a shift value of -54000 Hz and a sampling "
4289 "frequency of 44100 Hz, all frequencies between 54000 Hz and (54000+22050=) 76050 Hz will be shifted down by 54000 Hz. The "
4290 "rodents’ frequencies in the interval from 54000 Hz to 76050 Hz will therefore be mapped to the frequency interval between 0 and 22050 Hz. ")
4291 MAN_END
4292
4293 MAN_BEGIN (U"Sound: To BarkSpectrogram...", U"djmw", 20141023)
4294 INTRO (U"A command that creates a @BarkSpectrogram object from every selected "
4295 "@Sound object by @@band filtering in the frequency domain@ with a "
4296 "bank of filters.")
4297 NORMAL (U"The auditory filter functions used are defined as:")
4298 EQUATION (U"10 log %#H(%z) = 7 - 7.5 * (%z__%c_ - %z - 0.215) - 17.5 * \\Vr "
4299 "(0.196 + (%z__%c_ - %z - 0.215)^2)")
4300 NORMAL (U"where %z__%c_ is the central (resonance) frequency of the filter in Bark. "
4301 "The bandwidths of these filters are constant and equal 1 Bark. ")
4302 NORMAL (U"The auditory filters are defined in @@Sekey & Hanson (1984)@. You can draw these filters from "
4303 "a BarkSpectrogram object by selecting @@BarkSpectrogram: Draw Sekey-Hanson auditory filters...@.")
4304 MAN_END
4305
4306 MAN_BEGIN (U"Sound: To FormantFilter...", U"djmw", 20141024)
4307 INTRO (U"A #deprecated command that creates a @FormantFilter object from every selected @Sound object by "
4308 "@@band filtering in the frequency domain@ with a bank of filters whose bandwidths depend on the pitch of the signal.")
4309 NORMAL (U"The analysis proceeds in two steps:")
4310 LIST_ITEM (U"1. We perform a pitch analysis (see @@Sound: To Pitch...@ for details).")
4311 LIST_ITEM (U"2. We perform a filter bank analysis on a linear frequency scale. The bandwidth of the filters depends on "
4312 "the measured pitch (see @@Sound & Pitch: To Spectrogram...@ for details).")
4313 MAN_END
4314
4315 MAN_BEGIN (U"Sound: To Spectrogram (pitch-dependent)...", U"djmw", 20141024)
4316 INTRO (U"A command that creates a @Spectrogram object from every selected "
4317 "@Sound object by @@band filtering in the frequency domain@ with a "
4318 "bank of formant filters whose bandwidths vary with the local pitch of the signal.")
4319 NORMAL (U"The analysis proceeds in two steps:")
4320 LIST_ITEM (U"1. We perform a pitch analysis (see @@Sound: To Pitch...@ for details).")
4321 LIST_ITEM (U"2. We perform a filter bank analysis on a linear frequency scale. "
4322 "The bandwidth of the filters depends on the measured pitch (see @@Sound & Pitch: To Spectrogram...@ for details).")
4323 MAN_END
4324
4325 MAN_BEGIN (U"Sound: Paint where...", U"djmw", 20170829)
4326 INTRO (U"A command to paint only those parts of a @Sound where a condition holds. The painted area is the area "
4327 "between the Sound and a horizontal line at a certain level.")
4328 ENTRY (U"Settings")
4329 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (6.6), U""
4330 Manual_DRAW_SETTINGS_WINDOW ("Sound: Paint where...", 6.6) // 0.6 extra for the text
4331 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Colour (0-1, name, {r,g,b})", "0.5")
4332 Manual_DRAW_SETTINGS_WINDOW_RANGE("Time range (s)", "0.0", "0.0 (= all)")
4333 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= all)")
4334 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Fill from level", "0")
4335 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish", 1)
4336 Manual_DRAW_SETTINGS_WINDOW_TEXT ("Paint only those parts where the following condition holds",
4337 "1; always")
4338 )
4339 TERM (U"##Colour")
4340 DEFINITION (U"defines the @@Colour|colour@ of the paint.")
4341 TERM (U"##Time range (s)")
4342 DEFINITION (U"selects the time domain for the drawing.")
4343 TERM (U"##Vertical range")
4344 DEFINITION (U"defines the vertical limits; larger amplitudes will be clipped.")
4345 TERM (U"##Fill from level")
4346 DEFINITION (U"defines the level of the horizontal line. ")
4347 TERM (U"##Formula")
4348 DEFINITION (U"determines the part of the sound that will be painted. All parts where the formula evaluates to true will be painted. "
4349 "This formula may ##not# contain references to the sampling of the sound, i.e. don't use 'col', 'x1', 'dx' and 'ncol' in it.")
4350 ENTRY (U"Example 1")
4351 NORMAL (U"The following script paints the area under a sine curve in red and the area above in green."
4352 "For the first paint the horizontal line is at y=-1, for the second paint the line is at y=+1. "
4353 "The formula always evaluates to true.")
4354 CODE (U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)")
4355 CODE (U"Paint where: \"Red\", 0, 0, -1, 1, -1, \"yes\", ~ 1")
4356 CODE (U"Paint where: \"Green\", 0, 0, -1, 1, 1, \"no\", ~ 1 ")
4357 SCRIPT (8, 5,
4358 U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)\n"
4359 "Paint where: \"Red\", 0, 0, -1, 1, -1, \"no\", ~ 1\n"
4360 "Paint where: \"Green\", 0, 0, -1, 1, 1, \"yes\", ~ 1\n"
4361 "Remove\n")
4362 ENTRY (U"Example 2")
4363 NORMAL (U"The following script paints the area below zero in red and the area above in green."
4364 "The horizontal line is now always at y=0 and we use the formula to differentiate the areas.")
4365 CODE (U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)")
4366 CODE (U"Paint where: \"Red\", 0, 0, -1, 1, 0, \"no\", ~ self > 0")
4367 CODE (U"Paint where: \"Green\", 0, 0, -1, 1, 0, \"yes\", ~ self < 0")
4368 SCRIPT (8, 5,
4369 U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)\n"
4370 "Paint where: \"Red\", 0, 0, -1, 1, 0, \"no\", ~ self < 0\n"
4371 "Paint where: \"Green\", 0, 0, -1, 1, 0, \"yes\", ~ self > 0\n"
4372 "removeObject: s\n")
4373 ENTRY (U"Example 3")
4374 NORMAL (U"To give an indication that the area under a 1/x curve between the points %a and %b and the area "
4375 "between %c and %d are equal if %b/%a = %d/%c. For example, for %a=1, %b=2, %c=4 and %d=8: ")
4376 CODE (U"Create Sound from formula: \"1dx\", \"Mono\", 0, 20, 100, ~ 1.0 / x ")
4377 CODE (U"Draw: 0, 20, 0, 1.5, \"yes\", \"Curve\"")
4378 CODE (U"Paint where: \"Grey\", 0, 20, 0, 1.5, 0, \"yes\", ~ (x >= 1 and x < 2) or (x >= 4 and x < 8)")
4379 CODE (U"One mark bottom: 1, \"yes\", \"yes\", \"no\", \"\"")
4380 CODE (U"One mark bottom: 2, \"yes\", \"yes\", \"no\", \"\"")
4381 CODE (U"One mark bottom: 4, \"yes\", \"yes\", \"no\", \"\"")
4382 CODE (U"One mark bottom: 8, \"yes\", \"yes\", \"no\", \"\"")
4383 SCRIPT (8, 5,
4384 U"s = Create Sound from formula: \"1dx\", \"Mono\", 0, 20, 100, ~ 1.0 / x\n"
4385 "Draw: 0, 20, 0, 1.5, \"yes\", \"Curve\"\n"
4386 "Paint where: \"Grey\", 0, 20, 0, 1.5, 0, \"yes\", ~ (x >= 1 and x < 2) or (x >= 4 and x < 8)\n"
4387 "One mark bottom: 1, \"yes\", \"yes\", \"no\", \"\"\n"
4388 "One mark bottom: 2, \"yes\", \"yes\", \"no\", \"\"\n"
4389 "One mark bottom: 4, \"yes\", \"yes\", \"no\", \"\"\n"
4390 "One mark bottom: 8, \"yes\", \"yes\", \"no\", \"\"\n"
4391 "removeObject: s\n")
4392 MAN_END
4393
4394 MAN_BEGIN (U"Sounds: Paint enclosed...", U"djmw", 20170829)
4395 INTRO (U"Paints the area between the two selected @@Sound@s. ")
4396 ENTRY (U"Settings")
4397 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (4), U""
4398 Manual_DRAW_SETTINGS_WINDOW ("Sounds: Paint enclosed", 4)
4399 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Colour (0-1, name, {r,g,b})", "0.5")
4400 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Time range (s)", "0.0", "0.0 (= all)")
4401 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= all)")
4402 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish", 1)
4403 )
4404 TERM (U"##Colour")
4405 DEFINITION (U"defines the @@Colour|colour@ of the paint.")
4406 TERM (U"##Time range (s)")
4407 DEFINITION (U"selects the time domain for the drawing.")
4408 TERM (U"##Vertical range")
4409 DEFINITION (U"defines the vertical limits, larger amplitudes will be clipped.")
4410 ENTRY (U"Example")
4411 NORMAL (U"The following script paints the area enclosed between a sine tone of 5 Hz and the straight line %y = %x/2.")
4412 CODE (U"s1 = Create Sound from formula: \"sine\", \"Mono\", 0, 1, 10000, ~ 1/2 * sin(2*pi*5*x)\"")
4413 CODE (U"s2 = Create Sound from formula: \"line\", \"Mono\", 0, 1, 10000, ~ x / 2")
4414 CODE (U"plusObject (s1)")
4415 CODE (U"Paint enclosed: \"Grey\", 0, 0, -1, 1, ~ yes")
4416 SCRIPT ( 4, 2,
4417 U"s1 = Create Sound from formula: \"sine\", \"Mono\", 0, 1, 10000, ~ 1/2 * sin(2*pi*5*x)\n"
4418 "s2 = Create Sound from formula: \"line\", \"Mono\", 0, 1, 10000, ~ x / 2\n"
4419 "selectObject: s1, s2\n"
4420 "Paint enclosed: \"Grey\", 0, 0, -1, 1, \"yes\"\n"
4421 "removeObject: s1, s2\n")
4422 MAN_END
4423
4424 MAN_BEGIN (U"Sound: To Polygon...", U"djmw", 20170829)
4425 INTRO (U"A command that creates a @@Polygon@ from a selected @@Sound@, where the Polygon's "
4426 " points are defined by the (%time, %amplitude) pairs of the sound. ")
4427 ENTRY (U"Settings")
4428 TERM (U"##Channel")
4429 DEFINITION (U"defines which channel of the sound is used.")
4430 TERM (U"##Time range (s)")
4431 DEFINITION (U"defines the part of the sound whose (%time, %amplitude) pairs have to be included.")
4432 TERM (U"##Vertical range")
4433 DEFINITION (U"defines the vertical limits, larger amplitudes will be clipped.")
4434 TERM (U"##Connection y-value")
4435 DEFINITION (U"defines the y-value of the first and last point of the Polygon. This gives the opportunity to "
4436 " draw a closed Polygon with the horizontal connection line at any position you like. ")
4437 ENTRY (U"Example")
4438 NORMAL (U"The following script paints the area under a sound curve in red and the area above in green.")
4439 CODE (U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)")
4440 CODE (U"# Connection y-value is at amplitude -1: area under the curve.")
4441 CODE (U"p1 = To Polygon: 1, 0, 0, -1, 1, -1")
4442 CODE (U"Paint: \"{1,0,0}\", 0, 0, -1, 1")
4443 CODE (U"selectObject: s")
4444 CODE (U"# Connection y-value is now at amplitude 1: area above the curve.")
4445 CODE (U"p2 = To Polygon: 1, 0, 0, -1, 1, 1")
4446 CODE (U"Paint: \"{0,1,0}\", 0, 0, -1, 1")
4447 SCRIPT (4.5, 2,
4448 U"s = Create Sound from formula: \"s\", 1, 0, 1, 10000, ~ 0.5*sin(2*pi*5*x)\n"
4449 "p1 = To Polygon: 1, 0, 0, -1, 1, -1\n"
4450 "Paint: \"{1,0,0}\", 0, 0, -1, 1\n"
4451 "selectObject: s\n"
4452 "p2 = To Polygon: 1, 0, 0, -1, 1, 1\n"
4453 "Paint: \"{0,1,0}\", 0, 0, -1, 1\n"
4454 "removeObject: p2, p1, s\n"
4455 )
4456 MAN_END
4457
4458 #define xxx_to_TextGrid_detectSilences_COMMON_PARAMETERS_HELP \
4459 TERM (U"##Silence threshold (dB)") \
4460 DEFINITION (U"determines the maximum silence intensity value in dB with respect to the maximum " \
4461 "intensity. For example, if %imax is the maximum intensity in dB then the maximum silence " \
4462 "intensity is calculated as %%imax - silenceThreshold%; intervals with an intensity smaller " \
4463 "than this value are considered as silent intervals.") \
4464 TERM (U"##Minimum silent interval (s)") \
4465 DEFINITION (U"determines the minimum duration for an interval to be considered as silent. " \
4466 "If you don't want the closure for a plosive to count as silent then use a large enough value.") \
4467 TERM (U"##Minimum sounding interval (s)") \
4468 DEFINITION (U"determines the minimum duration for an interval to be ##not# considered as silent. " \
4469 "This offers the possibility to filter out small intense bursts of relatively short duration.") \
4470 TERM (U"##Silent interval label") \
4471 DEFINITION (U"determines the label for a silent interval in the TextGrid.") \
4472 TERM (U"##Sounding interval label") \
4473 DEFINITION (U"determines the label for a sounding interval in the TextGrid.")
4474
4475 MAN_BEGIN (U"Sound: To TextGrid (silences)...", U"djmw", 20160406)
4476 INTRO (U"A command that creates a @TextGrid in which the silent and sounding intervals of the selected @Sound are marked.")
4477 ENTRY (U"Settings")
4478 xxx_to_TextGrid_detectSilences_COMMON_PARAMETERS_HELP
4479 ENTRY (U"Algorithm")
4480 NORMAL (U"First a copy of the sound is @@Sound: Filter (pass Hann band)...|bandpass filtered@ between 80 and 8000 Hz to "
4481 "remove especially the low frequency noise that can have a significant influence on the intensity measurement but does not "
4482 "really contribute to the sound. Next the @@Sound: To Intensity...|intensity of the filtered sound@ is determined. "
4483 "Finally the silent and sounding intervals are determined @@Intensity: To TextGrid (silences)...|from the intensity curve@.")
4484 MAN_END
4485
4486 MAN_BEGIN (U"Sound: To TextGrid (speech activity)...", U"djmw", 20260313)
4487 INTRO (U"An old command; the same as @@Sound: To TextGrid (speech activity, LTSF)...@.")
4488 NORMAL (U"The name changed in Praat 6.4.62, because there is also @@Sound: To TextGrid (speech activity, Silero)...@.")
4489 MAN_END
4490
4491
4492 MAN_BEGIN (U"Sound: To TextGrid (speech activity, LTSF)...", U"djmw", 20231209)
4493 INTRO (U"A command that creates a @@TextGrid@ for the selected @@Sound@ in which the non-speech intervals and the "
4494 "intervals with speech activity are marked. The discrimination between the two is based on a spectral flatness measure.")
4495 NORMAL (U"Speech activity detection, in the technical literature often referred to as voice activity detection, "
4496 "is a method to discriminate speech segments from input noisy speech. "
4497 "According to the article of @@Ma & Nishihara (2013)@, spectral flatness is a measure of the width, uniformity, "
4498 "and noisiness of the power spectrum. A high spectral flatness indicates that the spectrum has a similar amount "
4499 "of power in all spectral bands, and the graph of the spectrum would appear relatively flat and smooth; "
4500 "A low spectral flatness indicates that the spectral power is less uniform, and this would be more typical "
4501 "for speech-like sounds. In general speech is a highly non-stationary signal while background noise can be "
4502 "considered stationary over relatively longer periods of time. ")
4503 NORMAL (U"Because the spectral flatness measure is completely "
4504 "independent of the overall intensity of the sound we have added the possibility to also discriminate on "
4505 "intensity.")
4506 ENTRY (U"Settings")
4507 TERM (U"##Time step (s)#")
4508 DEFINITION (U"determines the time interval between consecutive measurements of the spectral flatness measure. ")
4509 TERM (U"##Long term window (s)#")
4510 DEFINITION (U"determines the window duration for the calculation of the long term spectral flatness measure. "
4511 "According to ##Ma & Nishihara (2013)# a value of approximately 0.3 s performed best on average for a "
4512 "number of different noise conditions.")
4513 TERM (U"##Short term window (s)#")
4514 DEFINITION (U"determines the interval for averaging spectral estimates. "
4515 "According to ##Ma & Nishihara (2013)# a value of approximately 0.1 s performed best on average for a "
4516 "number of different noise conditions.")
4517 TERM (U"##Frequency range (Hz)#")
4518 DEFINITION (U"determines the frequency range used in the calculation of the spectral flatness measure. "
4519 "Ma & Nishihara (2013) used a range from 400 to 4000 Hz. Because fricatives tend to have strong components "
4520 "above 4000 Hz we increased the default value to 6000 Hz. In this way the fricative's intensity, which is "
4521 "calculated from this range, becomes higher and because of this a fricative is less likely to be skipped "
4522 "by a selection on the non-speech threshold. We also decreased the lower value from 400 to 70 Hz. "
4523 "In this way we increase chances that sounds at start or end positions with mainly low frequency components, "
4524 "like nasals, are detected.")
4525 TERM (U"##Flatness threshold#")
4526 DEFINITION (U"determines whether a frame is considered %%speech% or not, based on a spectral flatness measure. "
4527 "Values of the flatness below the threshold are considered speech.")
4528 TERM (U"##Non-speech threshold (dB)#")
4529 DEFINITION (U"also determines whether a frame is considered %%speech% or not, but based on intensity. "
4530 "Intervals with an intensity smaller than this value below the sound's maximum intensity value "
4531 "are considered as %%non-speech% intervals. The intensity is calculated from the frequency range defined above. ")
4532 TERM (U"##Minimum non-speech interval duration (s)#")
4533 DEFINITION (U"determines the minimum duration for an interval to be considered as non-speech. "
4534 "If you don't want the closure for a plosive to count as non-speech then use a large enough value.")
4535 TERM (U"##Minimum speech interval (s)") \
4536 DEFINITION (U"determines the minimum duration for an interval to be considered as speech. "
4537 "This offers the possibility to filter out small intense bursts of relatively short duration.")
4538 TERM (U"##Speech / Non-speech interval label#")
4539 DEFINITION (U"determine the labels for the corresponding intervals in the newly created TextGrid.")
4540 ENTRY (U"Algorithm")
4541 NORMAL (U"The speech activity algorithm is described in @@Ma & Nishihara (2013)@.")
4542 NORMAL (U"The logarithm of the speech flatness at frame %m is defined as:")
4543 EQUATION (U"L (m) = \\Si__k_ log (GM(%m, %f__%k_) / AM (%m, %f__%k_)), ")
4544 NORMAL (U" where GM(%m, %f__%k_) and AM (%m, %f__%k_) are the geometric and arithmetic means for spectrum "
4545 "component %f__%k_, respectively. "
4546 "The geometric mean GM (%m, %f__%k_) is defined as ")
4547 EQUATION (U"GM(%m, %f__%k_) = {\\Pi^^%m^__%n=%m-%R+1_ %S(%n, %f__%k_)}^^(1/%R)^")
4548 NORMAL (U" where the number of frames %R is determined by the setting of the %%long term window% parameter. "
4549 "AM(%m, %f__%k_) is defined as ")
4550 EQUATION (U"AM(%m, %f__%k_) = {\\Si^^m^__n=%m-%R+1_ %S(%n, %f__%k_)} / %R")
4551 NORMAL (U"The %short term window comes into play in the definition of the %S(%n, %f__%k_), because this is "
4552 "itself the average of %M local spectral frames")
4553 EQUATION (U"%S(%n, %f__%k_) = {\\Si^^M^__p=%m-%M+1_ |X(p, %f__%k_)|^^2^} / %M,")
4554 NORMAL (U"where the number of frames %M is determined by the setting of the %%short term window% length. ")
4555 NORMAL (U"The ratio between the geometric and arithmetic mean is always smaller than or equal to one. "
4556 "Only when all numbers are equal, this means a flat spectrum, the ratio becomes equal to one. ")
4557 MAN_END
4558
4559 MAN_BEGIN (U"Intensity: To TextGrid (silences)...", U"djmw", 20061201) // 2023
4560 INTRO (U"A command that creates a @TextGrid in which the silent and sounding intervals of the selected @Intensity are marked.")
4561 ENTRY (U"Settings")
4562 xxx_to_TextGrid_detectSilences_COMMON_PARAMETERS_HELP
4563 ENTRY (U"Algorithm")
4564 NORMAL (U"First the intensity contour is evaluated and the intervals above and below the silence threshold are marked as "
4565 "%sounding and %silent. "
4566 "We then remove sounding intervals with a duration smaller than the %%Minimum sounding interval duration%. "
4567 "This step is followed by joining the neighbouring silent intervals that resulted because of this removal. "
4568 "Finally we remove silent intervals with a duration smaller than the %%Minimum silent interval duration%. "
4569 "This is followed by joining the neighbouring sounding intervals that resulted because of this removal.")
4570 NORMAL (U"Experience showed that first removing short intensity bursts instead of short silences gave better results than doing it the other way around.")
4571 ENTRY (U"Important")
4572 NORMAL (U"The effectiveness of the %%Minimum silent interval duration% and %%Minimum sounding interval duration% "
4573 "depends on the effective window length that was used to determine the intensity contour. "
4574 "For example, if you have chosen 100 Hz for the “Pitch floor” parameter in the @@Sound: To Intensity...@ analysis, "
4575 "the effective window length was 32 ms. Don't expect to find sounding "
4576 "or silent intervals with a duration smaller than this effective window length.")
4577 MAN_END
4578
4579 MAN_BEGIN (U"ConstantQLogFSpectrogram", U"djmw", 20211111)
4580 INTRO (U"A ##ConstantQLogFSpectrogram# is a time-frequency representation of a sound that deviates from a traditional @Spectrogram in two important ways. ")
4581 LIST_ITEM (U"1. The frequency scale is logarithmic which means that the distances between successive "
4582 "frequencies are equal on a logarithmic scale.")
4583 LIST_ITEM (U"2. The frequency analysis is performed with filters that have a constant quality factor which essencially "
4584 "means that we are using the same number of periods in the analysis of each frequency bin and this results in longer "
4585 "analysis windows at low frequencies and shorter analysis windows at higher frequencies. As a result the sampling of each "
4586 "frequency bin is different, hence it is %%multi-sampled%.")
4587 NORMAL (U"One of the characteristics of a ##ConstantQLogFSpectrogram#'s representation is that the number of "
4588 "frequency bins in an octave is constant. If, for example, the number of frequency bins per octave is 24 this "
4589 "means that the number "
4590 "of frequency bins in the interval from 100 to 200 Hz equals 24 and that the number of frequency bins in the intervals "
4591 "from 200\\--400 Hz, 400\\--800 Hz, 800\\--1600 Hz, 1600\\--3200 Hz, etc. also equal 24. This behaviour mimics the "
4592 "layout of the frequency sensitivity of the human basilar membrane much better than a traditional @@Spectrogram@.")
4593 NORMAL (U"The frequency of the %k^^th^ frequency bin can be calculated as:")
4594 EQUATION (U"%f__%k_ = %%lowestFrequency%\\.c2^^(%k-1)/%%numberOfFrequencyBinsPerOctave%). ")
4595 NORMAL (U"A big advantage of the ##ConstantQLogFSpectrogram# over a traditional #Spectrogram is its invertability: we can create the original sound back from it. This provides a way to manipulate a sound in the frequency domain. ")
4596 MAN_END
4597
4598 MAN_BEGIN (U"Sound: To ConstantQLogFSpectrogram...", U"djmw", 20211111)
4599 INTRO (U"A command that creates a @@ConstantQLogFSpectrogram@ from a selected @@Sound@.")
4600 ENTRY (U"Settings")
4601 TERM (U"##Lowest frequency (Hz)")
4602 DEFINITION (U"defines the lowest frequency about which information will be obtained. This frequency has to be chosen well above "
4603 "zero hertz (because of the logarithmic frequency scale there are an infinite number of octaves between any lowest frequency "
4604 "and zero hertz). ")
4605 TERM (U"##Maximum frequency (Hz)")
4606 DEFINITION (U"The maximum frequency you are interested in. The default will be the Nyquist frequency of the sound. ")
4607 TERM (U"##Number of frequecy bins / octave")
4608 DEFINITION (U"determines the frequency division as the number of frequency bins that will be used for each octave. "
4609 "For the analysis of music generally a multiple of 12 will be used.")
4610 TERM (U"##Frequency resolution (bins)")
4611 DEFINITION (U"determines, together with the number of frequency bins per octave, the %%quality factor% used in the analysis."
4612 "The quality factor Q of a filter is defined as its "
4613 "central frequency divided by its bandwidth. The bandwith of a filter, i.e its domain, will be be set as twice the "
4614 "frequency resolution in bins. Therefore, the corresponding quality factor will be: ")
4615 EQUATION (U"%%qualityFactor% = 1 / (2^^(%%frequencyResolutionBins% / %%numberOfFrequencyBinsPerOctave%)^ - 2^^(\\--%%frequencyResolutionBins% / %%numberOfFrequencyBinsPerOctave%)^). ")
4616 DEFINITION (U"For a frequency resolution of 1 bin and a frequency division of 24 frequency bins per octave we get a "
4617 "quality factor of 14.26, for a frequency division of 48 bins per octave we get a quality factor of 34.6. "
4618 "The larger the quality factor the more frequency selective the filters will be and consequently, in the time domain, "
4619 "the longer their analysis window has to be. (Strictly speaking, the bandwidth of a filter is defined as the "
4620 "width of the filter at "
4621 "an intensity -3 dB below its top. The actual bandwidth depends on the form of the used filter function.)")
4622 TERM (U"##Time oversampling factor")
4623 DEFINITION (U"determines the number of frames in each frequency bin. Any number larger than 1 will increase the number of frames in a bin by approximately this factor. ")
4624 ENTRY (U"Algorithm")
4625 NORMAL (U"The algorithm for constructing the invertable constant-Q transform is described in @@Velasco et al. (2011)@ and in @@Holighaus et al. (2013)@. ")
4626 NORMAL (U"First the sound is transformed to the frequency domain with an FFT. The filtering is then performed in the frequency "
4627 "domain. For the %k^^th^ frequency bin the frequencies between %%lowestFrequency%\\.c2^^(%k-1)/%%numberOfFrequencyBinsPerOctave%)^ and %%lowestFrequency%\\.c2^^(%k+1)/%%numberOfFrequencyBinsPerOctave%)^ are transformed back with an inverse @FFT. The resulting coefficients are copied to the frames of the frequency bin. Because of the logarithmic frequency scale, the number of coefficients in a frequency bin will increase with bin number. ")
4628 NORMAL (U"")
4629 MAN_END
4630
4631 MAN_BEGIN (U"Sound: To Sound (derivative)...", U"djmw", 20230801)
4632 INTRO (U"Calculates the derivative of a @@Sound@.")
4633 ENTRY (U"Settings")
4634 TERM (U"##Low-pass frequency (Hz)")
4635 DEFINITION (U"defines the highest frequency to keep in the derivative. Because taking a derivative is comparable to "
4636 "multiplying the strength of each frequency component by its frequency value it has the effect of high-pass filtering. "
4637 "E.g. a 10000 Hz component is amplified 100 times stronger than a 100 Hz component. "
4638 "Low-pass filtering then becomes essential for removing high-frequency noise. ")
4639 TERM (U"##Smoothing (Hz)")
4640 DEFINITION (U"defines the width of the transition area between fully passed and fully suppressed "
4641 "frequencies. Frequencies below %%lowpassFrequency% will be fully passed, frequencies larger "
4642 "than %%lowpassFrequency%+%%smoothing% will be fully suppressed.")
4643 TERM (U"##New absolute peak")
4644 DEFINITION (U"the new absolute peak of the derivative. By specifying a value smaller than 1.0 the derivative can be made audible "
4645 "without distortion. If you want to listen to the derivative without distortion, it is absolutely necessary to scale the "
4646 "peak to a value somewhat smaller than 1.0, like 0.99. For example, for a pure sine tone with a frequency of 300 Hz "
4647 "and an amplitude of 1.0 whose formula is %%s(t) = sin(2\\pi300t)% the derivative with respect to time %t% is %%2\\pi300 cos(2\\pi300t)% ."
4648 "The result is a cosine of 300 Hz with a huge amplitude of %%2\\pi300%. You can prevent any scaling by supplying a value of 0.0.")
4649 ENTRY (U"Algorithm")
4650 NORMAL (U"The derivative of a wave form %%x%(%%t%) is most easily calculated in the spectral domain. According to "
4651 "Fourier theory, if %%x%(%%t%) = \\in%%X%(%%f%)exp(2\\pi%%ift%) %%dt%, then"
4652 " d%%x%(%%t%)/d%%t% = \\in%%X(%%f%)2\\pi%%if% exp(2\\pi%%ift%)d%%t%, where %%X%(%%f%) is the spectrum "
4653 "of the %%x%(%%t).")
4654 NORMAL (U"Therefore, by taking the spectrum of the signal and from this spectrum calculate new real and "
4655 "imaginary components and then transform back to the time domain we get the derivative.")
4656 NORMAL (U"The multiplication of the spectral components with the factor 2\\pi%%if% will result in a new "
4657 "%%X%\\'p(%%f%) whose components will be: Re(%%X\\'p%(%%f%)) = -2\\pi%%f% Im (%%X%(%%f%)) and Im(%%X\\'p%(%%f%)) =2\\pi%%f% Re(%%X%(%%f%)).")
4658 MAN_END
4659
4660 MAN_BEGIN (U"Spectrum: To Sound (resampled)...", U"djmw", 20220105)
4661 INTRO (U"A command that creates a @Sound from the selected @Spectrum by using a fast approximation of the inverse of the Discrete Fourier Transform (DFT).")
4662 NORMAL (U"For more details see @@Sound: To Spectrum (resampled)...@.")
4663 MAN_END
4664
4665 MAN_BEGIN (U"Sound: To Spectrum (resampled)...", U"djmw", 20220105)
4666 INTRO (U"A command that creates a @Spectrum from the selected @Sound by using a fast approximation of the Discrete Fourier Transform (DFT).")
4667 NORMAL (U"In general the amount of computation necessary to calculate the spectrum of a sound that consists "
4668 "of %N samples, is of the order of %O(%N log %N) multiplications. If the number of samples happens to be an "
4669 "exact power of 2, i.e. %N=2^^p^ and %p integer, a special algorithm called the FFT (Fast Fourier Transform) is "
4670 "available to calculate the spectrum very efficiently. In normal situations, however, the number of "
4671 "samples seldom happens to be an exact power of 2 and the calculation of the spectrum then proceeeds much slower, especially if "
4672 "%N happens to be a prime number a naive implementation of the DFT would calculate the spectrum in order O(%N^^2^) time. "
4673 "Extending the sound with zero sample values until the number of samples reaches a power of 2 enables us to use the fast "
4674 "FFT algorithm to calculate a fast approximation of the real spectrum. "
4675 "This is the traditional way to calculate the spectrum if you had chosen ##To Spectrum...# with the %%fast% option on. ")
4676 NORMAL (U"However, there is another option to get a sound with a number of samples that equals a power of 2, "
4677 "namely by upsampling the sound with a suitably chosen sampling frequency. We have to calculate the new sampling "
4678 "frequency such that the number of samples in the upsampled sound is exactly a power of 2. Of the new upsampled "
4679 "sound we can use the FFT algorithm to calculate its spectrum %%without the need to add zero sample values%. "
4680 "Because the upsampling results in a spectrum that "
4681 "contains higher frequency components than the spectrum of the original sound we have to process the just calculated spectrum by leaving out these higher frequency components to obtain the desired spectrum.")
4682 NORMAL (U"This resampled approximation generally performs better than the approximation by adding zero values.")
4683 ENTRY (U"Settings")
4684 TERM (U"##Precision#,")
4685 DEFINITION (U"the depth of the interpolation in samples. This determines the quality of the interpolation used "
4686 "in resampling.")
4687 ENTRY (U"Example")
4688 NORMAL (U"The following script shows the three different ways to calculate a Spectrum from a given sound. We deliberately have chosen the number of samples to be prime.")
4689 CODE (U"sound = Create Sound from formula: \"prime\", 1, 0.0, 3.9799, 10000, \"sin(2.0*pi*3333.0*x)\"")
4690 CODE (U"stopwatch")
4691 CODE (U"spectrum_dft = To Spectrum: \"no\"")
4692 CODE (U"time_dft = stopwatch")
4693 CODE (U"selectObject: sound")
4694 CODE (U"spectrum_resampled = To Spectrum (resampled): 30")
4695 CODE (U"time_resampled = stopwatch")
4696 CODE (U"selectObject: sound")
4697 CODE (U"spectrum_fft = To Spectrum: \"yes\"")
4698 CODE (U"time_fft = stopwatch")
4699 NORMAL (U"On my computer from 2019 the calculation of `spectrum_dft` happens to be very slow because of its naive %O(%N^2) algorithm. "
4700 "It takes 2.258 s while the resampled approximation only takes 0.031s and the approximation by adding zero values takes "
4701 "approximately 0.003 s. If the duration of the sound had been 10.0069 s, the number of samples again would be a prime number and "
4702 "the computing times are 14.127 s, 0.059 s and 0.005 s, respectively. This again shows that the naive implementation is "
4703 "very slow compared to the other two. It is also clear that resampling takes some extra time as compared to adding zero sample values. ")
4704 NORMAL (U"The following picture shows the `spectrum_dft` in black colour, the `spectrum_fft` in silver/grey and the "
4705 "`spectrum_resampled` in red. "
4706 "From the two alternative approximations of the spectrum, the resampled one looks a better approximation to the DFT than the one with zeros added.")
4707 PICTURE (5,3, drawSpectra)
4708 NORMAL (U"This method was inspired by a script by Ton Wempe.")
4709 MAN_END
4710
4711 MAN_BEGIN (U"Sound: Trim silences...", U"djmw", 20190914)
4712 INTRO (U"A command that creates from the selected @Sound a new sound with silence durations not longer than a specified value.")
4713 ENTRY (U"Settings")
4714 TERM (U"##Trim duration (s)#")
4715 DEFINITION (U"specifies the maximum allowed silence duration.")
4716 TERM (U"##Pitch floor (Hz)#, and, ##Time step (s)#")
4717 DEFINITION (U"determine how we measure the intensities on which the determination of silent intervals is based. See @@Sound: To Intensity...@ for more info.")
4718 TERM (U"##Silence threshold (dB)#, ##Minimum silent interval duration (s)#, and ##Minimum sounding interval duration#")
4719 DEFINITION (U"determine how the silent intervals will be determined. See @@Intensity: To TextGrid (silences)...@ for more info.")
4720 TERM (U"##Save trimming info as TextGrid#")
4721 DEFINITION (U"determines if a TextGrid with trimming information will also be created. The TextGrid will have one tier where intervals of the %%originating% sound that were trimmed have been labeled. ")
4722 TERM (U"##Trim label#")
4723 DEFINITION (U"determines the label that the trimmed intervals in the TextGrid will get.")
4724 MAN_END
4725
4726 MAN_BEGIN (U"Sound & Pitch: To Spectrogram...", U"djmw", 20191008)
4727 INTRO (U"A command that creates a @Spectrogram object from the selected "
4728 "@Sound and @Pitch objects by @@band filtering in the frequency domain@ with a "
4729 "bank of filters whose bandwidths depend on the local pitch.")
4730 NORMAL (U"The filter functions used are:")
4731 EQUATION (U"%#H(%f, %f__0_) = 1 / (((%f__%c_^^2^ - %f^2) /%f\\.c%B(%f__0_)))^2 + 1),")
4732 NORMAL (U"where %f__%c_ is the central (resonance) frequency of the filter. "
4733 "%B(%f__0_) is the bandwidth in Hz and determined as")
4734 EQUATION (U"%B(%f__0_) = %relativeBandwidth\\.c%f__0_, ")
4735 NORMAL (U"where %f__0_ is the fundamental frequency as determined from the Pitch "
4736 "object. Whenever the value of %f__0_ is undefined, a value of 100 Hz is taken.")
4737 MAN_END
4738
4739 MAN_BEGIN (U"Sound: To MelFilter...", U"djmw", 20141022)
4740 INTRO (U"A deprecated command. Use @@Sound: To MelSpectrogram...@ instead.")
4741 MAN_END
4742
4743 MAN_BEGIN (U"Sound: To MelSpectrogram...", U"djmw", 20141022)
4744 INTRO (U"A command that creates a @MelSpectrogram object from every selected "
4745 "@Sound object by @@band filtering in the frequency domain@ with a "
4746 "set of triangular filters.")
4747 NORMAL (U"The filter functions used are all triangular in shape on a %mel "
4748 "frequency scale. Each filter function depends on three parameters, the "
4749 "lower frequency %f__%l_, the central frequency %f__%c_ and the higher "
4750 "frequency %f__%h_. "
4751 "On a %mel scale, the distances %f__%c_-%f__%l_ and %f__%h_-%f__%c_ "
4752 "are equal for each filter. The filter function is as follows:" )
4753 EQUATION (U"%#H(%f) = 0 for %f \\<_ %f__%l_ and %f \\>_ %f__%h_")
4754 EQUATION (U"%#H(%f) = (%f - %f__%l_) / (%f__%c_ - %f__%l_) for %f__%l_ \\<_ %f \\<_ %f__%c_")
4755 EQUATION (U"%#H(%f) = (%f__%h_ - %f) / (%f__%h_ - %f__%c_) for %f__%c_ \\<_ %f \\<_ %f__%h_")
4756 NORMAL (U"In general the number of filter values stored in each frame of the MelSpectrogram is an order of magnitude smaller than the number of sound samples in the corresponding analysis frame.")
4757 MAN_END
4758
4759 MAN_BEGIN (U"Sound: To Pitch (shs)...", U"djmw", 19970402) // 2023
4760 INTRO (U"A command that creates a @Pitch object from every selected @Sound object.")
4761 ENTRY (U"Purpose")
4762 NORMAL (U"to perform a pitch analysis based on a spectral compression model. "
4763 "The concept of this model is that each spectral component not only activates "
4764 "those elements of the central pitch processor that are most sensitive to the "
4765 "component's frequency, but also elements that have a lower harmonic "
4766 "relation with this component. Therefore, when a specific element of the "
4767 "central pitch processor is most sensitive at a frequency %f__0_, it receives "
4768 "contributions from spectral components in the "
4769 "signal at integral multiples of %f__0_.")
4770 ENTRY (U"Algorithm")
4771 NORMAL (U"The spectral compression consists of the summation of a sequence of "
4772 "harmonically compressed spectra. "
4773 "The abscissa of these spectra is compressed by an integral factor, the rank "
4774 "of the compression. The maximum of the resulting sum spectrum is the "
4775 "estimate of the pitch. Details of the algorithm can be "
4776 "found in @@Hermes (1988)@")
4777 ENTRY (U"Settings")
4778 TERM (U"##Time step (s)# (standard value: 0.01 s)")
4779 DEFINITION (U"the measurement interval (frame duration), in seconds.")
4780 TERM (U"##Pitch floor (Hz)# (standard value: 50 Hz)")
4781 DEFINITION (U"candidates below this frequency will not be recruited. This parameter "
4782 "determines the length of the analysis window.")
4783 TERM (U"##Max. number of candidates# (standard value: 15)")
4784 DEFINITION (U"The maximum number of candidates that will be recruited.")
4785 TERM (U"##Maximum frequency (Hz)# (standard value: 1250 Hz)")
4786 DEFINITION (U"higher frequencies will not be considered.")
4787 TERM (U"##Max. number of subharmonics# (standard value: 15)")
4788 DEFINITION (U"the maximum number of harmonics that add up to the pitch.")
4789 TERM (U"##Compression factor# (standard value: 0.84)")
4790 DEFINITION (U"the factor by which successive compressed spectra are multiplied before the summation.")
4791 TERM (U"##Number of points per octave# (standard value: 48)")
4792 DEFINITION (U"determines the sampling of the logarithmic frequency scale.")
4793 TERM (U"##Pitch ceiling (Hz)# (standard value: 500 Hz)")
4794 DEFINITION (U"candidates above this frequency will be ignored.")
4795 MAN_END
4796
4797 MAN_BEGIN (U"Spectra: Multiply", U"djmw", 20100318)
4798 INTRO (U"Returns a new Spectrum object that is the product of the two selected "
4799 "@Spectrum objects.")
4800 MAN_END
4801
4802 MAN_BEGIN (U"Spectrum: Conjugate", U"djmw", 20031023)
4803 INTRO (U"Reverses the sign of the complex part of the selected @Spectrum object(s).")
4804 NORMAL (U"For real signals, conjugation in the spectral domain amounts to time-inversion in the time domain.")
4805 MAN_END
4806
4807 MAN_BEGIN (U"Spectrum: Shift frequencies...", U"djmw", 20121028)
4808 INTRO (U"Creates a new @Spectrum by shifting all frequencies of the selected Spectrum upwards or downwards.")
4809 ENTRY (U"Settings")
4810 TERM (U"##Shift by (Hz)")
4811 DEFINITION (U"a positive value shifts the spectrum towards higher frequencies, a negative value shifts the spectrum "
4812 "towards lower frequencies.")
4813 TERM (U"##New maximum frequency (Hz)")
4814 DEFINITION (U"the maximum frequency in the new Spectrum.")
4815 TERM (U"##Precision")
4816 DEFINITION (U"the number of neighbouring frequency points that are used in the calculation of the new frequency points. "
4817 "The precision relates linearly to the amount of computing time needed to get the new shifted spectrum.")
4818 MAN_END
4819
4820 MAN_BEGIN (U"SpeechSynthesizer", U"djmw", 20190811)
4821 INTRO (U"The SpeechSynthesizer is one of the @@types of objects@ in Praat. It creates a speech sound from text. The actual text-to-speech synthesis is performed by the @@eSpeak|eSpeak NG@ speech synthesizer and therefore our SpeechSynthesizer is merely an interface to Espeak.")
4822 ENTRY (U"Commands")
4823 NORMAL (U"Creation:")
4824 LIST_ITEM (U"\\bu @@Create SpeechSynthesizer...@")
4825 NORMAL (U"Playing:")
4826 LIST_ITEM (U"\\bu @@SpeechSynthesizer: Play text...|Play text...@")
4827 LIST_ITEM (U"\\bu @@SpeechSynthesizer: To Sound...|To Sound...@")
4828 NORMAL (U"Modification:")
4829 LIST_ITEM (U"\\bu @@SpeechSynthesizer: Set text input settings...|Set text input settings...@")
4830 LIST_ITEM (U"\\bu @@SpeechSynthesizer: Speech output settings...|Speech output settings...@")
4831 MAN_END
4832
4833 MAN_BEGIN (U"Create SpeechSynthesizer...", U"djmw", 20171101)
4834 INTRO (U"Creates the @@eSpeak|eSpeak NG@ speech synthesizer.")
4835 ENTRY (U"Settings")
4836 TERM (U"##Language#")
4837 DEFINITION (U"determines the language of the synthesizer.")
4838 TERM (U"##Voice variant#")
4839 DEFINITION (U"determines which voice type the synthesizer uses (male, female or whispered voices).")
4840 MAN_END
4841
4842 MAN_BEGIN (U"SpeechSynthesizer: Play text...", U"djmw", 20171101)
4843 INTRO (U"The selected @@SpeechSynthesizer@ plays a text.")
4844 ENTRY (U"Settings")
4845 TERM (U"##Text#")
4846 DEFINITION (U"is the text to be played. Text within [[ ]] is treated as phonemes codes in @@Kirshenbaum phonetic encoding@. For example, besides a text like \"This is text\", you might also input \"This [[Iz]] text\".")
4847 MAN_END
4848
4849 MAN_BEGIN (U"SpeechSynthesizer: To Sound...", U"djmw", 20171101)
4850 INTRO (U"The selected @@SpeechSynthesizer@ converts a text to the corresponding speech sound.")
4851 ENTRY (U"Settings")
4852 TERM (U"##Text#")
4853 DEFINITION (U"is the text to be played. Text within [[ ]] is treated as phonemes codes in @@Kirshenbaum phonetic encoding@. For example, besides a text like \"This is text\", you might also input \"This [[Iz]] text\".")
4854 TERM (U"##Create TextGrid with annotations#")
4855 DEFINITION (U"determines whether, besides the sound, a @@TextGrid@ with multiple-tier annotations will appear.")
4856 MAN_END
4857
4858 MAN_BEGIN (U"SpeechSynthesizer: Set text input settings...", U"djmw", 20171101)
4859 INTRO (U"A command available in the ##Modify# menu when you select a @@SpeechSynthesizer@.")
4860 ENTRY (U"Settings")
4861 TERM (U"##Input text format is#")
4862 DEFINITION (U"determines how the input text will be synthesized.")
4863 TERM (U"##Input phoneme codes are#")
4864 DEFINITION (U"currently only @@Kirshenbaum phonetic encoding@ is available.")
4865 MAN_END
4866
4867 MAN_BEGIN (U"SpeechSynthesizer: Speech output settings...", U"djmw", 20190811)
4868 INTRO (U"A command available in the ##Modify# menu when you select a @@SpeechSynthesizer@.")
4869 ENTRY (U"Settings")
4870 TERM (U"##Sampling frequency#")
4871 DEFINITION (U"determines how the sampling frequency of the sound.")
4872 TERM (U"##Gap between words#")
4873 DEFINITION (U"determines the amount of silence between words.")
4874 TERM (U"##Pitch multiplier (0.5-2.0)#")
4875 DEFINITION (U"determines how much the pitch will be changed. The extremes 0.5 and 2.0 represent, respectively, one octave "
4876 "below and one octave above the default pitch. ")
4877 TERM (U"##Pitch range multiplier (0.0-2.0)#")
4878 DEFINITION (U"determines how much the pitch range will be scaled. A value of 0.0 means monotonous pitch while a value of 2.0 means twice the default range.")
4879 TERM (U"##Words per minute#")
4880 DEFINITION (U"determines the speaking rate in words per minute.")
4881 TERM (U"##Output phoneme codes are#")
4882 MAN_END
4883
4884 MAN_BEGIN (U"SpeechSynthesizer: Set speech rate from speech...", U"djmw", 20171102)
4885 INTRO (U"A command available in the ##Modify# menu when you select a @@SpeechSynthesizer@.")
4886 ENTRY (U"Settings")
4887 TERM (U"##Estimate speech rate from speech#")
4888 DEFINITION (U"determines how speech rate is chosen. This is only used for the alignment of speech with text. If on, the speech rate is estimated from the part of speech that has to be aligned. ")
4889 MAN_END
4890
4891 MAN_BEGIN (U"SSCP", U"djmw", 19981103)
4892 INTRO (U"One of the @@types of objects@ in Praat.")
4893 NORMAL (U"An object of type SSCP represents the sums of squares and cross products of "
4894 "a multivariate data set.")
4895 NORMAL (U"Besides the matrix part, an object of type SSCP also contains a "
4896 "vector with centroids.")
4897 ENTRY (U"Inside a SSCP")
4898 NORMAL (U"With @Inspect you will see that this type contains the same "
4899 "attributes as a @TableOfReal with the following extras:")
4900 TERM (U"%numberOfObservations")
4901 TERM (U"%centroid")
4902 MAN_END
4903
4904 MAN_BEGIN (U"Sound: Extract Electroglottogram...", U"djmw", 20190929)
4905 INTRO (U"Extract one of the channels of a @@Sound@ as an @@Electroglottogram@.")
4906 ENTRY (U"Settings")
4907 TERM (U"##Channel number#")
4908 DEFINITION (U"defines the Electroglottogram channel in the sound.")
4909 TERM (U"##Invert#")
4910 DEFINITION (U"defines whether the wave in the Elecletroglottogram channel has to be inverted or not. "
4911 "The convention is that a positive direction in the Electroglottogram wave corresponds to "
4912 "an increase in contact area between the vocal folds which occurs if the vocal folds are closing. "
4913 "Since closing the vocal folds, in general, happens much faster than opening them, the steepest "
4914 "slope in each cycle of the wave should be the %%upward% slope. If this is not the case you "
4915 "should invert the wave.")
4916 MAN_END
4917
4918 MAN_BEGIN (U"SSCP: Draw sigma ellipse...", U"djmw", 19990222)
4919 INTRO (U"A command to draw for the selected @SSCP an ellipse that "
4920 "covers a part of the multivariate data.")
4921 ENTRY (U"Setting")
4922 TERM (U"##Number of sigmas")
4923 DEFINITION (U"determines the @@concentration ellipse|data coverage@.")
4924 MAN_END
4925
4926 MAN_BEGIN (U"SSCP: Get sigma ellipse area...", U"djmw", 20000525)
4927 INTRO (U"A command to query the selected @SSCP object for the area of a "
4928 "sigma ellipse.")
4929 ENTRY (U"Algorithm")
4930 NORMAL (U"The algorithm proceeds as follows:")
4931 LIST_ITEM (U"1. The four array elements in the SSCP-matrix that correspond to the chosen dimensions "
4932 "are copied into a two-dimensional matrix #%S (symmetric of course).")
4933 LIST_ITEM (U"2. The eigenvalues of #%S are determined, call them %s__1_ and %s__2_.")
4934 LIST_ITEM (U"3. The lengths %l__%i_ of the axes of the ellipse can be obtained as the "
4935 "square root of the %s__i_ multiplied by a scale factor: %l__%i_ = %scaleFactor \\.c "
4936 "\\Vr (%s__%i_ ), "
4937 "where %scaleFactor = %numberOfSigmas / \\Vr(%numberOfObservations \\-- 1).")
4938 LIST_ITEM (U"4. The area of the ellipse will be %\\pi\\.c%l__1_\\.c%l__2_.")
4939 MAN_END
4940
4941 MAN_BEGIN (U"SSCP: Get confidence ellipse area...", U"djmw", 20000525)
4942 INTRO (U"A command to query the selected @SSCP object for the area of a "
4943 "confidence ellipse.")
4944 ENTRY (U"Algorithm")
4945 NORMAL (U"The algorithm proceeds as follows:")
4946 LIST_ITEM (U"1. The four array elements in the SSCP-matrix that correspond to the chosen dimensions "
4947 "are copied into a two-dimensional matrix #%S (symmetric of course).")
4948 LIST_ITEM (U"2. The eigenvalues of #%S are determined, call them %s__1_ and %s__2_.")
4949 LIST_ITEM (U"3. The lengths %l__1_ and %l__2_ of the two axes of the ellipse can be obtained as "
4950 "(see for example @@Johnson (1998)@, page 410: ")
4951 EQUATION (U" %l__%i_ = %scaleFactor \\.c \\Vr (%s__%i_ ),")
4952 LIST_ITEM (U" where")
4953 EQUATION (U"%scaleFactor = \\Vr (%f \\.c %p \\.c (%n \\-- 1) / (%n \\.c (%n \\-- %p))),")
4954 LIST_ITEM (U" in which %f = @`invFisherQ` (1 \\-- %confidenceLevel, %p, %n \\-- %p), "
4955 "where %p is the numberOfRows from the SSCP object and %n the %numberOfObservations.")
4956 LIST_ITEM (U"4. The area of the ellipse will be %\\pi\\.c%l__1_\\.c%l__2_.")
4957 MAN_END
4958
4959 MAN_BEGIN (U"SSCP: Get diagonality (bartlett)...", U"djmw", 20011111)
4960 INTRO (U"Tests the hypothesis that the selected @SSCP matrix object is "
4961 "diagonal.")
4962 ENTRY (U"Setting")
4963 TERM (U"##Number of constraints")
4964 DEFINITION (U"modifies the number of independent observations. "
4965 "The default value is 1.")
4966 ENTRY (U"Algorithm")
4967 NORMAL (U"The test statistic is |#R|^^N/2^, the N/2-th power of the determinant"
4968 " of the correlation matrix. @@Bartlett (1954)@ developed the following "
4969 "approximation to the limiting distribution:")
4970 EQUATION (U"\\ci^2 = -(%N - %numberOfConstraints - (2%p + 5) /6) ln |#R|")
4971 NORMAL (U"In the formulas above, %p is the dimension of the correlation "
4972 "matrix, %N-%numberOfConstraints is the number of independent "
4973 "observations. Normally %numberOfConstraints would "
4974 "equal 1, however, if the matrix has been computed in some other way, "
4975 "e.g., from within-group sums of squares and cross-products of %k "
4976 "independent groups, %numberOfConstraints would equal %k.")
4977 NORMAL (U"We return the probability %\\al as ")
4978 EQUATION (U"%\\al = chiSquareQ (\\ci^2 , %p(%p-1)/2).")
4979 NORMAL (U"A very low %\\al indicates that it is very improbable that the "
4980 "matrix is diagonal.")
4981 MAN_END
4982
4983 MAN_BEGIN (U"SSCP: Get fraction variation...", U"djmw", 20040210)
4984 INTRO (U"A command to ask the selected @SSCP object for the fraction "
4985 "of the total variation that is accounted for by the selected dimension(s).")
4986 NORMAL (U"Further details can be found in @@Covariance: Get fraction variance...@.")
4987 MAN_END
4988
4989 MAN_BEGIN (U"SSCP: To CCA...", U"djmw", 20031103)
4990 INTRO (U"A command that creates a @@CCA|canonical correlation@ object from the "
4991 "selected @SSCP object.")
4992 ENTRY (U"Setting")
4993 TERM (U"##Dimension of dependent variate (ny)")
4994 DEFINITION (U"defines a partition of the square %n x %n SSCP matrix S into the parts S__yy_ of "
4995 "dimension %ny x %ny, S__xx_ of dimension %nx x %nx, and the parts "
4996 "S__xy_ and S__yx_ of dimensions %nx x %ny and %ny x %nx, respectively.")
4997 ENTRY (U"Algorithm")
4998 NORMAL (U"The partition for the square SSCP-matrix is as follows:")
4999 PICTURE (2.0, 2.0, drawPartionedMatrix)
5000 NORMAL (U"The canonical correlation equations we have to solve are:")
5001 EQUATION (U"(1) (#S__%yx_ #S__%xx_^^-1^ #S__%yx_\\'p -\\la #S__%yy_)#y = #0")
5002 EQUATION (U"(2) (#S__%yx_\\'p #S__%yy_^^-1^ #S__%yx_ -\\la #S__%xx_)#x = #0")
5003 NORMAL (U"where #S__%yy_ [%ny \\xx %ny] and #S__%xx_ [%nx \\xx %nx] are "
5004 "symmetric, positive definite matrices belonging to the dependent and the "
5005 "independent variables, respectively. ")
5006 NORMAL (U"These two equations are not independent and we will show that both "
5007 "equations have the same eigenvalues and that the eigenvectors #x for "
5008 "equation (2) can be obtained from the eigenvectors #y of equation (1).")
5009 NORMAL (U"We can solve equation (1) in several ways, however, the numerically "
5010 "stablest algorithm is probably by performing first a Cholesky decomposition "
5011 "of #S__xx_ and #S__yy_, followed by a @@generalized singular value "
5012 "decomposition@. The algorithm goes as follows:")
5013 NORMAL (U"The Cholesky decompositions (\"square roots\") of #S__yy_ and #S__xx_ are:")
5014 EQUATION (U"#S__yy_ = #U\\'p #U and #S__xx_ = #H\\'p #H,")
5015 NORMAL (U"where #U and H are upper triangular matrices. From these decompositions, "
5016 "the inverse for #S__xx_^^-1^ is easily computed. Let #K be the inverse of #H, "
5017 "then we can write: ")
5018 EQUATION (U"#S__xx_^^-1^ = #K #K\\'p.")
5019 NORMAL (U"We next substitute in equation (1) and rewrite as:")
5020 EQUATION (U"((#K\\'p#S__yx_\\'p)\\'p (#K\\'p#S__yx_\\'p) - \\la #U\\'p #U)#x = 0")
5021 NORMAL (U"This equation can be solved for eigenvalues and eigenvectors by the "
5022 "generalized singular value decomposition because it is of the form "
5023 "#A\\'p#A -\\la #B\\'p#B.")
5024 NORMAL (U"Now, given the solution for equation (1) we can find the solution "
5025 "for equation (2) by first multiplying (1) from the left with "
5026 "#S__yx_\\'p#S__yy_^^-1^, resulting in:")
5027 EQUATION (U"(#S__yx_\\'p#S__yy_^^-1^#S__yx_#S__xx_^^-1^#S__yx_\\'p -\\la #S__yx_\\'p) #y = 0")
5028 NORMAL (U"Now we split of the term #S__xx_^^-1^#S__yx_\\'p and obtain:")
5029 EQUATION (U"(#S__yx_\\'p#S__yy_^^-1^#S__yx_ - \\la #S__xx_) #S__xx_^^-1^#S__yx_\\'p #y = 0")
5030 NORMAL (U"This equation is like equation (2) and it has therefore the same eigenvalues "
5031 "and eigenvectors. (We also proved this fact in the algorithmic section of "
5032 "@@TableOfReal: To CCA...@.)")
5033 NORMAL (U"The eigenvectors #x is now")
5034 EQUATION (U"#x = #S__xx_^^-1^#S__yx_\\'p #y.")
5035 MAN_END
5036
5037 MAN_BEGIN (U"SSCP: To Covariance...", U"djmw", 20090624)
5038 INTRO (U"A command that creates a @Covariance object from each selected @SSCP object.")
5039 ENTRY (U"Setting")
5040 TERM (U"##Number of constraints")
5041 DEFINITION (U"determines the factor by which each entry in the "
5042 "SSCP-matrix is scaled to obtain the Covariance matrix.")
5043 ENTRY (U"Details")
5044 NORMAL (U"The relation between the numbers %c__%ij_ in the covariance matrix and the numbers %s__%ij_ in "
5045 "the originating SSCP matrix is:")
5046 EQUATION (U"%c__%ij_ = %s__%ij_ / (%numberOfObservations - %numberOfConstraints)")
5047 NORMAL (U"Normally %numberOfConstraints will equal 1. However, when the SSCP was the "
5048 "result of summing %g SSCP objects, as is, for example, the case when you obtained the total "
5049 "within-groups SSCP from pooling the individual group SSCP's, %numberOfConstraints will equal the number of pooled SSCP's, %g.")
5050 MAN_END
5051
5052 MAN_BEGIN (U"SSCP & TableOfReal: Extract quantile range...", U"djmw", 20040225)
5053 INTRO (U"Extract those rows from the selected @TableOfReal object whose @@Mahalanobis "
5054 "distance@, with respect to the selected @SSCP object, are within the "
5055 "quantile range.")
5056 MAN_END
5057
5058 MAN_PAGES_BEGIN
5059 R"~~~(
5060 "Create Strings from tokens..."
5061 © David Weenink 2017, Paul Boersma 2023
5062
5063 Create a new @Strings object as a list of tokens.
5064
5065 Settings
5066 ========
5067 ##Name
5068 : the name of the new Strings object.
5069
5070 ##Text
5071 : the text to be tokenized.
5072
5073 ##Separators
5074 : determines the separator characters. If left empty, a space will be used as a separator.
5075
5076 Behaviour
5077 =========
5078 Multiple consecutive separators in the text will be treated as one.
5079
5080 Examples
5081 ========
5082 Example 1
5083 \#{Create Strings from tokens:} "test", "a b c", " "
5084 : will produce a Strings object with 3 strings in it: "a", "b" and "c".
5085
5086 Example 2
5087 \#{Create Strings from tokens:} "test", "a b c ", " "
5088 : will also produce a Strings object with 3 strings in it: "a", "b" and "c".
5089
5090 Example 3
5091 \#{Create Strings from tokens:} "test", "a,b,c", ","
5092 : will produce a Strings object with 3 strings in it: "a", "b" and "c".
5093
5094 Example 4
5095 \#{Create Strings from tokens:} "test", "a, b, c", ","
5096 : will produce a Strings object with 3 strings in it: "a", " b" and " c" (note the spaces).
5097
5098 Example 5
5099 \#{Create Strings from tokens:} "test", "a, b, c", " ,"
5100 : will produce a Strings object with 3 strings in it: "a", "b" and "c".
5101
5102 Example 6
5103 \#{Create Strings from tokens:} "test", "a,,b,c", " ,"
5104 : will also produce a Strings object with 3 strings in it: "a", "b" and "c".
5105
5106 Example 7
5107 \#{Create Strings from tokens:} "test", "a, ,b,c", ","
5108 : will produce a Strings with 4 strings in it: "a", " ", "b" and "c".
5109
5110 Example 8
5111 \#{Create Strings from tokens:} "test", "a,b,c,", ","
5112 : will produce a Strings object with 3 strings in it: "a", "b" and "c".
5113
5114 Example 9
5115 \#{Create Strings from tokens:} "test", "a,b,c, ", ","
5116 : will produce a Strings object with 4 strings in it: "a", "b", "c" and " ".
5117
5118 Example 10
5119 \#{Create Strings from tokens:} "test", "A string" + tab$ + "of ..tokens" + newline$ + "and some more tokens", " .," + tab$ + newline$
5120 : will produce a Strings object with 8 strings in it: "A", "string", "of", "tokens", "and", "some", "more" and "tokens".
5121 )~~~"
5122 MAN_PAGES_END
5123
5124 MAN_BEGIN (U"T-test", U"djmw", 20020117)
5125 INTRO (U"A test on the mean of a normal variate when the variance is unknown.")
5126 NORMAL (U"In Praat, the %t-test is used to query a @Covariance object and:")
5127 LIST_ITEM (U"1. get the significance of one mean. See @@Covariance: Get "
5128 "significance of one mean...@.")
5129 LIST_ITEM (U"2. get the significance of the %difference between two means. "
5130 "See @@Covariance: Get significance of means difference...@.")
5131 NORMAL (U"You should use a %t-test when you want to test a hypothesis about "
5132 "the mean of one column in a @TableOfReal object, or, if you want to test "
5133 "a hypothesis about the difference between the means of two columns in "
5134 "this object.")
5135 NORMAL (U"You can perform these %t-tests in Praat by first transforming the "
5136 "TableOfReal object into a Covariance object (see @@TableOfReal: To "
5137 "Covariance@) and then choosing the appropriate query method on the "
5138 "latter object.")
5139 MAN_END
5140
5141 MAN_PAGES_BEGIN
5142 R"~~~(
5143 ################################################################################
5144 "BHEP multivariate normality test"
5145 © David Weenink 2010-11-24
5146
5147 Given a sample of %n independent and identically distributed (i.i.d) observation vectors of dimension %d,
5148 #%x_1 , #%x_2 , ..., #%x_%n, drawn from an unknown continuous distribution function %F(#%x),
5149 the Baringhaus–Henze–Epps–Pulley multivariate normality test tests
5150 : H_0: %F(#%x) = %F_0 (#%x) against H_1 : %F(#%x) ≠ %F_0(#%x), where
5151
5152 %F_0(#%x) is the multivariate normal distribution function %N_%d(#%μ, #%Σ) with mean #%μ and covariance matrix #%Σ
5153 whose derivative with respect to #%x is the multivariate probability density function
5154 %f_0(#%x)= (2π)^^-%d/2^ |#%Σ|^½ exp{-½(#%x-#%μ)^T #%Σ^^-1^ (#%x-#%μ)}.
5155
5156 According to @@Henze & Wagner (1997)@ the test statistic in BHEP has a number of favourable characteristics:
5157 . it is affine invariant
5158 . it is consistent
5159
5160 Settings
5161 ========
5162
5163 The test depends on a smoothing parameter %h that can be chosen in various ways:
5164 @@Henze & Wagner (1997)@ recommend %h = 1.41, while
5165 @@Tenreiro (2009)@ recommends %h__%s _= 0.448 + 0.026\\.c%d for short tailed alternatives and "
5166 " %h__%l_ = 0.928 + 0.049\\.c%d for long tailed alternatives.
5167
5168 ################################################################################
5169 )~~~"
5170 MAN_PAGES_END
5171
5172 MAN_BEGIN (U"Table: Normal probability plot...", U"djmw", 20130619)
5173 NORMAL (U"In a normal probability plot, the data in the selected column of the @Table are plotted "
5174 "against a normal distribution in such a way that the points should form approximately a straight line. "
5175 "Departures from a straight line indicate departures from normality.")
5176 ENTRY (U"Settings")
5177 TERM (U"##Number of quantiles#")
5178 DEFINITION (U"the number of quantile points, %n, in the plot. From this number %n, the quantile points are "
5179 "determined as follows: the last quantile point is %q__%n_ = 0.5^^1/%n^ and the first quantile point is "
5180 "%q__1_=1\\--%q__%n_. The intermediate quantile points %q__%i_ are determined according to "
5181 "%q__%i_=(%i \\-- 0.3175)/(%n + 0.365), where %i runs from 2 to %n\\--1.")
5182 TERM (U"##Number of sigmas#")
5183 DEFINITION (U"determines the horizontal and vertical drawing ranges in units of standard deviations. ")
5184 MAN_END
5185
5186 MAN_BEGIN (U"Table: Quantile-quantile plot...", U"djmw", 20130619)
5187 NORMAL (U"In a quantile-quantile plot the quantiles of the data in the first selected column of the @Table are plotted against "
5188 "the quantiles of the data in the second selected column. If the two sets come from a population with the "
5189 "same distribution, the points should fall approximately along the reference line.")
5190 MAN_END
5191
5192 MAN_BEGIN (U"Table: Bar plot...", U"djmw", 20230901) // ppgb 2023
5193 INTRO (U"Draws a bar plot from data in one or more columns of the selected @Table. In a bar plot the horizontal axis has nominal values (labels). ")
5194 ENTRY (U"Settings")
5195 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (10.6), U""
5196 Manual_DRAW_SETTINGS_WINDOW ("Table: Bar plot", 10.6) // 0.6 extra for the text
5197 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Vertical column(s)", "")
5198 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= auto)")
5199 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Column with labels", "")
5200 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Distance of first bar from border", "1.0")
5201 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Distance between bar groups", "1.0")
5202 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Distance between bars within group", "0.0")
5203 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Colours (0-1, name, {r,g,b})", "Grey")
5204 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Label text angle (degrees)", "0.0")
5205 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN ("Garnish", 1)
5206 )
5207 TERM (U"##Vertical column(s)")
5208 DEFINITION (U"you list the table columns that you want to represent in the bar plot. The number of selected columns is the group size.")
5209 TERM (U"##Vertical range")
5210 DEFINITION (U"determine the lower and upper limit of the display.")
5211 TERM (U"##Column with labels")
5212 DEFINITION (U"determines the column whose labels will be put at the bottom of the plot.")
5213 TERM (U"##Distance of first bar from border")
5214 DEFINITION (U"determines how far the first (and last) bar wil be positioned from the borders (in units of the width of one bar).")
5215 TERM (U"##Distance between bar groups")
5216 DEFINITION (U"determines how far groups of bars are from each other. ")
5217 TERM (U"##Distance between bars within group")
5218 DEFINITION (U"determines the distance between the bars within each group.")
5219 TERM (U"##Colours")
5220 DEFINITION (U"determines the colours of the bars in a group.")
5221 TERM (U"##Label text angle (degrees)")
5222 DEFINITION (U"determines the angle of the labels written below the plot. If you have very long label texts you can prevent the label texts from overlapping.")
5223 ENTRY (U"Examples")
5224 NORMAL (U"@@Keating & Esposito (2006)@ present a bar plot in their fig. 3 from which we estimate the following data table")
5225 CODE (U"Language Modal Breathy")
5226 CODE (U"Chong -1.5 5")
5227 CODE (U"Fuzhou 2 10")
5228 CODE (U"Green Hmong 3 12")
5229 CODE (U"White Hmong 2 11")
5230 CODE (U"Mon -1.5 0")
5231 CODE (U"SADV Zapotec -6 -4")
5232 CODE (U"SLQ Zapotec 3.5 14")
5233 CODE (U"Tlacolula Zapotec 3 13")
5234 CODE (U"Tamang 1 1")
5235 CODE (U"!Xoo 1 14")
5236 NORMAL (U"Given that we have these data in a Table with the three columns labeled \"Language\", \"Modal\" and \"Breathy\", "
5237 "respectively, we can first try to reproduce their figure 3 (a bar plot with both Modal and Breathy columns displayed) ")
5238 NORMAL (U"As you can see the labels in the first column are very long texts and they will surely overlap if "
5239 "plotted at the bottom of a plot. We therefore use a value of 15 degrees for the \"Label text angle\" " "parameter. This "
5240 "will make the label texts nonoverlapping. We cannot make this angle much larger, because then the label texts would run out of "
5241 "the viewport. ")
5242 NORMAL (U"The following script line will produce the picture below.")
5243 CODE (U"Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.0, \"0.9 0.5\", 15.0, \"yes\"")
5244 SCRIPT (5, 3, U"h1h2 = Create H1H2 table (Keating & Esposito 2006)\n"
5245 "Font size: 10\n"
5246 "Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.0, \"0.9 0.5\", 15.0, \"yes\"\n"
5247 "removeObject: h1h2\n")
5248 NORMAL (U"The essentials of the bart plot in their paper are perfectly reproduced in the figure above. "
5249 "If you want the bars within a group to be placed somewhat more apart, say 0.2 times the bar width, "
5250 "you can set the \"Distance between bars in a group\" to a value of 0.2:")
5251 CODE (U"Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.2, \"0.9 0.5\", 15.0, \"yes\"")
5252 SCRIPT (5, 3, U"h1h2 = Create H1H2 table (Keating & Esposito 2006)\n"
5253 "Font size: 10\n"
5254 "Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.2, \"0.9 0.5\", 15.0, \"yes\"\n"
5255 "removeObject: h1h2\n")
5256 NORMAL (U"Of course we can also work with colours and we can add vertical marks as the following scriptlet shows")
5257 CODE (U"Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.0, \"Green Red\", 15.0, \"yes\"")
5258 CODE (U"Marks left every: 1, 5, 1, 1, 1")
5259 CODE (U"Text left: 1, \"H__1_-H__2_ (dB)\"")
5260 SCRIPT (5, 3, U"h1h2 = Create H1H2 table (Keating & Esposito 2006)\n"
5261 "Font size: 10\n"
5262 "Bar plot: \"Modal Breathy\", -10, 20, \"Language\", 1.0, 1.0, 0.0, \"Green Red\", 15.0, \"yes\"\n"
5263 "Marks left every: 1, 5, 1, 1, 1\n"
5264 "Text left: 1, \"H__1_-H__2_ (dB)\"\n"
5265 "removeObject: h1h2\n")
5266 MAN_END
5267
5268 MAN_BEGIN (U"Table: Box plots...", U"djmw", 20230901)
5269 INTRO (U"A command to draw a @@box plot@s for each factor from the data in other column(s) of the selected @Table object, "
5270 "where the factors will be sorted in @@natural sort order@.")
5271 ENTRY (U"Example")
5272 NORMAL (U"To draw separate box plots for the male, female and children F0 for the @@Peterson & Barney (1952)@ data: ")
5273 CODE (U"Create formant table (Peterson & Barney 1952)")
5274 CODE (U"Box plots: \"F0\", \"Type\", 70, 400")
5275 CODE (U"Text left: \"yes\", \"F0 (Hz)\"")
5276 SCRIPT (5,3, U"pb = Create formant table (Peterson & Barney 1952)\n"
5277 "Box plots: \"F0\", \"Type\", 70, 400, \"yes\"\n"
5278 "Text left: \"yes\", \"F0 (Hz)\"\n"
5279 "removeObject: pb\n"
5280 )
5281 MAN_END
5282
5283 MAN_BEGIN (U"Table: Line graph where...", U"djmw", 20230901)
5284 INTRO (U"Draws a line graph from the data in a column of the selected @Table."
5285 "More info @@Table: Line graph...@.")
5286 MAN_END
5287
5288 MAN_BEGIN (U"Table: Line graph...", U"djmw", 20231207)
5289 INTRO (U"Draws a line graph from the data in a column of the selected @Table. "
5290 "In a line plot, the horizontal axis can have a nominal scale or a numeric scale. "
5291 "The data points are connected by line segments.")
5292 ENTRY (U"Settings")
5293 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (8.6), U""
5294 Manual_DRAW_SETTINGS_WINDOW ("Table: Line graph", 8.6) // 0.6 extra for the text
5295 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Vertical column", "")
5296 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= auto)")
5297 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Horizontal column", "")
5298 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Horizontal range", "0.0", "0.0 (= auto)")
5299 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Text", "+")
5300 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Text font size", "12")
5301 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Label text angle (degrees)", "0.0")
5302 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish", 1)
5303 )
5304 TERM (U"##Vertical column")
5305 DEFINITION (U"The column whose data points you want to plot.")
5306 TERM (U"##Vertical range")
5307 DEFINITION (U"determine the lower and upper limits of the plot.")
5308 TERM (U"##Horizontal column")
5309 DEFINITION (U"determines the horizontal scale. If you leave it empty, or if the (selected part of the) selected column "
5310 "contains nominal values, i.e. the values are not numeric but text, the horizontal "
5311 "distance between the data points will be constant (i.e. 1) and the nominal values (texts) will be put as labels at "
5312 "the bottom of the horizontal axis. On the other hand, if this column contains only numerical values, the horizontal "
5313 "position of the data points will be determined by the values in this column.")
5314 TERM (U"##Horizontal range")
5315 DEFINITION (U"determines the left and right limit of the plot.")
5316 TERM (U"##Text")
5317 DEFINITION (U"The text to put at the position of the data point in the plot.")
5318 TERM (U"##Text font size")
5319 DEFINITION (U"defines the size of the text.")
5320 TERM (U"##Label text angle (degrees)")
5321 DEFINITION (U"determines the angle of the labels written %%below% the plot. If you have very long label texts in the "
5322 "\"Horizontal column\", you can prevent the label texts from overlapping. This only has effect for a horizontal "
5323 "column with nominal values.")
5324 ENTRY (U"Examples")
5325 NORMAL (U"The following table was estimated from fig. 3 in @@Ganong (1980)@ and represents the fraction /d/ responses as a function of a "
5326 "voice onset time (VOT) continuum. The second column shows the responses in a word - nonword continuum, while the third column shows "
5327 "the responses to a nonword - word continuum.")
5328 CODE (U"VOT dash-tash dask-task")
5329 CODE (U"-17.5 0.98 0.92")
5330 CODE (U" -7.5 0.95 0.83")
5331 CODE (U" -2.5 0.71 0.33")
5332 CODE (U" 2.5 0.29 0.10")
5333 CODE (U" 7.5 0.12 0.02")
5334 CODE (U" 17.5 0.10 0.02")
5335 NORMAL (U"We can reproduce fig. 3 from Ganong (1980) with the following script, where we labeled the word - nonword curve with \"wn\" and the nonword - word curve with \"nw\". We deselect \"Garnish\" because we want to put special marks at the bottom.")
5336 CODE (U"Font size: 10\n")
5337 CODE (U"Dotted line\n")
5338 CODE (U"Line graph: \"dash-tash\", 0, 1, \"VOT\", -20, 20, \"wn\", 12, 0, \"no\"")
5339 CODE (U"Dashed line\n")
5340 CODE (U"Line graph: \"dask-task\", 0, 1, \"VOT\", -20, 20, \"nw\", 12, 0, \"no\"")
5341 CODE (U"Draw inner box")
5342 CODE (U"One mark bottom: 2.5, \"no\", \"yes\", \"no\", \"+2.5\"")
5343 CODE (U"One mark bottom: -2.5, \"yes\", \"yes\", \"no\", \"\"")
5344 CODE (U"One mark bottom: -7.5, \"yes\", \"yes\", \"no\", \"\"")
5345 CODE (U"One mark bottom: 7.5, \"no\", \"yes\", \"no\", \"+7.5\"")
5346 CODE (U"One mark bottom: 2.5, \"no\", \"no\", \"no\", \"+2.5\"")
5347 CODE (U"One mark bottom: -20, \"no\", \"no\", \"no\", \"Short VOT\"")
5348 CODE (U"One mark bottom: 20, \"no\", \"no\", \"no\", \"Long VOT\"")
5349 CODE (U"Text bottom: 1, \"VOT (ms)\"")
5350 CODE (U"Marks left every: 1, 0.2, \"yes\", \"yes\", \"no\"")
5351 CODE (U"Text left: 1, \"Prop. of voiced responses\"")
5352
5353 SCRIPT (5, 3, U"ganong = Create Table (Ganong 1980)\n"
5354 "Dotted line\n"
5355 "Font size: 10\n"
5356 "Line graph: \"dash-tash\", 0, 1, \"VOT\", -20, 20, \"wn\", 12, 0, \"no\"\n"
5357 "Dashed line\n"
5358 "Line graph: \"dask-task\", 0, 1, \"VOT\", -20, 20, \"nw\", 12, 0, \"no\"\n"
5359 "Draw inner box\n"
5360 "One mark bottom: 2.5, 0, \"yes\", \"no\", \"+2.5\"\n"
5361 "One mark bottom: -2.5, \"yes\", \"yes\", \"no\", \"\"\n"
5362 "One mark bottom: -7.5, \"yes\", \"yes\", \"no\", \"\"\n"
5363 "One mark bottom: 7.5, \"no\", \"yes\", \"no\", \"+7.5\"\n"
5364 "One mark bottom: 2.5, \"no\", \"no\", \"no\", \"+2.5\"\n"
5365 "One mark bottom: -20, \"no\", \"no\", \"no\", \"Short VOT\"\n"
5366 "One mark bottom: 20, \"no\", \"no\", \"no\", \"Long VOT\"\n"
5367 "Text bottom: 1, \"VOT (ms)\"\n"
5368 "Marks left every: 1, 0.2, \"yes\", \"yes\", \"no\"\n"
5369 "Text left: 1, \"Prop. of voiced responses\"\n"
5370 "removeObject: ganong\n"
5371 )
5372 NORMAL (U"As an example of what happens if you don't supply an argument for the \"Horizontal column\" we will use "
5373 "the same table as for the previous plot. However the resulting plot may not be as meaningful (note that the "
5374 "horizontal nominal scale makes all points equidistant in the horizontal direction.)")
5375 CODE (U"Dotted line\n")
5376 CODE (U"Line graph: \"dash-tash\", 0, 1, \"\", 0, 0, \"wn\", 12, 0, \"yes\"")
5377 CODE (U"One mark bottom: 1, \"no\", \"yes\", \"no\", \"Short VOT\"")
5378 SCRIPT (5, 3, U"ganong = Create Table (Ganong 1980)\n"
5379 "Dotted line\n"
5380 "Font size: 10\n"
5381 "Line graph: \"dash-tash\", 0, 1, \"\", 0, 0, \"wn\", 12, 0, \"yes\"\n"
5382 "One mark bottom: 1, \"no\", \"yes\", \"no\", \"Short VOT\"\n"
5383 "removeObject: ganong\n"
5384 )
5385 MAN_END
5386
5387 MAN_BEGIN (U"Table: Horizontal error bars plot...", U"djmw", 20230901)
5388 INTRO (U"Draws horizontal lines that represent the error intervals of a data column from the selected @@Table@.")
5389 NORMAL (U"This command behaves analogous to @@Table: Vertical error bars plot...@.")
5390 MAN_END
5391
5392 MAN_BEGIN (U"Table: Vertical error bars plot...", U"djmw", 20230901)
5393 INTRO (U"Draws vertical lines that represent the error intervals of a data column from the selected @@Table@.")
5394 ENTRY (U"Settings")
5395 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (9.6), U""
5396 Manual_DRAW_SETTINGS_WINDOW ("Table: Vertical error bars plot", 9.6) // 0.6 extra for the text
5397 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Horizontal column", "")
5398 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Horizontal range", "0.0", "0.0 (= auto)")
5399 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Vertical column", "")
5400 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Vertical range", "0.0", "0.0 (= auto)")
5401 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Lower error value column", "")
5402 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Upper error value column", "")
5403 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Bar size (mm)", "1.0")
5404 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish", 1)
5405 )
5406 TERM (U"##Horizontal column#")
5407 DEFINITION (U"determines the data along the horizontal axis.")
5408 TERM (U"##Horizontal range#")
5409 DEFINITION (U"determines the lower and upper limits of the plot.")
5410 TERM (U"##Vertical column#")
5411 DEFINITION (U"determines the data along the horizontal axis.")
5412 TERM (U"##Vertical range#")
5413 DEFINITION (U"determines the lower and upper limits of the plot.")
5414 TERM (U"##Lower error value column#, ##Upper error value column#")
5415 DEFINITION (U"determine the size of the vertical lines that will be drawn. These lines are drawn between the points "
5416 "(%x,%y-%low) and (%x, %y+%up), where %x and %y are the values from the %%horizontal column% and the %%vertical "
5417 "column%, respectively, and, %low and %up are the corresponding values "
5418 "in the %%lower error value column% and the %%upper error value column%, respectively. If either of these column "
5419 "names is not given the corresponding values (%low and/or %up) will taken as zero. This makes it possible to draw "
5420 "one-sided and two-sided error bars. If your errors are symmetric around the y-position, your table only needs "
5421 "one column and you can supply the name of this column in both fields.")
5422 TERM (U"##Bar size (mm)#")
5423 DEFINITION (U"determines the width of the horizontal bars or whishers at the lower end position of the drawn line. ")
5424 TERM (U"##Garnish#")
5425 DEFINITION (U"determines whether or not some decoration is drawn.")
5426 MAN_END
5427
5428 MAN_BEGIN (U"Table: Get median absolute deviation...", U"djmw", 20120405)
5429 INTRO (U"Get the median absolute deviation (MAD) of the column in the selected @@Table@ (adjusted by a scale factor).")
5430 ENTRY (U"Algorithm")
5431 NORMAL (U"From the %n numbers %x__1_, %x__2_, ..., %x__%n_ in the selected column we first calculate the @@quantile algorithm|median@ "
5432 "value %x__median_. Next we calculate the %n absolute deviations from this median: %d__1_, %d__2_, ..., %d__%n_, "
5433 "where %d__%j_=|%x__%j_ - %x__median_|. "
5434 "Then we calculate the MAD value, which is the median of the %n values %d__1_, %d__2_, ..., %d__%n_. Finally we multiply the MAD "
5435 "value by the scale factor 1.4826. This last multiplication makes the result comparable with the value of the standard deviation if "
5436 "the %x values are normally distributed.")
5437 MAN_END
5438
5439 MAN_BEGIN (U"Table: Report one-way anova...", U"djmw", 20120617)
5440 INTRO (U"Performs a one-way analysis of variance on the data in one column of a selected @@Table@ and reports the fixed-effects anova table results in the info window.")
5441 ENTRY (U"Settings")
5442 TERM (U"##Column with data#")
5443 DEFINITION (U"the label of the column who's data will be analyzed.")
5444 TERM (U"##Factor#")
5445 DEFINITION (U"the label of the column with the names of the levels.")
5446 TERM (U"##Table with means#")
5447 DEFINITION (U"if checked, a Table with the mean values of the levels will be created.")
5448 TERM (U"##Table with differences between means#")
5449 DEFINITION (U"if checked, a Table with the differences between the mean values of the levels will be created.")
5450 TERM (U"##Table with Tukey's post-hoc test#")
5451 DEFINITION (U"if checked, a Table with Tukey's HSD tests will be created. Each value in this Table measures "
5452 "the probability that the corresponding difference between the level means happened by chance. The test "
5453 "compares all possible level means and is based on the studentized range distribution.")
5454 MAN_END
5455
5456 MAN_BEGIN (U"Table: Report two-way anova...", U"djmw", 20140117)
5457 INTRO (U"Performs a two-way analysis of variance on the data in one column of a selected %%fully factorial% "
5458 "@@Table@ and reports the fixed-effects anova table in the info window. ")
5459 ENTRY (U"Settings")
5460 TERM (U"##Column with data#")
5461 DEFINITION (U"the label of the column who's data will be analyzed.")
5462 TERM (U"##First factor")
5463 DEFINITION (U"the label of the column with the names of the levels for the first factor.")
5464 TERM (U"##Second factor")
5465 DEFINITION (U"the label of the column with the names of the levels for the second factor.")
5466 TERM (U"##Table with means")
5467 DEFINITION (U"if checked, a Table with the mean values of all the levels will be created.")
5468 ENTRY (U"Example")
5469 NORMAL (U"Suppose you want to check if fundamental frequency depends on the type of vowel and speaker type. We will use the "
5470 "@@Create formant table (Peterson & Barney 1952)|Peterson & Barney@ vowel data set to illustrate this. "
5471 "The following script will first create the data set and then produce the two-way anova report." )
5472 CODE (U"Create formant table (Peterson & Barney 1952)")
5473 CODE (U"Report two-way anova: \"F0\", \"Vowel\", \"Type\"")
5474 NORMAL (U"This will produce the following anova table in the info window:")
5475 CODE (U"Two-way analysis of \"F0\" by \"Vowel\" and \"Type\".")
5476 CODE (U"")
5477 CODE (U" Source SS Df MS F P")
5478 CODE (U" Vowel 73719.4 9 8191.05 7.62537 5.25258e-11")
5479 CODE (U" Type 4.18943e+06 2 2.09471e+06 1950.05 0")
5480 CODE (U"Vowel x Type 6714.34 18 373.019 0.347258 0.994969")
5481 CODE (U" Error 1.60053e+06 1490 1074.18")
5482 CODE (U" Total 5.87039e+06 1519")
5483 NORMAL (U"The analysis shows that F0 strongly depends on the vowel and also on the speaker type and, luckily, we do not have any "
5484 "interaction between the vowel and the speaker type. Besides the anova table there is also shown a table with the mean F0 "
5485 "values for each Vowel-Type combination which looks like:")
5486 CODE (U" c m w Mean")
5487 CODE (U" aa 258 124 212 198")
5488 CODE (U" ae 248 125 208 194")
5489 CODE (U" ah 263 129 223 205")
5490 CODE (U" ao 259 127 217 201")
5491 CODE (U" eh 259 128 220 202")
5492 CODE (U" er 264 133 219 205")
5493 CODE (U" ih 270 136 232 213")
5494 CODE (U" iy 270 136 231 212")
5495 CODE (U" uh 273 136 234 214")
5496 CODE (U" uw 278 139 235 218")
5497 CODE (U" Mean 264 131 223 206")
5498 NORMAL (U"The first column of this table shows the vowel codes while the first row shows the speaker types (child, man, woman). "
5499 "The last row and the last column of the table shows the averages for the factors Type and Vowel, respectively. The actual "
5500 "data are unbalanced because we have 300, 660 and 560 replications per column respectively (for each speaker we have two replcations of the data).")
5501 ENTRY (U"Algorithm")
5502 NORMAL (U"The formulas to handle unbalanced designs come from @@Khuri (1998)@.")
5503 MAN_END
5504
5505 MAN_BEGIN (U"Table: Report one-way Kruskal-Wallis...", U"djmw", 20120617)
5506 INTRO (U"Performs a one-way Kruskal-Wallis analysis on the data in one column of a selected @@Table@ and reports the results in the info window. This test is sometimes refered to as a one-way analysis of variance for %%non-normally distributed% data.")
5507 ENTRY (U"Settings")
5508 TERM (U"##Column with data#")
5509 DEFINITION (U"the label of the column whose data will be analyzed.")
5510 TERM (U"##Factor#")
5511 DEFINITION (U"the label of the column with the names of the levels.")
5512 ENTRY (U"Algorithm")
5513 NORMAL (U"The analysis is done on the ranked data and consists of the following steps:")
5514 LIST_ITEM (U"1. Rank all the %N data points together, i.e. rank the data from 1 to %N.")
5515 LIST_ITEM (U"2. The test statistic is:")
5516 EQUATION (U"%K = (12 / (%N(%N+1)) \\Si__%i=1_^^%g^ %n__%i_ (meanRank__%i_)^^2^ - 3(%N+1),")
5517 DEFINITION (U"where %g is the number of levels, %n__%i_ the number of data in %i-th level and meanRank__%i_ "
5518 "the average rank of the %i-th level.")
5519 LIST_ITEM (U"3. The %p value is %%approximated by the \\ci^^2^ (%K, %g - 1) distribution.")
5520 MAN_END
5521
5522 MAN_BEGIN (U"TableOfReal: Report multivariate normality (BHEP)...", U"djmw", 20090701)
5523 INTRO (U"Report about multivariate normality according to the @@BHEP multivariate normality test@.")
5524 ENTRY (U"Settings")
5525 TERM (U"##Smoothing parameter#")
5526 DEFINITION (U"determines the smoothing parameter %h.")
5527 MAN_END
5528
5529 MAN_BEGIN (U"TableOfReal: Change row labels...", U"djmw", 20010822)
5530 INTRO (U"Changes the row labels of the selected @TableOfReal object according "
5531 "to the specification in the search and replace fields.")
5532 NORMAL (U"Both search and replace fields may contain @@regular expressions|"
5533 "Regular expressions@. The ##Replace limit# parameter limits the number of "
5534 "replaces that may occur within each label.")
5535 MAN_END
5536
5537 MAN_BEGIN (U"TableOfReal: Change column labels...", U"djmw", 20010822)
5538 INTRO (U"Changes the column labels of the selected @TableOfReal object according "
5539 "to the specification in the search and replace fields.")
5540 NORMAL (U"Both search and replace fields may contain @@regular expressions|"
5541 "Regular expressions@. The %%Replace limit% parameter limits the number of "
5542 "replaces that may occur within each label.")
5543 MAN_END
5544
5545 MAN_BEGIN (U"TableOfReal: Draw biplot...", U"djmw", 20020603)
5546 INTRO (U"A command to draw a biplot for each column in the selected "
5547 "@TableOfReal object.")
5548 ENTRY (U"Settings")
5549 TERM (U"##Xmin#, ##Xmax#, ##Ymin#, ##Ymax#")
5550 DEFINITION (U"determine the drawing boundaries.")
5551 TERM (U"##Split factor#")
5552 DEFINITION (U"determines the weighing of the row and column structure "
5553 "(see below).")
5554 ENTRY (U"Behaviour")
5555 LIST_ITEM (U"1. Get the @@singular value decomposition@ #U #D #V\\'p of the "
5556 "table.")
5557 LIST_ITEM (U"2. Calculate weighing factors %\\la for row and columns")
5558 EQUATION (U"%\\la__r,1_ = %\\si__1_^^%splitFactor^")
5559 EQUATION (U"%\\la__c,1_ = %\\si__1_^^1-%splitFactor^")
5560 EQUATION (U"%\\la__r,2_ = %\\si__2_^^%splitFactor^")
5561 EQUATION (U"%\\la__c,2_ = %\\si__2_^^1-%splitFactor^")
5562 DEFINITION (U"where %\\si__1_ and %\\si__2_ are the first and the second singular values")
5563 LIST_ITEM (U"3. For the rows (%i from 1..%numberOfRows) form:")
5564 EQUATION (U"%xr__%i_ = %U__%i1_ %\\la__%r,1_")
5565 EQUATION (U"%yr__%i_ = %U__%i2_ %\\la__%r,2_")
5566 LIST_ITEM (U"4. For the columns (%i from 1..%numberOfColumns) form:")
5567 EQUATION (U"%xc__%i_ = %V__%i1_ %\\la__%c,1_")
5568 EQUATION (U"%yc__%i_ = %V__%i2_ %\\la__%c,2_")
5569 LIST_ITEM (U"5. Plot the points (%xr__%i_, yr__%i_) and (%xc__%i_, yc__%i_) in the "
5570 "same figure with the corresponding row and column labels.")
5571 MAN_END
5572
5573 MAN_BEGIN (U"TableOfReal: Draw box plots...", U"djmw", 20000523)
5574 INTRO (U"A command to draw a @@box plot@ for each column in the selected "
5575 "@TableOfReal object.")
5576 ENTRY (U"Settings")
5577 TERM (U"##From row#, ##To row#, ##From column#, ##To column#")
5578 DEFINITION (U"determine the part of the table that you want to analyse.")
5579 TERM (U"%Ymin and %Ymax")
5580 DEFINITION (U"determine the drawing boundaries.")
5581 MAN_END
5582
5583 MAN_BEGIN (U"TableOfReal: Draw as scalable squares...", U"djmw", 20180304)
5584 INTRO (U"A command to draw the cells of the table as squares whose areas conform to the cell's value. ")
5585 ENTRY (U"Settings")
5586 TERM (U"##From row#, ##To row#")
5587 DEFINITION (U"determine the rows to be drawn.")
5588 TERM (U"##From column#, ##To column#")
5589 DEFINITION (U"determine the columns to be drawn.")
5590 TERM (U"##Origin#")
5591 DEFINITION (U"determines the drawing orientation. For a table with %%nrow% rows and %%ncol% columns:")
5592 TERM1 (U"%%top-left%: cel [1] [1] will be at the top left position in the drawing, cell [%%nrow%] [%%ncol%] will be at bottom right position.")
5593 TERM1 (U"%%top-right%: cel [1] [1] will be at the top right position in the drawing, cell [%%nrow%] [%%ncol%] will be at bottom left position.")
5594 TERM1 (U"%%bottom-left%: cel [1] [1] will be at the bottom left position in the drawing, cell [%%nrow%] [%%ncol%] will be at top right position.")
5595 TERM1 (U"%%bottom-right%: cel [1] [1] will be at the bottom right position in the drawing, cell [%%nrow%] [%%ncol%] will be at top left position.")
5596 TERM (U"##Cell area scale factor#")
5597 DEFINITION (U"multiplies the area of each cell's square. If this factor is larger than 1.0 some of the squares might overlap.")
5598 TERM (U"##Filling order#")
5599 DEFINITION (U"determines in what order the squares will be drawn. The order is only important if some of the squares overlap, "
5600 "i.e. if the cell area scale factor is larger than 1.0.")
5601 TERM1 (U"%%rows%: start with the first row, cell [1] [1] to cell [1] [%%ncol%], next the second row, etc...")
5602 TERM1 (U"%%columns% start with column 1, cell [1] [1] to cell [%%nrow%] [1], next column 2 etc...")
5603 TERM1 (U"%%increasing values%: first sort the cell values in increasing order and then start drawing them, the cell with the smallest value first. ")
5604 TERM1 (U"%%decreasing values%: first sort the cell values in decreasing order and then start drawing them, the cell with the largest value first.")
5605 TERM1 (U"%%random%: draw cells in random order. If the cell area scale factor is larger than 1.0 this may result in a different graph of the same table for each successive call.")
5606 MAN_END
5607
5608 MAN_BEGIN (U"TableOfReal: Draw rows as histogram...", U"djmw", 20030619)
5609 INTRO (U"A command to draw a histogram from the rows in the selected "
5610 "@TableOfReal object.")
5611 NORMAL (U"The histogram will consist of %groups of bars. The number of groups will "
5612 "be determined by the number of selected columns from the table, while the "
5613 "number of bars within each group will be determined from the number of "
5614 "selected rows.")
5615 ENTRY (U"Settings")
5616 TERM (U"##Row numbers# and ##Column range#")
5617 DEFINITION (U"determine the part of the table that you want to draw. "
5618 "The column range determines the number of bars that you want to draw for "
5619 "each row selected by the %%Row numbers% argument.")
5620 TERM (U"##Ymin# and ##Ymax#")
5621 DEFINITION (U"the drawing boundaries.")
5622 NORMAL (U"The following arguments are all relative to the width of a bar "
5623 "in the histogram. ")
5624 TERM (U"##Horizontal offset")
5625 DEFINITION (U"the offset from the left and right margin.")
5626 TERM (U"##Distance between bar groups")
5627 DEFINITION (U"the distance between each group, i.e., the distance "
5628 "between the right side of the last bar in a group to the left side of "
5629 "the first bar in the next group.")
5630 TERM (U"##Distance between bars")
5631 DEFINITION (U"the distance between the bars in a group.")
5632 TERM (U"##Grey values")
5633 DEFINITION (U"the grey values of the bars in a group.")
5634 ENTRY (U"Bar positioning")
5635 NORMAL (U"If you want to put the labels yourself you will need the following information.")
5636 NORMAL (U"The width of a bar is determined as follows:")
5637 EQUATION (U"%width = 1 / (%nc \\.c %nr + 2 \\.c %hoffset + (%nc - 1)\\.c %intergroup +"
5638 "%nc\\.c(%nr -1)\\.c %interbar),")
5639 NORMAL (U"where %nc is the number of columns (groups) to draw, %nr is the number of "
5640 "rows to draw (the number of bars within a group), %hoffset is the horizontal "
5641 "offset, %intergroup the distance between each group and %interbar "
5642 "the distance between the bars within a group.")
5643 NORMAL (U"The spacing between the bars drawn from a row:")
5644 EQUATION (U"%dx = (%intergroup + %nr + (%nr -1) \\.c %interbar) *% width")
5645 NORMAL (U"The first bar for the %k-th row starts at:")
5646 EQUATION (U"%x1 = %hoffset \\.c %width + (%k - 1) \\.c (1 + %interbar) \\.c %width")
5647 MAN_END
5648
5649 MAN_BEGIN (U"TableOfReal: Select columns where row...", U"djmw", 20140117)
5650 INTRO (U"Copy columns from the selected @TableOfReal object to a new "
5651 "TableOfReal object.")
5652 ENTRY (U"Settings")
5653 TERM (U"##Columns#")
5654 DEFINITION (U"defines the indices of the columns to be selected. Ranges can be "
5655 "defined with a colon \":\". Columns will be selected in the specified "
5656 "order.")
5657 TERM (U"##Row condition#")
5658 DEFINITION (U"specifies a condition for the selection of rows. If the "
5659 "condition evaluates as %true for a particular row, the selected elements "
5660 "in this row will be copied. See @@Matrix: Formula...@ for the kind of "
5661 "expressions that can be used here.")
5662 ENTRY (U"Examples")
5663 CODE (U"Select columns where row: \"1 2 3\", \"1\"")
5664 CODE (U"Select columns where row: \"1 : 3\", \"1\"")
5665 NORMAL (U"Two alternative expressions to copy the first three columns to a new table "
5666 "with the same number of rows.")
5667 CODE (U"Select columns where row: \"3 : 1\", \"1\"")
5668 NORMAL (U"Copy the first three columns to a new table with the same number of "
5669 "rows. The new table will have the 3 columns reversed.")
5670 CODE (U"Select columns where row: \"1:6 9:11\", \"self[row,8]>0\"")
5671 NORMAL (U"Copy the first six columns and columns 9, 10, and 11 to a new table. "
5672 "Copy only elements from rows where the element in column 8 is greater "
5673 "than zero.")
5674 MAN_END
5675
5676 MAN_BEGIN (U"TableOfReal: Standardize columns", U"djmw", 19990428)
5677 INTRO (U"Standardizes each column of the selected @TableOfReal.")
5678 NORMAL (U"The entries %x__%ij_ in the TableOfReal will change to:")
5679 EQUATION (U"(%x__%ij_ \\-- %\\mu__%j_) / %\\si__%j_, ")
5680 NORMAL (U"where %\\mu__%j_ and %\\si__%j_ are the mean and the standard deviation as calculated "
5681 "from the %j^^th^ column, respectively. After standardization all column means will equal zero "
5682 "and all column standard deviations will equal one.")
5683 ENTRY (U"Algorithm")
5684 NORMAL (U"Standard deviations are calculated with the corrected two-pass algorithm as described in @@Chan, Golub & LeVeque (1983)@.")
5685 MAN_END
5686
5687 MAN_BEGIN (U"TableOfReal: To Configuration (lda)...", U"djmw", 19981103)
5688 INTRO (U"Calculates a @Configuration based on the @Discriminant scores obtained "
5689 "from the selected @TableOfReal. Row labels in the table indicate group membership.")
5690 ENTRY (U"Setting")
5691 TERM (U"##Number of dimensions")
5692 DEFINITION (U"determines the number of dimensions of the resulting Configuration.")
5693 ENTRY (U"Algorithm")
5694 NORMAL (U"First we calculate the Discriminant from the data in the TableOfReal. "
5695 "See @@TableOfReal: To Discriminant@ for details.")
5696 NORMAL (U"The eigenvectors of the Discriminant determine the directions that "
5697 "the data in the TableOfReal will be projected unto.")
5698 MAN_END
5699
5700 MAN_BEGIN (U"TableOfReal: To Configuration (pca)...", U"djmw", 20220111)
5701 INTRO (U"Calculates a @Configuration based on the principal components from the "
5702 "selected @TableOfReal.")
5703 ENTRY (U"Setting")
5704 TERM (U"##Number of dimensions")
5705 DEFINITION (U"determines the number of dimensions of the resulting Configuration.")
5706 ENTRY (U"Algorithm")
5707 NORMAL (U"We form principal components without explicitly calculating the covariance matrix "
5708 "#C = #M\\'p #M, where #M is the matrix part of the TableOfReal. ")
5709 LIST_ITEM (U"1. Calculate the singular value decomposition of #M. This results in "
5710 "#M = #U #D #V\\'p.")
5711 LIST_ITEM (U"2. The principalComponent__%ij_ = \\su__%k=1..%numberOfColumns_ %M__%ik_ \\.c %V__%jk_.")
5712 ENTRY (U"Remark")
5713 NORMAL (U"The resulting configuration is unique up to reflections along the new principal directions.")
5714 MAN_END
5715
5716 MAN_BEGIN (U"TableOfReal: To Correlation", U"djmw", 20151209)
5717 INTRO (U"A command that creates a (%Pearson) @Correlation object from every "
5718 "selected @TableOfReal object. The correlations are calculated between "
5719 "columns.")
5720 ENTRY (U"Algorithm")
5721 NORMAL (U"The linear correlation coefficient %r__%ij_ (also called the %%product"
5722 " moment correlation coefficient% or %%Pearson's correlation coefficient%) "
5723 " between the elements of columns %i and %j is calculated as:")
5724 EQUATION (U"%r__%ij_ = \\Si__%k_ (%x__%ki_ - %x\\-^__%i_)(%x__%kj_ - %x\\-^__%j_)/"
5725 "(\\Vr (\\Si__%k_(%x__%ki_ - %x\\-^__%i_)^2) \\Vr (\\Si__%k_(%x__%kj_ -"
5726 " %x\\-^__%j_)^2)),")
5727 NORMAL (U"where %x__%mn_ is the element %m in column %n, and %x\\-^__%n_ "
5728 "is the mean of column %n.")
5729 MAN_END
5730
5731 MAN_BEGIN (U"TableOfReal: To Correlation (rank)", U"djmw", 20151209)
5732 INTRO (U"A command that creates a (%%Spearman rank-order%) @Correlation object "
5733 "from every selected @TableOfReal object. The correlations are calculated "
5734 "between columns.")
5735 ENTRY (U"Algorithm")
5736 NORMAL (U"The Spearman rank-order correlation coefficient %r__%ij_ between "
5737 "the elements of columns %i and %j is calculated as the linear correlation"
5738 " of the ranks:")
5739 EQUATION (U"%r__%ij_ = \\Si__%k_ (%R__%ki_ - %R\\-^__%i_) "
5740 "(%R__%kj_ - %R\\-^__%j_) / (\\Vr (\\Si__%k_(%R__%ki_ - %R\\-^__%i_)^2) "
5741 "\\Vr (\\Si__%k_(%R__%kj_ - %R\\-^__%j_)^2)),")
5742 NORMAL (U"where %R__%mn_ is the rank of element %m in column %n, "
5743 "and %R\\-^__%n_ is the mean of the ranks in column %n.")
5744 MAN_END
5745
5746 MAN_BEGIN (U"TableOfReal: To Covariance", U"djmw", 20220111)
5747 INTRO (U"A command that creates a @Covariance object from every "
5748 "selected @TableOfReal object. The covariances are calculated between "
5749 "columns.")
5750 ENTRY (U"Algorithm")
5751 NORMAL (U"The covariance coefficients %s__%ij_ "
5752 " between the elements of columns %i and %j are defined as:")
5753 EQUATION (U"%s__%ij_ = \\Si__%k_ (%x__%ki_ - %x\\-^__%i_)(%x__%kj_ - %x\\-^__%j_)/"
5754 "(%numberOfObservations - %numberOfConstraints),")
5755 NORMAL (U"where %x__%ki_ is the element %k in column %i, %x\\-^__%i_ "
5756 "is the mean of column %i, %numberOfObservations equals the number of rows in "
5757 "the table, and %numberOfConstraints equals 1.")
5758 NORMAL (U"The actual calculation goes as follows")
5759 LIST_ITEM (U"1. Centralize each column (subtract the mean).")
5760 LIST_ITEM (U"2. Get its @@singular value decomposition@ #U #D #V\\'p.")
5761 LIST_ITEM (U"3. Form #S = #V #D #V\\'p.")
5762 LIST_ITEM (U"4. Divide all elements in #S by (%numberOfObservations - 1).")
5763 MAN_END
5764
5765 MAN_BEGIN (U"TableOfReal: To Discriminant", U"djmw", 19990104)
5766 INTRO (U"A command that creates a @Discriminant object from every selected "
5767 "@TableOfReal object. Row labels in the table indicate group membership.")
5768 ENTRY (U"Algorithm")
5769 NORMAL (U"We solve for directions #x that are eigenvectors of the generalized "
5770 "eigenvalue equation:")
5771 EQUATION (U"#%B #x - %\\la #%W #x = 0,")
5772 NORMAL (U"where #%B and #%W are the between-groups and the within-groups sums of "
5773 "squares and cross-products matrices, respectively. Both #%B and #%W are symmetric "
5774 "matrices. Standard formula show that both matrices can also "
5775 "be written as a matrix product. The formula above then transforms to:")
5776 EQUATION (U"#%B__1_\\'p#%B__1_ #x - %\\la #%W__1_\\'p#%W__1_ #x = 0")
5777 NORMAL (U"The equation can be solved with the @@generalized singular value decomposition@. "
5778 "This procedure is numerically very stable and can even cope with cases when both "
5779 "matrices are singular.")
5780 NORMAL (U"The a priori probabilities in the Discriminant will be calculated from the number of "
5781 "%training vectors %n__%i_ in each group:")
5782 EQUATION (U"%aprioriProbability__%i_ = %n__%i_ / \\Si__%k=1..%numberOfGroups_ %n__%k_")
5783 MAN_END
5784
5785 MAN_BEGIN (U"TableOfReal: To PCA", U"djmw", 20160223)
5786 INTRO (U"A command that creates a @PCA object from every selected "
5787 "@TableOfReal object, where the TableOfReal object is interpreted as row-oriented, i.e. %%numberOfRows% data vectors, each data vector has %%numberofColumns% elements.")
5788 NORMAL (U"In @@Principal component analysis|the tutorial on PCA@ you will find more info on principal component analysis.")
5789 MAN_END
5790
5791 MAN_BEGIN (U"TableOfReal: To SSCP...", U"djmw", 19990218)
5792 INTRO (U"Calculates Sums of Squares and Cross Products (@SSCP) from the selected @TableOfReal.")
5793 ENTRY (U"Algorithm")
5794 NORMAL (U"The sums of squares and cross products %s__%ij_ "
5795 "between the elements of columns %i and %j are calculated as:")
5796 EQUATION (U"%s__%ij_ = \\Si__%k_ (%x__%ki_ - %x\\-^__%i_)(%x__%kj_ - %x\\-^__%j_),")
5797 NORMAL (U"where %x__%mn_ is the element %m in column %n, and %x\\-^__%n_ "
5798 "is the mean of column %n.")
5799 MAN_END
5800
5801 MAN_BEGIN (U"TableOfReal: To PatternList and Categories...", U"djmw", 20040429)
5802 INTRO (U"Extracts a @PatternList and a @Categories from the selected @TableOfReal.")
5803 NORMAL (U"The selected rows and columns are copied into the PatternList and "
5804 "the corresponding row labels are copied into a Categories.")
5805 MAN_END
5806
5807 MAN_BEGIN (U"TableOfReal: To CCA...", U"djmw", 20020424)
5808 INTRO (U"A command that creates a @CCA object from the selected "
5809 "@TableOfReal object.")
5810 ENTRY (U"Settings")
5811 TERM (U"##Dimension of dependent variate (ny)#")
5812 DEFINITION (U"defines the partition of the table into the two parts whose "
5813 "correlations will be determined. The first %ny columns should be the "
5814 "dependent part, the rest of the columns will be interpreted as the "
5815 "independent part (%nx columns). In general %nx should be larger than or "
5816 "equal to %ny.")
5817 ENTRY (U"Behaviour")
5818 NORMAL (U"Calculates canonical correlations between the %dependent and the "
5819 "%independent parts of the table. The corresponding "
5820 "canonical coefficients are also determined.")
5821 ENTRY (U"Algorithm")
5822 NORMAL (U"The canonical correlation equations for two data sets #T__%y_ "
5823 "[%n \\xx %p] and #T__%x_ [n \\xx %q] are:")
5824 EQUATION (U"(1) (#S__%yx_ #S__%xx_^^-1^ #S__%yx_\\'p -\\la #S__%yy_)#y = #0")
5825 EQUATION (U"(2) (#S__%yx_\\'p #S__%yy_^^-1^ #S__%yx_ -\\la #S__%xx_)#x = #0")
5826 NORMAL (U"where #S__%yy_ [%p \\xx %p] and #S__%xx_ [%q \\xx %q] are the "
5827 "covariance matrices of data sets #T__%y_ and #T__%x_, respectively, "
5828 "#S__%yx_ [%p \\xx %q] is the matrix of covariances between data sets "
5829 "#T__%y_ and #T__%x_, and the vectors #y and #x are the %%canonical "
5830 "weights% or the %%canonical function coefficients% for the dependent and "
5831 "the independent data, respectively. "
5832 "In terms of the (dependent) data set #T__%y_ and the (independent) data set "
5833 "#T__%x_, these covariances can be written as:")
5834 EQUATION (U"#S__%yy_ = #T__%y_\\'p #T__%y_, #S__%yx_ = #T__%y_\\'p #T__%x_ and "
5835 "#S__%xx_ = #T__%x_\\'p #T__%x_.")
5836 NORMAL (U"The following @@singular value decomposition@s ")
5837 EQUATION (U"#T__%y_ = #U__%y_ #D__%y_ #V__%y_\\'p and #T__%x_ = #U__%x_ #D__%x_ "
5838 "#V__%x_\\'p ")
5839 NORMAL (U"transform equation (1) above into:")
5840 EQUATION (U"(3) (#V__%y_ #D__%y_ #U__%y_\\'p#U__%x_ #U__%x_\\'p #U__%y_ #D__%y_ "
5841 "#V__%y_\\'p - \\la #V__%y_ #D__%y_ #D__%y_ #V__%y_\\'p)#y = 0 ")
5842 NORMAL (U"where we used the fact that:")
5843 EQUATION (U"#S__%xx_^^-1^ = #V__%x_ #D__%x_^^-2^ #V__%x_\\'p.")
5844 NORMAL (U"Equation (3) can be simplified by multiplication from the left by "
5845 "#D__%y_^^-1^ #V__%y_' to:")
5846 EQUATION (U" (4) ((#U__%x_\\'p #U__%y_)\\'p (#U__%x_\\'p #U__%y_) - \\la #I)#D__%y_ "
5847 "#V__%y_\\'p #y = #0")
5848 NORMAL (U"This equation can, finally, be solved by a substitution of the s.v.d "
5849 "of #U__%x_\\'p #U__%y_ = #U #D #V\\'p into (4). This results in")
5850 EQUATION (U"(5) (#D^^2^ - \\la #I) #V\\'p #D__%y_ #V__%y_\\'p #y = #0")
5851 NORMAL (U"In an analogous way we can reduce eigenequation (2) to:")
5852 EQUATION (U"(6) (#D^^2^ - \\la #I) #U\\'p #D__%x_ #V__%x_\\'p #x = #0")
5853 NORMAL (U"From (5) and (6) we deduce that the eigenvalues in both equations "
5854 "are equal to the squared singular values of the product matrix "
5855 "#U__%x_\\'p#U__%y_. "
5856 "These singular values are also called %%canonical "
5857 "correlation coefficients%. The eigenvectors #y and #x can be obtained "
5858 "from the columns of the following matrices #Y and #X:")
5859 EQUATION (U"#Y = #V__%y_ #D__%y_^^-1^ #V")
5860 EQUATION (U"#X = #V__%x_ #D__%x_^^-1^ #U")
5861 NORMAL (U"For example, when the vector #y equals the first column of #Y and "
5862 "the vector #x equals "
5863 "the first column of #X, then the vectors #u = #T__%y_#y and #v = #T__%x_#x "
5864 "are the linear combinations from #T__%y_ and #T__%x_ that have maximum "
5865 "correlation. Their correlation coefficient equals the first canonical "
5866 "correlation coefficient.")
5867 MAN_END
5868
5869 MAN_BEGIN (U"TableOfReal: To TableOfReal (means by row labels)...", U"djmw", 20140117)
5870 INTRO (U"A command that appears in the ##Multivariate statistics# menu if you select a @@TableOfReal@. "
5871 "It calculates the multivariate means for the different row labels from the selected TableOfReal.")
5872 ENTRY (U"Setting")
5873 TERM (U"##Expand#")
5874 DEFINITION (U"when %off, then for a table with %n rows and %m different labels (%m\\<_%n), the resulting table will have %m rows. "
5875 "When %on, the dimensions of the resulting table will be the same as the originating, and corresponding means substituded "
5876 "in each row.")
5877 ENTRY (U"Example")
5878 NORMAL (U"The following commands")
5879 CODE (U"@@Create TableOfReal (Pols 1973)...|Create TableOfReal (Pols 1973)@: \"no\"")
5880 CODE (U"To TableOfReal (means by row labels): 0")
5881 NORMAL (U"will result in a new TableOfReal that has 12 rows. Each row will contain the mean F1, F2 and F3 values "
5882 "for a particular vowel. These means were obtained from 50 representations of that vowel.")
5883 NORMAL (U"If we had chosen the %expansion:")
5884 CODE (U"To TableOfReal (means by row labels): \"yes\"")
5885 NORMAL (U"the resulting TableOfReal would have had 600 rows. This representation comes in handy when, for example, "
5886 "you have to calculate deviations from the mean.")
5887 MAN_END
5888
5889 MAN_BEGIN (U"TextGrid: Extend time...", U"djmw", 20020702)
5890 INTRO (U"Extends the domain of the selected @TextGrid object.")
5891 ENTRY (U"Settings")
5892 TERM (U"##Extend domain by#")
5893 DEFINITION (U"defines the amount of time by which the domain will be extended.")
5894 TERM (U"##At")
5895 DEFINITION (U"defines whether starting times or finishing times will be modified.")
5896 ENTRY (U"Behaviour")
5897 NORMAL (U"We add an extra (empty) interval into each %%interval tier%. "
5898 "This is necessary to keep original intervals intact. According to the "
5899 "value of the second argument, the new interval will be added at the "
5900 "beginning or at the end of the tier.")
5901 NORMAL (U"For %%point tiers% only the domain will be changed.")
5902 MAN_END
5903
5904 MAN_BEGIN (U"TextGrid & DurationTier: To TextGrid (scale times)", U"djmw", 20170612)
5905 INTRO (U"Scales the durations of the selected @@TextGrid@ intervals as specified by the selected @@DurationTier@.")
5906 MAN_END
5907
5908 MAN_BEGIN (U"TextGrid: To DurationTier...", U"djmw", 20170617)
5909 INTRO (U"Creates a @@DurationTier@ that could scale the durations of the specified intervals of the selected @@TextGrid@ with a specified factor.")
5910 ENTRY (U"Settings")
5911 SCRIPT (5.4, Manual_SETTINGS_WINDOW_HEIGHT (6), U""
5912 Manual_DRAW_SETTINGS_WINDOW ("TextGrid: To DurationTier", 6)
5913 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Tier number", "1")
5914 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Time scale factor", "2.0")
5915 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Left transition duration", "1e-10")
5916 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Right transition duration", "1e-10")
5917 Manual_DRAW_SETTINGS_WINDOW_FIELD ("Scale intervals whose labels", "starts with")
5918 Manual_DRAW_SETTINGS_WINDOW_FIELD ("...the text", "hi")
5919 )
5920 TERM (U"##Tier number#")
5921 DEFINITION (U"specifies the tier with the intervals.")
5922 TERM (U"##Time scale factor#")
5923 DEFINITION (U"specifies the scale factor by which the duration of a selected interval has to be multiplied.")
5924 TERM (U"##Left transition duration#")
5925 DEFINITION (U"specifies how long it takes to go from a time scale factor of 1.0 to the specified one. "
5926 "Default a very small duration is used. ")
5927 TERM (U"##Right transition duration#")
5928 DEFINITION (U"specifies the time it takes to go from the specified time scale factor to 1.0. "
5929 "Default a very small duration is used.")
5930 TERM (U"##Scale intervals whose labels")
5931 DEFINITION (U"specifies the interval selection criterion.")
5932 TERM (U"##...the text")
5933 DEFINITION (U"specifies the text used in the selection criterion.")
5934 ENTRY (U"Algorithm")
5935 SCRIPT (5, 3, U"ymin = 0.9\n"
5936 "Axes: 0, 1, ymin, 2.0\n"
5937 "t1 = 0.2\n"
5938 "t4 = 0.9\n"
5939 "timeScaleFactor = 1.5\n"
5940 "leftTransitionDuration = 0.1\n"
5941 "rightTransitionDuration = 0.2\n"
5942 "t2 = t1 + leftTransitionDuration\n"
5943 "t3 = t4 - rightTransitionDuration\n"
5944 "Solid line\n"
5945 "Draw line: t1, 1, t2, timeScaleFactor\n"
5946 "Draw line: t2, timeScaleFactor, t3, timeScaleFactor\n"
5947 "Draw line: t3, timeScaleFactor, t4, 1.0\n"
5948 "Dotted line\n"
5949 "Draw line: 0, 1, t1, 1\n"
5950 "Draw line: t4, 1.0, 1.0, 1.0\n"
5951 "Draw line: t1, ymin, t1, timeScaleFactor+0.1\n"
5952 "Draw line: t2, ymin, t2, timeScaleFactor+0.1\n"
5953 "Draw two-way arrow: t1, timeScaleFactor+0.1, t2, timeScaleFactor+0.1\n"
5954 "Text: (t1+t2)/2, \"Centre\", timeScaleFactor+0.1, \"Bottom\", \"leftTransitionDuration\"\n"
5955 "Draw line: t3, ymin, t3, timeScaleFactor+0.1\n"
5956 "Draw line: t4, ymin, t4, timeScaleFactor+0.1\n"
5957 "Draw two-way arrow: t3, timeScaleFactor+0.1, t4, timeScaleFactor+0.1\n"
5958 "Text: (t3+t4)/2, \"Centre\", timeScaleFactor+0.1, \"Bottom\", \"rightTransitionDuration\"\n"
5959 "One mark bottom: t1, \"no\", \"yes\", \"no\", \"t__1_\"\n"
5960 "One mark bottom: t2, \"no\", \"yes\", \"no\", \"t__2_\"\n"
5961 "One mark bottom: t3, \"no\", \"yes\", \"no\", \"t__3_\"\n"
5962 "One mark bottom: t4, \"no\", \"yes\", \"no\", \"t__4_\"\n"
5963 "One mark left: 1.0, \"yes\", \"yes\", \"no\", \"\"\n"
5964 "Text bottom: \"yes\", \"Time (s) \\->\"\n"
5965 "Text left: \"yes\", \"Duration scale factor \\->\"\n"
5966 "Draw inner box\n"
5967 )
5968 NORMAL (U"For each selected interval its duration will be specified by four points in the duration tier as the figure above shows. "
5969 "Given that the start time "
5970 "and the end time of the interval are at %t__1_ and %t__4_, respectively, the times of these four points will be "
5971 "%t__1_, %t__2_=%t__1_+%%leftTransitionDuration%, %t__3_=%t__4_-%%rightTransitionDuration% and %t__4_. The associated duration scale factors "
5972 "will be 1.0, %%timeScalefactor%, %%timeScalefactor% and 1.0, respectively.")
5973 NORMAL (U"Normally we would use very small values for the right and the left transition durations, and the curve in the figure above "
5974 "would look more like a rectangular block instead of the trapezium above. If, on the contrary, larger values for the durations are taken, such that the sum of "
5975 "the left and the right transition durations %%exceeds% the interval's width, then the ordering of the time points at %t__1_ to %t__4_ changes, "
5976 "which will have unexpected results on the duration tier.")
5977 ENTRY (U"Examples")
5978 NORMAL (U"Suppose you want to change the durations of some parts in a sound. The way to go is:")
5979 LIST_ITEM (U"1. Create a TextGrid with at least one interval tier with the segments of interest labeled.")
5980 LIST_ITEM (U"2. Select the TextGrid and choose ##To DurationTier...#.")
5981 LIST_ITEM (U"3. Select the Sound and create a @@Manipulation@ object from it. Check and potentially correct the pitch measurements in this Manipulation "
5982 "(##View & Edit#), as the quality of the resynthesis depends critically on the quality of the pitch measurements.")
5983 LIST_ITEM (U"4. Select the Manipulation and the DurationTier together and choose ##Replace duration tier#.")
5984 LIST_ITEM (U"5. Select the Manipulation object and choose ##Get resynthesis (overlap-add)#. The resulting Sound will have the "
5985 "durations of its selected intervals changed.")
5986 LIST_ITEM (U"6. Optionally you may also want to scale the TextGrid to line up with the newly created Sound. To do so, select the "
5987 "TextGrid and the DurationTier together and choose ##To TextGrid (scale times)#. You will get a new TextGrid that is nicely "
5988 "aligned with the new sound.")
5989 MAN_END
5990
5991 MAN_BEGIN (U"NavigationContext", U"djmw", 20210723)
5992 INTRO (U"One of the @@types of objects@ in Praat. The ##NavigationContext# contains the information that the "
5993 "@@TextGridNavigator@ needs to search for a match on one tier of a @@TextGrid@.")
5994 ENTRY (U"What is inside a NavigationContext?")
5995 TERM (U"##Topic label set#")
5996 DEFINITION (U"defines the labels that we want to find. As an example consider the following "
5997 "set of vowel labels { \"u\", \"o\", \"a\", \"i\", \"e\" }. Our intention is to find only those intervals in "
5998 "the specified tier of the TextGrid that match with one of these labels. ")
5999 TERM (U"##Topic match criterion#")
6000 DEFINITION (U"defines the type of match you want. To name just a few of the possible options: "
6001 "##is equal to# or ##is not equal to# or ##contains# or ##does not contain# or "
6002 "##starts with# or ##does not start with#. Many more match criteria can be chosen and these criteria "
6003 "come in pairs where the second one of the pair is the negation of the first.")
6004 TERM (U"##Combine topic matches with#")
6005 DEFINITION (U"defines whether the match criteria of the labels in the topic set have to be combined by "
6006 "##OR# or by ##AND#. Consider the topic set defined above. If the topic match criterion "
6007 "chosen was ##is equal to# then we would want the match for the current interval label in the tier to succeeed "
6008 "only if the expression (currentLabel\\$ = \"u\" OR currentLabel\\$ = \"o\" OR currentLabel\\$ = \"a\" "
6009 "OR currentLabel\\$ = \"i\" OR currentLabel\\$ = \"e\") evaluates as true, i.e. if one of the labels of the "
6010 "topic set matches the current label in the tier then we would have a match. "
6011 "On the other hand, if the chosen match criterium were the opposite, ##not equal to#, then we would want our match for "
6012 "the current interval label to succeed only if the expression (currentLabel\\$ \\=/ \"u\" AND currentLabel\\$ \\=/ \"o\" "
6013 "AND currentLabel\\$ \\=/ \"a\" AND currentLabel\\$ \\=/ \"i\" AND currentLabel\\$ \\=/ \"e\") evaluates as true. "
6014 "Therefore, in general, for labels that are single words, a positive match criterion, like ##is equal to#, "
6015 "we would choose ##OR# while for a negative match criterion, like ##is not equal to# we would choose ##AND#. "
6016 "However, for labels that are multi-word both ##AND# as well as ##OR# combinations can be useful.")
6017 TERM (U"##Before label set#")
6018 DEFINITION (U"defines the labels that the label of the preceding interval has to match if the current interval label "
6019 "matches the topic label set. This makes the search context-sensitive because it is not enough that the current "
6020 "interval label matches (in a specified way) the topic set but also the label of the preceding interval has to "
6021 "match the before set. If, for example, the before set contains "
6022 "\"p\", \"t\" and \"k\" then in combination with the topic labels defined above this would limit the search to only "
6023 "those vowels that are preceded by a plosive.")
6024 TERM (U"##Combine before matches with#")
6025
6026 DEFINITION (U"defines, just like for the topic match criterion, the kind of match you are looking for only now for "
6027 "the labels of the %%before set%.")
6028 TERM (U"##Before match boolean#")
6029 DEFINITION (U"defines, also in analogy with the description of the topic match boolean, the relation between the matches "
6030 "of the labels in the %%before set%.")
6031 TERM (U"##After label set#")
6032 DEFINITION (U"defines the labels that the label of the following interval has to match if the current interval label "
6033 "matches the topic label set. An example set could consist of "
6034 "\"m\" and \"n\". In combination with the topic set we would search for vowels followed by a nasal.")
6035 TERM (U"##After match criterion# and ##Combine after matches with#")
6036 DEFINITION (U"have the same meaning as defined above for the topic and before sets.")
6037 TERM (U"##Context combination criterion#")
6038 DEFINITION (U"defines how the before and after sets have to be combined in the matching. The possible options are ##before#, or "
6039 "##after# or ##before and after# or ##before or after, not both# or ##before or after, or both# or finally "
6040 "##no before and no after#. Given the topic, before and after labels examples defined above, choosing ##before and after# "
6041 "would limit the search to vowels preceded by a plosive and followed by a nasal.")
6042 TERM (U"##Exclude topic labels boolean#")
6043 DEFINITION (U"when on, only the before and / or the after label set will be used in matching. Of course this effect "
6044 "could also be reached by leaving the topic set empty.")
6045 MAN_END
6046
6047 MAN_BEGIN (U"TextGridNavigator", U"djmw", 20230801)
6048 INTRO (U"One of the @@types of objects@ in Praat. A ##TextGridNavigator# is a multi-tier search machine.")
6049 ENTRY (U"What is a multi-tier search machine?")
6050 NORMAL (U"A multi-tier search machine enables you to find an interval (or a point) on a tier, based on criteria "
6051 "that can have a specified relation with intervals (or points) on the same tier or on other tiers of the TextGrid. "
6052 "Matches on each tier are based on the labels in a tier. Matches found on different tiers are combined based on time. "
6053 "The match criteria for each tier are specified in the tier's @@NavigationContext@. ")
6054 ENTRY (U"Example 1: Single-tier topic search: ")
6055 NORMAL (U"We create a TextGridNavigator that searches for the occurrence in tier 1 of one of the labels "
6056 "in a %topic set that consists of the labels { \"a\", \"e\", \"i\", \"o\", \"u\" }. If a label in tier 1 equals one of the labels in this topic set we have a match. "
6057 "The command to create the TextGridNavigator for the selected TextGrid is:")
6058 CODE (U"To TextGridNavigator (topic only): 1,")
6059 CODE (U"... { \"a\", \"e\", \"i\", \"o\", \"u\" }, \"is equal to\", \"OR\",")
6060 CODE (U"... \"Match start to Match end\"")
6061 NORMAL (U"In this case the tier's ##NavigationContext# is very simple as the searching / matching only involves "
6062 "labels of the topic set. After the TextGridNavigator has been created it doesn't need the TextGrid anymore because "
6063 "tier 1 has been copied into the navigator object. The following code would find all the intervals that match and "
6064 "get their start time, end time and label. ")
6065 CODE (U"Find first")
6066 CODE (U"index = Get index: tierNumber, \"topic\"")
6067 CODE (U"while index > 0")
6068 CODE1 (U"selectObject: textgrid")
6069 CODE1 (U"startTime = Get start time: tierNumber, \"topic\"")
6070 CODE1 (U"endTime = Get end time: tierNumber, \"topic\"")
6071 CODE1 (U"label$ = Get label: tierNumber, \"topic\"")
6072 CODE1 (U"...")
6073 CODE1 (U"selectObject: navigator")
6074 CODE1 (U"Find next")
6075 CODE1 (U"index = Get index: tierNumber, \"topic\"")
6076 CODE (U"endwhile")
6077 NORMAL (U"The ##Find first# command finds the index of the first interval (or point) in the tier that matches. "
6078 "The ##Get index# command returns this index. Besides giving the index of the topic match it can also return "
6079 "indices of before or after matches. If no match was found it returns zero. ##Find next# finds the next interval "
6080 "that matches.")
6081 NORMAL (U"Instead of finding the indices one at a time in a %while loop until we are done, we could use alternatives "
6082 "and query for a list of all indices or times where the labels match. We then know beforehand how many matches we have "
6083 "and therefore we can use a %for loop.")
6084 CODE (U"tierNumber = 1")
6085 CODE (U"navigator = To TextGridNavigator (topic only): tierNumber,")
6086 CODE (U"... { \"a\", \"e\", \"i\", \"u\", \"o\" }, \"is equal to\", \"OR\",")
6087 CODE (U"... \"Match start to Match end\"")
6088 CODE (U"startTimes# = List start times: \"topic\"")
6089 CODE (U"labels$# = List labels: \"Topic\"")
6090 CODE (U"endTimes# = List end times: \"topic\"")
6091 CODE (U"for index to size (startTimes#)")
6092 CODE1 (U"duration = endTimes# [index] - startTimes# [index]")
6093 CODE1 (U"<your code>")
6094 CODE (U"endfor")
6095 NORMAL (U"We could also combine the start and end times into one query list:")
6096 CODE (U"domains## = List domains: \"Topic start to Topic end\"")
6097 CODE (U"numberOfMatches = numberOfRows (domains##)")
6098 NORMAL (U"and use it in a loop as, for example,")
6099 CODE (U"for index to numberOfMatches")
6100 CODE1 (U"duration = domains## [index, 2] - domains## [index, 1]")
6101 CODE1 (U"<your code>")
6102 CODE (U"endfor")
6103
6104 ENTRY (U"Example 2: Single-tier before + topic + after search ")
6105 NORMAL (U"A more complex example could query for a vowel from the same %topic set as we used above but only matches if "
6106 "additionally it is immediately preceded by an unvoiced plosive from a %Before set, like e.g. { \"p\", \"t\", \"k\" }, "
6107 "and also is immediately followed by a nasal from an %After set, like { \"m\", \"n\" }. "
6108 "The command to create this navigator once the TextGrid is selected is: ")
6109 CODE (U"tierNumber = 1")
6110 CODE (U"To TextGridNavigator: tierNumber,")
6111 CODE (U"... { \"a\", \"e\", \"i\", \"o\", \"u\" }, \"is equal to\", \"OR\",")
6112 CODE (U"... { \"p\", \"t\", \"k\" }, \"is equal to\", \"OR\",")
6113 CODE (U"... { \"m\", \"n\" }, \"is equal to\", \"OR\",")
6114 CODE (U"... \"before and after\", \"false\", \"Topic start to Topic end\"")
6115 NORMAL (U"This example and the one above involve only searches on one tier and both follow the same scheme: they "
6116 "search for a %%topic label% which may be preceded by a %%before label% and/or followed by an %%after label%. "
6117 "The %topic, %before and %%after label% belong to different sets (the three sets may of course have labels in common). "
6118 "With a choice from a number of "
6119 "use criterions like ##Before or After, not both# or ##Before and After# you specify how the corresponding label "
6120 "sets will be used during the matching.")
6121 NORMAL (U"For each tier in the TextGrid, we can define a tier search based on tier-specific sets of %%topic labels%, and/ or "
6122 "tier-specific %%before% and %after labels%. Besides these maximally three sets of labels, we also need to specify "
6123 "the kind of match that we want. This is all specified in a tier's @@NavigationContext@. ")
6124
6125 ENTRY (U"Example 3: Multi-tier search by combining single-tier searches")
6126 NORMAL (U"A multi-tier search navigator can be created by successively adding one or more single tier searches to an "
6127 "already existing TextGridNavigator. Each tier added for searching should have a unique tier number. "
6128 "To combine the matches on different tiers we have to chose how to relate these matches on the basis of time because time is "
6129 "the only feature that all tiers have in common as they all have the same time domain. "
6130 "Suppose the TextGrid has two tiers: the first is a phoneme tier like we used in the previous example and the second "
6131 "is a syntactic tier where intervals may be labeled as \"Noun\", \"Determiner\", \"Verb\" etc. "
6132 "We want to restrict the vowel search on tier 1 to only those vowels that are within an interval at tier 2 that "
6133 "is labeled as \"Noun\" and is preceded by an interval labeled \"Determiner\". "
6134 "The only complexity of a multi-tier TextGrid navigator is within its creation process. The following script shows how "
6135 "to create the two-tier navigator.")
6136 CODE (U"phonemeTierNumber = 1")
6137 CODE (U"syntaxTierNumber = 2")
6138 CODE (U"selectObject: texgrid")
6139 CODE (U"navigator = To TextGridNavigator: phonemeTierNumber,")
6140 CODE (U"... { \"a\", \"e\", \"i\", \"o\", \"u\" }, \"is equal to\", \"OR\",")
6141 CODE (U"... { \"p\", \"t\", \"k\" }, \"is equal to\", \"OR\",")
6142 CODE (U"... { \"m\", \"n\" }, \"is equal to\", \"OR\",")
6143 CODE (U"... \"before and after\", \"false\", \"Topic start to Topic end\"")
6144 CODE (U"selectObject: texgrid, navigator")
6145 CODE (U"Add search tier: syntaxTierNumber,")
6146 CODE (U"... { \"Noun\" }, \"is equal to\", \"OR\",")
6147 CODE (U"... { \"Determiner\" }, \"is equal to\", \"OR\",")
6148 CODE (U"... { }, \"is equal to\", \"OR\",")
6149 CODE (U"... \"before\", \"false\", \"Topic start to Topic end\",")
6150 CODE (U"... overlaps before and after")
6151 NORMAL (U"The script starts by creating the navigator for the %topic tier, tier number 1, that we already discussed in "
6152 "##Example 2# which searches for vowels in a plosive-nasal context. "
6153 "The %%match domain%, i.e. that time interval in the topic tier that will be used as the anchor for the comparisons with the match domains of other tiers, is chosen as ##Topic start to Topic end#. This means that, in case of a match on this tier, "
6154 "the start and end times of the match equal the start and end times of the matched vowel interval, respectively. "
6155 "More options exist for the choice of the match domain. "
6156 "The chosen match domain on the %topic tier will %always serve as the anchor for the comparisons with matches on other tiers. "
6157 "The ##Add search tier# command adds a tier to the navigator that will be searched for combinations of a \"Noun\" label "
6158 "preceded by a \"Determiner\" label. "
6159 "The @@NavigationContext@ for this tier therefore consists of only a %topic set and a %before set and both have "
6160 "only one member. "
6161 "The matches on the added search tier will be used to limit the number of matches on the %topic tier by checking if a "
6162 "specified time relation between the match domains on both tiers exist. "
6163 "Suppose that on both tiers we have a match which means that on the %topic tier we found a vowel that is preceded "
6164 "by a plosive and followed by a nasal, and, on the syntax tier we found an interval labeled \"Noun\" that is preceded "
6165 "by an interval labeled \"Determiner\". The start and end time of the match domain on the topic tier equal the start and "
6166 "end time of the vowel interval; name them %tmin1 and %tmax1, respectively. The match domain on the syntax tier will be "
6167 "the interval [%tmin2, %tmax2], where %tmin2 and %tmax2 are the start and end time of the interval labeled \"Noun\" because we "
6168 "also have chosen the ##Topic start to Topic end# option as the match domain for the syntax tier. "
6169 "How to combine these two separate matches on the two different tiers will be determined by the last option of the "
6170 "##Add search tier# command which was chosen as ##overlaps before and after#. "
6171 "Now, only if %tmin2 < %tmin1 and %tmax2 > %tmax1 the two intervals have the desired alignment and the match would succeed. ")
6172 NORMAL (U"We can, of course, make our match stricter and demand that, for example, the complete three phoneme match of the topic "
6173 "tier is located within the match domain of the syntax tier by issuing the following command:")
6174 CODE (U"selectObject: navigator")
6175 CODE (U"Modify match domain: phonemeTierNumber, \"Before start to Topic end\"")
6176 NORMAL (U"Even more stricter to exact alignment:")
6177 CODE (U"Modify match domain alignment: syntaxTierNumber, \"touches before and after\"")
6178 ENTRY (U"Using the TextGridNavigator with other TextGrids")
6179 NORMAL (U"If the TextGrids in your corpus have identical structure, i.e. your search tiers all have the same tier number "
6180 "you can simply reuse your already defined navigator.")
6181 CODE (U"selectObject: navigator, otherTextGrid")
6182 CODE (U"Replace search tiers")
6183 MAN_END
6184
6185 MAN_BEGIN (U"TextGrid: To TextGridNavigator...", U"djmw", 20210723)
6186 INTRO (U"A command to create a new @@TextGridNavigator@ object for the selected @@TextGrid@.")
6187 ENTRY (U"Settings")
6188 TERM (U"##Tier number#")
6189 DEFINITION (U"defines the tier of the TextGrid that will be used for the navigation. This tier will be copied "
6190 "into the TextGridNavigator. This tier will be called the %%topic tier%.")
6191 TERM (U"Next follow the settings for the @@NavigationContext|navigation context@. You can define a full "
6192 "context-sensitive search on the selected tier. This means that whether a label in an interval matches may depend "
6193 "on whether the label of the preceeding interval matches a certain condition and / or whether the label in the succeeding interval matches a possibly different condition. ")
6194 TERM (U"##Match domain#")
6195 DEFINITION (U"defines the start and end times of the match domain on this tier. Various options exist, the default, "
6196 "##Topic start to Topic end# takes the start time and end time of the interval that matches the topic. "
6197 "As is explained in the @@TextGridNavigator@ matching in multi-tier search is based on time intervals, "
6198 "therefore this option is irrelevant for single-tier searches.")
6199 MAN_END
6200
6201 MAN_BEGIN (U"TextGridNavigator & TextGrid: Add search tier...", U"djmw", 20220117)
6202 INTRO (U"A command to extend the search of the selected @@TextGridNavigator@ with another tier of the selected @@TextGrid@. ")
6203 ENTRY (U"Settings")
6204 TERM (U"##Tier number#")
6205 DEFINITION (U"defines the tier of the TextGrid that will also be used to limit make the searches more specific. This tier has to be different from the tiers that are already in use.")
6206 TERM (U"The @@NavigationContext|navigation context@ for this tier has to be defined.")
6207 TERM (U"##Match domain#")
6208 DEFINITION (U"defines the start and end times of the match domain on this tier. Various options exist, the default, "
6209 "##Topic start to Topic end# takes the start time and end time of the interval that matches the topic on this tier. ")
6210 TERM (U"##Match domain alignment#")
6211 DEFINITION (U"defines the alignment between the match domain in this tier to the match domain in the topic tier. "
6212 "For example, if the option ##overlaps before and after# were chosen and the match domain in the selected tier "
6213 "is [%%tmin2%, %%tmax2%] while on the topic tier it is [%%tmin1%, %%tmax1%] then a match would only succeed "
6214 "if %%tmin2% < %%tmin1% and %%tmax2% > %%tmax1%.")
6215 MAN_END
6216
6217
6218 MAN_BEGIN (U"TextGridNavigator & TextGrid: Replace search tiers", U"djmw", 20210719)
6219 INTRO (U"A command to replace the current search tiers in the selected @@TextGridNavigator@ with the tiers from the "
6220 "selected @@TextGrid@.")
6221 NORMAL (U"This is the easiest way to use the TextGridNavigator to navigate another TextGrid.")
6222 MAN_END
6223
6224 MAN_BEGIN (U"TIMIT acoustic-phonetic speech corpus", U"djmw", 19970320)
6225 INTRO (U"A large American-English speech corpus that resulted from the joint efforts "
6226 "of several American research sites.")
6227 NORMAL (U"The TIMIT corpus contains a total of 6300 sentences, 10 sentences spoken by "
6228 "630 speakers selected from 8 major dialect regions of the USA. 70\\% of "
6229 "the speakers are male, 30\\% are female.")
6230 NORMAL (U"The text corpus design was done by the Massachusetts Institute of "
6231 "Technology (MIT), Stanford Research Institute and Texas Instruments (TI). "
6232 "The speech was recorded at TI, transcribed at MIT, and has been maintained, "
6233 "verified and prepared for CDROM production by the American National Institute "
6234 "of Standards and Technology (NIST) (@@Lamel, Kassel & Seneff (1986)@).")
6235 MAN_END
6236
6237 MAN_BEGIN (U"VowelEditor", U"djmw", 20200403)
6238 INTRO (U"An Editor for generating vowel-like @@sound|Sound@s from mouse movements.")
6239 ENTRY (U"How to get a sound")
6240 NORMAL (U"With the mouse button down, you can move the mouse cursor around in the plane "
6241 "spanned by the first two formants. While you move the cursor around, the positions you trace will be "
6242 "indicated by blue dots. After you release the mouse button, the color of the trajectory will change "
6243 "to black. Next you will hear the vowel-like sound whose "
6244 "first two formants follow this trajectory. (The small bars on the trajectory are time markers. With "
6245 "default settings, time markers are at 50 milliseconds apart and they may give you an indication of the speed by which you traversed the trajectory.)")
6246 ENTRY (U"The interface")
6247 NORMAL (U"In the lower part of the editor a number of buttons and fields are displayed.")
6248 TERM (U"##Play")
6249 DEFINITION (U"will play the trajectory.")
6250 TERM (U"##Reverse")
6251 DEFINITION (U"will reverse the trajectory and play it.")
6252 TERM (U"##Publish")
6253 DEFINITION (U"will publish the sound in the list of objects.")
6254 TERM (U"##Duration (s)")
6255 DEFINITION (U"allows to modify the duration of the current trajectory. ")
6256 TERM (U"##Extend (s)")
6257 DEFINITION (U"determines the duration of the straight line trajectory that connects the endpoint of the current trajectory with the startpoint of a new trajectory. You may extend the current trajectory by starting a new trajectory with the shift button pressed. After you finished the new trajectory, three trajectories will be appended: the current one, the straight line one and the new one.")
6258 TERM (U"##Start F0 (Hz)")
6259 DEFINITION (U"determines the fundamental frequency at the start of the trajectory.")
6260 TERM (U"##F0 slope (oct/s)")
6261 DEFINITION (U"determines how many octaves the pitch will changes during the course of the trajectory.")
6262 NORMAL (U"The bottom line in the Editor displays the first and second formant frequency and the fundamental frequency at the start point and the endpoint of the trajectory.")
6263 ENTRY (U"Edit menu")
6264 TERM (U"##Set F0...")
6265 DEFINITION (U"Set pitch and slope.")
6266 TERM (U"##Reverse trajectory")
6267 DEFINITION (U"Reverses the trajectory (like editor button).") // ??
6268 TERM (U"##Modify trajectory duration...")
6269 DEFINITION (U"Modifies trajectory duration (like editor field).") // ??
6270 TERM (U"##New trajectory...")
6271 DEFINITION (U"Set startpoint, endpoint and duration of a new trajectory.")
6272 TERM (U"##Extend trajectory...")
6273 DEFINITION (U"Extend current trajectory to...")
6274 TERM (U"##Shift trajectory...")
6275 DEFINITION (U"Shift current trajectory.")
6276 ENTRY (U"View menu")
6277 TERM (U"##F1 & F2 range...#")
6278 DEFINITION (U"Modify the horizontal and vertical scales.")
6279 TERM (U"##Show vowel marks from fixed set...#")
6280 DEFINITION (U"Show the vowel marks in the editor from a fixed set of vowel inventories.")
6281 TERM (U"##Show vowel marks from Table file...#")
6282 DEFINITION (U"Put your own marks in the editor. The Table needs to have at least three mandatory columns "
6283 "labeled \"Vowel\", \"F1\" and \"F2\" and "
6284 "two optional column labeled \"Size\" and \"Colour\". The Vowel column contains the vowel marker labels, the F1 and "
6285 "F2 columns have the first and second formant frequencies in Hertz. The optional Size column contains "
6286 "the font size of the vowel markers, while the Colour column contains the @@Colour|colour@ specification of each vowel. "
6287 "The Table has to be in tab-separated format (or saved in Praat as a binary or text Table file)."
6288 )
6289 TERM (U"##Show trajectory time markers every...")
6290 DEFINITION (U"Shows time markers as small bars orthogonal to the trajectory. ")
6291 ENTRY (U"File menu")
6292 TERM (U"##Preferences...#")
6293 DEFINITION (U"Here you can modify the sharpness of the F1 and F2 peaks and also add a number of higher formants.")
6294 TERM (U"##Publish Sound")
6295 DEFINITION (U"Make the synthesized sound available in the object menu.")
6296 TERM (U"##Extract FormantTier")
6297 TERM (U"##Extract PitchTier")
6298 DEFINITION (U"Publish the Sound, the PitchTier and the FormantTier from the trajectory.")
6299 TERM (U"##Draw trajectory...")
6300 DEFINITION (U"Draws the trajectory in the picture window.")
6301 MAN_END
6302
6303 MAN_BEGIN (U"VowelEditor: Show vowel marks from Table file...", U"djmw", 20200403) // ppgb 2024
6304 INTRO (U"A command in the @@VowelEditor@ that lets you set your own vowel marks. ")
6305 ENTRY (U"Layout of the Table")
6306 NORMAL (U"The Table needs at least three mandatory columns labeled \"Vowel\", \"F1\" and \"F2\" and "
6307 "two optional column labeled \"Size\" and \"Colour\". The Vowel column contains the vowel marker labels, the F1 and "
6308 "F2 columns have the first and second formant frequencies in Hertz. The optional Size column contains "
6309 "the font size of the vowel markers, while the Colour column contains the @@Colour|colour@ specification of each vowel.")
6310 NORMAL (U"The Table has to be in tab-separated format (or saved in Praat as a binary or text Table file).")
6311 MAN_END
6312
6313 /********************** GSL ********************************************/
6314 MAN_BEGIN (U"incompleteBeta", U"djmw", 20071024)
6315 TERM (U"##incompleteBeta (%a, %b, %x)")
6316 DEFINITION (U"I__x_(%a,%b) = 1/beta(%a,%b)\\in__0_^%x %t^^%a-1^(1-%t)^^%b-1^ dt,")
6317 NORMAL (U"for 0 \\<_ %x \\<_ 1 and %a and %b and %a+%b not equal to a negative integer.")
6318 //double incompleteBeta (double a, double b, double x);
6319 //Pre: 0<= x <= 1; a> 0, b>0
6320 //Def: $I_x(a,b)=B_x(a,b)/B(a,b)=1/B(a,b) \int_0^x t^{a-1}(1-t)^{b-1)dt$
6321 //Limiting values: $I_0(a,b)=0 I_1(a,b)=1$
6322 //Symmetry: $I_x(a,b) = 1 - I_{1-x}(b,a)$
6323 MAN_END
6324
6325 MAN_BEGIN (U"incompleteGammaP", U"djmw", 20170531)
6326 TERM (U"##incompleteGammaP (%a, %x)")
6327 DEFINITION (U"incompleteGammaP = 1/\\Ga(%a)\\in__0_^%x e^^-%t^%t^^%a-1^ dt,")
6328 NORMAL (U"where %x and %a are real numbers that satisfy %x\\>_ 0 and %a not being a negative integer.")
6329 MAN_END
6330
6331 MAN_BEGIN (U"lnBeta", U"djmw", 20071024)
6332 TERM (U"##lnBeta (%a, %b)")
6333 DEFINITION (U"Computes the logarithm of the #beta function, subject to %a and %b and %a+%b not being negative integers.")
6334 MAN_END
6335
6336 /********************* References **************************************/
6337
6338 MAN_BEGIN (U"Alexandrescu (2017)", U"djmw", 20250120)
6339 NORMAL (U"A. Alexandrescu (2017): \"Fast deterministic selection.\" %%Symposium on experimental algorithms (SEA 2017):% 1\\--18.")
6340 MAN_END
6341
6342 MAN_BEGIN (U"Anderson et al. (1999)", U"djmw", 20200131)
6343 NORMAL (U"E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum, "
6344 "S. Hammarling, A. McKenney & D. Sorensen (1999): %%LAPACK users' guide%. Third edition. Philadelphia, PA: Society for Industrial and Applied Mathematics.")
6345 MAN_END
6346
6347 MAN_BEGIN (U"Bai & Demmel (1993)", U"djmw", 19981007)
6348 NORMAL (U"Z. Bai & J. Demmel (1993): \"Computing the generalized singular value "
6349 "decomposition.\" %%SIAM J. Sci. Comput.% #14: 1464\\--1486.")
6350 MAN_END
6351
6352 MAN_BEGIN (U"Bartlett (1954)", U"djmw", 20011111)
6353 NORMAL (U"M.S. Bartlett (1954): \"A note on multiplying factors for various "
6354 "chi-squared approximations.\", %%Joural of the Royal Statistical Society, "
6355 "Series B% #16: 296\\--298.")
6356 MAN_END
6357
6358 MAN_BEGIN (U"Berry et al. (2007)", U"djmw", 20190321)
6359 NORMAL (U"M.W. Berry, M. Browne, A.N. Langville, V.P. Pauca & R.J. Plemmons (2007): "
6360 "\"Algorithms and applications for approximate nonnegative matrix factorization.\", "
6361 "Computational Statistics & Data Analysis ##52#: 155\\--173.")
6362 MAN_END
6363
6364 MAN_BEGIN (U"Blumensath & Davies (2010)", U"djmw", 20190601)
6365 NORMAL (U"T. Blumensath & M.E. Davies: \"Normalised iterative hard thresholding;"
6366 " guaranteed stability and performance\", %%IEEE Journal of Selected Topics in Signal Processing% #4: 298\\--309.")
6367 MAN_END
6368
6369 MAN_BEGIN (U"Boll (1979)", U"djmw", 20121021)
6370 NORMAL (U"S.F. Boll (1979): \"Suppression of acoustic noise in speech using spectral subtraction.\""
6371 "%%IEEE Transactions on ASSP% #27: 113\\--120.")
6372 MAN_END
6373
6374 MAN_BEGIN (U"Boomsma (1977)", U"djmw", 20020524)
6375 NORMAL (U"A. Boomsma (1977): \"Comparing approximations of confidence intervals "
6376 "for the product-moment correlation coefficient.\" %%Statistica Neerlandica% "
6377 "#31: 179-186.")
6378 MAN_END
6379
6380 MAN_BEGIN (U"Chan, Golub & LeVeque (1983)", U"djmw", 20170802)
6381 NORMAL (U"T.F. Chan, G.H. Golub & R.J. LeVeque (1983): \"Algorithms for computing the sample variance: Analysis and recommendations.\" %%The American Statistician% #37: 242\\--247.")
6382 MAN_END
6383
6384 MAN_BEGIN (U"Chan, Golub & LeVeque (1979)", U"djmw", 20170802)
6385 NORMAL (U"T.F. Chan, G.H. Golub & R.J. LeVeque (1979): \"Updating formulae and an pairwise algorithm for computing sample variances.\" %%Stanford working paper STAN-CS-79-773%, 1\\--22.")
6386 MAN_END
6387
6388 MAN_BEGIN (U"Cooley & Lohnes (1971)", U"djmw", 20060322)
6389 NORMAL (U"W.W. Colley & P.R. Lohnes (1971): %%Multivariate data analysis%. "
6390 "John Wiley & Sons.")
6391 MAN_END
6392
6393 MAN_BEGIN (U"Davis & Mermelstein (1980)", U"djmw", 20010419)
6394 NORMAL (U"S.B. Davis & P. Mermelstein (1980), \"Comparison of parametric "
6395 "representations for monosyllabic word recognition in continuously spoken sentences.\" "
6396 "%%IEEE Transactions on ASSP% #28: 357\\--366.")
6397 MAN_END
6398
6399 MAN_BEGIN (U"Deng & Tang (2011)", U"djmw", 20170915)
6400 NORMAL (U"X. Deng & Z. Tang (2011). \"Moving surface spline interpolation based on Green's function\": "
6401 "%%Mathematical Geosciences% #43: 663\\--680.")
6402 MAN_END
6403
6404 MAN_BEGIN (U"Efron & Tibshirani (1993)", U"djmw", 20031103)
6405 NORMAL (U"B. Efron & R.J. Tibshirani (1993): %%An introduction "
6406 "to the bootstrap%. Chapman & Hall.")
6407 MAN_END
6408
6409 MAN_BEGIN (U"eSpeak", U"David Weenink & Paul Boersma", 20211217) // 2024
6410 NORMAL (U"eSpeak is a free text-to-speech synthesizer. It was developed by Jonathan Duddington until 2015. "
6411 "In 2015, Reece Dunn cloned it, and together with a group of developers they maintain and actualize it under the name “eSpeak NG”. "
6412 "eSpeak NG uses formant synthesis. "
6413 "On 2024-08-24, version 1.52-dev supports 137 languages with 104 voices, and is available in Praat (see @Acknowledgments).")
6414 MAN_END
6415
6416 MAN_BEGIN (U"Févotte, Bertin & Durrieu (2009)", U"djmw", 20190618)
6417 NORMAL (U"C. Févotte, N. Bertin & J.-L. Durrieu (2009): \"Nonnegative matrix factorization with the Itakura-Saito divergene: "
6418 "with applications to music analysis\", %%Neural Computation% #21: 793\\--830.")
6419 MAN_END
6420
6421 MAN_BEGIN (U"Flanagan (1960)", U"djmw", 19980713)
6422 NORMAL (U"J.L. Flanagan (1960): \"Models for approximating basilar membrane "
6423 "displacement.\" %%Bell System Technical Journal% #39: 1163\\--1191.")
6424 MAN_END
6425
6426 MAN_BEGIN (U"Friedl (1997)", U"djmw", 20010710)
6427 NORMAL (U"J.E.F. Friedl (1997): %%Mastering Regular Expressions%. "
6428 "O'Reilly & Associates.")
6429 MAN_END
6430
6431 MAN_BEGIN (U"Ganong (1980)", U"djmw", 20130622)
6432 NORMAL (U"W.F. Ganong III (1980): \"Phonetic categorization in auditory word perception.\" %%Journal of Experimental Psychology: Human Perception and Performance% #6: 110\\--125.")
6433 MAN_END
6434
6435
6436 MAN_PAGES_BEGIN
6437 R"~~~(
6438 ################################################################################
6439 "Garofolo, Lamel, Fisher, Fiscus, Pallett & Dahlgren (1993)"
6440 © Paul Boersma 2025-04-26
6441
6442 John S. Garofolo, Lori F. Lamel, William M. Fisher, Jonathan G. Fiscus, David S. Pallett & Nancy L. Dahlgren (1993):
6443 “DARPA TIMIT: acoustic-phonetic continuous speech corpus CD-ROM, NIST Speech Disc CD1-1.1”,
6444 %NISTIR (%%National Institute of Standards and Technology Interagency or Internal Report%) 4930, Gaithersburg MD.
6445 [https://doi.org/10.6028/NIST.IR.4930]
6446
6447 ################################################################################
6448 "Greiner & Hormann (1998)"
6449 © David Weenink 2011-06-17
6450
6451 G. Greiner & K. Hormann (1998): “Efficient clipping of arbitrary polygons”, %%ACM Transactions on Graphics% #17: 71\--83.
6452
6453 ################################################################################
6454 "Heath et al. (1986)"
6455 © David Weenink 1998-10-07
6456
6457 M.T. Heath, J.A. Laub, C.C. Paige & R.C. Ward (1986): “Computing the
6458 singular value decomposition of a product of two matrices”,
6459 %%SIAM Journal on Scientific and Statistical Computing% #7: 1147\--1159.
6460
6461 ################################################################################
6462 "Hastie, Tibshirani & Friedman (2001)"
6463 © David Weenink 2022-01-11
6464
6465 T. Hastie, R. Tibshirani & J. Friedman (2001): %%The elements of statistical learning%. Springer Series in Statistics.
6466
6467 ################################################################################
6468 "Henrich et al. (2004)"
6469 © David Weenink 2019-09-03
6470
6471 N. Henrich, C. d'Alessandro, B. Doval & M. Castellengo (2004):
6472 “On the use of the derivative of electroglottographic signals for characterization of nonpathological phonation”,
6473 %%Journal of the Acoustical Society of America% #115: 1321\--1332.
6474
6475 ################################################################################
6476 "Hermes (1988)"
6477 © David Weenink 1998-01-23
6478
6479 Dik J. Hermes (1988): “Measurement of pitch by subharmonic summation”,
6480 %%Journal of the Acoustical Society of America% #83: 257\--264.
6481
6482 ################################################################################
6483 "Henze & Wagner (1997)"
6484 © David Weenink 2021-08-03
6485
6486 N. Henze & T. Wagner (1997): “A new approach to the BHEP tests for multivariate normality”,
6487 %%Journal of Multivariate Analysis% #62: 1\--23.
6488
6489 ################################################################################
6490 "Herbst et al. (2014)"
6491 © David Weenink 2019-08-29
6492
6493 C. Herbst, J. Lohscheller, J. \S<vec, N. Henrich, G. Weissengruber & W. Tecumseh Fitch (2014):
6494 “Glottal opening and closing events investigated by electroglottography and super-high-speed video recordings”,
6495 %%The Journal of Experimental Biology% #217: 955\--963.
6496
6497 ################################################################################
6498 "Herbst (2019)"
6499 © David Weenink 2019-08-26
6500
6501 C. Herbst (2019): “Electroglottography \-- an update”, %%Journal of Voice%: In press.
6502
6503 ################################################################################
6504 "Holighaus et al. (2013)"
6505 © David Weenink 2021-04-26
6506
6507 N. Holighaus, M. Dörfler, G. A. Velasco & T. Grill (2013): “A framework for invertible, real-time constant-Q transforms”,
6508 %%IEEE Transactions on Audio, Speech, and Language Processing% #21: 775\--785.
6509
6510 ################################################################################
6511 "Hormann & Agathos (2001)"
6512 © David Weenink 2011-06-17
6513
6514 K. Hormann & A. Agathos (2001): “The point in polygon problem for arbitrary polygons”,
6515 %%Computational Geometry% #20: 131\--144.
6516
6517 ################################################################################
6518 "Irino & Patterson (1997)"
6519 © David Weenink 2010-05-17
6520
6521 T. Irino & R.D. Patterson (1997): “A time-domain, level-dependent auditory filter: The gammachirp”,
6522 %%Journal of the Acoustical Society of America% #101: 412\--419.
6523
6524 ################################################################################
6525 "Itakura & Saito (1968)"
6526 © David Weenink 2019-06-17
6527
6528 F. Itakura & S. Saito (1968): “Analysis synthesis telephony based on the maximum likelihood method”,
6529 In %%Proc. 6th International Congress on Acoustics%, Los Alamitos, CA: IEEE: C-17\--20.
6530
6531 ################################################################################
6532 "Janecek et al. (2011)"
6533 © David Weenink 2019-03-12
6534
6535 A. Janecek, S. Schulze Grotthoff & W.N. Gangsterer (2011):
6536 “LIBNMF \-- a library for nonnegative matrix factorization”, %%Computing and Informatics% #30: 205\--224.
6537
6538 ################################################################################
6539 "Johannesma (1972)"
6540 © David Weenink 1998-01-23
6541
6542 Peter I.M. Johannesma (1972): “The pre-response stimulus ensemble of neurons in the cochlear nucleus.”
6543 In %%Symposium on Hearing Theory% (IPO, Eindhoven, Netherlands), 58\--69.
6544
6545 ################################################################################
6546 "Johnson (1998)"
6547 © David Weenink 2000-05-25
6548
6549 D.E. Johnson (1998): %%Applied multivariate methods%.
6550
6551 ################################################################################
6552 "Keating & Esposito (2006)"
6553 © David Weenink 2013-06-20
6554
6555 P.A. Keating & C. Esposito (2006): “Linguistic voice quality”, %%UCLA Working Papers in Phonetics% #105: 85\--91.
6556
6557 ################################################################################
6558 "Khuri (1998)"
6559 © David Weenink 2012-07-02
6560
6561 A. Khuri (1998): “Unweighted sums of squares in unbalanced analysis of variance”,
6562 %%Journal of Statistical Planning and Inference% #74: 135\--147.
6563
6564 ################################################################################
6565 "Kim & Kim (2006)"
6566 © David Weenink 2011-06-17
6567
6568 D.H. Kim & M.-J. Kim (2006): “An extension of polygon clipping to resolve degenerate cases”,
6569 %%Computer-Aided Design & Applications% #3: 447\--456.
6570
6571 ################################################################################
6572 "Kostlan & Gokhman (1987)"
6573 © David Weenink 2017-05-30
6574
6575 E. Kostlan & D. Gokhman (1987): “A program for calculating the incomplete gamma function”,
6576 %%Technical Report, Dept. of Mathematics, Univ. of California%, Berkeley.
6577
6578 ################################################################################
6579 "Krishnamoorthy & Yu (2004)"
6580 © David Weenink 2009-08-13
6581
6582 K. Krishnamoorthy & J. Yu (2004): “Modified Nel and Van der Merwe test for multivariate
6583 Behrens-Fisher problem”, %%Statistics & Probability Letters% #66: 161\--169.
6584
6585 ################################################################################
6586 "Lamel, Kassel & Seneff (1986)"
6587 © David Weenink 1998-01-23, Paul Boersma 2025
6588
6589 Lori F. Lamel, Robert H. Kassel & Stephanie Seneff (1986):
6590 “Speech database development: Design and analysis of the acoustic-phonetic corpus.”
6591 %%Proc. DARPA Speech Recognition Workshop%, Report No. SAIC-86/1546, 100\--119.
6592
6593 Reprinted in @@Garofolo, Lamel, Fisher, Fiscus, Pallett & Dahlgren (1993)@.
6594
6595 ################################################################################
6596 )~~~"
6597 MAN_PAGES_END
6598
6599 MAN_BEGIN (U"Lee & Seung (2001)", U"djmw", 20190312)
6600 NORMAL (U"D.D. Lee & S.H. Seung (2001): \"Algorithms for non-negative matrix factorization.\" "
6601 "%%Advances in in neural information processing systems% #13: 556\\--562.")
6602 MAN_END
6603
6604 MAN_BEGIN (U"Ma & Nishihara (2013)", U"djmw", 20210315)
6605 NORMAL (U"Y. Ma & A. Nishihara (2013): \"Efficient voice activity detection algorithm using long-term "
6606 "spectral flatness measure.\", %%EURASIP Journal on Audio, Speech, and Music Processing%, ##2013#:21")
6607 MAN_END
6608
6609 MAN_BEGIN (U"Magron & Virtanen (2018)", U"djmw", 20191024)
6610 NORMAL (U"P. Magron & T. Virtanen (2018): \"Expectation-maximization algorithms for Itakura-Saito "
6611 "nonnegative matrix factorization.\" HAL-01632082v2.")
6612 MAN_END
6613
6614 MAN_BEGIN (U"Marsaglia & Tsang (2000)", U"djmw", 20190620)
6615 NORMAL (U"G. Marsaglia & W.W. Tsang (2000): \"A simple method for generating gamma variables.\""
6616 " %%ACM Transactions on Mathematical Software% #26: 363\\--372.")
6617 MAN_END
6618
6619 MAN_BEGIN (U"Matou\\s<ek (1991)", U"djmw", 20250119)
6620 NORMAL (U"J. Matou\\s<ek (1991): \"Randomized optimal algorithm for slope selection.\""
6621 " %%Information Processing Letters #39: 183\\--187.")
6622 MAN_END
6623
6624 MAN_BEGIN (U"Morrison (1990)", U"djmw", 19980123)
6625 NORMAL (U"D.F. Morrison (1990): %%Multivariate statistical methods%. "
6626 "New York: McGraw-Hill.")
6627 MAN_END
6628
6629 MAN_BEGIN (U"Peterson & Barney (1952)", U"djmw", 20020620)
6630 NORMAL (U"G.E. Peterson & H.L. Barney (1952): \"Control methods used in a study "
6631 "of the vowels.\" %%Journal of the Acoustical Society of America% #24: 175\\--184")
6632 MAN_END
6633
6634 MAN_BEGIN (U"Pols et al. (1973)", U"djmw", 19990426)
6635 NORMAL (U"L.C.W. Pols, H.R.C. Tromp & R. Plomp (1973): "
6636 "\"Frequency analysis of Dutch vowels from 50 male speakers.\" "
6637 "%%Journal of the Acoustical Society of America% #53: 1093\\--1101.")
6638 MAN_END
6639
6640 MAN_BEGIN (U"Press et al. (1992)", U"djmw", 19980114)
6641 NORMAL (U"W.H. Press, S.A. Teukolsky, W.T. Vetterling & B.P. Flannery (1992): "
6642 "%%Numerical recipes in C: The art of scientific computing%. "
6643 "Second Edition. Cambridge University Press.")
6644 MAN_END
6645
6646 MAN_BEGIN (U"Sakoe & Chiba (1978)", U"djmw", 20050302)
6647 NORMAL (U"H. Sakoe & S. Chiba (1978): \"Dynamic programming algorithm optimization for spoken word recognition.\" "
6648 "%%Transactions on ASSP% #26: 43\\--49.")
6649 MAN_END
6650
6651 MAN_BEGIN (U"Sanchez (2012)", U"djmw", 20260219)
6652 NORMAL (U"C.A. Sanchez (2012): \"mtpsd documentation.\" "
6653 "%%https://github.com/cantonios/mtpsd/.")
6654 MAN_END
6655
6656 MAN_BEGIN (U"Sandwell (1987)", U"djmw", 20170915)
6657 NORMAL (U"D.T. Sandwell (1987): \"Biharmonic spline interpolation of GEOS-3 and SEASAT altimeter data.\", "
6658 "%%Geophysica Research Letters% #14: 139\\--142.")
6659 MAN_END
6660
6661 MAN_BEGIN (U"Sekey & Hanson (1984)", U"djmw", 20050302)
6662 NORMAL (U"A. Sekey & B.A. Hanson (1984): \"Improved 1-Bark bandwidth auditory filter.\" "
6663 "%%Journal of the Acoustical Society of America% #75: 1902\\--1904.")
6664 MAN_END
6665
6666 MAN_BEGIN (U"Schott (2001)", U"djmw", 20090629)
6667 NORMAL (U"J. R. Schott (2001): \"Some tests for the equality of covariance matrices.\" "
6668 "%%Journal of Statistical Planning and Inference% #94: 25\\-–36.")
6669 MAN_END
6670
6671 MAN_BEGIN (U"Shepard (1964)", U"djmw", 19980114)
6672 NORMAL (U"R.N. Shepard (1964): \"Circularity in judgments of relative pitch.\" "
6673 "%%Journal of the Acoustical Society of America% #36: 2346\\--2353.")
6674 MAN_END
6675
6676 MAN_BEGIN (U"Slaney (1993)", U"djmw", 19980712)
6677 NORMAL (U"M. Slaney (1993): \"An efficient implementation of the "
6678 "Patterson-Holdsworth auditory filterbank.\" "
6679 "%%Apple Computer Technical Report% #35, 41 pages.")
6680 MAN_END
6681
6682 MAN_BEGIN (U"Slapian (1977)", U"djmw", 20260219)
6683 NORMAL (U"D. Slapian (1977): \"Program to compute discrete prolate spheroidal wave functions, "
6684 "sequences, and eigenvalues.\" "
6685 "%%Technical Report% TM 77-1218-8, Bell Telephone Laboratories.")
6686 MAN_END
6687
6688 MAN_BEGIN (U"Ten Berge (1991)", U"djmw", 20191221)
6689 NORMAL (U"J. Ten Berge (1991): \"A general solution for a class of weakly constrained linear regression problems.\", %%Psychometrika% #56, 601\\--609.")
6690 MAN_END
6691
6692 MAN_BEGIN (U"Tribolet et al. (1979)", U"djmw", 20010114)
6693 NORMAL (U"J.M. Tribolet & T.F. Quatieri (1979): \"Computation of the Complex "
6694 "Cepstrum.\" In %%Programs for Digital Signal Processing%, "
6695 "Digital Signal Processing Committee (eds.), IEEE Press.")
6696 MAN_END
6697
6698 MAN_BEGIN (U"Tukey (1977)", U"djmw", 20000524)
6699 NORMAL (U"J.W. Tukey (1977): %%Exploratory data analysis%. Reading, MA: Addison-Wesley.")
6700 MAN_END
6701
6702 MAN_BEGIN (U"Van Nierop et al. (1973)", U"djmw", 20020620)
6703 NORMAL (U"D.J.P.J. Van Nierop, L.C.W. Pols & R. Plomp (1973): \"Frequency "
6704 "analysis of Dutch vowels from 25 female speakers.\" %%Acustica% #29: 110\\--118")
6705 MAN_END
6706
6707 MAN_BEGIN (U"Velasco et al. (2011)", U"djmw", 20210422)
6708 NORMAL (U"G.A. Velasco, N. Holighaus, M. Dörfler & T. Grill (2011):\"Constructing an invertable constant-Q transform with "
6709 "nonstationary Gabor frames.\" %%Proc. of the 14^^th^ Int. Conference on Digital Audio Effects%, Paris, France, September 2011.")
6710 MAN_END
6711
6712 MAN_BEGIN (U"Weenink (1985)", U"djmw", 20111010)
6713 NORMAL (U"D.J.M. Weenink (1985), \"Formant analysis of Dutch vowels from 10 children\", "
6714 "%%Proceedings of the Institute of Phonetic Sciences of the "
6715 "University of Amsterdam% #9, 45\\--52.")
6716 MAN_END
6717
6718 MAN_BEGIN (U"Watrous (1991)", U"djmw", 20080125)
6719 NORMAL (U"R.L. Watrous (1991): \"Current status of Peterson-Barney vowel formant data.\" "
6720 "%%Journal of the Acoustical Society of America% #89: 2459\\--2460.")
6721 MAN_END
6722
6723 MAN_BEGIN (U"Weenink (1999)", U"djmw", 20041217)
6724 NORMAL (U"D.J.M. Weenink (1999): \"Accurate algorithms for performing "
6725 "principal component analysis and discriminant analysis.\" "
6726 "%%Proceedings of the Institute of Phonetic Sciences of the "
6727 "University of Amsterdam% #23: 77\\--89.")
6728 MAN_END
6729
6730 MAN_BEGIN (U"Weenink (2003)", U"djmw", 20040225)
6731 NORMAL (U"D.J.M. Weenink (2003): \"Canonical correlation analysis.\" "
6732 "%%Proceedings of the Institute of Phonetic Sciences of the "
6733 "University of Amsterdam% #25: 81\\--99.")
6734 MAN_END
6735
6736 MAN_BEGIN (U"Wessel & Bercovici (1989)", U"djmw", 20170917)
6737 NORMAL (U"P. Wessel & D. Bercovici (1998): \"Interpolation with splines in tension: a Green's function approach.\" "
6738 "%%Mathematical Geology% #30: 77\\--93.")
6739 MAN_END
6740
6741 MAN_BEGIN (U"Wu et al. (2018)", U"djmw", 20210803)
6742 NORMAL (U"L. Wu, C. Weng, X. Wang, K. Wang & X. Liu (2018): \"Test of covariance and correlation matrices\", "
6743 "arXiv: 1812.01172 [stat.ME]: 32 pp.")
6744 MAN_END
6745 }
6746
6747 /* End of file manual_dwtools.cpp */