This is dangerous because if you don't pay enough attention there's a good chance to end up with an infinite loop. But Praat allows you to manipulate counter variables as well. you leave it to the built-in mechanism to increment the value and just use this value in a formula or as a reference to tiers or intervals or whatever. Usually, you use counter variables read-only, i.e. Then, each tier is considered successively, querying the number of intervals of the current tier, followed by the label extraction loop.Ĭounter variables of for-loops are ordinary variables that may be used like other variables in the loop's code block. Summary: First, the number of available tiers is determined. # loop through all intervals of current tier and extract labels one by one NumberOfIntervals = Get number of intervals: i # determine number of intervals of current tier A query for the number of tiers gives us the number of repetitions: If the TextGrid includes 3 tiers we need to extract labels 3 times in succession if the TextGrid includes 10 tiers we need our code block to run 10 times and so on. So, obviously, the number of repetitions for this task depends on the number of tiers in the selected TextGrid. In the code block of the outer loop we want to extract all labels of a given tier. Let's start with the outer loop by determining the necessary number of repetitions. The outer loop handles the tiers one by one, while the inner loop handles the intervals of each tier. If you have more than one tier and want to list all labels in all tiers you need two nested loops. So far, we've extracted labels from tier 1. Above, I used the formula numberOfIntervals / 2 + 1 to specify the interval after numberOfIntervals / 2 as starting point. Between from and to the initialization value can be specified like the stop value: with a literal number, a variable, or a formula. In the new Editor window, select Edit > Paste history. Hopefully it will all make more sense to you now if it didn't before. Download the text grid for workshop 3 (14 kb).NumberOfIntervals = Get number of intervals: 1įor i from numberOfIntervals / 2 + 1 to numberOfIntervalsįrom is another reserved word which may optionally be inserted, expanding the syntactic frame of the for-loop. How to script settings windows' in the Praat Scripting Tutorial.Download the audio file for workshop 3 in FLAC format (16.3 MB).Download the tutorial for workshop 3 in PPTX format (4.28 MB).Download the tutorial for workshop 3 in PDF format (4.2 MB).Measuring the center of gravity of fricatives.Measuring voice quality (jitter, shimmer, HNR).Workshop 3: Measuring phonetic phenomena I Download the scripts used in the tutorial (10 kB)ĭownload Lenz (a program that allows you to type IPA symbols directly into Praat and other programs).ĭownload the Praat syntax highlighting file (installation instructions can be found here).Download the tutorial and TextGrid for workshop 2 in PowerPoint 2007 format (3.0 MB).Download the tutorial and TextGrid for workshop 2 in PDF format (1.1 MB).How to use specific scripts, such as MaSCoT.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |