Debian Codegraph @

fon/praat_Tiers.cpp

raw symbols SCIP
1 /* praat_Tiers.cpp
2 *
3 * Copyright (C) 1992-2018,2020-2026 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "H1minusH2Tier.h"
20 #include "Ltas.h"
21 #include "PitchTier_to_PointProcess.h"
22 #include "PitchTier_to_Sound.h"
23 #include "Matrix_and_PointProcess.h"
24 #include "PointProcess_and_Sound.h"
25 #include "Sound_PointProcess.h"
26 #include "SpectrumTier.h"
27 #include "TextGrid.h"
28 #include "VoiceAnalysis.h"
29
30 #include "praat_Tiers.h"
31
32 // MARK: - AMPLITUDETIER
33
34 // MARK: New
35
36 FORM (NEW1_AmplitudeTier_create, U"Create empty AmplitudeTier", nullptr) {
37 WORD (name, U"Name", U"empty")
38 REAL (startTime, U"Start time (s)", U"0.0")
39 REAL (endTime, U"End time (s)", U"1.0")
40 OK
41 DO
42 Melder_require (endTime > startTime,
43 U"The end time should be greater than the start time.");
44 CREATE_ONE
45 autoAmplitudeTier result = AmplitudeTier_create (startTime, endTime);
46 CREATE_ONE_END (name)
47 }
48
49 // MARK: Help
50
51 DIRECT (HELP_AmplitudeTier_help) {
52 HELP (U"AmplitudeTier")
53 }
54
55 // MARK: View & Edit
56
57 DIRECT (EDITOR_ONE_WITH_ONE_AmplitudeTier_viewAndEdit) {
58 EDITOR_ONE_WITH_ONE (an,AmplitudeTier, Sound) // Sound may be null
59 autoAmplitudeTierEditor editor = AmplitudeTierEditor_create (ID_AND_FULL_NAME, me, you);
60 EDITOR_ONE_WITH_ONE_END
61 }
62
63 DIRECT (HINT_AmplitudeTier_Sound_viewAndEdit) {
64 INFO_NONE
65 Melder_information (U"To include a copy of a Sound in your AmplitudeTier window:\n"
66 " select an AmplitudeTier and a Sound, and click \"View & Edit\".");
67 INFO_NONE_END
68 }
69
70 // MARK: Query
71
72 FORM (REAL_AmplitudeTier_getShimmer_local, U"AmplitudeTier: Get shimmer (local)", U"AmplitudeTier: Get shimmer (local)...") {
73 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
74 REAL (longestPeriod, U"Longest period (s)", U"0.02")
75 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
76 OK
77 DO
78 QUERY_ONE_FOR_REAL (AmplitudeTier)
79 const double result = AmplitudeTier_getShimmer_local_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
80 QUERY_ONE_FOR_REAL_END (U" (local shimmer)")
81 }
82
83 FORM (REAL_AmplitudeTier_getShimmer_local_dB, U"AmplitudeTier: Get shimmer (local, dB)", U"AmplitudeTier: Get shimmer (local, dB)...") {
84 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
85 REAL (longestPeriod, U"Longest period (s)", U"0.02")
86 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
87 OK
88 DO
89 QUERY_ONE_FOR_REAL (AmplitudeTier)
90 const double result = AmplitudeTier_getShimmer_local_dB_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
91 QUERY_ONE_FOR_REAL_END (U" dB (local shimmer)")
92 }
93
94 FORM (REAL_AmplitudeTier_getShimmer_apq3, U"AmplitudeTier: Get shimmer (apq3)", U"AmplitudeTier: Get shimmer (apq3)...") {
95 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
96 REAL (longestPeriod, U"Longest period (s)", U"0.02")
97 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
98 OK
99 DO
100 QUERY_ONE_FOR_REAL (AmplitudeTier)
101 const double result = AmplitudeTier_getShimmer_apq3_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
102 QUERY_ONE_FOR_REAL_END (U" (apq3 shimmer)")
103 }
104
105 FORM (REAL_AmplitudeTier_getShimmer_apq5, U"AmplitudeTier: Get shimmer (apq5)", U"AmplitudeTier: Get shimmer (apq5)...") {
106 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
107 REAL (longestPeriod, U"Longest period (s)", U"0.02")
108 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
109 OK
110 DO
111 QUERY_ONE_FOR_REAL (AmplitudeTier)
112 const double result = AmplitudeTier_getShimmer_apq5_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
113 QUERY_ONE_FOR_REAL_END (U" (apq5 shimmer)")
114 }
115
116 FORM (REAL_AmplitudeTier_getShimmer_apq11, U"AmplitudeTier: Get shimmer (apq11)", U"AmplitudeTier: Get shimmer (apq11)...") {
117 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
118 REAL (longestPeriod, U"Longest period (s)", U"0.02")
119 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
120 OK
121 DO
122 QUERY_ONE_FOR_REAL (AmplitudeTier)
123 const double result = AmplitudeTier_getShimmer_apq11_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
124 QUERY_ONE_FOR_REAL_END (U" (apq11 shimmer)")
125 }
126
127 FORM (REAL_AmplitudeTier_getShimmer_dda, U"AmplitudeTier: Get shimmer (dda)", U"AmplitudeTier: Get shimmer (dda)...") {
128 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
129 REAL (longestPeriod, U"Longest period (s)", U"0.02")
130 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
131 OK
132 DO
133 QUERY_ONE_FOR_REAL (AmplitudeTier)
134 const double result = AmplitudeTier_getShimmer_dda_u (me, shortestPeriod, longestPeriod, maximumAmplitudeFactor);
135 QUERY_ONE_FOR_REAL_END (U" (dda shimmer)")
136 }
137
138 /*
139 FORM (REAL_AmplitudeTier_getValueAtTime, U"Get AmplitudeTier value", U"AmplitudeTier: Get value at time...") {
140 REAL (time, U"Time (s)", U"0.5")
141 OK
142 DO
143 QUERY_ONE_FOR_REAL (AmplitudeTier)
144 const double result = RealTier_getValueAtTime (me, time);
145 QUERY_ONE_FOR_REAL_END (U" Pa")
146 }
147
148 FORM (REAL_AmplitudeTier_getValueAtIndex, U"Get AmplitudeTier value", U"AmplitudeTier: Get value at index...") {
149 INTEGER (pointNumber, U"Point number", U"10")
150 OK
151 DO
152 QUERY_ONE_FOR_REAL (AmplitudeTier)
153 const double result = RealTier_getValueAtIndex (me, pointNumber);
154 QUERY_ONE_FOR_REAL_END (U" Pa")
155 }
156 */
157
158 // MARK: Modify
159
160 FORM (MODIFY_AmplitudeTier_addPoint, U"Add one point", U"AmplitudeTier: Add point...") {
161 REAL (time, U"Time (s)", U"0.5")
162 REAL (soundPressure, U"Sound pressure (Pa)", U"0.8")
163 OK
164 DO
165 MODIFY_EACH (AmplitudeTier)
166 RealTier_addPoint (me, time, soundPressure);
167 MODIFY_EACH_END
168 }
169
170 FORM (MODIFY_AmplitudeTier_formula, U"AmplitudeTier: Formula", U"AmplitudeTier: Formula...") {
171 COMMENT (U"# ncol = the number of points")
172 COMMENT (U"for col from 1 to ncol")
173 COMMENT (U" # x = the time of the colth point, in seconds")
174 COMMENT (U" # self = the value of the colth point, in Pascal")
175 COMMENT (U" self = `formula'")
176 COMMENT (U"endfor")
177 FORMULA (formula, U"Formula", U"- self ; upside down")
178 OK
179 DO
180 MODIFY_EACH_WEAK (AmplitudeTier)
181 RealTier_formula (me, formula, interpreter, nullptr);
182 MODIFY_EACH_WEAK_END
183 }
184
185 // MARK: Synthesize
186
187 FORM (NEW_AmplitudeTier_to_Sound, U"AmplitudeTier: To Sound (pulse train)", U"AmplitudeTier: To Sound (pulse train)...") {
188 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100.0")
189 NATURAL (interpolationDepth, U"Interpolation depth (samples)", U"2000")
190 OK
191 DO
192 CONVERT_EACH_TO_ONE (AmplitudeTier)
193 autoSound result = AmplitudeTier_to_Sound (me, samplingFrequency, interpolationDepth);
194 CONVERT_EACH_TO_ONE_END (my name.get())
195 }
196
197 // MARK: Convert
198
199 DIRECT (NEW_AmplitudeTier_downto_PointProcess) {
200 CONVERT_EACH_TO_ONE (AmplitudeTier)
201 autoPointProcess result = AnyTier_downto_PointProcess (me->asAnyTier());
202 CONVERT_EACH_TO_ONE_END (my name.get())
203 }
204
205 DIRECT (NEW_AmplitudeTier_downto_RealTier) {
206 CONVERT_EACH_TO_ONE (AmplitudeTier)
207 autoRealTier result = AnyRealTier_downto_RealTier (me);
208 CONVERT_EACH_TO_ONE_END (my name.get())
209 }
210
211 DIRECT (NEW_AmplitudeTier_downto_TableOfReal) {
212 CONVERT_EACH_TO_ONE (AmplitudeTier)
213 autoTableOfReal result = AmplitudeTier_downto_TableOfReal (me);
214 CONVERT_EACH_TO_ONE_END (my name.get())
215 }
216
217 FORM (NEW_AmplitudeTier_to_IntensityTier, U"AmplitudeTier: To IntensityTier", U"AmplitudeTier: To IntensityTier...") {
218 REAL (threshold, U"Threshold (dB)", U"-10000.0")
219 OK
220 DO
221 CONVERT_EACH_TO_ONE (AmplitudeTier)
222 autoIntensityTier result = AmplitudeTier_to_IntensityTier (me, threshold);
223 CONVERT_EACH_TO_ONE_END (my name.get())
224 }
225
226 // MARK: - AMPLITUDETIER & SOUND
227
228 DIRECT (NEW1_Sound_AmplitudeTier_multiply) {
229 CONVERT_ONE_AND_ONE_TO_ONE (Sound, AmplitudeTier)
230 autoSound result = Sound_AmplitudeTier_multiply (me, you);
231 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_amp")
232 }
233
234 // MARK: - DURATIONTIER
235
236 // MARK: New
237
238 FORM (NEW1_DurationTier_create, U"Create empty DurationTier", U"Create DurationTier...") {
239 WORD (name, U"Name", U"empty")
240 REAL (startTime, U"Start time (s)", U"0.0")
241 REAL (endTime, U"End time (s)", U"1.0")
242 OK
243 DO
244 Melder_require (endTime > startTime,
245 U"Your end time should be greater than your start time.");
246 CREATE_ONE
247 autoDurationTier result = DurationTier_create (startTime, endTime);
248 CREATE_ONE_END (name)
249 }
250
251 // MARK: Help
252
253 DIRECT (HELP_DurationTier_help) {
254 HELP (U"DurationTier")
255 }
256
257 // MARK: View & Edit
258
259 DIRECT (EDITOR_ONE_WITH_ONE_DurationTier_edit) {
260 EDITOR_ONE_WITH_ONE (a,DurationTier, Sound) // Sound may be null
261 autoDurationTierEditor editor = DurationTierEditor_create (ID_AND_FULL_NAME, me, you);
262 EDITOR_ONE_WITH_ONE_END
263 }
264
265 DIRECT (HINT_DurationTier_Sound_edit) {
266 INFO_NONE
267 Melder_information (U"To include a copy of a Sound in your DurationTier window:\n"
268 " select a DurationTier and a Sound, and click \"View & Edit\".");
269 INFO_NONE_END
270 }
271
272 DIRECT (HINT_DurationTier_Manipulation_replace) {
273 INFO_NONE
274 Melder_information (U"To replace the DurationTier in a Manipulation object,\n"
275 "select a DurationTier object and a Manipulation object\nand choose \"Replace duration\".");
276 INFO_NONE_END
277 }
278
279 // MARK: Query
280
281 FORM (REAL_DurationTier_getTargetDuration, U"Get target duration", nullptr) {
282 REAL (fromSourceTime, U"left Source time range (s)", U"0.0")
283 REAL (toSourceTime, U"right Source time range (s)", U"1.0")
284 OK
285 DO
286 QUERY_ONE_FOR_REAL (DurationTier)
287 double result = RealTier_getArea (me, fromSourceTime, toSourceTime);
288 QUERY_ONE_FOR_REAL_END (U" seconds")
289 }
290
291 FORM (REAL_DurationTier_getValueAtTime, U"Get DurationTier value", U"DurationTier: Get value at time...") {
292 REAL (sourceTime, U"Source time (s)", U"0.5")
293 OK
294 DO
295 QUERY_ONE_FOR_REAL (DurationTier)
296 double result = RealTier_getValueAtTime (me, sourceTime);
297 QUERY_ONE_FOR_REAL_END (U" (relative duration)")
298 }
299
300 FORM (REAL_DurationTier_getValueAtIndex, U"Get DurationTier value", U"Duration: Get value at index...") {
301 INTEGER (pointNumber, U"Point number", U"10")
302 OK
303 DO
304 QUERY_ONE_FOR_REAL (DurationTier)
305 double result = RealTier_getValueAtIndex (me, pointNumber);
306 QUERY_ONE_FOR_REAL_END (U" (relative duration)")
307 }
308
309 // MARK: Modify
310
311 FORM (MODIFY_DurationTier_addPoint, U"Add one point to DurationTier", U"DurationTier: Add point...") {
312 REAL (time, U"Time (s)", U"0.5")
313 REAL (relativeDuration, U"Relative duration", U"1.5")
314 OK
315 DO
316 MODIFY_EACH (DurationTier)
317 RealTier_addPoint (me, time, relativeDuration);
318 MODIFY_EACH_END
319 }
320
321 FORM (MODIFY_DurationTier_formula, U"DurationTier: Formula", U"DurationTier: Formula...") {
322 COMMENT (U"# ncol = the number of points")
323 COMMENT (U"for col from 1 to ncol")
324 COMMENT (U" # x = the time of the colth point, in seconds")
325 COMMENT (U" # self = the value of the colth point, in relative units")
326 COMMENT (U" self = `formula'")
327 COMMENT (U"endfor")
328 FORMULA (formula, U"Formula", U"self * 1.5 ; slow down")
329 OK
330 DO
331 MODIFY_EACH_WEAK (DurationTier)
332 RealTier_formula (me, formula, interpreter, nullptr);
333 MODIFY_EACH_WEAK_END
334 }
335
336 // MARK: Convert
337
338 DIRECT (NEW_DurationTier_downto_PointProcess) {
339 CONVERT_EACH_TO_ONE (DurationTier)
340 autoPointProcess result = AnyTier_downto_PointProcess (me->asAnyTier());
341 CONVERT_EACH_TO_ONE_END (my name.get())
342 }
343
344 DIRECT (NEW_DurationTier_downto_RealTier) {
345 CONVERT_EACH_TO_ONE (DurationTier)
346 autoRealTier result = AnyRealTier_downto_RealTier (me);
347 CONVERT_EACH_TO_ONE_END (my name.get())
348 }
349
350 // MARK: - FORMANTGRID
351
352 // MARK: New
353
354 FORM (NEW1_FormantGrid_create, U"Create FormantGrid", nullptr) {
355 WORD (name, U"Name", U"schwa")
356 REAL (startTime, U"Start time (s)", U"0.0")
357 REAL (endTime, U"End time (s)", U"1.0")
358 NATURAL (numberOfFormants, U"Number of formants", U"10")
359 POSITIVE (initialFirstFormant, U"Initial first formant (Hz)", U"550.0")
360 POSITIVE (initialFormatSpacing, U"Initial formant spacing (Hz)", U"1100.0")
361 REAL (initialFirstBandwidth, U"Initial first bandwidth (Hz)", U"60.0")
362 REAL (initialBandwidthSpacing, U"Initial bandwidth spacing (Hz)", U"50.0")
363 OK
364 DO
365 Melder_require (endTime > startTime,
366 U"Your end time should be greater than your start time.");
367 CREATE_ONE
368 autoFormantGrid result = FormantGrid_create (startTime, endTime, numberOfFormants,
369 initialFirstFormant, initialFormatSpacing, initialFirstBandwidth, initialBandwidthSpacing);
370 CREATE_ONE_END (name)
371 }
372
373 // MARK: Help
374
375 DIRECT (HELP_FormantGrid_help) {
376 HELP (U"FormantGrid")
377 }
378
379 // MARK: View & Edit
380
381 static void cb_FormantGridEditor_publish (Editor /* me */, autoDaata publish) {
382 /*
383 Keep the gate for error handling.
384 */
385 try {
386 praat_new (publish.move(), U"fromFormantGridEditor");
387 praat_updateSelection ();
388 } catch (MelderError) {
389 Melder_flushError ();
390 }
391 }
392 DIRECT (EDITOR_ONE_FormantGrid_edit) {
393 EDITOR_ONE (a,FormantGrid)
394 autoFormantGridEditor editor = FormantGridEditor_create (ID_AND_FULL_NAME, me);
395 Editor_setPublicationCallback (editor.get(), cb_FormantGridEditor_publish);
396 EDITOR_ONE_END
397 }
398
399 // MARK: Modify
400
401 FORM (MODIFY_FormantGrid_formula_frequencies, U"FormantGrid: Formula (frequencies)", U"Formant: Formula (frequencies)...") {
402 COMMENT (U"row is formant number, col is point number:")
403 COMMENT (U" for row from 1 to nrow do for col from 1 to ncol do F (row, col) :=")
404 FORMULA (formula, U"Formula", U"if row = 2 then self + 200 else self fi")
405 OK
406 DO
407 MODIFY_EACH_WEAK (FormantGrid)
408 FormantGrid_formula_frequencies (me, formula, interpreter, nullptr);
409 MODIFY_EACH_WEAK_END
410 }
411
412 FORM (MODIFY_FormantGrid_formula_bandwidths, U"FormantGrid: Formula (bandwidths)", U"Formant: Formula (bandwidths)...") {
413 COMMENT (U"row is formant number, col is point number:")
414 COMMENT (U" for row from 1 to nrow do for col from 1 to ncol do B (row, col) :=")
415 COMMENT (U"self [] is the FormantGrid itself, so it returns frequencies, not bandwidths!")
416 FORMULA (formula, U"Formula", U"self / 10 ; one tenth of the formant frequency")
417 OK
418 DO
419 MODIFY_EACH_WEAK (FormantGrid)
420 FormantGrid_formula_bandwidths (me, formula, interpreter, nullptr);
421 MODIFY_EACH_WEAK_END
422 }
423
424 FORM (MODIFY_FormantGrid_addFormantPoint, U"FormantGrid: Add formant point", U"FormantGrid: Add formant point...") {
425 NATURAL (formantNumber, U"Formant number", U"1")
426 REAL (time, U"Time (s)", U"0.5")
427 POSITIVE (frequency, U"Frequency (Hz)", U"550.0")
428 OK
429 DO
430 MODIFY_EACH (FormantGrid)
431 FormantGrid_addFormantPoint (me, formantNumber, time, frequency);
432 MODIFY_EACH_END
433 }
434
435 FORM (MODIFY_FormantGrid_addBandwidthPoint, U"FormantGrid: Add bandwidth point", U"FormantGrid: Add bandwidth point...") {
436 NATURAL (formantNumber, U"Formant number", U"1")
437 REAL (time, U"Time (s)", U"0.5")
438 POSITIVE (bandwidth, U"Bandwidth (Hz)", U"100.0")
439 OK
440 DO
441 MODIFY_EACH (FormantGrid)
442 FormantGrid_addBandwidthPoint (me, formantNumber, time, bandwidth);
443 MODIFY_EACH_END
444 }
445
446 FORM (MODIFY_FormantGrid_removeBandwidthPointsBetween, U"Remove bandwidth points between", U"FormantGrid: Remove bandwidth points between...") {
447 NATURAL (formantNumber, U"Formant number", U"1")
448 REAL (fromTime, U"From time (s)", U"0.3")
449 REAL (toTime, U"To time (s)", U"0.7")
450 OK
451 DO
452 MODIFY_EACH (FormantGrid)
453 FormantGrid_removeBandwidthPointsBetween (me, formantNumber, fromTime, toTime);
454 MODIFY_EACH_END
455 }
456
457 FORM (MODIFY_FormantGrid_removeFormantPointsBetween, U"Remove formant points between", U"FormantGrid: Remove formant points between...") {
458 NATURAL (formantNumber, U"Formant number", U"1")
459 REAL (fromTime, U"From time (s)", U"0.3")
460 REAL (toTime, U"To time (s)", U"0.7")
461 OK
462 DO
463 MODIFY_EACH (FormantGrid)
464 FormantGrid_removeFormantPointsBetween (me, formantNumber, fromTime, toTime);
465 MODIFY_EACH_END
466 }
467
468 // MARK: Convert
469
470 FORM (NEW_FormantGrid_to_Formant, U"FormantGrid: To Formant", nullptr) {
471 POSITIVE (timeStep, U"Time step (s)", U"0.01")
472 REAL (intensity, U"Intensity (Pa\u00B2)", U"0.1")
473 OK
474 DO
475 Melder_require (intensity >= 0.0,
476 U"The intensity cannot be negative.");
477 CONVERT_EACH_TO_ONE (FormantGrid)
478 autoFormant result = FormantGrid_to_Formant (me, timeStep, intensity);
479 CONVERT_EACH_TO_ONE_END (my name.get())
480 }
481
482 // MARK: - FORMANTGRID & SOUND
483
484 DIRECT (NEW1_Sound_FormantGrid_filter) {
485 CONVERT_ONE_AND_ONE_TO_ONE (Sound, FormantGrid)
486 autoSound result = Sound_FormantGrid_filter (me, you);
487 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_filt")
488 }
489
490 DIRECT (NEW1_Sound_FormantGrid_filter_noscale) {
491 CONVERT_ONE_AND_ONE_TO_ONE (Sound, FormantGrid)
492 autoSound result = Sound_FormantGrid_filter_noscale (me, you);
493 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_filt")
494 }
495
496 // MARK: - FORMANTTIER
497
498 // MARK: New
499
500 FORM (NEW1_FormantTier_create, U"Create empty FormantTier", nullptr) {
501 WORD (name, U"Name", U"empty")
502 REAL (startTime, U"Start time (s)", U"0.0")
503 REAL (endTime, U"End time (s)", U"1.0")
504 OK
505 DO
506 Melder_require (endTime > startTime,
507 U"Your end time should be greater than your start time.");
508 CREATE_ONE
509 autoFormantTier result = FormantTier_create (startTime, endTime);
510 CREATE_ONE_END (name)
511 }
512
513 // MARK: Draw
514
515 FORM (GRAPHICS_FormantTier_speckle, U"Draw FormantTier", nullptr) {
516 praat_TimeFunction_RANGE (fromTime, toTime)
517 POSITIVE (maximumFrequency, U"Maximum frequency (Hz)", U"5500.0")
518 BOOLEAN (garnish, U"Garnish", true)
519 OK
520 DO
521 GRAPHICS_EACH (FormantTier)
522 FormantTier_speckle (me, GRAPHICS, fromTime, toTime, maximumFrequency, garnish);
523 GRAPHICS_EACH_END
524 }
525
526 // MARK: Query
527
528 FORM (REAL_FormantTier_getValueAtTime, U"FormantTier: Get value", U"FormantTier: Get value at time...") {
529 NATURAL (formantNumber, U"Formant number", U"1")
530 REAL (time, U"Time (s)", U"0.5")
531 OK
532 DO
533 QUERY_ONE_FOR_REAL (FormantTier)
534 double result = FormantTier_getValueAtTime (me, formantNumber, time);
535 QUERY_ONE_FOR_REAL_END (U" Hz")
536 }
537
538 FORM (REAL_FormantTier_getBandwidthAtTime, U"FormantTier: Get bandwidth", U"FormantTier: Get bandwidth at time...") {
539 NATURAL (formantNumber, U"Formant number", U"1")
540 REAL (time, U"Time (s)", U"0.5")
541 OK
542 DO
543 QUERY_ONE_FOR_REAL (FormantTier)
544 double result = FormantTier_getBandwidthAtTime (me, formantNumber, time);
545 QUERY_ONE_FOR_REAL_END (U" Hz")
546 }
547
548 // MARK: Modify
549
550 FORM (MODIFY_FormantTier_addPoint, U"Add one point", U"FormantTier: Add point...") {
551 REAL (time, U"Time (s)", U"0.5")
552 TEXTFIELD (formantBandwidthPairs, U"Frequencies and bandwidths (Hz)", U"500 50 1500 100 2500 150 3500 200 4500 300", 5)
553 OK
554 DO
555 autoFormantPoint point = FormantPoint_create (time, 10);
556 double *f = & point -> formant [0], *b = & point -> bandwidth [0];
557 conststring8 fbpairs = Melder_peek32to8 (formantBandwidthPairs);
558 int numberOfFormants = sscanf (fbpairs, "%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf",
559 f+1, b+1, f+2, b+2, f+3, b+3, f+4, b+4, f+5, b+5, f+6, b+6, f+7, b+7, f+8, b+8, f+9, b+9, f+10, b+10) / 2;
560 Melder_require (numberOfFormants >= 1,
561 U"The number of formant-bandwidth pairs must be at least 1.");
562 point -> numberOfFormants = numberOfFormants;
563 MODIFY_EACH (FormantTier)
564 autoFormantPoint point2 = Data_copy (point.get());
565 AnyTier_addPoint_move (me->asAnyTier(), point2.move());
566 MODIFY_EACH_END
567 }
568
569 // MARK: Convert
570
571 FORM (NEW_FormantTier_downto_TableOfReal, U"Down to TableOfReal", nullptr) {
572 BOOLEAN (includeFormants, U"Include formants", true)
573 BOOLEAN (includeBandwidths, U"Include bandwidths", false)
574 OK
575 DO
576 CONVERT_EACH_TO_ONE (FormantTier)
577 autoTableOfReal result = FormantTier_downto_TableOfReal (me, includeFormants, includeBandwidths);
578 CONVERT_EACH_TO_ONE_END (my name.get())
579 }
580
581 // MARK: - FORMANTTIER & SOUND
582
583 DIRECT (NEW1_Sound_FormantTier_filter) {
584 CONVERT_ONE_AND_ONE_TO_ONE (Sound, FormantTier)
585 autoSound result = Sound_FormantTier_filter (me, you);
586 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_filt")
587 }
588
589 DIRECT (NEW1_Sound_FormantTier_filter_noscale) {
590 CONVERT_ONE_AND_ONE_TO_ONE (Sound, FormantTier)
591 autoSound result = Sound_FormantTier_filter_noscale (me, you);
592 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_filt")
593 }
594
595 // MARK: - INTENSITYTIER
596
597 // MARK: New
598
599 FORM (NEW1_IntensityTier_create, U"Create empty IntensityTier", nullptr) {
600 WORD (name, U"Name", U"empty")
601 REAL (startTime, U"Start time (s)", U"0.0")
602 REAL (endTime, U"End time (s)", U"1.0")
603 OK
604 DO
605 Melder_require (endTime > startTime,
606 U"Your end time should be greater than your start time.");
607 CREATE_ONE
608 autoIntensityTier result = IntensityTier_create (startTime, endTime);
609 CREATE_ONE_END (name)
610 }
611
612 // MARK: Help
613
614 DIRECT (HELP_IntensityTier_help) {
615 HELP (U"IntensityTier")
616 }
617
618 // MARK: View & Edit
619
620 DIRECT (EDITOR_ONE_WITH_ONE_IntensityTier_viewAndEdit) {
621 EDITOR_ONE_WITH_ONE (an,IntensityTier, Sound) // Sound may be null
622 autoIntensityTierEditor editor = IntensityTierEditor_create (ID_AND_FULL_NAME, me, you);
623 EDITOR_ONE_WITH_ONE_END
624 }
625
626 DIRECT (HINT_IntensityTier_Sound_viewAndEdit) {
627 INFO_NONE
628 Melder_information (U"To include a copy of a Sound in your IntensityTier window:\n"
629 " select an IntensityTier and a Sound, and click \"View & Edit\".");
630 INFO_NONE_END
631 }
632
633 // MARK: Query
634
635 FORM (REAL_IntensityTier_getValueAtTime, U"Get IntensityTier value", U"IntensityTier: Get value at time...") {
636 REAL (time, U"Time (s)", U"0.5")
637 OK
638 DO
639 QUERY_ONE_FOR_REAL (IntensityTier)
640 const double result = RealTier_getValueAtTime (me, time);
641 QUERY_ONE_FOR_REAL_END (U" dB")
642 }
643
644 FORM (REAL_IntensityTier_getValueAtIndex, U"Get IntensityTier value", U"IntensityTier: Get value at index...") {
645 INTEGER (pointNumber, U"Point number", U"10")
646 OK
647 DO
648 QUERY_ONE_FOR_REAL (IntensityTier)
649 const double result = RealTier_getValueAtIndex (me, pointNumber);
650 QUERY_ONE_FOR_REAL_END (U" dB")
651 }
652
653 // MARK: Modify
654
655 FORM (MODIFY_IntensityTier_addPoint, U"Add one point", U"IntensityTier: Add point...") {
656 REAL (time, U"Time (s)", U"0.5")
657 REAL (intensity, U"Intensity (dB)", U"75")
658 OK
659 DO
660 MODIFY_EACH (IntensityTier)
661 RealTier_addPoint (me, time, intensity);
662 MODIFY_EACH_END
663 }
664
665 FORM (MODIFY_IntensityTier_formula, U"IntensityTier: Formula", U"IntensityTier: Formula...") {
666 COMMENT (U"# ncol = the number of points")
667 COMMENT (U"for col from 1 to ncol")
668 COMMENT (U" # x = the time of the colth point, in seconds")
669 COMMENT (U" # self = the value of the colth point, in dB")
670 COMMENT (U" self = `formula`")
671 COMMENT (U"endfor")
672 FORMULA (formula, U"Formula", U"self + 3.0")
673 OK
674 DO
675 MODIFY_EACH_WEAK (IntensityTier)
676 RealTier_formula (me, formula, interpreter, nullptr);
677 MODIFY_EACH_WEAK_END
678 }
679
680 // MARK: Convert
681
682 DIRECT (NEW_IntensityTier_downto_PointProcess) {
683 CONVERT_EACH_TO_ONE (IntensityTier)
684 autoPointProcess result = AnyTier_downto_PointProcess (me->asAnyTier());
685 CONVERT_EACH_TO_ONE_END (my name.get())
686 }
687
688 DIRECT (NEW_IntensityTier_downto_RealTier) {
689 CONVERT_EACH_TO_ONE (IntensityTier)
690 autoRealTier result = AnyRealTier_downto_RealTier (me);
691 CONVERT_EACH_TO_ONE_END (my name.get())
692 }
693
694 DIRECT (NEW_IntensityTier_downto_TableOfReal) {
695 CONVERT_EACH_TO_ONE (IntensityTier)
696 autoTableOfReal result = IntensityTier_downto_TableOfReal (me);
697 CONVERT_EACH_TO_ONE_END (my name.get())
698 }
699
700 DIRECT (NEW_IntensityTier_to_AmplitudeTier) {
701 CONVERT_EACH_TO_ONE (IntensityTier)
702 autoAmplitudeTier result = IntensityTier_to_AmplitudeTier (me);
703 CONVERT_EACH_TO_ONE_END (my name.get())
704 }
705
706 // MARK: - INTENSITYTIER & POINTPROCESS
707
708 DIRECT (NEW1_IntensityTier_PointProcess_to_IntensityTier) {
709 CONVERT_ONE_AND_ONE_TO_ONE (IntensityTier, PointProcess)
710 autoIntensityTier result = IntensityTier_PointProcess_to_IntensityTier (me, you);
711 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get())
712 }
713
714 // MARK: - INTENSITYTIER & SOUND
715
716 DIRECT (NEW1_Sound_IntensityTier_multiply_old) {
717 CONVERT_ONE_AND_ONE_TO_ONE (Sound, IntensityTier)
718 autoSound result = Sound_IntensityTier_multiply (me, you, true);
719 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_int")
720 }
721
722 FORM (NEW1_Sound_IntensityTier_multiply, U"Sound & IntervalTier: Multiply", nullptr) {
723 BOOLEAN (scaleTo09, U"Scale to 0.9", true)
724 OK
725 DO
726 CONVERT_ONE_AND_ONE_TO_ONE (Sound, IntensityTier)
727 autoSound result = Sound_IntensityTier_multiply (me, you, scaleTo09);
728 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_int")
729 }
730
731 // MARK: - PITCHTIER
732
733 FORM (MODIFY_PitchTier_addPoint, U"PitchTier: Add point", U"PitchTier: Add point...") {
734 REAL (time, U"Time (s)", U"0.5")
735 REAL (pitch, U"Pitch (Hz)", U"200.0")
736 OK
737 DO
738 MODIFY_EACH (PitchTier)
739 RealTier_addPoint (me, time, pitch);
740 MODIFY_EACH_END
741 }
742
743 FORM (NEW1_PitchTier_create, U"Create empty PitchTier", nullptr) {
744 WORD (name, U"Name", U"empty")
745 REAL (startTime, U"Start time (s)", U"0.0")
746 REAL (endTime, U"End time (s)", U"1.0")
747 OK
748 DO
749 Melder_require (endTime > startTime,
750 U"Your end time should be greater than your start time.");
751 CREATE_ONE
752 autoPitchTier result = PitchTier_create (startTime, endTime);
753 CREATE_ONE_END (name)
754 }
755
756 DIRECT (NEW_PitchTier_downto_PointProcess) {
757 CONVERT_EACH_TO_ONE (PitchTier)
758 autoPointProcess result = AnyTier_downto_PointProcess (me->asAnyTier());
759 CONVERT_EACH_TO_ONE_END (my name.get())
760 }
761
762 DIRECT (NEW_PitchTier_downto_RealTier) {
763 CONVERT_EACH_TO_ONE (RealTier)
764 autoRealTier result = AnyRealTier_downto_RealTier (me);
765 CONVERT_EACH_TO_ONE_END (my name.get())
766 }
767
768 FORM (NEW_PitchTier_downto_TableOfReal, U"PitchTier: Down to TableOfReal", nullptr) {
769 CHOICEx (unit, U"Unit", 1, 0)
770 OPTION (U"Hertz")
771 OPTION (U"semitones")
772 OK
773 DO
774 CONVERT_EACH_TO_ONE (PitchTier)
775 autoTableOfReal result = PitchTier_downto_TableOfReal (me, unit);
776 CONVERT_EACH_TO_ONE_END (my name.get())
777 }
778
779 FORM (GRAPHICS_old_PitchTier_draw, U"PitchTier: Draw", nullptr) {
780 praat_TimeFunction_RANGE (fromTime, toTime)
781 REAL (fromFrequency, U"left Frequency range (Hz)", U"0.0")
782 POSITIVE (toFrequency, U"right Frequency range (Hz)", U"500.0")
783 BOOLEAN (garnish, U"Garnish", true)
784 OK
785 DO
786 Melder_require (toFrequency > fromFrequency,
787 U"Your maximum frequency should be greater than your minimum frequency.");
788 GRAPHICS_EACH (PitchTier)
789 PitchTier_draw (me, GRAPHICS, fromTime, toTime, fromFrequency, toFrequency,
790 garnish, U"lines and speckles");
791 GRAPHICS_EACH_END
792 }
793
794 FORM (GRAPHICS_PitchTier_draw, U"PitchTier: Draw", nullptr) {
795 praat_TimeFunction_RANGE (fromTime, toTime)
796 REAL (fromFrequency, U"left Frequency range (Hz)", U"0.0")
797 POSITIVE (toFrequency, U"right Frequency range (Hz)", U"500.0")
798 BOOLEAN (garnish, U"Garnish", true)
799 COMMENT (U"")
800 OPTIONMENUSTR (drawingMethod, U"Drawing method", 1)
801 OPTION (U"lines")
802 OPTION (U"speckles")
803 OPTION (U"lines and speckles")
804 OK
805 DO_ALTERNATIVE (GRAPHICS_old_PitchTier_draw)
806 Melder_require (toFrequency > fromFrequency,
807 U"Your maximum frequency should be greater than your minimum frequency.");
808 GRAPHICS_EACH (PitchTier)
809 PitchTier_draw (me, GRAPHICS, fromTime, toTime, fromFrequency, toFrequency, garnish, drawingMethod);
810 GRAPHICS_EACH_END
811 }
812
813 DIRECT (EDITOR_ONE_WITH_ONE_PitchTier_viewAndEdit) {
814 EDITOR_ONE_WITH_ONE (a,PitchTier, Sound) // Sound may be null
815 autoPitchTierEditor editor = PitchTierEditor_create (ID_AND_FULL_NAME, me, you);
816 EDITOR_ONE_WITH_ONE_END
817 }
818
819 FORM (MODIFY_PitchTier_formula, U"PitchTier: Formula", U"PitchTier: Formula...") {
820 COMMENT (U"# ncol = the number of points")
821 COMMENT (U"for col from 1 to ncol")
822 COMMENT (U" # x = the time of the colth point, in seconds")
823 COMMENT (U" # self = the value of the colth point, in hertz")
824 COMMENT (U" self = `formula`")
825 COMMENT (U"endfor")
826 FORMULA (formula, U"Formula", U"self * 2 ; one octave up")
827 OK
828 DO
829 MODIFY_EACH_WEAK (PitchTier)
830 RealTier_formula (me, formula, interpreter, nullptr);
831 MODIFY_EACH_WEAK_END
832 }
833
834 FORM (REAL_PitchTier_getMean_curve, U"PitchTier: Get mean (curve)", U"PitchTier: Get mean (curve)...") {
835 praat_TimeFunction_RANGE (fromTime, toTime)
836 OK
837 DO
838 QUERY_ONE_FOR_REAL (PitchTier)
839 double result = RealTier_getMean_curve_u (me, fromTime, toTime);
840 QUERY_ONE_FOR_REAL_END (U" Hz")
841 }
842
843 FORM (REAL_PitchTier_getMean_points, U"PitchTier: Get mean (points)", U"PitchTier: Get mean (points)...") {
844 praat_TimeFunction_RANGE (fromTime, toTime)
845 OK
846 DO
847 QUERY_ONE_FOR_REAL (PitchTier)
848 double result = RealTier_getMean_points_u (me, fromTime, toTime);
849 QUERY_ONE_FOR_REAL_END (U" Hz")
850 }
851
852 FORM (REAL_PitchTier_getStandardDeviation_curve, U"PitchTier: Get standard deviation (curve)", U"PitchTier: Get standard deviation (curve)...") {
853 praat_TimeFunction_RANGE (fromTime, toTime)
854 OK
855 DO
856 QUERY_ONE_FOR_REAL (PitchTier)
857 double result = RealTier_getStandardDeviation_curve_u (me, fromTime, toTime);
858 QUERY_ONE_FOR_REAL_END (U" Hz")
859 }
860
861 FORM (REAL_PitchTier_getStandardDeviation_points, U"PitchTier: Get standard deviation (points)", U"PitchTier: Get standard deviation (points)...") {
862 praat_TimeFunction_RANGE (fromTime, toTime)
863 OK
864 DO
865 QUERY_ONE_FOR_REAL (PitchTier)
866 double result = RealTier_getStandardDeviation_points_u (me, fromTime, toTime);
867 QUERY_ONE_FOR_REAL_END (U" Hz")
868 }
869
870 FORM (REAL_PitchTier_getValueAtTime, U"PitchTier: Get value at time", U"PitchTier: Get value at time...") {
871 REAL (time, U"Time (s)", U"0.5")
872 OK
873 DO
874 QUERY_ONE_FOR_REAL (PitchTier)
875 double result = RealTier_getValueAtTime (me, time);
876 QUERY_ONE_FOR_REAL_END (U" Hz")
877 }
878
879 FORM (REAL_PitchTier_getValueAtIndex, U"PitchTier: Get value at index", U"PitchTier: Get value at index...") {
880 INTEGER (pointNumber, U"Point number", U"10")
881 OK
882 DO
883 QUERY_ONE_FOR_REAL (PitchTier)
884 double result = RealTier_getValueAtIndex (me, pointNumber);
885 QUERY_ONE_FOR_REAL_END (U" Hz")
886 }
887
888 DIRECT (HELP_PitchTier_help) {
889 HELP (U"PitchTier")
890 }
891
892 DIRECT (PLAY_PitchTier_hum) {
893 PLAY_EACH (PitchTier)
894 PitchTier_hum (me, nullptr, nullptr);
895 PLAY_EACH_END
896 }
897
898 FORM (MODIFY_PitchTier_interpolateQuadratically, U"PitchTier: Interpolate quadratically", nullptr) {
899 NATURAL (numberOfPointsPerParabola, U"Number of points per parabola", U"4")
900 CHOICEx (unit, U"Unit", 2, 0)
901 OPTION (U"Hz")
902 OPTION (U"semitones")
903 OK
904 DO
905 MODIFY_EACH (PitchTier)
906 RealTier_interpolateQuadratically (me, numberOfPointsPerParabola, unit);
907 MODIFY_EACH_END
908 }
909
910 DIRECT (PLAY_PitchTier_play) {
911 PLAY_EACH (PitchTier)
912 PitchTier_play (me, nullptr, nullptr);
913 PLAY_EACH_END
914 }
915
916 DIRECT (PLAY_PitchTier_playSine) {
917 PLAY_EACH (PitchTier)
918 PitchTier_playPart_sine (me, 0.0, 0.0, nullptr, nullptr);
919 PLAY_EACH_END
920 }
921
922 FORM (MODIFY_PitchTier_shiftFrequencies, U"PitchTier: Shift frequencies", nullptr) {
923 REAL (fromTime, U"left Time range (s)", U"0.0")
924 REAL (toTime, U"right Time range (s)", U"1000.0")
925 REAL (frequencyShift, U"Frequency shift", U"-20.0")
926 OPTIONMENU (unit_i, U"Unit", 1)
927 OPTION (U"Hertz")
928 OPTION (U"mel")
929 OPTION (U"logHertz")
930 OPTION (U"semitones")
931 OPTION (U"ERB")
932 OK
933 DO
934 kPitch_unit unit =
935 unit_i == 1 ? kPitch_unit::HERTZ :
936 unit_i == 2 ? kPitch_unit::MEL :
937 unit_i == 3 ? kPitch_unit::LOG_HERTZ :
938 unit_i == 4 ? kPitch_unit::SEMITONES_1 :
939 kPitch_unit::ERB;
940 MODIFY_EACH_WEAK (PitchTier)
941 PitchTier_shiftFrequencies (me, fromTime, toTime, frequencyShift, unit);
942 MODIFY_EACH_WEAK_END
943 }
944
945 FORM (MODIFY_PitchTier_multiplyFrequencies, U"PitchTier: Multiply frequencies", nullptr){
946 REAL (fromTime, U"left Time range (s)", U"0.0")
947 REAL (toTime, U"right Time range (s)", U"1000.0")
948 POSITIVE (factor, U"Factor", U"1.2")
949 OK
950 DO
951 MODIFY_EACH (PitchTier)
952 PitchTier_multiplyFrequencies (me, fromTime, toTime, factor);
953 MODIFY_EACH_END
954 }
955
956 FORM (MODIFY_PitchTier_stylize, U"PitchTier: Stylize", U"PitchTier: Stylize...") {
957 REAL (frequencyResolution, U"Frequency resolution", U"4.0")
958 CHOICEx (unit, U"Unit", 2, 0)
959 OPTION (U"Hz")
960 OPTION (U"semitones")
961 OK
962 DO
963 MODIFY_EACH (PitchTier)
964 PitchTier_stylize (me, frequencyResolution, unit);
965 MODIFY_EACH_END
966 }
967
968 DIRECT (NEW_PitchTier_to_PointProcess) {
969 CONVERT_EACH_TO_ONE (PitchTier)
970 autoPointProcess result = PitchTier_to_PointProcess (me);
971 CONVERT_EACH_TO_ONE_END (my name.get())
972 }
973
974 FORM (NEW_PitchTier_to_Sound_phonation, U"PitchTier: To Sound (phonation)", nullptr) {
975 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100")
976 POSITIVE (adaptationFactor, U"Adaptation factor", U"1.0")
977 POSITIVE (maximumPeriod, U"Maximum period (s)", U"0.05")
978 POSITIVE (openPhase, U"Open phase", U"0.7")
979 REAL (collisionPhase, U"Collision phase", U"0.03")
980 POSITIVE (power1, U"Power 1", U"3.0")
981 POSITIVE (power2, U"Power 2", U"4.0")
982 BOOLEAN (hum, U"Hum", false)
983 OK
984 DO
985 CONVERT_EACH_TO_ONE (PitchTier)
986 autoSound result = PitchTier_to_Sound_phonation (me, samplingFrequency,
987 adaptationFactor, maximumPeriod, openPhase, collisionPhase, power1, power2, hum);
988 CONVERT_EACH_TO_ONE_END (my name.get())
989 }
990
991 FORM (NEW_PitchTier_to_Sound_pulseTrain, U"PitchTier: To Sound (pulse train)", nullptr) {
992 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100")
993 POSITIVE (adaptationFactor, U"Adaptation factor", U"1.0")
994 POSITIVE (adaptationTime, U"Adaptation time", U"0.05")
995 NATURAL (interpolationDepth, U"Interpolation depth (samples)", U"2000")
996 BOOLEAN (hum, U"Hum", false)
997 OK
998 DO
999 CONVERT_EACH_TO_ONE (PitchTier)
1000 autoSound result = PitchTier_to_Sound_pulseTrain (me, samplingFrequency,
1001 adaptationFactor, adaptationTime, interpolationDepth, hum);
1002 CONVERT_EACH_TO_ONE_END (my name.get())
1003 }
1004
1005 FORM (NEW_PitchTier_to_Sound_sine, U"PitchTier: To Sound (sine)", nullptr) {
1006 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100.0")
1007 OK
1008 DO
1009 CONVERT_EACH_TO_ONE (PitchTier)
1010 autoSound result = PitchTier_to_Sound_sine (me, 0.0, 0.0, samplingFrequency);
1011 CONVERT_EACH_TO_ONE_END (my name.get())
1012 }
1013
1014 DIRECT (HINT_PitchTier_Sound_viewAndEdit) {
1015 INFO_NONE
1016 Melder_information (U"To include a copy of a Sound in your PitchTier window:\n"
1017 " select a PitchTier and a Sound, and click \"View & Edit\".");
1018 INFO_NONE_END
1019 }
1020
1021 FORM_SAVE (SAVE_PitchTier_writeToPitchTierSpreadsheetFile, U"Save PitchTier as spreadsheet", nullptr, U"PitchTier") {
1022 SAVE_ONE (PitchTier, U"save the selected PitchTier object to the spreadsheet file")
1023 PitchTier_writeToPitchTierSpreadsheetFile (me, file);
1024 SAVE_ONE_END
1025 }
1026
1027 FORM_SAVE (SAVE_PitchTier_writeToHeaderlessSpreadsheetFile, U"Save PitchTier as spreadsheet", nullptr, U"txt") {
1028 SAVE_ONE (PitchTier, U"save the selected PitchTier object to the headerless spreadsheet file")
1029 PitchTier_writeToHeaderlessSpreadsheetFile (me, file);
1030 SAVE_ONE_END
1031 }
1032
1033 DIRECT (INFO_PitchTier_Manipulation_replace) {
1034 INFO_NONE
1035 Melder_information (U"To replace the PitchTier in a Manipulation object,\n"
1036 "select a PitchTier object and a Manipulation object\nand choose \"Replace pitch\".");
1037 INFO_NONE_END
1038 }
1039
1040 // MARK: - PITCHTIER & POINTPROCESS
1041
1042 DIRECT (NEW1_PitchTier_PointProcess_to_PitchTier) {
1043 CONVERT_ONE_AND_ONE_TO_ONE (PitchTier, PointProcess)
1044 autoPitchTier result = PitchTier_PointProcess_to_PitchTier (me, you);
1045 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get())
1046 }
1047
1048 // MARK: - POINTPROCESS
1049
1050 FORM (MODIFY_PointProcess_addPoint, U"PointProcess: Add point", U"PointProcess: Add point...") {
1051 REAL (time, U"Time (s)", U"0.5")
1052 OK
1053 DO
1054 MODIFY_EACH (PointProcess)
1055 PointProcess_addPoint (me, time);
1056 MODIFY_EACH_END
1057 }
1058
1059 FORM (MODIFY_PointProcess_addPoints, U"PointProcess: Add points", U"PointProcess: Add point...") {
1060 REALVECTOR (times, U"Times", WHITESPACE_SEPARATED_, U"0.1 0.2 0.5")
1061 OK
1062 DO
1063 MODIFY_EACH (PointProcess)
1064 PointProcess_addPoints (me, times);
1065 MODIFY_EACH_END
1066 }
1067
1068 FORM (NEW1_PointProcess_createEmpty, U"Create an empty PointProcess", U"Create empty PointProcess...") {
1069 WORD (name, U"Name", U"empty")
1070 REAL (startTime, U"Start time (s)", U"0.0")
1071 REAL (endTime, U"End time (s)", U"1.0")
1072 OK
1073 DO
1074 Melder_require (endTime >= startTime,
1075 U"Your end time (", endTime, U") should not be less than your start time (", startTime, U").");
1076 CREATE_ONE
1077 autoPointProcess result = PointProcess_create (startTime, endTime, 0);
1078 CREATE_ONE_END (name)
1079 }
1080
1081 FORM (NEW1_PointProcess_createPoissonProcess, U"Create Poisson process", U"Create Poisson process...") {
1082 WORD (name, U"Name", U"poisson")
1083 REAL (startTime, U"Start time (s)", U"0.0")
1084 REAL (endTime, U"End time (s)", U"1.0")
1085 POSITIVE (density, U"Density (/s)", U"100.0")
1086 OK
1087 DO
1088 Melder_require (endTime >= startTime,
1089 U"Your end time (", endTime, U") should not be less than your start time (", startTime, U").");
1090 CREATE_ONE
1091 autoPointProcess result = PointProcess_createPoissonProcess (startTime, endTime, density);
1092 CREATE_ONE_END (name)
1093 }
1094
1095 DIRECT (NEW1_PointProcesses_difference) {
1096 CONVERT_TWO_TO_ONE (PointProcess)
1097 autoPointProcess result = PointProcesses_difference (me, you);
1098 CONVERT_TWO_TO_ONE_END (U"difference")
1099 }
1100
1101 FORM (GRAPHICS_PointProcess_draw, U"PointProcess: Draw", nullptr) {
1102 praat_TimeFunction_RANGE (fromTime, toTime)
1103 BOOLEAN (garnish, U"Garnish", true)
1104 OK
1105 DO
1106 GRAPHICS_EACH (PointProcess)
1107 PointProcess_draw (me, GRAPHICS, fromTime, toTime, garnish);
1108 GRAPHICS_EACH_END
1109 }
1110
1111 DIRECT (EDITOR_ONE_WITH_ONE_PointProcess_viewAndEdit) {
1112 EDITOR_ONE_WITH_ONE (a,PointProcess, Sound) // Sound may be null
1113 autoPointEditor editor = PointEditor_create (ID_AND_FULL_NAME, me, you);
1114 EDITOR_ONE_WITH_ONE_END
1115 }
1116
1117 FORM (MODIFY_PointProcess_fill, U"PointProcess: Fill", nullptr) {
1118 praat_TimeFunction_RANGE (fromTime, toTime)
1119 POSITIVE (period, U"Period (s)", U"0.01")
1120 OK
1121 DO
1122 MODIFY_EACH_WEAK (PointProcess)
1123 PointProcess_fill (me, fromTime, toTime, period);
1124 MODIFY_EACH_WEAK_END
1125 }
1126
1127 FORM (REAL_PointProcess_getInterval, U"PointProcess: Get interval", U"PointProcess: Get interval...") {
1128 REAL (time, U"Time (s)", U"0.5")
1129 OK
1130 DO
1131 QUERY_ONE_FOR_REAL (PointProcess)
1132 double result = PointProcess_getInterval (me, time);
1133 QUERY_ONE_FOR_REAL_END (U" seconds")
1134 }
1135
1136 #define dia_PointProcess_getRangeProperty(fromTime,toTime,shortestPeriod,longestPeriod,maximumPeriodfactor) \
1137 praat_TimeFunction_RANGE (fromTime, toTime) \
1138 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001") \
1139 REAL (longestPeriod, U"Longest period (s)", U"0.02") \
1140 POSITIVE (maximumPeriodFactor, U"Maximum period factor", U"1.3")
1141
1142 FORM (REAL_PointProcess_getJitter_local, U"PointProcess: Get jitter (local)", U"PointProcess: Get jitter (local)...") {
1143 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1144 OK
1145 DO
1146 QUERY_ONE_FOR_REAL (PointProcess)
1147 double result = PointProcess_getJitter_local (me, fromTime, toTime,
1148 shortestPeriod, longestPeriod, maximumPeriodFactor);
1149 QUERY_ONE_FOR_REAL_END (U" (local jitter)")
1150 }
1151
1152 FORM (REAL_PointProcess_getJitter_local_absolute, U"PointProcess: Get jitter (local, absolute)", U"PointProcess: Get jitter (local, absolute)...") {
1153 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1154 OK
1155 DO
1156 QUERY_ONE_FOR_REAL (PointProcess)
1157 double result = PointProcess_getJitter_local_absolute (me, fromTime, toTime,
1158 shortestPeriod, longestPeriod, maximumPeriodFactor);
1159 QUERY_ONE_FOR_REAL_END (U" seconds (local absolute jitter)")
1160 }
1161
1162 FORM (REAL_PointProcess_getJitter_rap, U"PointProcess: Get jitter (rap)", U"PointProcess: Get jitter (rap)...") {
1163 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1164 OK
1165 DO
1166 QUERY_ONE_FOR_REAL (PointProcess)
1167 double result = PointProcess_getJitter_rap (me, fromTime, toTime,
1168 shortestPeriod, longestPeriod, maximumPeriodFactor);
1169 QUERY_ONE_FOR_REAL_END (U" (rap jitter)")
1170 }
1171
1172 FORM (REAL_PointProcess_getJitter_ppq5, U"PointProcess: Get jitter (ppq5)", U"PointProcess: Get jitter (ppq5)...") {
1173 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1174 OK
1175 DO
1176 QUERY_ONE_FOR_REAL (PointProcess)
1177 double result = PointProcess_getJitter_ppq5 (me, fromTime, toTime,
1178 shortestPeriod, longestPeriod, maximumPeriodFactor);
1179 QUERY_ONE_FOR_REAL_END (U" (ppq5 jitter)")
1180 }
1181
1182 FORM (REAL_PointProcess_getJitter_ddp, U"PointProcess: Get jitter (ddp)", U"PointProcess: Get jitter (ddp)...") {
1183 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1184 OK
1185 DO
1186 QUERY_ONE_FOR_REAL (PointProcess)
1187 double result = PointProcess_getJitter_ddp (me, fromTime, toTime,
1188 shortestPeriod, longestPeriod, maximumPeriodFactor);
1189 QUERY_ONE_FOR_REAL_END (U" (ddp jitter)")
1190 }
1191
1192 FORM (REAL_PointProcess_getMeanPeriod, U"PointProcess: Get mean period", U"PointProcess: Get mean period...") {
1193 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1194 OK
1195 DO
1196 QUERY_ONE_FOR_REAL (PointProcess)
1197 double result = PointProcess_getMeanPeriod (me, fromTime, toTime,
1198 shortestPeriod, longestPeriod, maximumPeriodFactor);
1199 QUERY_ONE_FOR_REAL_END (U" seconds (mean period)")
1200 }
1201
1202 FORM (REAL_PointProcess_getStdevPeriod, U"PointProcess: Get stdev period", U"PointProcess: Get stdev period...") {
1203 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1204 OK
1205 DO
1206 QUERY_ONE_FOR_REAL (PointProcess)
1207 double result = PointProcess_getStdevPeriod (me, fromTime, toTime,
1208 shortestPeriod, longestPeriod, maximumPeriodFactor);
1209 QUERY_ONE_FOR_REAL_END (U" (stdev period)")
1210 }
1211
1212 FORM (INTEGER_PointProcess_getLowIndex, U"PointProcess: Get low index", U"PointProcess: Get low index...") {
1213 REAL (time, U"Time (s)", U"0.5")
1214 OK
1215 DO
1216 QUERY_ONE_FOR_REAL (PointProcess)
1217 integer result = PointProcess_getLowIndex (me, time);
1218 QUERY_ONE_FOR_REAL_END (U" (low index)")
1219 }
1220
1221 FORM (INTEGER_PointProcess_getHighIndex, U"PointProcess: Get high index", U"PointProcess: Get high index...") {
1222 REAL (time, U"Time (s)", U"0.5")
1223 OK
1224 DO
1225 QUERY_ONE_FOR_REAL (PointProcess)
1226 integer result = PointProcess_getHighIndex (me, time);
1227 QUERY_ONE_FOR_REAL_END (U" (high index)")
1228 }
1229
1230 FORM (INTEGER_PointProcess_getNearestIndex, U"PointProcess: Get nearest index", U"PointProcess: Get nearest index...") {
1231 REAL (time, U"Time (s)", U"0.5")
1232 OK
1233 DO
1234 QUERY_ONE_FOR_REAL (PointProcess)
1235 integer result = PointProcess_getNearestIndex (me, time);
1236 QUERY_ONE_FOR_REAL_END (U" (nearest index)")
1237 }
1238
1239 DIRECT (INTEGER_PointProcess_getNumberOfPoints) {
1240 QUERY_ONE_FOR_REAL (PointProcess)
1241 integer result = my nt;
1242 QUERY_ONE_FOR_REAL_END (U" points")
1243 }
1244
1245 FORM (INTEGER_PointProcess_getNumberOfPeriods, U"PointProcess: Get number of periods", U"PointProcess: Get number of periods...") {
1246 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1247 OK
1248 DO
1249 QUERY_ONE_FOR_REAL (PointProcess)
1250 integer result = PointProcess_getNumberOfPeriods (me, fromTime, toTime,
1251 shortestPeriod, longestPeriod, maximumPeriodFactor);
1252 QUERY_ONE_FOR_REAL_END (U" periods")
1253 }
1254
1255 FORM (REAL_PointProcess_getTimeFromIndex, U"Get time", 0 /*"PointProcess: Get time from index..."*/) {
1256 NATURAL (pointNumber, U"Point number", U"10")
1257 OK
1258 DO
1259 QUERY_ONE_FOR_REAL (PointProcess)
1260 const double result =
1261 pointNumber > my nt ? undefined : my t [pointNumber];
1262 QUERY_ONE_FOR_REAL_END (U" seconds")
1263 }
1264
1265 DIRECT (HELP_PointProcess_help) {
1266 HELP (U"PointProcess")
1267 }
1268
1269 DIRECT (PLAY_PointProcess_hum) {
1270 PLAY_EACH (PointProcess)
1271 PointProcess_hum (me, my xmin, my xmax, nullptr, nullptr);
1272 PLAY_EACH_END
1273 }
1274
1275 DIRECT (NEW1_PointProcesses_intersection) {
1276 CONVERT_TWO_TO_ONE (PointProcess)
1277 autoPointProcess result = PointProcesses_intersection (me, you);
1278 CONVERT_TWO_TO_ONE_END (U"intersection")
1279 }
1280
1281 DIRECT (PLAY_PointProcess_play) {
1282 PLAY_EACH (PointProcess)
1283 PointProcess_play (me, nullptr, nullptr);
1284 PLAY_EACH_END
1285 }
1286
1287 FORM (MODIFY_PointProcess_removePoint, U"PointProcess: Remove point", U"PointProcess: Remove point...") {
1288 NATURAL (pointNumber, U"Point number", U"1")
1289 OK
1290 DO
1291 MODIFY_EACH (PointProcess)
1292 PointProcess_removePoint (me, pointNumber);
1293 MODIFY_EACH_END
1294 }
1295
1296 FORM (MODIFY_PointProcess_removePointNear, U"PointProcess: Remove point near", U"PointProcess: Remove point near...") {
1297 REAL (time, U"Time (s)", U"0.5")
1298 OK
1299 DO
1300 MODIFY_EACH (PointProcess)
1301 PointProcess_removePointNear (me, time);
1302 MODIFY_EACH_END
1303 }
1304
1305 FORM (MODIFY_PointProcess_removePoints, U"PointProcess: Remove points", U"PointProcess: Remove points...") {
1306 NATURAL (fromPointNumber, U"From point number", U"1")
1307 NATURAL (toPointNumber, U"To point number", U"10")
1308 OK
1309 DO
1310 MODIFY_EACH (PointProcess)
1311 PointProcess_removePoints (me, fromPointNumber, toPointNumber);
1312 MODIFY_EACH_END
1313 }
1314
1315 FORM (MODIFY_PointProcess_removePointsBetween, U"PointProcess: Remove points between", U"PointProcess: Remove points between...") {
1316 REAL (fromTime, U"left Time range (s)", U"0.3")
1317 REAL (toTime, U"right Time range (s)", U"0.7")
1318 OK
1319 DO
1320 MODIFY_EACH (PointProcess)
1321 PointProcess_removePointsBetween (me, fromTime, toTime);
1322 MODIFY_EACH_END
1323 }
1324
1325 DIRECT (NEW_PointProcess_to_IntervalTier) {
1326 CONVERT_EACH_TO_ONE (PointProcess)
1327 autoIntervalTier result = IntervalTier_create (my xmin, my xmax);
1328 CONVERT_EACH_TO_ONE_END (my name.get())
1329 }
1330
1331 DIRECT (NEW_PointProcess_to_Matrix) {
1332 CONVERT_EACH_TO_ONE (PointProcess)
1333 autoMatrix result = PointProcess_to_Matrix (me);
1334 CONVERT_EACH_TO_ONE_END (my name.get())
1335 }
1336
1337 FORM (NEW_PointProcess_to_PitchTier, U"PointProcess: To PitchTier", U"PointProcess: To PitchTier...") {
1338 POSITIVE (maximumInterval, U"Maximum interval (s)", U"0.02")
1339 OK
1340 DO
1341 CONVERT_EACH_TO_ONE (PointProcess)
1342 autoPitchTier result = PointProcess_to_PitchTier (me, maximumInterval);
1343 CONVERT_EACH_TO_ONE_END (my name.get())
1344 }
1345
1346 FORM (NEW_PointProcess_to_TextGrid, U"PointProcess: To TextGrid...", U"PointProcess: To TextGrid...") {
1347 SENTENCE (tierNames, U"Tier names", U"Mary John bell")
1348 SENTENCE (pointTiers, U"Point tiers", U"bell")
1349 OK
1350 DO
1351 CONVERT_EACH_TO_ONE (PointProcess)
1352 autoTextGrid result = TextGrid_create (my xmin, my xmax, tierNames, pointTiers);
1353 CONVERT_EACH_TO_ONE_END (my name.get())
1354 }
1355
1356 FORM (NEW_PointProcess_to_TextGrid_vuv, U"PointProcess: To TextGrid (vuv)...", U"PointProcess: To TextGrid (vuv)...") {
1357 POSITIVE (maximumPeriod, U"Maximum period (s)", U"0.02")
1358 REAL (meanPeriod, U"Mean period (s)", U"0.01")
1359 OK
1360 DO
1361 CONVERT_EACH_TO_ONE (PointProcess)
1362 autoTextGrid result = PointProcess_to_TextGrid_vuv (me, maximumPeriod, meanPeriod);
1363 CONVERT_EACH_TO_ONE_END (my name.get())
1364 }
1365
1366 DIRECT (NEW_PointProcess_to_TextTier) {
1367 CONVERT_EACH_TO_ONE (PointProcess)
1368 autoTextTier result = TextTier_create (my xmin, my xmax);
1369 CONVERT_EACH_TO_ONE_END (my name.get())
1370 }
1371
1372 FORM (NEW_PointProcess_to_Sound_phonation, U"PointProcess: To Sound (phonation)", U"PointProcess: To Sound (phonation)...") {
1373 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100.0")
1374 POSITIVE (adaptationFactor, U"Adaptation factor", U"1.0")
1375 POSITIVE (maximumPeriod, U"Maximum period (s)", U"0.05")
1376 POSITIVE (openPhase, U"Open phase", U"0.7")
1377 REAL (collisionPhase, U"Collision phase", U"0.03")
1378 POSITIVE (power1, U"Power 1", U"3.0")
1379 POSITIVE (power2, U"Power 2", U"4.0")
1380 OK
1381 DO
1382 CONVERT_EACH_TO_ONE (PointProcess)
1383 autoSound result = PointProcess_to_Sound_phonation (me, samplingFrequency,
1384 adaptationFactor, maximumPeriod, openPhase, collisionPhase, power1, power2);
1385 CONVERT_EACH_TO_ONE_END (my name.get())
1386 }
1387
1388 FORM (NEW_PointProcess_to_Sound_pulseTrain, U"PointProcess: To Sound (pulse train)", U"PointProcess: To Sound (pulse train)...") {
1389 POSITIVE (samplingFrequency, U"Sampling frequency (Hz)", U"44100.0")
1390 POSITIVE (adaptationFactor, U"Adaptation factor", U"1.0")
1391 POSITIVE (adaptationTime, U"Adaptation time (s)", U"0.05")
1392 NATURAL (interpolationDepth, U"Interpolation depth (samples)", U"2000")
1393 OK
1394 DO
1395 CONVERT_EACH_TO_ONE (PointProcess)
1396 autoSound result = PointProcess_to_Sound_pulseTrain (me, samplingFrequency,
1397 adaptationFactor, adaptationTime, interpolationDepth);
1398 CONVERT_EACH_TO_ONE_END (my name.get())
1399 }
1400
1401 DIRECT (NEW_PointProcess_to_Sound_hum) {
1402 CONVERT_EACH_TO_ONE (PointProcess)
1403 autoSound result = PointProcess_to_Sound_hum (me);
1404 CONVERT_EACH_TO_ONE_END (my name.get())
1405 }
1406
1407 DIRECT (NEW1_PointProcesses_union) {
1408 CONVERT_TWO_TO_ONE (PointProcess)
1409 autoPointProcess result = PointProcesses_union (me, you);
1410 CONVERT_TWO_TO_ONE_END (U"union")
1411 }
1412
1413 FORM (NEW_PointProcess_upto_IntensityTier, U"PointProcess: Up to IntensityTier", U"PointProcess: Up to IntensityTier...") {
1414 POSITIVE (intensity, U"Intensity (dB)", U"70.0")
1415 OK
1416 DO
1417 CONVERT_EACH_TO_ONE (PointProcess)
1418 autoIntensityTier result = PointProcess_upto_IntensityTier (me, intensity);
1419 CONVERT_EACH_TO_ONE_END (my name.get())
1420 }
1421
1422 FORM (NEW_PointProcess_upto_PitchTier, U"PointProcess: Up to PitchTier", U"PointProcess: Up to PitchTier...") {
1423 POSITIVE (frequency, U"Frequency (Hz)", U"190.0")
1424 OK
1425 DO
1426 CONVERT_EACH_TO_ONE (PointProcess)
1427 autoPitchTier result = PointProcess_upto_PitchTier (me, frequency);
1428 CONVERT_EACH_TO_ONE_END (my name.get())
1429 }
1430
1431 FORM (NEW_PointProcess_upto_TextTier, U"PointProcess: Up to TextTier", U"PointProcess: Up to TextTier...") {
1432 SENTENCE (text, U"Text", U"")
1433 OK
1434 DO
1435 CONVERT_EACH_TO_ONE (PointProcess)
1436 autoTextTier result = PointProcess_upto_TextTier (me, text);
1437 CONVERT_EACH_TO_ONE_END (my name.get())
1438 }
1439
1440 FORM (MODIFY_PointProcess_voice, U"PointProcess: Fill unvoiced parts", nullptr) {
1441 POSITIVE (period, U"Period (s)", U"0.01")
1442 POSITIVE (maximumVoicedPeriod, U"Maximum voiced period (s)", U"0.02000000001")
1443 OK
1444 DO
1445 MODIFY_EACH_WEAK (PointProcess)
1446 PointProcess_voice (me, period, maximumVoicedPeriod);
1447 MODIFY_EACH_WEAK_END
1448 }
1449
1450 DIRECT (HINT_PointProcess_Sound_viewAndEdit) {
1451 INFO_NONE
1452 Melder_information (U"To include a copy of a Sound in your PointProcess window:\n"
1453 " select a PointProcess and a Sound, and click \"View & Edit\".");
1454 INFO_NONE_END
1455 }
1456
1457 // MARK: - POINTPROCESS & SOUND
1458
1459 DIRECT (MODIFY_Point_Sound_transplantDomain) {
1460 MODIFY_FIRST_OF_ONE_AND_ONE (PointProcess, Sound)
1461 my xmin = your xmin;
1462 my xmax = your xmax;
1463 MODIFY_FIRST_OF_ONE_AND_ONE_END
1464 }
1465
1466 FORM (REAL_Point_Sound_getShimmer_local, U"PointProcess & Sound: Get shimmer (local)", U"PointProcess & Sound: Get shimmer (local)...") {
1467 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1468 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1469 OK
1470 DO
1471 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1472 double result = PointProcess_Sound_getShimmer_local (me, you, fromTime, toTime,
1473 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1474 QUERY_ONE_AND_ONE_FOR_REAL_END (U" (local shimmer)");
1475 }
1476
1477 FORM (REAL_Point_Sound_getShimmer_local_dB, U"PointProcess & Sound: Get shimmer (local, dB)", U"PointProcess & Sound: Get shimmer (local, dB)...") {
1478 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1479 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1480 OK
1481 DO
1482 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1483 double result = PointProcess_Sound_getShimmer_local_dB (me, you, fromTime, toTime,
1484 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1485 QUERY_ONE_AND_ONE_FOR_REAL_END (U" dB (local shimmer)");
1486 }
1487
1488 FORM (REAL_Point_Sound_getShimmer_apq3, U"PointProcess & Sound: Get shimmer (apq3)", U"PointProcess & Sound: Get shimmer (apq3)...") {
1489 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1490 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1491 OK
1492 DO
1493 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1494 double result = PointProcess_Sound_getShimmer_apq3 (me, you, fromTime, toTime,
1495 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1496 QUERY_ONE_AND_ONE_FOR_REAL_END (U" (apq3 shimmer)");
1497 }
1498
1499 FORM (REAL_Point_Sound_getShimmer_apq5, U"PointProcess & Sound: Get shimmer (apq)", U"PointProcess & Sound: Get shimmer (apq5)...") {
1500 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1501 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1502 OK
1503 DO
1504 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1505 double result = PointProcess_Sound_getShimmer_apq5 (me, you, fromTime, toTime,
1506 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1507 QUERY_ONE_AND_ONE_FOR_REAL_END (U" (apq5 shimmer)");
1508 }
1509
1510 FORM (REAL_Point_Sound_getShimmer_apq11, U"PointProcess & Sound: Get shimmer (apq11)", U"PointProcess & Sound: Get shimmer (apq11)...") {
1511 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1512 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1513 OK
1514 DO
1515 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1516 double result = PointProcess_Sound_getShimmer_apq11 (me, you, fromTime, toTime,
1517 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1518 QUERY_ONE_AND_ONE_FOR_REAL_END (U" (apq11 shimmer)");
1519 }
1520
1521 FORM (REAL_Point_Sound_getShimmer_dda, U"PointProcess & Sound: Get shimmer (dda)", U"PointProcess & Sound: Get shimmer (dda)...") {
1522 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1523 POSITIVE (maximumAmplitudeFactor, U"Maximum amplitude factor", U"1.6")
1524 OK
1525 DO
1526 QUERY_ONE_AND_ONE_FOR_REAL (PointProcess, Sound)
1527 double result = PointProcess_Sound_getShimmer_dda (me, you, fromTime, toTime,
1528 shortestPeriod, longestPeriod, maximumPeriodFactor, maximumAmplitudeFactor);
1529 QUERY_ONE_AND_ONE_FOR_REAL_END (U" (dda shimmer)");
1530 }
1531
1532 FORM (NEW1_PointProcess_Sound_to_AmplitudeTier_period, U"PointProcess & Sound: To AmplitudeTier (period)", nullptr) {
1533 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1534 OK
1535 DO
1536 CONVERT_ONE_AND_ONE_TO_ONE (PointProcess, Sound)
1537 autoAmplitudeTier result = PointProcess_Sound_to_AmplitudeTier_period (me, you, fromTime, toTime,
1538 shortestPeriod, longestPeriod, maximumPeriodFactor);
1539 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get(), U"_", my name.get())
1540 }
1541
1542 DIRECT (NEW1_PointProcess_Sound_to_AmplitudeTier_point) {
1543 CONVERT_ONE_AND_ONE_TO_ONE (PointProcess, Sound)
1544 autoAmplitudeTier result = PointProcess_Sound_to_AmplitudeTier_point (me, you);
1545 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get(), U"_", my name.get());
1546 }
1547
1548 FORM (NEW1_PointProcess_Sound_to_H1minusH2Tier, U"PointProcess & Sound: To H1minusH2Tier", nullptr) {
1549 dia_PointProcess_getRangeProperty (fromTime, toTime, shortestPeriod, longestPeriod, maximumPeriodfactor)
1550 OK
1551 DO
1552 CONVERT_ONE_AND_ONE_TO_ONE (PointProcess, Sound)
1553 autoH1minusH2Tier result = PointProcess_Sound_to_H1minusH2Tier_u (me, you, fromTime, toTime,
1554 shortestPeriod, longestPeriod, maximumPeriodFactor);
1555 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get(), U"_", my name.get())
1556 }
1557
1558 FORM (NEW1_PointProcess_Sound_to_Ltas, U"PointProcess & Sound: To Ltas", nullptr) {
1559 POSITIVE (maximumFrequency, U"Maximum frequency (Hz)", U"5000.0")
1560 POSITIVE (bandwidth, U"Band width (Hz)", U"100.0")
1561 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
1562 REAL (longestPeriod, U"Longest period (s)", U"0.02")
1563 POSITIVE (maximumPeriodFactor, U"Maximum period factor", U"1.3")
1564 OK
1565 DO
1566 CONVERT_ONE_AND_ONE_TO_ONE (PointProcess, Sound)
1567 autoLtas result = PointProcess_Sound_to_Ltas (me, you,
1568 maximumFrequency, bandwidth, shortestPeriod, longestPeriod, maximumPeriodFactor);
1569 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get())
1570 }
1571
1572 FORM (NEW1_PointProcess_Sound_to_Ltas_harmonics, U"PointProcess & Sound: To Ltas (harmonics", nullptr) {
1573 NATURAL (maximumHarmonic, U"Maximum harmonic", U"20")
1574 REAL (shortestPeriod, U"Shortest period (s)", U"0.0001")
1575 REAL (longestPeriod, U"Longest period (s)", U"0.02")
1576 POSITIVE (maximumPeriodFactor, U"Maximum period factor", U"1.3")
1577 OK
1578 DO
1579 CONVERT_ONE_AND_ONE_TO_ONE (PointProcess, Sound)
1580 autoLtas result = PointProcess_Sound_to_Ltas_harmonics (me, you,
1581 maximumHarmonic, shortestPeriod, longestPeriod, maximumPeriodFactor);
1582 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get())
1583 }
1584
1585 FORM (NEW1_Sound_PointProcess_to_SoundEnsemble_correlate, U"Sound & PointProcess: To SoundEnsemble (correlate)", nullptr) {
1586 REAL (fromTime, U"From time (s)", U"-0.1")
1587 REAL (toTime, U"To time (s)", U"1.0")
1588 OK
1589 DO
1590 CONVERT_ONE_AND_ONE_TO_ONE (Sound, PointProcess)
1591 autoSound result = Sound_PointProcess_to_SoundEnsemble_correlate (me, you, fromTime, toTime);
1592 CONVERT_ONE_AND_ONE_TO_ONE_END (your name.get())
1593 }
1594
1595 // MARK: - REALTIER
1596
1597 // MARK: New
1598
1599 FORM (NEW1_RealTier_create, U"Create empty RealTier", nullptr) {
1600 WORD (name, U"Name", U"empty")
1601 REAL (startTime, U"Start time (s)", U"0.0")
1602 REAL (endTime, U"End time (s)", U"1.0")
1603 OK
1604 DO
1605 Melder_require (endTime > startTime,
1606 U"Your end time should be greater than your start time.");
1607 CREATE_ONE
1608 autoRealTier result = RealTier_create (startTime, endTime);
1609 CREATE_ONE_END (name)
1610 }
1611
1612 // MARK: Help
1613
1614 DIRECT (HELP_RealTier_help) {
1615 HELP (U"RealTier")
1616 }
1617
1618 // MARK: View & Edit
1619
1620 DIRECT (EDITOR_ONE_WITH_ONE_RealTier_viewAndEdit) {
1621 EDITOR_ONE_WITH_ONE (a,RealTier, Sound) // Sound may be null
1622 autoRealTierEditor editor = RealTierEditor_create (ID_AND_FULL_NAME, me, you);
1623 EDITOR_ONE_WITH_ONE_END
1624 }
1625
1626 DIRECT (HINT_RealTier_Sound_viewAndEdit) {
1627 INFO_NONE
1628 Melder_information (U"To include a copy of a Sound in your RealTier window:\n"
1629 " select a RealTier and a Sound, and click \"View & Edit\".");
1630 INFO_NONE_END
1631 }
1632
1633 // MARK: Query
1634
1635 FORM (REAL_RealTier_getValueAtTime, U"Get RealTier value", U"RealTier: Get value at time...") {
1636 REAL (time, U"Time (s)", U"0.5")
1637 OK
1638 DO
1639 QUERY_ONE_FOR_REAL (RealTier)
1640 const double result = RealTier_getValueAtTime (me, time);
1641 QUERY_ONE_FOR_REAL_END (U"")
1642 }
1643
1644 FORM (REAL_RealTier_getValueAtIndex, U"Get RealTier value", U"RealTier: Get value at index...") {
1645 INTEGER (pointNumber, U"Point number", U"10")
1646 OK
1647 DO
1648 QUERY_ONE_FOR_REAL (RealTier)
1649 const double result = RealTier_getValueAtIndex (me, pointNumber);
1650 QUERY_ONE_FOR_REAL_END (U"")
1651 }
1652
1653 // MARK: Modify
1654
1655 FORM (MODIFY_RealTier_addPoint, U"Add one point", U"RealTier: Add point...") {
1656 REAL (time, U"Time (s)", U"0.5")
1657 REAL (intensity, U"Y value", U"75")
1658 OK
1659 DO
1660 MODIFY_EACH (RealTier)
1661 RealTier_addPoint (me, time, intensity);
1662 MODIFY_EACH_END
1663 }
1664
1665 FORM (MODIFY_RealTier_formula, U"RealTier: Formula", U"RealTier: Formula...") {
1666 COMMENT (U"# ncol = the number of points")
1667 COMMENT (U"for col from 1 to ncol")
1668 COMMENT (U" # x = the time of the colth point, in seconds")
1669 COMMENT (U" # self = the value of the colth point")
1670 COMMENT (U" self = `formula`")
1671 COMMENT (U"endfor")
1672 FORMULA (formula, U"Formula", U"self + 3.0")
1673 OK
1674 DO
1675 MODIFY_EACH_WEAK (RealTier)
1676 RealTier_formula (me, formula, interpreter, nullptr);
1677 MODIFY_EACH_WEAK_END
1678 }
1679
1680 // MARK: Convert
1681
1682 DIRECT (NEW_RealTier_downto_PointProcess) {
1683 CONVERT_EACH_TO_ONE (RealTier)
1684 autoPointProcess result = AnyTier_downto_PointProcess (me->asAnyTier());
1685 CONVERT_EACH_TO_ONE_END (my name.get())
1686 }
1687
1688 DIRECT (NEW_RealTier_downto_TableOfReal) {
1689 CONVERT_EACH_TO_ONE (RealTier)
1690 autoTableOfReal result = RealTier_downto_TableOfReal (me, U"Time (s)", U"Y");
1691 CONVERT_EACH_TO_ONE_END (my name.get())
1692 }
1693
1694 // MARK: Cast
1695
1696 DIRECT (NEW_RealTier_to_AmplitudeTier) {
1697 CONVERT_EACH_TO_ONE (RealTier)
1698 autoAmplitudeTier result = RealTier_to_AmplitudeTier (me);
1699 CONVERT_EACH_TO_ONE_END (my name.get())
1700 }
1701
1702 DIRECT (NEW_RealTier_to_DurationTier) {
1703 CONVERT_EACH_TO_ONE (RealTier)
1704 autoDurationTier result = RealTier_to_DurationTier (me);
1705 CONVERT_EACH_TO_ONE_END (my name.get())
1706 }
1707
1708 DIRECT (NEW_RealTier_to_IntensityTier) {
1709 CONVERT_EACH_TO_ONE (RealTier)
1710 autoIntensityTier result = RealTier_to_IntensityTier (me);
1711 CONVERT_EACH_TO_ONE_END (my name.get())
1712 }
1713
1714 DIRECT (NEW_RealTier_to_PitchTier) {
1715 CONVERT_EACH_TO_ONE (RealTier)
1716 autoPitchTier result = RealTier_to_PitchTier (me);
1717 CONVERT_EACH_TO_ONE_END (my name.get())
1718 }
1719
1720 // MARK: - REALTIER & POINTPROCESS
1721
1722 DIRECT (NEW1_RealTier_PointProcess_to_RealTier) {
1723 CONVERT_ONE_AND_ONE_TO_ONE (RealTier, PointProcess)
1724 autoRealTier result = RealTier_PointProcess_to_RealTier (me, you);
1725 CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get())
1726 }
1727
1728 // MARK: - SPECTRUMTIER
1729
1730 DIRECT (NEW_SpectrumTier_downto_Table) {
1731 CONVERT_EACH_TO_ONE (SpectrumTier)
1732 autoTable result = SpectrumTier_downto_Table (me, true, true, true);
1733 CONVERT_EACH_TO_ONE_END (my name.get())
1734 }
1735
1736 FORM (GRAPHICS_old_SpectrumTier_draw, U"SpectrumTier: Draw", nullptr) { // 2010-10-19
1737 REAL (fromFrequency, U"left Frequency range (Hz)", U"0.0")
1738 REAL (toFrequency, U"right Frequency range (Hz)", U"10000.0")
1739 REAL (fromPower, U"left Power range (dB)", U"20.0")
1740 REAL (toPower, U"right Power range (dB)", U"80.0")
1741 BOOLEAN (garnish, U"Garnish", true)
1742 OK
1743 DO
1744 GRAPHICS_EACH (SpectrumTier)
1745 SpectrumTier_draw (me, GRAPHICS, fromFrequency, toFrequency,
1746 fromPower, toPower, garnish, U"lines and speckles");
1747 GRAPHICS_EACH_END
1748 }
1749
1750 FORM (GRAPHICS_SpectrumTier_draw, U"SpectrumTier: Draw", nullptr) {
1751 REAL (fromFrequency, U"left Frequency range (Hz)", U"0.0")
1752 REAL (toFrequency, U"right Frequency range (Hz)", U"10000.0")
1753 REAL (fromPower, U"left Power range (dB)", U"20.0")
1754 REAL (toPower, U"right Power range (dB)", U"80.0")
1755 BOOLEAN (garnish, U"Garnish", true)
1756 COMMENT (U"")
1757 OPTIONMENUSTR (drawingMethod, U"Drawing method", 1)
1758 OPTION (U"lines")
1759 OPTION (U"speckles")
1760 OPTION (U"lines and speckles")
1761 OK
1762 DO_ALTERNATIVE (GRAPHICS_old_SpectrumTier_draw)
1763 GRAPHICS_EACH (SpectrumTier)
1764 SpectrumTier_draw (me, GRAPHICS, fromFrequency, toFrequency,
1765 fromPower, toPower, garnish, drawingMethod);
1766 GRAPHICS_EACH_END
1767 }
1768
1769 FORM (LIST_SpectrumTier_list, U"SpectrumTier: List", nullptr) {
1770 BOOLEAN (includeIndexes, U"Include indexes", true)
1771 BOOLEAN (includeFrequency, U"Include frequency", true)
1772 BOOLEAN (includePowerDensity, U"Include power density", true)
1773 OK
1774 DO
1775 INFO_ONE (SpectrumTier)
1776 SpectrumTier_list (me, includeIndexes, includeFrequency, includePowerDensity);
1777 INFO_ONE_END
1778 }
1779
1780 FORM (MODIFY_SpectrumTier_removePointsBelow, U"SpectrumTier: Remove points below", nullptr) {
1781 REAL (removeAllPointsBelow, U"Remove all points below (dB)", U"40.0")
1782 OK
1783 DO
1784 MODIFY_EACH (SpectrumTier)
1785 RealTier_removePointsBelow (me, removeAllPointsBelow);
1786 MODIFY_EACH_END
1787 }
1788
1789 // MARK: - buttons
1790
1791 void praat_Tiers_init () {
1792 Thing_recognizeClassesByName (classPointProcess,
1793 classRealPoint, classRealTier,
1794 classPitchTier, classIntensityTier, classDurationTier, classAmplitudeTier,
1795 classSpectrumTier, classH1minusH2Tier,
1796 classFormantPoint, classFormantTier, classFormantGrid
1797 );
1798
1799 praat_addMenuCommand (U"Objects", U"New", U"Tiers", nullptr, 0, nullptr);
1800 praat_addMenuCommand (U"Objects", U"New", U"Create empty PointProcess...",
1801 nullptr, 1, NEW1_PointProcess_createEmpty);
1802 praat_addMenuCommand (U"Objects", U"New", U"Create Poisson process...",
1803 nullptr, 1, NEW1_PointProcess_createPoissonProcess);
1804 praat_addMenuCommand (U"Objects", U"New", U"-- new tiers ---",
1805 nullptr, 1, nullptr);
1806 praat_addMenuCommand (U"Objects", U"New", U"Create PitchTier...",
1807 nullptr, 1, NEW1_PitchTier_create);
1808 praat_addMenuCommand (U"Objects", U"New", U"Create FormantGrid...",
1809 nullptr, 1, NEW1_FormantGrid_create);
1810 praat_addMenuCommand (U"Objects", U"New", U"Create FormantTier...",
1811 nullptr, GuiMenu_DEPTH_1 | GuiMenu_HIDDEN, NEW1_FormantTier_create);
1812 praat_addMenuCommand (U"Objects", U"New", U"Create IntensityTier...",
1813 nullptr, 1, NEW1_IntensityTier_create);
1814 praat_addMenuCommand (U"Objects", U"New", U"Create DurationTier...",
1815 nullptr, 1, NEW1_DurationTier_create);
1816 praat_addMenuCommand (U"Objects", U"New", U"Create AmplitudeTier...",
1817 nullptr, 1, NEW1_AmplitudeTier_create);
1818 praat_addMenuCommand (U"Objects", U"New", U"Create RealTier...",
1819 nullptr, 1, NEW1_RealTier_create);
1820
1821 praat_addAction1 (classAmplitudeTier, 0, U"AmplitudeTier help", nullptr, 0, HELP_AmplitudeTier_help);
1822 praat_addAction1 (classAmplitudeTier, 1, U"View & Edit || Edit",
1823 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_AmplitudeTier_viewAndEdit);
1824 praat_addAction1 (classAmplitudeTier, 0, U"View & Edit with Sound?",
1825 nullptr, 0, HINT_AmplitudeTier_Sound_viewAndEdit);
1826 praat_addAction1 (classAmplitudeTier, 0, U"Query -", nullptr, 0, nullptr);
1827 praat_TimeTier_query_init (classAmplitudeTier);
1828 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (local)...",
1829 nullptr, 1, REAL_AmplitudeTier_getShimmer_local);
1830 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (local_dB)...",
1831 nullptr, 1, REAL_AmplitudeTier_getShimmer_local_dB);
1832 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (apq3)...",
1833 nullptr, 1, REAL_AmplitudeTier_getShimmer_apq3);
1834 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (apq5)...",
1835 nullptr, 1, REAL_AmplitudeTier_getShimmer_apq5);
1836 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (apq11)...",
1837 nullptr, 1, REAL_AmplitudeTier_getShimmer_apq11);
1838 praat_addAction1 (classAmplitudeTier, 1, U"Get shimmer (dda)...",
1839 nullptr, 1, REAL_AmplitudeTier_getShimmer_dda);
1840 praat_addAction1 (classAmplitudeTier, 0, U"Modify -", nullptr, 0, nullptr);
1841 praat_TimeTier_modify_init (classAmplitudeTier);
1842 praat_addAction1 (classAmplitudeTier, 0, U"Add point...",
1843 nullptr, 1, MODIFY_AmplitudeTier_addPoint);
1844 praat_addAction1 (classAmplitudeTier, 0, U"Formula...",
1845 nullptr, 1, MODIFY_AmplitudeTier_formula);
1846 praat_addAction1 (classAmplitudeTier, 0, U"Synthesize", nullptr, 0, nullptr);
1847 praat_addAction1 (classAmplitudeTier, 0, U"To Sound (pulse train)...",
1848 nullptr, 0, NEW_AmplitudeTier_to_Sound);
1849 praat_addAction1 (classAmplitudeTier, 0, U"Convert", nullptr, 0, nullptr);
1850 praat_addAction1 (classAmplitudeTier, 0, U"To IntensityTier...",
1851 nullptr, 0, NEW_AmplitudeTier_to_IntensityTier);
1852 praat_addAction1 (classAmplitudeTier, 0, U"Down to PointProcess",
1853 nullptr, 0, NEW_AmplitudeTier_downto_PointProcess);
1854 praat_addAction1 (classAmplitudeTier, 0, U"Down to RealTier",
1855 nullptr, 0, NEW_AmplitudeTier_downto_RealTier);
1856 praat_addAction1 (classAmplitudeTier, 0, U"Down to TableOfReal",
1857 nullptr, 0, NEW_AmplitudeTier_downto_TableOfReal);
1858
1859 praat_addAction1 (classDurationTier, 0, U"DurationTier help", nullptr, 0, HELP_DurationTier_help);
1860 praat_addAction1 (classDurationTier, 1, U"View & Edit || Edit",
1861 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_DurationTier_edit);
1862 praat_addAction1 (classDurationTier, 0, U"View & Edit with Sound?",
1863 nullptr, 0, HINT_DurationTier_Sound_edit);
1864 praat_addAction1 (classDurationTier, 0, U"& Manipulation: Replace?",
1865 nullptr, 0, HINT_DurationTier_Manipulation_replace);
1866 praat_addAction1 (classDurationTier, 0, U"Query -", nullptr, 0, nullptr);
1867 praat_TimeTier_query_init (classDurationTier);
1868 praat_addAction1 (classDurationTier, 1, U"-- get content --",
1869 nullptr, 1, nullptr);
1870 praat_addAction1 (classDurationTier, 1, U"Get value at time...",
1871 nullptr, 1, REAL_DurationTier_getValueAtTime);
1872 praat_addAction1 (classDurationTier, 1, U"Get value at index...",
1873 nullptr, 1, REAL_DurationTier_getValueAtIndex);
1874 praat_addAction1 (classDurationTier, 1, U"Get target duration...",
1875 nullptr, 1, REAL_DurationTier_getTargetDuration);
1876 praat_addAction1 (classDurationTier, 0, U"Modify -", nullptr, 0, nullptr);
1877 praat_TimeTier_modify_init (classDurationTier);
1878 praat_addAction1 (classDurationTier, 0, U"Add point...",
1879 nullptr, 1, MODIFY_DurationTier_addPoint);
1880 praat_addAction1 (classDurationTier, 0, U"Formula...",
1881 nullptr, 1, MODIFY_DurationTier_formula);
1882 praat_addAction1 (classDurationTier, 0, U"Convert", nullptr, 0, nullptr);
1883 praat_addAction1 (classDurationTier, 0, U"Down to PointProcess",
1884 nullptr, 0, NEW_DurationTier_downto_PointProcess);
1885 praat_addAction1 (classDurationTier, 0, U"Down to RealTier",
1886 nullptr, 0, NEW_DurationTier_downto_RealTier);
1887
1888 praat_addAction1 (classFormantGrid, 0, U"FormantGrid help", nullptr, 0, HELP_FormantGrid_help);
1889 praat_addAction1 (classFormantGrid, 1, U"View & Edit || Edit",
1890 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_FormantGrid_edit);
1891 praat_addAction1 (classFormantGrid, 0, U"Modify -", nullptr, 0, nullptr);
1892 praat_TimeFunction_modify_init (classFormantGrid);
1893 praat_addAction1 (classFormantGrid, 0, U"Formula (frequencies)...",
1894 nullptr, 1, MODIFY_FormantGrid_formula_frequencies);
1895 /*praat_addAction1 (classFormantGrid, 0, U"Formula (bandwidths)...",
1896 nullptr, 1, MODIFY_FormantGrid_formula_bandwidths);*/
1897 praat_addAction1 (classFormantGrid, 0, U"Add formant point...",
1898 nullptr, 1, MODIFY_FormantGrid_addFormantPoint);
1899 praat_addAction1 (classFormantGrid, 0, U"Add bandwidth point...",
1900 nullptr, 1, MODIFY_FormantGrid_addBandwidthPoint);
1901 praat_addAction1 (classFormantGrid, 0, U"Remove formant points between...",
1902 nullptr, 1, MODIFY_FormantGrid_removeFormantPointsBetween);
1903 praat_addAction1 (classFormantGrid, 0, U"Remove bandwidth points between...",
1904 nullptr, 1, MODIFY_FormantGrid_removeBandwidthPointsBetween);
1905 praat_addAction1 (classFormantGrid, 0, U"Convert -", nullptr, 0, nullptr);
1906 praat_addAction1 (classFormantGrid, 0, U"To Formant...",
1907 nullptr, 1, NEW_FormantGrid_to_Formant);
1908
1909 praat_addAction1 (classFormantTier, 0, U"Draw -", nullptr, 0, nullptr);
1910 praat_addAction1 (classFormantTier, 0, U"Speckle...",
1911 nullptr, 1, GRAPHICS_FormantTier_speckle);
1912 praat_addAction1 (classFormantTier, 0, U"Query -", nullptr, 0, nullptr);
1913 praat_TimeTier_query_init (classFormantTier);
1914 praat_addAction1 (classFormantTier, 1, U"-- get value --",
1915 nullptr, 1, nullptr);
1916 praat_addAction1 (classFormantTier, 1, U"Get value at time...",
1917 nullptr, 1, REAL_FormantTier_getValueAtTime);
1918 praat_addAction1 (classFormantTier, 1, U"Get bandwidth at time...",
1919 nullptr, 1, REAL_FormantTier_getBandwidthAtTime);
1920 praat_addAction1 (classFormantTier, 0, U"Modify -", nullptr, 0, nullptr);
1921 praat_TimeTier_modify_init (classFormantTier);
1922 praat_addAction1 (classFormantTier, 0, U"Add point...",
1923 nullptr, 1, MODIFY_FormantTier_addPoint);
1924 praat_addAction1 (classFormantTier, 0, U"Down", nullptr, 0, nullptr);
1925 praat_addAction1 (classFormantTier, 0, U"Down to TableOfReal...",
1926 nullptr, 0, NEW_FormantTier_downto_TableOfReal);
1927
1928 praat_addAction1 (classIntensityTier, 0, U"IntensityTier help", nullptr, 0, HELP_IntensityTier_help);
1929 praat_addAction1 (classIntensityTier, 1, U"View & Edit || Edit",
1930 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_IntensityTier_viewAndEdit);
1931 praat_addAction1 (classIntensityTier, 0, U"View & Edit with Sound?",
1932 nullptr, 0, HINT_IntensityTier_Sound_viewAndEdit);
1933 praat_addAction1 (classIntensityTier, 0, U"Query -", nullptr, 0, nullptr);
1934 praat_TimeTier_query_init (classIntensityTier);
1935 praat_addAction1 (classIntensityTier, 1, U"-- get content --",
1936 nullptr, 1, nullptr);
1937 praat_addAction1 (classIntensityTier, 1, U"Get value at time...",
1938 nullptr, 1, REAL_IntensityTier_getValueAtTime);
1939 praat_addAction1 (classIntensityTier, 1, U"Get value at index...",
1940 nullptr, 1, REAL_IntensityTier_getValueAtIndex);
1941 praat_addAction1 (classIntensityTier, 0, U"Modify -", nullptr, 0, nullptr);
1942 praat_TimeTier_modify_init (classIntensityTier);
1943 praat_addAction1 (classIntensityTier, 0, U"Add point...",
1944 nullptr, 1, MODIFY_IntensityTier_addPoint);
1945 praat_addAction1 (classIntensityTier, 0, U"Formula...",
1946 nullptr, 1, MODIFY_IntensityTier_formula);
1947 praat_addAction1 (classIntensityTier, 0, U"Convert", nullptr, 0, nullptr);
1948 praat_addAction1 (classIntensityTier, 0, U"To AmplitudeTier",
1949 nullptr, 0, NEW_IntensityTier_to_AmplitudeTier);
1950 praat_addAction1 (classIntensityTier, 0, U"Down to PointProcess",
1951 nullptr, 0, NEW_IntensityTier_downto_PointProcess);
1952 praat_addAction1 (classIntensityTier, 0, U"Down to RealTier",
1953 nullptr, 0, NEW_IntensityTier_downto_RealTier);
1954 praat_addAction1 (classIntensityTier, 0, U"Down to TableOfReal",
1955 nullptr, 0, NEW_IntensityTier_downto_TableOfReal);
1956
1957 praat_addAction1 (classPitchTier, 1, U"Save as PitchTier spreadsheet file... || Write to PitchTier spreadsheet file...",
1958 nullptr, 0, SAVE_PitchTier_writeToPitchTierSpreadsheetFile);
1959 praat_addAction1 (classPitchTier, 1, U"Save as headerless spreadsheet file... || Write to headerless spreadsheet file...",
1960 nullptr, 0, SAVE_PitchTier_writeToHeaderlessSpreadsheetFile);
1961 praat_addAction1 (classPitchTier, 0, U"PitchTier help", nullptr, 0, HELP_PitchTier_help);
1962 praat_addAction1 (classPitchTier, 1, U"View & Edit || Edit",
1963 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_PitchTier_viewAndEdit);
1964 praat_addAction1 (classPitchTier, 0, U"View & Edit with Sound?",
1965 nullptr, 0, HINT_PitchTier_Sound_viewAndEdit);
1966 praat_addAction1 (classPitchTier, 0, U"Play -", nullptr, 0, nullptr);
1967 praat_addAction1 (classPitchTier, 0, U"Play pulses",
1968 nullptr, 1, PLAY_PitchTier_play);
1969 praat_addAction1 (classPitchTier, 0, U"Hum",
1970 nullptr, 1, PLAY_PitchTier_hum);
1971 praat_addAction1 (classPitchTier, 0, U"Play sine",
1972 nullptr, 1, PLAY_PitchTier_playSine);
1973 praat_addAction1 (classPitchTier, 0, U"Draw...",
1974 nullptr, 0, GRAPHICS_PitchTier_draw);
1975 praat_addAction1 (classPitchTier, 0, U"& Manipulation: Replace?",
1976 nullptr, 0, INFO_PitchTier_Manipulation_replace);
1977 praat_addAction1 (classPitchTier, 0, U"Query -", nullptr, 0, nullptr);
1978 praat_TimeTier_query_init (classPitchTier);
1979 praat_addAction1 (classPitchTier, 1, U"-- get content --",
1980 nullptr, 1, nullptr);
1981 praat_addAction1 (classPitchTier, 1, U"Get value at time...",
1982 nullptr, 1, REAL_PitchTier_getValueAtTime);
1983 praat_addAction1 (classPitchTier, 1, U"Get value at index...",
1984 nullptr, 1, REAL_PitchTier_getValueAtIndex);
1985 praat_addAction1 (classPitchTier, 1, U"-- get statistics --",
1986 nullptr, 1, nullptr);
1987 praat_addAction1 (classPitchTier, 1, U"Get mean (curve)...",
1988 nullptr, 1, REAL_PitchTier_getMean_curve);
1989 praat_addAction1 (classPitchTier, 1, U"Get mean (points)...",
1990 nullptr, 1, REAL_PitchTier_getMean_points);
1991 praat_addAction1 (classPitchTier, 1, U"Get standard deviation (curve)...",
1992 nullptr, 1, REAL_PitchTier_getStandardDeviation_curve);
1993 praat_addAction1 (classPitchTier, 1, U"Get standard deviation (points)...",
1994 nullptr, 1, REAL_PitchTier_getStandardDeviation_points);
1995 praat_addAction1 (classPitchTier, 0, U"Modify -", nullptr, 0, nullptr);
1996 praat_TimeTier_modify_init (classPitchTier);
1997 praat_addAction1 (classPitchTier, 0, U"Add point...",
1998 nullptr, 1, MODIFY_PitchTier_addPoint);
1999 praat_addAction1 (classPitchTier, 0, U"Formula...",
2000 nullptr, 1, MODIFY_PitchTier_formula);
2001 praat_addAction1 (classPitchTier, 0, U"-- stylize --",
2002 nullptr, 1, nullptr);
2003 praat_addAction1 (classPitchTier, 0, U"Stylize...",
2004 nullptr, 1, MODIFY_PitchTier_stylize);
2005 praat_addAction1 (classPitchTier, 0, U"Interpolate quadratically...",
2006 nullptr, 1, MODIFY_PitchTier_interpolateQuadratically);
2007 praat_addAction1 (classPitchTier, 0, U"-- modify frequencies --",
2008 nullptr, 1, nullptr);
2009 praat_addAction1 (classPitchTier, 0, U"Shift frequencies...",
2010 nullptr, 1, MODIFY_PitchTier_shiftFrequencies);
2011 praat_addAction1 (classPitchTier, 0, U"Multiply frequencies...",
2012 nullptr, 1, MODIFY_PitchTier_multiplyFrequencies);
2013 praat_addAction1 (classPitchTier, 0, U"Synthesize -", nullptr, 0, nullptr);
2014 praat_addAction1 (classPitchTier, 0, U"To PointProcess",
2015 nullptr, 1, NEW_PitchTier_to_PointProcess);
2016 praat_addAction1 (classPitchTier, 0, U"To Sound (pulse train)...",
2017 nullptr, 1, NEW_PitchTier_to_Sound_pulseTrain);
2018 praat_addAction1 (classPitchTier, 0, U"To Sound (phonation)...",
2019 nullptr, 1, NEW_PitchTier_to_Sound_phonation);
2020 praat_addAction1 (classPitchTier, 0, U"To Sound (sine)...",
2021 nullptr, 1, NEW_PitchTier_to_Sound_sine);
2022 praat_addAction1 (classPitchTier, 0, U"Convert -", nullptr, 0, nullptr);
2023 praat_addAction1 (classPitchTier, 0, U"Down to PointProcess",
2024 nullptr, 1, NEW_PitchTier_downto_PointProcess);
2025 praat_addAction1 (classPitchTier, 0, U"Down to RealTier",
2026 nullptr, 1, NEW_PitchTier_downto_RealTier);
2027 praat_addAction1 (classPitchTier, 0, U"Down to TableOfReal...",
2028 nullptr, 1, NEW_PitchTier_downto_TableOfReal);
2029
2030 praat_addAction1 (classPointProcess, 0, U"PointProcess help", nullptr, 0, HELP_PointProcess_help);
2031 praat_addAction1 (classPointProcess, 1, U"View & Edit || View & Edit alone || Edit alone",
2032 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_PointProcess_viewAndEdit);
2033 praat_addAction1 (classPointProcess, 0, U"View & Edit with Sound?",
2034 nullptr, GuiMenu_NO_API, HINT_PointProcess_Sound_viewAndEdit);
2035 praat_addAction1 (classPointProcess, 0, U"Play -", nullptr, 0, nullptr);
2036 praat_addAction1 (classPointProcess, 0, U"Play as pulse train",
2037 nullptr, 1, PLAY_PointProcess_play);
2038 praat_addAction1 (classPointProcess, 0, U"Hum",
2039 nullptr, 1, PLAY_PointProcess_hum);
2040 praat_addAction1 (classPointProcess, 0, U"Draw...",
2041 nullptr, 0, GRAPHICS_PointProcess_draw);
2042 praat_addAction1 (classPointProcess, 0, U"Query -", nullptr, 0, nullptr);
2043 praat_TimeFunction_query_init (classPointProcess);
2044 praat_addAction1 (classPointProcess, 1, U"-- script get --",
2045 nullptr, 1, nullptr);
2046 praat_addAction1 (classPointProcess, 1, U"Get number of points",
2047 nullptr, 1, INTEGER_PointProcess_getNumberOfPoints);
2048 praat_addAction1 (classPointProcess, 1, U"Get low index...",
2049 nullptr, 1, INTEGER_PointProcess_getLowIndex);
2050 praat_addAction1 (classPointProcess, 1, U"Get high index...",
2051 nullptr, 1, INTEGER_PointProcess_getHighIndex);
2052 praat_addAction1 (classPointProcess, 1, U"Get nearest index...",
2053 nullptr, 1, INTEGER_PointProcess_getNearestIndex);
2054 praat_addAction1 (classPointProcess, 1, U"Get time from index...",
2055 nullptr, 1, REAL_PointProcess_getTimeFromIndex);
2056 praat_addAction1 (classPointProcess, 1, U"Get interval...",
2057 nullptr, 1, REAL_PointProcess_getInterval);
2058 praat_addAction1 (classPointProcess, 1, U"-- periods --",
2059 nullptr, 1, nullptr);
2060 praat_addAction1 (classPointProcess, 1, U"Get number of periods...",
2061 nullptr, 1, INTEGER_PointProcess_getNumberOfPeriods);
2062 praat_addAction1 (classPointProcess, 1, U"Get mean period...",
2063 nullptr, 1, REAL_PointProcess_getMeanPeriod);
2064 praat_addAction1 (classPointProcess, 1, U"Get stdev period...",
2065 nullptr, 1, REAL_PointProcess_getStdevPeriod);
2066 praat_addAction1 (classPointProcess, 1, U"Get jitter (local)...",
2067 nullptr, 1, REAL_PointProcess_getJitter_local);
2068 praat_addAction1 (classPointProcess, 1, U"Get jitter (local, absolute)...",
2069 nullptr, 1, REAL_PointProcess_getJitter_local_absolute);
2070 praat_addAction1 (classPointProcess, 1, U"Get jitter (rap)...",
2071 nullptr, 1, REAL_PointProcess_getJitter_rap);
2072 praat_addAction1 (classPointProcess, 1, U"Get jitter (ppq5)...",
2073 nullptr, 1, REAL_PointProcess_getJitter_ppq5);
2074 praat_addAction1 (classPointProcess, 1, U"Get jitter (ddp)...",
2075 nullptr, 1, REAL_PointProcess_getJitter_ddp);
2076 praat_addAction1 (classPointProcess, 0, U"Modify -", nullptr, 0, nullptr);
2077 praat_TimeFunction_modify_init (classPointProcess);
2078 praat_addAction1 (classPointProcess, 0, U"Add point...",
2079 nullptr, 1, MODIFY_PointProcess_addPoint);
2080 praat_addAction1 (classPointProcess, 0, U"Add points...",
2081 nullptr, 1, MODIFY_PointProcess_addPoints);
2082 praat_addAction1 (classPointProcess, 0, U"Remove point...",
2083 nullptr, 1, MODIFY_PointProcess_removePoint);
2084 praat_addAction1 (classPointProcess, 0, U"Remove point near...",
2085 nullptr, 1, MODIFY_PointProcess_removePointNear);
2086 praat_addAction1 (classPointProcess, 0, U"Remove points...",
2087 nullptr, 1, MODIFY_PointProcess_removePoints);
2088 praat_addAction1 (classPointProcess, 0, U"Remove points between...",
2089 nullptr, 1, MODIFY_PointProcess_removePointsBetween);
2090 praat_addAction1 (classPointProcess, 0, U"-- voice --",
2091 nullptr, 1, nullptr);
2092 praat_addAction1 (classPointProcess, 0, U"Fill...",
2093 nullptr, 1, MODIFY_PointProcess_fill);
2094 praat_addAction1 (classPointProcess, 0, U"Voice...",
2095 nullptr, 1, MODIFY_PointProcess_voice);
2096 praat_addAction1 (classPointProcess, 0, U"Annotate -", nullptr, 0, nullptr);
2097 praat_addAction1 (classPointProcess, 0, U"To TextGrid...",
2098 nullptr, 1, NEW_PointProcess_to_TextGrid);
2099 praat_addAction1 (classPointProcess, 0, U"-- to single tier --",
2100 nullptr, GuiMenu_HIDDEN | GuiMenu_DEPTH_1, nullptr);
2101 praat_addAction1 (classPointProcess, 0, U"To TextTier",
2102 nullptr, GuiMenu_DEPTH_1 | GuiMenu_HIDDEN, NEW_PointProcess_to_TextTier);
2103 praat_addAction1 (classPointProcess, 0, U"To IntervalTier",
2104 nullptr, GuiMenu_DEPTH_1 | GuiMenu_HIDDEN, NEW_PointProcess_to_IntervalTier);
2105 praat_addAction1 (classPointProcess, 0, U"Analyse -",
2106 nullptr, 0, nullptr);
2107 praat_addAction1 (classPointProcess, 0, U"To PitchTier...",
2108 nullptr, 1, NEW_PointProcess_to_PitchTier);
2109 praat_addAction1 (classPointProcess, 0, U"To TextGrid (vuv)...",
2110 nullptr, 1, NEW_PointProcess_to_TextGrid_vuv);
2111 praat_addAction1 (classPointProcess, 0, U"Synthesize -", nullptr, 0, nullptr);
2112 praat_addAction1 (classPointProcess, 0, U"To Sound (pulse train)...",
2113 nullptr, 1, NEW_PointProcess_to_Sound_pulseTrain);
2114 praat_addAction1 (classPointProcess, 0, U"To Sound (phonation)...",
2115 nullptr, 1, NEW_PointProcess_to_Sound_phonation);
2116 praat_addAction1 (classPointProcess, 0, U"To Sound (hum)",
2117 nullptr, 1, NEW_PointProcess_to_Sound_hum);
2118 praat_addAction1 (classPointProcess, 0, U"Convert -", nullptr, 0, nullptr);
2119 praat_addAction1 (classPointProcess, 0, U"Hack", nullptr, 1, nullptr);
2120 praat_addAction1 (classPointProcess, 0, U"To Matrix",
2121 nullptr, 2, NEW_PointProcess_to_Matrix);
2122 praat_addAction1 (classPointProcess, 0, U"Up to TextTier...",
2123 nullptr, 2, NEW_PointProcess_upto_TextTier);
2124 praat_addAction1 (classPointProcess, 0, U"Up to PitchTier...",
2125 nullptr, 2, NEW_PointProcess_upto_PitchTier);
2126 praat_addAction1 (classPointProcess, 0, U"Up to IntensityTier...",
2127 nullptr, 2, NEW_PointProcess_upto_IntensityTier);
2128 praat_addAction1 (classPointProcess, 0, U"Combine -", nullptr, 0, nullptr);
2129 praat_addAction1 (classPointProcess, 2, U"Union",
2130 nullptr, 1, NEW1_PointProcesses_union);
2131 praat_addAction1 (classPointProcess, 2, U"Intersection",
2132 nullptr, 1, NEW1_PointProcesses_intersection);
2133 praat_addAction1 (classPointProcess, 2, U"Difference",
2134 nullptr, 1, NEW1_PointProcesses_difference);
2135
2136 praat_addAction1 (classRealTier, 0, U"RealTier help",
2137 nullptr, 0, HELP_RealTier_help);
2138 praat_addAction1 (classRealTier, 1, U"View & Edit || Edit",
2139 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_RealTier_viewAndEdit);
2140 praat_addAction1 (classRealTier, 0, U"View & Edit with Sound?",
2141 nullptr, 0, HINT_RealTier_Sound_viewAndEdit);
2142 praat_addAction1 (classRealTier, 0, U"Query -", nullptr, 0, nullptr);
2143 praat_TimeTier_query_init (classRealTier);
2144 praat_addAction1 (classRealTier, 1, U"-- get content --",
2145 nullptr, 1, nullptr);
2146 praat_addAction1 (classRealTier, 1, U"Get value at time...",
2147 nullptr, 1, REAL_RealTier_getValueAtTime);
2148 praat_addAction1 (classRealTier, 1, U"Get value at index...",
2149 nullptr, 1, REAL_RealTier_getValueAtIndex);
2150 praat_addAction1 (classRealTier, 0, U"Modify -", nullptr, 0, nullptr);
2151 praat_TimeTier_modify_init (classRealTier);
2152 praat_addAction1 (classRealTier, 0, U"Add point...",
2153 nullptr, 1, MODIFY_RealTier_addPoint);
2154 praat_addAction1 (classRealTier, 0, U"Formula...",
2155 nullptr, 1, MODIFY_RealTier_formula);
2156 praat_addAction1 (classRealTier, 0, U"Convert", nullptr, 0, nullptr);
2157 praat_addAction1 (classRealTier, 0, U"Down to PointProcess",
2158 nullptr, 0, NEW_RealTier_downto_PointProcess);
2159 praat_addAction1 (classRealTier, 0, U"Down to TableOfReal",
2160 nullptr, 0, NEW_RealTier_downto_TableOfReal);
2161 praat_addAction1 (classRealTier, 0, U"Cast", nullptr, 0, nullptr);
2162 praat_addAction1 (classRealTier, 0, U"To PitchTier",
2163 nullptr, 0, NEW_RealTier_to_PitchTier);
2164 praat_addAction1 (classRealTier, 0, U"To IntensityTier",
2165 nullptr, 0, NEW_RealTier_to_IntensityTier);
2166 praat_addAction1 (classRealTier, 0, U"To DurationTier",
2167 nullptr, 0, NEW_RealTier_to_DurationTier);
2168 praat_addAction1 (classRealTier, 0, U"To AmplitudeTier",
2169 nullptr, 0, NEW_RealTier_to_AmplitudeTier);
2170
2171 praat_addAction1 (classSpectrumTier, 0, U"Draw...",
2172 nullptr, 0, GRAPHICS_SpectrumTier_draw);
2173 praat_addAction1 (classSpectrumTier, 0, U"Tabulate -", nullptr, 0, nullptr);
2174 praat_addAction1 (classSpectrumTier, 1, U"List...",
2175 nullptr, 1, LIST_SpectrumTier_list);
2176 praat_addAction1 (classSpectrumTier, 0, U"Down to Table",
2177 nullptr, 1, NEW_SpectrumTier_downto_Table);
2178 praat_addAction1 (classSpectrumTier, 0, U"Remove points below...",
2179 nullptr, 0, MODIFY_SpectrumTier_removePointsBelow);
2180
2181 praat_addAction2 (classAmplitudeTier, 1, classSound, 1, U"View & Edit || Edit",
2182 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_AmplitudeTier_viewAndEdit);
2183 praat_addAction2 (classAmplitudeTier, 1, classSound, 1, U"Multiply",
2184 nullptr, 0, NEW1_Sound_AmplitudeTier_multiply);
2185 praat_addAction2 (classDurationTier, 1, classSound, 1, U"View & Edit || Edit",
2186 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_DurationTier_edit);
2187 praat_addAction2 (classFormantGrid, 1, classSound, 1, U"Filter",
2188 nullptr, 0, NEW1_Sound_FormantGrid_filter);
2189 praat_addAction2 (classFormantGrid, 1, classSound, 1, U"Filter (no scale)",
2190 nullptr, 0, NEW1_Sound_FormantGrid_filter_noscale);
2191 praat_addAction2 (classFormantTier, 1, classSound, 1, U"Filter",
2192 nullptr, 0, NEW1_Sound_FormantTier_filter);
2193 praat_addAction2 (classFormantTier, 1, classSound, 1, U"Filter (no scale)",
2194 nullptr, 0, NEW1_Sound_FormantTier_filter_noscale);
2195 praat_addAction2 (classIntensityTier, 1, classPointProcess, 1, U"To IntensityTier",
2196 nullptr, 0, NEW1_IntensityTier_PointProcess_to_IntensityTier);
2197 praat_addAction2 (classIntensityTier, 1, classSound, 1, U"View & Edit || Edit",
2198 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_IntensityTier_viewAndEdit);
2199 praat_addAction2 (classIntensityTier, 1, classSound, 1, U"Multiply...",
2200 nullptr, 0, NEW1_Sound_IntensityTier_multiply);
2201 praat_addAction2 (classIntensityTier, 1, classSound, 1, U"Multiply",
2202 nullptr, GuiMenu_DEPRECATED_2005, NEW1_Sound_IntensityTier_multiply_old); // replace with Multiply: 1
2203 praat_addAction2 (classPitchTier, 1, classPointProcess, 1, U"To PitchTier",
2204 nullptr, 0, NEW1_PitchTier_PointProcess_to_PitchTier);
2205 praat_addAction2 (classPitchTier, 1, classSound, 1, U"View & Edit || Edit",
2206 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_PitchTier_viewAndEdit);
2207 praat_addAction2 (classPointProcess, 1, classSound, 1, U"View & Edit || Edit",
2208 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_PointProcess_viewAndEdit);
2209 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Query", nullptr, 0, nullptr);
2210 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (local)...",
2211 nullptr, 0, REAL_Point_Sound_getShimmer_local);
2212 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (local_dB)...",
2213 nullptr, 0, REAL_Point_Sound_getShimmer_local_dB);
2214 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (apq3)...",
2215 nullptr, 0, REAL_Point_Sound_getShimmer_apq3);
2216 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (apq5)...",
2217 nullptr, 0, REAL_Point_Sound_getShimmer_apq5);
2218 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (apq11)...",
2219 nullptr, 0, REAL_Point_Sound_getShimmer_apq11);
2220 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Get shimmer (dda)...",
2221 nullptr, 0, REAL_Point_Sound_getShimmer_dda);
2222 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Modify", nullptr, 0, nullptr);
2223 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Transplant time domain",
2224 nullptr, 0, MODIFY_Point_Sound_transplantDomain);
2225 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Analyse", nullptr, 0, nullptr);
2226 /*praat_addAction2 (classPointProcess, 1, classSound, 1, U"To Manipulation",
2227 nullptr, 0, NEW1_Sound_PointProcess_to_Manipulation);*/
2228 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To AmplitudeTier (point)",
2229 nullptr, 0, NEW1_PointProcess_Sound_to_AmplitudeTier_point);
2230 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To AmplitudeTier (period)...",
2231 nullptr, 0, NEW1_PointProcess_Sound_to_AmplitudeTier_period);
2232 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To H1minusH2Tier...",
2233 nullptr, 0, NEW1_PointProcess_Sound_to_H1minusH2Tier);
2234 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To Ltas...",
2235 nullptr, 0, NEW1_PointProcess_Sound_to_Ltas);
2236 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To Ltas (only harmonics)...",
2237 nullptr, 0, NEW1_PointProcess_Sound_to_Ltas_harmonics);
2238 praat_addAction2 (classPointProcess, 1, classSound, 1, U"Synthesize", nullptr, 0, nullptr);
2239 praat_addAction2 (classPointProcess, 1, classSound, 1, U"To Sound ensemble...",
2240 nullptr, 0, NEW1_Sound_PointProcess_to_SoundEnsemble_correlate);
2241 praat_addAction2 (classRealTier, 1, classPointProcess, 1, U"To RealTier",
2242 nullptr, 0, NEW1_RealTier_PointProcess_to_RealTier);
2243 praat_addAction2 (classRealTier, 1, classSound, 1, U"View & Edit || Edit",
2244 nullptr, GuiMenu_ATTRACTIVE, EDITOR_ONE_WITH_ONE_RealTier_viewAndEdit);
2245 }
2246
2247 /* End of file praat_Tiers.cpp */