11/28/2023 0 Comments Praat script duration manipulationInfo window, user interaction, file handling Īdvanced TopicsArguments to commands/scripts.Jumps, loops for/endfor# throws = 0repeat sum = randomInteger(1,6) + randomInteger(1,6) throws = throws + 1until sum = 12echo Took me ‘throws’ trials#throws = 1sum = randomInteger(1,6) + randomInteger(1,6)while sum 12 throws = throws + 1 sum = randomInteger(1,6) + randomInteger(1,6)endwhileecho Took me ‘throws’ trials.e.g.) for j from 1 to 5 square‘j’ = j*j endforsquare1 = 1, square2 = 4, square3 = 9, square4 = 16, square5 = 25.Array variables: simulated with quote substitution.e.g.) echo The number of characters is ‘lengthOfSentence’.Variable substitution (in between single quotes), ‘variable$’.Predefined string variables: newline$, tab$, shellDirectory$.e.g.) sentenceToProcess$ = “Praat rules”.String variables (end in a dollar sign), variable$ = string.myStringVariable$ = left$(myMainSentence$, (lengthOfUtterance-…lengthOfRightWord)).You can split long command lines into multiple lines using ….Comments lines start with # or ! or (# preferred). You can use indenting to make your script readable (tabs preferred)sum = 0 for i to 10 for j to 10 sum = sum + i*j endfor endfor pause The total sum is ‘sum’.All white spaces (and tabs) at line beginnings are ignored.uTonesTier 1 'intervalText$' Now a script! "'uTonesTierName$' 'sTonesTierName$'" 'sTonesTierName$' Rename… textgridObj plus Sound soundObj Edit pause Insert a sample interval? select TextGrid textgridObj Insert boundary. 'fileLocation$' Rename… soundObj To TextGrid. 1 1 test = fileLocation$ = "D:\recording\2syllAP-LHa.wav" uTonesTierName$ = "phonological" sTonesTierName$ = "phonetic" uTonesTier = 1 intervalText$ = "test" Read from file. "phonological phonetic" phonetic plus Sound 2syllAP-LHa Edit select TextGrid 2syllAP-LHa Insert boundary. D:\recording\2syllAP-LHa.wav To TextGrid. Clear history to erase all the earlier commands īasic Topics: How to run a script (example) Paste history Read from file.Constants could be replaced with variables.Can be used to copy/paste recorded commands.Edit => Paste history in the script editor.An executable text with menu commands and action commands.TextGrid īasic Topics: How to run a script (example) Query results can be used to modify an object, e.g.myPointLabel$ = Get label of point… 1 1.Query results can be used to put information into a variable.Information is displayed by default in the Info window.Gives you information about the selected object.Point tier: a sequence of labeled points.Interval tier: a connected sequence of labeled intervals with boundaries in between.Used for annotation (segmentation and labeling).Created with a sound object selected Annotate-To TextGrid….Types of objectsSound, Spectrum, Spectrogram, TextGrid, Pitch, Formant, Intensity, Manipulation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |