build_SHA$ = "F1D133EFB2 2014-02-03T14:36:06Z" # # PraatDemoFramework 0.1 # # Master Praat script # # PraatDemoFramework: main.praat is the master GUI of PraatDemoFramework # It is written in Praat script for the demo window # # Copyright (C) 2010 R.J.J.H. van Son and the Netherlands Cancer Institute # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # demoAppName$ = "Praatdemoframe" # Define variable that might be reset in Initialise*.praat if not variableExists("build_SHA$") build_SHA$ = "-" endif # These are simply "useful" defaults localTableDir$ = "Data" buttonsTableName$ = "MainPage" configTableName$ = "Config" feedbackTablePrefix$ = "Feedback" feedbackTableName$ = "" buttons$ = "" config$ = "" recordedSound$ = "" alertText$ = "" config.input$ = "Microphone" # Pop-Up window colors popUp.bordercolor$ = "{0.5,0.5,1}" popUp.backgroundcolor$ = "{0.9,0.9,1}" # If running in a packed script binary if index_regex(preferencesDirectory$, "(?i'demoAppName$')$") preferencesAppDir$ = preferencesDirectory$ elsif index_regex(preferencesDirectory$, "[pP]raat(\-dir| Prefs)?$") # If running as a Praat script, create a new preferences directory if unix preferencesAppDir$ = "'preferencesDirectory$'/../.'demoAppName$'" else preferencesAppDir$ = "'preferencesDirectory$'/../'demoAppName$'" endif else # Make a subdirectory in the current preferences directory preferencesAppDir$ = "'preferencesDirectory$'/'demoAppName$'" endif wipeFeedbackArea$ = "" sampleFrequency = 44100 # Parameters for isolating recorded speech from noise # Should be mostly left alone unless you are using ultra clean # or very noisy recordings noiseThresshold = -30 minimumPitch = 60 soundMargin = 0.25 minimumIntensity = 30 # Set up button height buttonbevel = 0 # Define canvas viewportMargin = 5 defaultFontSize = 12 defaultFont$ = "Helvetica" defaultLineWidth = 1 recordingLightX = 0 recordingLightY = 100 ########################################################## # # This is the actual code run at startup # ########################################################## # When using this script as a library in "include