| 1 |
#! Praat script TextGridWindow.praat |
| 2 |
# Paul Boersma 2022-05-24 |
| 3 |
|
| 4 |
exitScript: "Please run this script only in parts." |
| 5 |
|
| 6 |
# |
| 7 |
# Text-cursor-based label splitting. |
| 8 |
# |
| 9 |
Create Sound from formula: "sineWithNoise", 1, 0.0, 1.0, 44100, ~1/2 * sin(2*pi*377*x) + randomGauss(0,0.1) |
| 10 |
To TextGrid: "one two", "" |
| 11 |
Set interval text: 1, 1, "abcd" |
| 12 |
selectObject: "Sound sineWithNoise", "TextGrid sineWithNoise" |
| 13 |
View & Edit |
| 14 |
# |
| 15 |
# If: |
| 16 |
# you put the text cursor between "ab" and "cd" in the text field, |
| 17 |
# then click in the boundary insertion circle on tier 1 |
| 18 |
# Then: |
| 19 |
# a boundary should appear on tier 1, |
| 20 |
# with "ab" in the interval on its left, |
| 21 |
# and "cd" in the interval on its right |
| 22 |
# |
| 23 |
# (last checked 2022-05-24 for Mac, Windows, Linux) |
| 24 |
# |
| 25 |
# If: |
| 26 |
# you select the cd interval, |
| 27 |
# then put the time cursor somewhere in the "cd" interval, |
| 28 |
# then click in the boundary insertion circle on tier 2 |
| 29 |
# Then: |
| 30 |
# a boundary should appear on tier 2, |
| 31 |
# with nothing in the interval on its left, |
| 32 |
# and nothing in the interval on its right |
| 33 |
# |
| 34 |
# (last checked 2022-05-24 for Mac, Windows, Linux) |
| 35 |
# |
| 36 |
# If: |
| 37 |
# you put "hallo" in the first interval on tier 2, |
| 38 |
# then you select the "ab" interval on tier 1, |
| 39 |
# then put the time cursor somewhere in the "ab" interval, |
| 40 |
# then click in the boundary insertion circle on tier 2 |
| 41 |
# Then: |
| 42 |
# a boundary should appear on tier 2, |
| 43 |
# with "hallo" in the interval on its left, |
| 44 |
# and nothing in the interval on its right |
| 45 |
# |
| 46 |
# (last checked 2022-05-24 for Mac, Windows, Linux) |
| 47 |
# |
| 48 |
removeObject: "Sound sineWithNoise", "TextGrid sineWithNoise" |