a brief documentation about the variables ############################### NOTE ON VARIABLE SUBSTITUTION This might help understanding what Paul meant by allowing/not allowing substitution, mixed language, and resolving mixing. This will work: appendInfoLine("total number of tone 1 in ", i-1, " files is ", totalNumOfTone1) This will not work: printline total number of tone 1 in 'i-1' files is 'totalNumOfTone1' but this will work too: Get label of interval... t i-1 basically 'i' can appear but 'i-1' cannot compute within the single quotation marks. ################################ NOTE:The concatenation file and the sound cluster file are completely indepedent processes. If there is a mistake in one of the sound cluster results, it could be that some words are not correctly annotated (such as for their tone).But it's certainly possible for the sound cluster script to run through without mistake warning because it only finds all tone x words it can based on the results of the tone annotations. (this happened when i ran it through four versions of the same aria, and three versions have 25 tone 3 words each, while the other one has only 24 tone 3 words. it turned out that one word in tone 3 was wrongly labeled as tone 5.this is due to the mistakes of the initial manual labelings, not the automatic labeling of course, which would always generate consistent labels. #######PekOperaAnnotation################# ---------main----------------- nos=number of sound objects selected mos=number of textgrid objects selected nt=number of tiers (before the script is ran) aria$=name of the current aria ----------SetLyrics()----------- lyrics=the read-in text file that contains the lyrics line$=the string that contains the current line of lyrics leng=length of the current line of lyrics totalNumOfPhrase=the total number of phrases in the lyrics file tierLyrics=the tier number for the lyrics tier ------SetWords()--------- numOfIntWordTier=number of intervals on the word tier countEmptyWord=the number of empty intervals on word tier ------PhraseAlign()------- numOfPhrase=number of phrases in the current line of lyrics, possibly separated by coma totalNumOfPhrase=total number of phrases in the entire lyrics text$[i]=each element in this string array holds exactly one phrase from parsing the lyrics ------CheckConsistency()------ tierWord=tier number of the word tier numOfPhrases=(not to be confused with numOfPhrase in the PhraseAlign procedure)after the lyrics are all set, this variable holds the total number of phrases in the lyrics tier(apart from 'ac' intervals and 'silence' intervals. This should equal the 'totalNumOfPhrase' in lyrics text, in the SetLyrics procedure, if that variable was computed as necessary. numEmptyWordpp = used to count the empty word intervals per phrase on the word tier numint=the number of the current interval being evaluated on the word tier(as to whether it is empty) end=the end time of the current phrase wordEnd=the end time of the current word interval being evaluated phrase$=the string containing the text of the current phrase being evaluated -------GetWords()--------- #c = is used to hold the number of words in the current line; #wordCount = holds the total number of words so far ################ MODIFICATIONS############### to include the coma and stop into the phrase lyrics: line 368: text$ [n]=left$(line$,position[y]-1) changed into: text$ [n]=left$(line$,position[y]) same for line 360 and 374. I have modified it so that the coma and stop will show up on the lyrics tier, but will not on the word tier bc word tier is segmented by the tone marks regardless of punctuations. ###############PekOperaAnnotation Ends################### @@ @ @ @ @ @ @ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @ @ @ @ @ @ @ @ @ ###############Sound Cluster########################## numOfTone=number of tone x words in the current file totalNumOfTone=total number of tone x words in all files currently processed soundOne'j'=the extracted sound segment of tone x in an array soundOneC'j'the extracted sound segment plus the 0.2s of silence ready to be concatenated, stored in an array #all the positions of all tone x word across 'i' files are stored in the interval[0] to interval [totalNumOfTone1-1] array #############Sound Cluster Ends#######################