clearinfo appendInfoLine: "File name", tab$, "Label", tab$, "Duration", tab$, "F1", tab$, "F2" tier = 1 ####################################### ####################################### # vocal tract initialization # delete content Draw window for a plain window Erase all # choose frame from 0-5 (x-axis) and 0-4 (y-axis) Select outer viewport: 0, 5, 0, 4 # Graphic settings; colour, line width, line type, font type, font size Black Line width: 1 Plain line Helvetica 10 # set units of your axes (left and right, bottom and top) Axes: 3000, 0, 1000, 0 # to draw a number of equally spaced marks into the drawing area: units, distance, write numbers (?), draw ticks (?), draw dotted lines (?) Marks right every: 1, 500, "yes", "yes", "yes" Marks top every: 1, 500, "yes", "yes", "yes" # draw a rectangle inside the drawing area Draw inner box # set captions Text right: "yes", "F1" Text top: "yes", "F2" ####################################### ####################################### name$ = "Minimal_Pairs" sound_name$ = name$ + ".wav" text_name$ = name$ + ".TextGrid" Read from file: sound_name$ Read from file: text_name$ selectObject: "Sound " + name$ To Formant (burg): 0, 5, 5500, 0.025, 50 selectObject: "TextGrid " + name$ interval_nr = Get number of intervals: 1 for int from 1 to interval_nr selectObject: "TextGrid " + name$ label$ = Get label of interval: tier, int start = Get start point: tier, int end = Get end point: tier, int #duration = round((end-start)*1000) duration = (end-start)*1000 centre = (start + end) / 2 selectObject: "Formant " + name$ f1 = Get value at time: 1, centre, "Hertz", "Linear" f2 = Get value at time: 2, centre, "Hertz", "Linear" # Drawing settings: font, font size, colour Times 12 Black # write F1 and F2 values as well as the label in the vocal tract drawing # horizontal and vertical alignment of the label Text: f2, "Centre", f1, "Half", label$ appendInfoLine: name$, tab$, label$, tab$, duration, tab$, f1, tab$, f2 endfor selectObject: "Sound " + name$ plusObject: "TextGrid " + name$ Remove