From 3f53a6dee882bcb83ec3bfe55a74ce651a90adf1 Mon Sep 17 00:00:00 2001 From: Rob van Son Date: Wed, 15 Jan 2014 11:54:34 +0100 Subject: [PATCH] BAckground redesign and experiments with the Pitch tracker --- Config.praat | 3 --- Data/Background.Table | 12 ++++++------ InitialiseSGC2.praat | 2 ++ MainPage.praat | 12 +++++------- ToneProt/ToneRecognition.praat | 2 +- ToneProt/ToneScript.praat | 3 ++- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Config.praat b/Config.praat index c1afef8..e7d2259 100644 --- a/Config.praat +++ b/Config.praat @@ -750,9 +750,6 @@ procedure display_word_list_name endproc procedure write_word_list - # Draw the contour - call draw_tone_contour - # Write current Pinyin text call display_text Black diff --git a/Data/Background.Table b/Data/Background.Table index 647c06c..e504302 100644 --- a/Data/Background.Table +++ b/Data/Background.Table @@ -1,9 +1,9 @@ font size align colour text -Helvetica 56 centre {1,1,1} -Helvetica 56 centre {1,1,1} -Helvetica 56 centre {1,1,1} -Helvetica 56 centre {0.99,0.97,0.85} SPEAK GOOD CHINESE 2.0 -Helvetica 56 centre {0.99,0.97,0.85} 说好中文 -Helvetica 56 centre {0.99,0.99,0.99} shuō​ hǎo​ Zhōng​wén​ +Helvetica 36 centre {1,1,1} +Helvetica 36 centre {0.99,0.97,0.85} SPEAK GOOD CHINESE 2.0 +Helvetica 36 centre {0.99,0.97,0.85} shuō​ hǎo​ Zhōng​wén​ +Helvetica 36 centre {0.99,0.97,0.85} 说好中文 +Helvetica 36 centre {1,1,1} +Helvetica 36 centre {1,1,1} diff --git a/InitialiseSGC2.praat b/InitialiseSGC2.praat index dcc8050..1a5d4e0 100644 --- a/InitialiseSGC2.praat +++ b/InitialiseSGC2.praat @@ -184,6 +184,8 @@ procedure init_window call set_window_title 'buttons$' '.windowTitle$' # Display the word-list call write_word_list + # Draw the contour + call draw_tone_contour # Logging light call paint_logging_light endproc diff --git a/MainPage.praat b/MainPage.praat index 543b094..1a08e4f 100644 --- a/MainPage.praat +++ b/MainPage.praat @@ -180,7 +180,6 @@ procedure processMainPagePrevious .clickX .clickY .pressed$ te.currentWord -= 1 call init_window # Draw the contour - call draw_tone_contour call wipeArea 'wipeFeedbackArea$' call display_text Black endproc @@ -190,7 +189,6 @@ procedure processMainPageNext .clickX .clickY .pressed$ te.currentWord += 1 call init_window # Draw the contour - call draw_tone_contour call wipeArea 'wipeFeedbackArea$' call display_text Black endproc @@ -198,14 +196,14 @@ endproc procedure processMainPageWordlistUp .clickX .clickY .pressed$ call wipeArea 'wipeFeedbackArea$' call load_word_list "'localWordlistDir$'" -1 - call write_word_list + call init_window call display_text Black endproc procedure processMainPageWordlistDown .clickX .clickY .pressed$ call wipeArea 'wipeFeedbackArea$' call load_word_list "'localWordlistDir$'" 1 - call write_word_list + call init_window call display_text Black endproc @@ -304,6 +302,9 @@ procedure draw_tone_contour # Wipe screen call reset_viewport call wipeArea 'wipeContourArea$' + if config.showBackground + call draw_background Background + endif select Table 'wordlist$' if te.currentWord > 0 and te.currentWord <= te.numberOfWords .sound$ = Get value... 'te.currentWord' Sound @@ -412,9 +413,6 @@ procedure display_text .color$ # Clear the writing area call wipeArea 'wipePinyinArea$' - if config.showBackground - call draw_background Background - endif # Actually display text demo '.color$' call set_font_size '.currentFontSize' diff --git a/ToneProt/ToneRecognition.praat b/ToneProt/ToneRecognition.praat index 97c1e63..4b4412f 100644 --- a/ToneProt/ToneRecognition.praat +++ b/ToneProt/ToneRecognition.praat @@ -56,7 +56,7 @@ procedure FreeToneRecognition .pinyin$ .test_word$ .exclude$ .upperRegister .fre referenceName$ = .inFile$ select Pitch '.inFile$' plus Pitch SourcePitch - noprogress To DTW... 24 10 yes yes no restriction + .dtw = noprogress To DTW... 24 10 yes yes no restriction Rename... DTW'.inFile$' distance = Get distance (weighted) diff --git a/ToneProt/ToneScript.praat b/ToneProt/ToneScript.praat index dbcb8e7..83f35b9 100644 --- a/ToneProt/ToneScript.praat +++ b/ToneProt/ToneScript.praat @@ -340,5 +340,6 @@ procedure generateWord toneScript.whatToGenerate$ toneScript.theWord$ toneScript endproc procedure convert2Pitch .minimumPitch .maximumPitch - .object = noprogress To Pitch (ac)... 0 '.minimumPitch' 15 yes 0.1 0.4 0.02 0.5 0.3 '.maximumPitch' + .object = noprogress To Pitch (ac)... 0 '.minimumPitch' 25 yes 0.05 0.3 0.01 0.6 0.14 '.maximumPitch' + #.object = noprogress To Pitch (cc)... 0 '.minimumPitch' 25 yes 0.05 0.3 0.01 0.6 0.14 '.maximumPitch' endproc -- 2.11.4.GIT