4 # Draw the correct tone tracks
6 form Mandarin Tone contours
13 .pinyin$ = replace_regex$(.pinyin$, "^\s*(.+)\s*$", "\1", 1)
14 .pinyin$ = replace_regex$(.pinyin$, "5", "0", 0)
17 # Generate reference example
18 # Start with a range of 1 octave and a speed factor of 1
21 execute ToneScript.praat '.pinyin$' '.register' 1 1 CorrectPitch
23 freqTop = 1.5 * .register
26 select Pitch '.pinyin$'
27 demo Select outer viewport... 20 80 40 100
28 demo Axes... 0 100 0 100
31 demo Draw... 0 0 0 'freqTop' 0
34 demo Draw... 0 0 0 'freqTop' 0
35 demo Select outer viewport... 0 100 0 100
36 demo Axes... 0 100 0 100
39 select Pitch '.pinyin$'