manual_ExperimentMFC.cpp 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. /* manual_ExperimentMFC.cpp
  2. *
  3. * Copyright (C) 2001-2011,2013,2015,2016 Paul Boersma
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "ManPagesM.h"
  19. void manual_ExperimentMFC_init (ManPages me);
  20. void manual_ExperimentMFC_init (ManPages me) {
  21. MAN_BEGIN (U"ExperimentMFC", U"ppgb", 20130101)
  22. INTRO (U"One of the @@types of objects@ in Praat, "
  23. "for running a Multiple Forced Choice listening experiment.")
  24. LIST_ITEM (U"@@ExperimentMFC 1. When to use Praat")
  25. LIST_ITEM (U"@@ExperimentMFC 2. The first example")
  26. LIST_ITEM (U"@@ExperimentMFC 2.1. The experiment file")
  27. LIST_ITEM (U"@@ExperimentMFC 2.2. The stimuli")
  28. LIST_ITEM (U"@@ExperimentMFC 2.3. The carrier phrase")
  29. LIST_ITEM (U"@@ExperimentMFC 2.4. Breaks")
  30. LIST_ITEM (U"@@ExperimentMFC 2.5. Randomization strategies")
  31. LIST_ITEM (U"@@ExperimentMFC 2.6. Instructions")
  32. LIST_ITEM (U"@@ExperimentMFC 2.7. Response categories")
  33. LIST_ITEM (U"@@ExperimentMFC 2.8. Goodness judgments")
  34. LIST_ITEM (U"@@ExperimentMFC 2.9. How an experiment proceeds")
  35. LIST_ITEM (U"@@ExperimentMFC 3. More examples")
  36. LIST_ITEM (U"@@ExperimentMFC 3.1. A simple discrimination experiment")
  37. LIST_ITEM (U"@@ExperimentMFC 3.2. An AXB discrimination experiment")
  38. LIST_ITEM (U"@@ExperimentMFC 3.3. A 4I-oddity experiment")
  39. LIST_ITEM (U"@@ExperimentMFC 3.4. Variable inter-stimulus intervals")
  40. LIST_ITEM (U"@@ExperimentMFC 4. Special buttons")
  41. LIST_ITEM (U"@@ExperimentMFC 4.1. The replay button")
  42. LIST_ITEM (U"@@ExperimentMFC 4.2. The OK button")
  43. LIST_ITEM (U"@@ExperimentMFC 4.3. The oops button")
  44. LIST_ITEM (U"@@ExperimentMFC 5. Stimulus-dependent texts")
  45. LIST_ITEM (U"@@ExperimentMFC 5.1. The stimulus-dependent run text")
  46. LIST_ITEM (U"@@ExperimentMFC 5.2. Stimulus-dependent response buttons")
  47. LIST_ITEM (U"@@ExperimentMFC 6. Responses are sounds")
  48. LIST_ITEM (U"@@ExperimentMFC 7. Blanking the screen")
  49. LIST_ITEM (U"@@ExperimentMFC 8. Running multiple experiments")
  50. MAN_END
  51. MAN_BEGIN (U"ExperimentMFC 1. When to use Praat", U"ppgb", 20160925)
  52. NORMAL (U"With Praat's ExperimentMFC, you can do simple experiments on identification and discrimination. "
  53. "`Simple' means that for identification, the subject hears a sound and has to click on one of a set of "
  54. "labelled rectangles (optionally, you can have the subject give a goodness-of-fit judgment). "
  55. "For discrimination, you can have simple same-different choices, or more intricate things like AXB, 4I-oddity, and so on.")
  56. NORMAL (U"The advantage of using Praat's ExperimentMFC for this is that it is free, it works on Windows, Unix, and Macintosh, "
  57. "and the whole experiment (experiment file plus sound files) is portable across computers "
  58. "(you can run it from a USB stick, for instance). Because of the limited possibilities, "
  59. "it is also quite easy to set up the experiment. Just read the description below.")
  60. NORMAL (U"If you require more from your experiment design, you can use Praat's @@Demo window@; "
  61. "with that less simple method you could for instance let the stimulus depend on the subject's previous responses. "
  62. "Alternatively, you could use a dedicated program like Presentation or E-prime instead of Praat; "
  63. "with these programs, you can also sometimes measure reaction times more accurately.")
  64. MAN_END
  65. MAN_BEGIN (U"ExperimentMFC 2. The first example", U"ppgb", 20051205)
  66. INTRO (U"The following pages give an example of an experiment definition, "
  67. "and explain the main features of an identification task.")
  68. LIST_ITEM (U"@@ExperimentMFC 2.1. The experiment file")
  69. LIST_ITEM (U"@@ExperimentMFC 2.2. The stimuli")
  70. LIST_ITEM (U"@@ExperimentMFC 2.3. The carrier phrase")
  71. LIST_ITEM (U"@@ExperimentMFC 2.4. Breaks")
  72. LIST_ITEM (U"@@ExperimentMFC 2.5. Randomization strategies")
  73. LIST_ITEM (U"@@ExperimentMFC 2.6. Instructions")
  74. LIST_ITEM (U"@@ExperimentMFC 2.7. Response categories")
  75. LIST_ITEM (U"@@ExperimentMFC 2.8. Goodness judgments")
  76. LIST_ITEM (U"@@ExperimentMFC 2.9. How an experiment proceeds")
  77. MAN_END
  78. MAN_BEGIN (U"ExperimentMFC 2.1. The experiment file", U"ppgb", 20160925)
  79. INTRO (U"An experiment is defined in a simple text file, which we call an %%experiment file%. "
  80. "The following is an example of such an experiment file. The first two lines have to be typed "
  81. "exactly as in this example, the rest depends on your stimuli, on your response categories, "
  82. "and on the way the experiment is to be presented to the listener. "
  83. "The order of the elements in this file cannot be changed, and nothing can be skipped. "
  84. "The first two lines make the file recognizable for Praat as an ExperimentMFC file; "
  85. "the number 7 is the version number of this type of ExperimentMFC file "
  86. "(Praat can still read older ExperimentMFC files with a lower version number).")
  87. CODE (U"\"ooTextFile\"")
  88. CODE (U"\"ExperimentMFC 7\"")
  89. CODE (U"blankWhilePlaying? <no>")
  90. CODE (U"stimuliAreSounds? <yes>")
  91. CODE (U"stimulusFileNameHead = \"Sounds/\"")
  92. CODE (U"stimulusFileNameTail = \".wav\"")
  93. CODE (U"stimulusCarrierBefore = \"weSayTheWord\"")
  94. CODE (U"stimulusCarrierAfter = \"again\"")
  95. CODE (U"stimulusInitialSilenceDuration = 0.5 seconds")
  96. CODE (U"stimulusMedialSilenceDuration = 0")
  97. CODE (U"stimulusFinalSilenceDuration = 0.5 seconds")
  98. CODE (U"numberOfDifferentStimuli = 4")
  99. CODE1 (U"\"heed\" \"\"")
  100. CODE1 (U"\"hid\" \"\"")
  101. CODE1 (U"\"hood\" \"\"")
  102. CODE1 (U"\"hud\" \"\"")
  103. CODE (U"numberOfReplicationsPerStimulus = 3")
  104. CODE (U"breakAfterEvery = 0")
  105. CODE (U"randomize = <PermuteBalancedNoDoublets>")
  106. CODE (U"startText = \"This is a listening experiment.")
  107. CODE (U"After hearing a sound, choose the vowel that is most similar to what you heard.")
  108. CODE (U"")
  109. CODE (U"Click to start.\"")
  110. CODE (U"runText = \"Choose the vowel that you heard.\"")
  111. CODE (U"pauseText = \"You can have a short break if you like. Click to proceed.\"")
  112. CODE (U"endText = \"The experiment has finished.\"")
  113. CODE (U"maximumNumberOfReplays = 0")
  114. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  115. CODE (U"okButton = 0 0 0 0 \"\" \"\"")
  116. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  117. CODE (U"responsesAreSounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  118. CODE (U"numberOfDifferentResponses = 5")
  119. CODE1 (U"0.2 0.3 0.7 0.8 \"h I d\" 40 \"\" \"i\"")
  120. CODE1 (U"0.3 0.4 0.5 0.6 \"h E d\" 40 \"\" \"e\"")
  121. CODE1 (U"0.4 0.5 0.3 0.4 \"h A d\" 40 \"\" \"a\"")
  122. CODE1 (U"0.5 0.6 0.5 0.6 \"h O d\" 40 \"\" \"o\"")
  123. CODE1 (U"0.6 0.7 0.7 0.8 \"h U d\" 40 \"\" \"u\"")
  124. CODE (U"numberOfGoodnessCategories = 5")
  125. CODE1 (U"0.25 0.35 0.10 0.20 \"1 (poor)\" 24 \"\"")
  126. CODE1 (U"0.35 0.45 0.10 0.20 \"2\" 24 \"\"")
  127. CODE1 (U"0.45 0.55 0.10 0.20 \"3\" 24 \"\"")
  128. CODE1 (U"0.55 0.65 0.10 0.20 \"4\" 24 \"\"")
  129. CODE1 (U"0.65 0.75 0.10 0.20 \"5 (good)\" 24 \"\"")
  130. NORMAL (U"This experiment will play 4 different stimuli to the listener, each 3 times. "
  131. "Thus, the listener is confronted with 12 trials.")
  132. MAN_END
  133. MAN_BEGIN (U"ExperimentMFC 2.2. The stimuli", U"ppgb", 20130101)
  134. INTRO (U"You can see that the @@ExperimentMFC 2.1. The experiment file|example experiment@ "
  135. "contains four different stimuli: %heed, %hid, %hood, and %hud. "
  136. "These are the %names of the four stimuli.")
  137. NORMAL (U"Because in the example experiment stimuli are sounds, "
  138. "each of the four stimuli should be in a sound file. "
  139. "The names of these sound files must be identical to the names "
  140. "of the stimuli, bracketed with %stimulusFileNamehead and %stimulusFileNameTail. "
  141. "Hence, the stimuli are expected in the following four files:")
  142. LIST_ITEM (U"Sounds/heed.wav")
  143. LIST_ITEM (U"Sounds/hid.wav")
  144. LIST_ITEM (U"Sounds/hood.wav")
  145. LIST_ITEM (U"Sounds/hud.wav")
  146. NORMAL (U"You need not use WAV files. You can also use AIFF files, "
  147. "in which case %stimulusFileNameTail would probably be \".aiff\", or any other "
  148. "type of sound file that Praat supports. But all sound files must have the same number of channels "
  149. "(i.e. all mono or all stereo) and the same sampling frequency.")
  150. NORMAL (U"In this example, the experiment will look for the sound files in the directory #Sounds, "
  151. "which has to be in the same directory as your experiment file. "
  152. "In other words, \"Sounds/heed.wav\" is a %%relative file path%.")
  153. NORMAL (U"Instead of a relative path, you can also supply a %%full file path%. "
  154. "Such a path depends on your computer and on your operating system. "
  155. "For instance, if you have a Windows computer and the stimuli are in the directory ##D:\\bsCorpus\\bsAutumn\\bsSpeaker23#, "
  156. "you can write")
  157. CODE (U"fileNameHead = \"D:\\bsCorpus\\bsAutumn\\bsSpeaker23\\bs\"")
  158. NORMAL (U"If you have a Macintosh (OS X) or Unix computer and the stimuli are in ##/Users/mietta/Sounds/Dutch#, you write")
  159. CODE (U"fileNameHead = \"/Users/mietta/Sounds/Dutch/\"")
  160. NORMAL (U"But relative file paths will usually be preferred: they are more %portable. "
  161. "The advantage of using relative file paths is that you can move your whole experiment (experiment file plus sounds) "
  162. "from one computer to another without changing the experiment file, "
  163. "as long as you put the experiment file in the same directory as where you put the directory #Sounds. "
  164. "Or you can put the whole experiment on a USB stick and run the experiment directly from the stick. "
  165. "Since Praat supports the forward slash \"/\" as a directory separator on all computers, "
  166. "you can run the exact same experiment on Macintosh, Windows and Unix computers, "
  167. "independent of the type of computer where you have created your experiment.")
  168. MAN_END
  169. MAN_BEGIN (U"ExperimentMFC 2.3. The carrier phrase", U"ppgb", 20051205)
  170. NORMAL (U"The stimuli can be embedded in a %%carrier phrase%. "
  171. "In the @@ExperimentMFC 2.1. The experiment file|example experiment@, we see that the stimulus "
  172. "will be inserted between the sounds in the files ##weSayTheWord.wav# "
  173. "and ##again.wav#, both of which are expected to be in the directory #Sounds. "
  174. "If you do not want a carrier phrase, you do")
  175. CODE (U"stimulusCarrierBefore = \"\"")
  176. CODE (U"stimulusCarrierAfter = \"\"")
  177. NORMAL (U"If you want only an introductory phrase before the stimulus, and nothing after the stimulus, "
  178. "you do something like")
  179. CODE (U"stimulusCarrierBefore = \"listenTo\"")
  180. CODE (U"stimulusCarrierAfter = \"\"")
  181. NORMAL (U"and of course you supply the file ##listenTo.wav# in the directory #Sounds.")
  182. NORMAL (U"If you want to have a short silence before every stimulus (and before the carrier phrase), "
  183. "you supply a non-zero %stimulusInitialSilenceDuration, as in the example.")
  184. NORMAL (U"Since the carrier phrase is concatenated with the stimulus before it is played, it should have the same "
  185. "sampling frequency as the stimulus files.")
  186. MAN_END
  187. MAN_BEGIN (U"ExperimentMFC 2.4. Breaks", U"ppgb", 20051205)
  188. NORMAL (U"A new stimulus will arrive as soon as the listener makes her choice. To allow her some breathing "
  189. "time, you can insert a break after every so many trials. In the example, %breakAfterEvery is 0, "
  190. "because there are only 12 trials. A typical experiment has perhaps 180 trials, and you may want to "
  191. "insert a break after every 40 trials. In that case, you do")
  192. CODE (U"breakAfterEvery = 40")
  193. MAN_END
  194. MAN_BEGIN (U"ExperimentMFC 2.5. Randomization strategies", U"ppgb", 20051205)
  195. NORMAL (U"The 3 times 4 stimuli will have to be played in a certain order. For the least random order, you say")
  196. CODE (U"randomize = <CyclicNonRandom>")
  197. NORMAL (U"In this case, the stimuli will be played in the order in which they were specified in the file, 3 times:")
  198. FORMULA (U"heed hid hood hud heed hid hood hud heed hid hood hud")
  199. NORMAL (U"The most likely case in which you would want to use this randomization strategy, is if you have, say, 120 "
  200. "different stimuli and you want to play them only once (%numberOfReplicationsPerStimulus = 1) in a fixed order.")
  201. NORMAL (U"The other extreme, the most random order, is")
  202. CODE (U"randomize = <WithReplacement>")
  203. NORMAL (U"In this case, a stimulus will be chosen at random 12 times without memory, for instance")
  204. FORMULA (U"hid hood hood heed hid hood hud hud hid hood heed hid")
  205. NORMAL (U"The order will probably be different for each listener. "
  206. "In this example, %hood and %hid occur four times each, %heed and %hud only twice each. "
  207. "This strategy is too random for most experiments. Usually, you will want to have the same number "
  208. "of replications of each stimulus. The most random way to do this is")
  209. CODE (U"randomize = <PermuteAll>")
  210. NORMAL (U"In this case, all stimuli will be played exactly 3 times, for instance")
  211. FORMULA (U"heed hood hud hud hid heed heed hud hood hid hid hood")
  212. NORMAL (U"Quite often, you will want a less random order, namely one in which the 12 trials are divided into "
  213. "3 blocks of 4 stimuli. Within each block, all 4 different stimuli occur in a random order:")
  214. CODE (U"randomize = <PermuteBalanced>")
  215. NORMAL (U"In this case, each stimulus occurs exactly once within each block:")
  216. FORMULA (U"heed hood hud hid hood hud hid heed heed hud hood hid")
  217. NORMAL (U"This strategy ensures a certain spreading of the stimuli over the sequence of 12 trials. "
  218. "As we see here, it is still possible that the same stimulus (%heed) occurs twice in a row, "
  219. "namely as the last stimulus of the second block and the first stimulus of the third. "
  220. "If you want to prevent that situation, you use")
  221. CODE (U"randomize = <PermuteBalancedNoDoublets>")
  222. NORMAL (U"This will ensure that the same stimulus is never applied twice in a row:")
  223. FORMULA (U"heed hood hud hid hood hud hid heed hud heed hood hid")
  224. NORMAL (U"This randomization strategy is used in our example, and advised for most listening experiments "
  225. "in which you want to minimize effects of stimulus order.")
  226. NORMAL (U"The randomization procedure does not interfere in any way with the breaks. The order is determined "
  227. "before any breaks are inserted.")
  228. MAN_END
  229. MAN_BEGIN (U"ExperimentMFC 2.6. Instructions", U"ppgb", 20081123)
  230. NORMAL (U"Before the experiment begins, the listener will see the %startText in the centre of the screen. "
  231. "During each trial, she will see the %runText at the top of the screen. "
  232. "During breaks, she will see the %pauseText in the centre of the screen. "
  233. "After all the trials have been performed, she will see the %endText. "
  234. "As you can see in the example, all these texts can consist of multiple lines.")
  235. MAN_END
  236. MAN_BEGIN (U"ExperimentMFC 2.7. Response categories", U"ppgb", 20110911)
  237. NORMAL (U"Every trial comes with the same set of response categories. "
  238. "The @@ExperimentMFC 2.1. The experiment file|example experiment@ has five of them. "
  239. "For each response category, you supply the area of the screen where a rectangle will be drawn. "
  240. "The whole screen measures from 0.0 (left) to 1.0 (right) and from 0.0 (bottom) to 1.0 (top). "
  241. "Thus, \"0.2 0.3 0.7 0.8\" means that a rectangle will be drawn somewhere in the top left quadrant "
  242. "of the screen. You also supply the text that will be drawn in this rectangle, for instance the text \"h I d\". "
  243. "After this you supply the font size for this text, for instance 40.")
  244. NORMAL (U"The second text that you supply for every response is a response key on the keyboard. "
  245. "In the above example this is \"\", i.e. the subject cannot press a key as a response. "
  246. "If you want the user to be able to press the \"m\" key instead of clicking in the \"h I d\" rectangle, "
  247. "the line in the experiment file would be:")
  248. CODE1 (U"0.2 0.3 0.7 0.8 \"h I d\" 40 \"m\" \"i\"")
  249. NORMAL (U"The third text that you supply for each rectangle is the response category as it will be reported by Praat to you when the user clicks it, "
  250. "e.g. the text \"i\". If you want Praat to ignore mouse clicks on this rectangle, specify an empty response "
  251. "category, i.e. \"\".")
  252. NORMAL (U"The border of the rectangles will be maroon, the background of the screen will be light grey. "
  253. "The colour of clickable rectangles will be yellow, that of non-clickable rectangles (those with "
  254. "empty category specifications) light grey.")
  255. NORMAL (U"You can have a picture instead of a text on a response button, by using \\bsFI:")
  256. CODE1 (U"0.2 0.3 0.7 0.8 \"\\bsFIpictures/hello.jpg\" 40 \"m\" \"i\"")
  257. NORMAL (U"In this example, the picture ##hello.jpg# from the subdirectory #pictures "
  258. "(i.e. a subdirectory of the directory where your experiment file is) "
  259. "will be drawn into the rectangle [0.2, 0.3] \\xx [0.7, 0.8]. "
  260. "This currently (September 2011) works only on the Mac and Windows.")
  261. MAN_END
  262. MAN_BEGIN (U"ExperimentMFC 2.8. Goodness judgments", U"ppgb", 20160925)
  263. NORMAL (U"If %numberOfGoodnessCategories is not 0, some more rectangles will be drawn, "
  264. "as in the @@ExperimentMFC 2.1. The experiment file|example experiment@. "
  265. "You specify again the locations of these rectangles (in the example, they touch each other), "
  266. "the texts on them, the font sizes, and the response keys. "
  267. "Praat will record the number of the button when the listener clicks on it. "
  268. "Thus, if she clicks on the button labelled \"1 (poor)\", Praat will record a goodness judgment of 1, "
  269. "because this is the first button in the list. If she clicks on \"5 (good)\", Praat will record a "
  270. "goodness judgment of 5.")
  271. MAN_END
  272. MAN_BEGIN (U"ExperimentMFC 2.9. How an experiment proceeds", U"ppgb", 20110317)
  273. NORMAL (U"A text file with an ExperimentMFC object can be read into Praat with @@Read from file...@ "
  274. "(it is not a script but a data file, so do not try to read it with ##Open Praat script...#). "
  275. "You can then choose #Run. After the experiment finishes, you can close the experiment window "
  276. "and choose ##Extract results#. The resulting ResultsMFC object contains for each trial the stimulus "
  277. "name (e.g. \"hood\"), the response category (e.g. \"u\"), and the goodness judgment (e.g. 4). "
  278. "You will want to save this ResultsMFC object to a text file with @@Save as text file...@. "
  279. "You may want to call these text files by the names of the subjects, e.g. ##ts.ResultsMFC# "
  280. "and ##mj.ResultsMFC#. Once you have collected the results of all your subjects, you can read "
  281. "all the results files into Praat with @@Read from file...@, then select all the resulting "
  282. "ResultsMFC objects (which will have automatically been named #ts, #mj, and so on), then choose "
  283. "##Collect to table#. This will result in a table whose first column contains the names of the subjects, "
  284. "the second column contains the stimulus names, the third column contains the responses, "
  285. "and the last column contains the approximate reaction times (measured from the start of the stimulus sound, i.e. after the initial silence duration). "
  286. "If there are goodness judgments, these will go into the fourth column. The table can be saved "
  287. "as a table file (with ##Save as tab-separated file...#), which can be read by programs like Excel and SPSS.")
  288. MAN_END
  289. MAN_BEGIN (U"ExperimentMFC 3. More examples", U"ppgb", 20051205)
  290. INTRO (U"You can do many more kinds of experiments than simple identification experiments.")
  291. LIST_ITEM (U"@@ExperimentMFC 3.1. A simple discrimination experiment")
  292. LIST_ITEM (U"@@ExperimentMFC 3.2. An AXB discrimination experiment")
  293. LIST_ITEM (U"@@ExperimentMFC 3.3. A 4I-oddity experiment")
  294. LIST_ITEM (U"@@ExperimentMFC 3.4. Variable inter-stimulus intervals")
  295. MAN_END
  296. MAN_BEGIN (U"ExperimentMFC 3.1. A simple discrimination experiment", U"ppgb", 20160925)
  297. NORMAL (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ was an %identification experiment: "
  298. "the subject had identify a single sound as one element of a set of categories. "
  299. "Phoneticians will often do %discrimination experiments, which are experiments in which "
  300. "a stimulus consists of multiple sub-stimuli played in sequence, and the subject has to judge the similarity "
  301. "between these sub-stimuli.")
  302. NORMAL (U"The simplest discrimination task has only two sub-stimuli, and the subject has to say whether these are "
  303. "the %same or %different. Suppose you have vowel-like sounds along an F1 continuum with seven steps, "
  304. "say 300, 320, 340, 360, 380, 400, and 420 hertz, and you are interested in knowing how well the listeners "
  305. "can distinguish these. As your stimuli, you create pairs of these sounds, separated by 0.8 seconds of silence. "
  306. "It is important to include stimuli in which the sounds are identical, e.g. stimuli in which both sounds have an F1 "
  307. "of 340 Hz (see the literature on signal detection theory). Since sounds that are very different acoustically "
  308. "will always be heard as different, you do not include pairs in which the distance is larger than 60 Hz. "
  309. "The experiment file will look like this:")
  310. CODE (U"\"ooTextFile\"")
  311. CODE (U"\"ExperimentMFC 7\"")
  312. CODE (U"blank while playing? <no>")
  313. CODE (U"stimuli are sounds? <yes>")
  314. CODE (U"\"stimuli/\" \".wav\"")
  315. CODE (U"carrier phrase \"\" \"\"")
  316. CODE (U"initial silence duration 0.5 seconds")
  317. CODE (U"medial silence duration 0.8 seconds ! inter-stimulus interval")
  318. CODE (U"final silence duration 0 seconds")
  319. CODE (U"37 different stimuli")
  320. CODE1 (U"\"300,300\" \"\" \"300,320\" \"\" \"300,340\" \"\" \"300,360\" \"\"")
  321. CODE1 (U"\"320,300\" \"\" \"320,320\" \"\" \"320,340\" \"\" \"320,360\" \"\" \"320,380\" \"\"")
  322. CODE1 (U"\"340,300\" \"\" \"340,320\" \"\" \"340,340\" \"\" \"340,360\" \"\" \"340,380\" \"\" \"340,400\" \"\"")
  323. CODE1 (U"\"360,300\" \"\" \"360,320\" \"\" \"360,340\" \"\" \"360,360\" \"\" \"360,380\" \"\" \"360,400\" \"\" \"360,420\" \"\"")
  324. CODE1 (U"\"380,320\" \"\" \"380,340\" \"\" \"380,360\" \"\" \"380,380\" \"\" \"380,400\" \"\" \"380,420\" \"\"")
  325. CODE1 (U"\"400,340\" \"\" \"400,360\" \"\" \"400,380\" \"\" \"400,400\" \"\" \"400,420\" \"\"")
  326. CODE1 (U"\"420,360\" \"\" \"420,380\" \"\" \"420,400\" \"\" \"420,420\" \"\"")
  327. CODE (U"10 replications per stimulus")
  328. CODE (U"break after every 50 stimuli")
  329. CODE (U"<PermuteBalancedNoDoublets>")
  330. CODE (U"\"Click to start.\"")
  331. CODE (U"\"Say whether these sounds were the same or different.\"")
  332. CODE (U"\"You can have a short break if you like. Click to proceed.\"")
  333. CODE (U"\"The experiment has finished. Call the experimenter.\"")
  334. CODE (U"0 replays")
  335. CODE (U"replay button 0 0 0 0 \"\" \"\"")
  336. CODE (U"ok button 0 0 0 0 \"\" \"\"")
  337. CODE (U"oops button 0 0 0 0 \"\" \"\"")
  338. CODE (U"responses are sounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  339. CODE (U"2 response categories")
  340. CODE1 (U"0.1 0.4 0.35 0.65 \"same\" 24 \"\" \"same\"")
  341. CODE1 (U"0.6 0.9 0.35 0.65 \"different\" 24 \"\" \"different\"")
  342. CODE (U"0 goodness categories")
  343. NORMAL (U"In this example, the subject will have to click 370 times. After every 50 times, she will have the "
  344. "opportunity to sip her tea. A 0.5-seconds silence is played before every stimulus, so that the listener "
  345. "will not hear the stimulus immediately after her mouse click.")
  346. NORMAL (U"The experimenter does not have to create the stimulus pairs as sound files. "
  347. "You can specify multiple sound files by separating them with commas. Thus, \"320,300\" means that "
  348. "Praat will play the files ##320.wav# and ##300.wav#. These two substimuli will be separated here by a silence "
  349. "of 0.8 seconds, called the %%inter-stimulus interval% (or %stimulusMedialSilenceDuration).")
  350. NORMAL (U"Note that the text in this file is rather different from the previous example. "
  351. "It does not matter whether you write \"numberOfDifferentStimuli\", or \"different stimuli\", or anything else; "
  352. "Praat ignores these texts as long as they do not contain numbers, quoted strings, or things between <>.")
  353. MAN_END
  354. MAN_BEGIN (U"ExperimentMFC 3.2. An AXB discrimination experiment", U"ppgb", 20160925)
  355. INTRO (U"In the AXB task, the subject will hear three stimuli in sequence, and has to say "
  356. "whether the second (X) is more similar to the first (A) or to the second (B). "
  357. "An experiment file could look like follows:")
  358. CODE (U"\"ooTextFile\"")
  359. CODE (U"\"ExperimentMFC 7\"")
  360. CODE (U"blankWhilePlaying? <no>")
  361. CODE (U"stimuliAreSounds? <yes>")
  362. CODE (U"\"stimuli/\" \".wav\"")
  363. CODE (U"carrier \"\" \"\"")
  364. CODE (U"initial silence 0.5")
  365. CODE (U"inter-stimulus interval 0.3")
  366. CODE (U"final silence 0")
  367. CODE (U"100 stimuli")
  368. CODE1 (U"\"300,300,320\" \"\" \"300,320,340\" \"\" \"300,340,340\" \"\" \"300,340,360\" \"\"")
  369. CODE1 (U"...")
  370. CODE1 (U"(and 96 more triplets of substimuli)")
  371. CODE1 (U"...")
  372. CODE (U"4 replications")
  373. CODE (U"break every 50")
  374. CODE (U"<PermuteBalancedNoDoublets>")
  375. CODE (U"\"Click to start.\"")
  376. CODE (U"\"Say whether the second sound is more similar to the first or to the third.\"")
  377. CODE (U"\"You can have a short break if you like. Click to proceed.\"")
  378. CODE (U"\"The experiment has finished.\"")
  379. CODE (U"0 replays")
  380. CODE (U"replay button 0 0 0 0 \"\" \"\"")
  381. CODE (U"ok button 0 0 0 0 \"\" \"\"")
  382. CODE (U"oops button 0 0 0 0 \"\" \"\"")
  383. CODE (U"responses are sounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  384. CODE (U"3 response categories")
  385. CODE1 (U"0.1 0.3 0.4 0.6 \"first\" 30 \"\" \"A\"")
  386. CODE1 (U"0.4 0.6 0.4 0.6 \"second\" 30 \"\" \"\"")
  387. CODE1 (U"0.7 0.9 0.4 0.6 \"third\" 30 \"\" \"B\"")
  388. CODE (U"0 goodness categories")
  389. NORMAL (U"In this example, the subject has to click 400 times. She sees three buttons, "
  390. "labelled %first, %second, and %third, but the second button (the one with the empty response category) "
  391. "is not clickable: it has a light grey rather than a yellow interior and cannot be chosen by the subject. "
  392. "In your ResultsMFC object, you will only see %A and %B responses.")
  393. MAN_END
  394. MAN_BEGIN (U"ExperimentMFC 3.3. A 4I-oddity experiment", U"ppgb", 20160925)
  395. NORMAL (U"In the four-items-oddity task, the subject will hear four stimuli in sequence, and has to say "
  396. "whether the second or the third is the odd one out. The other three substimuli are identical. "
  397. "An experiment file could look as follows:")
  398. CODE (U"\"ooTextFile\"")
  399. CODE (U"\"ExperimentMFC 7\"")
  400. CODE (U"blankWhilePlaying? <no>")
  401. CODE (U"stimuliAreSounds? <yes>")
  402. CODE (U"stimulusFileNameHead = \"stimuli/\"")
  403. CODE (U"stimulusFileNameTail = \".wav\"")
  404. CODE (U"stimulusCarrierBefore = \"\"")
  405. CODE (U"stimulusCarrierAfter = \"\"")
  406. CODE (U"stimulusInitialSilenceDuration = 0.5 seconds")
  407. CODE (U"stimulusMedialSilenceDuration = 0.3 seconds")
  408. CODE (U"numberOfDifferentStimuli = 60")
  409. CODE1 (U"\"300,300,320,300\" \"\" \"300,320,300,300\" \"\"")
  410. CODE1 (U"\"300,300,340,300\" \"\" \"300,340,300,300\" \"\"")
  411. CODE1 (U"\"300,300,360,300\" \"\" \"300,360,300,300\" \"\"")
  412. CODE1 (U"\"320,320,300,320\" \"\" \"320,300,320,320\" \"\"")
  413. CODE1 (U"\"320,320,340,320\" \"\" \"320,340,320,320\" \"\"")
  414. CODE1 (U"\"320,320,360,320\" \"\" \"320,360,320,320\" \"\"")
  415. CODE1 (U"\"320,320,380,320\" \"\" \"320,380,320,320\" \"\"")
  416. CODE1 (U"\"340,340,300,340\" \"\" \"340,300,340,340\" \"\"")
  417. CODE1 (U"\"340,340,320,340\" \"\" \"340,320,340,340\" \"\"")
  418. CODE1 (U"\"340,340,360,340\" \"\" \"340,360,340,340\" \"\"")
  419. CODE1 (U"\"340,340,380,340\" \"\" \"340,380,340,340\" \"\"")
  420. CODE1 (U"\"340,340,400,340\" \"\" \"340,400,340,340\" \"\"")
  421. CODE1 (U"\"360,360,300,360\" \"\" \"360,300,360,360\" \"\"")
  422. CODE1 (U"\"360,360,320,360\" \"\" \"360,320,360,360\" \"\"")
  423. CODE1 (U"\"360,360,340,360\" \"\" \"360,340,360,360\" \"\"")
  424. CODE1 (U"\"360,360,380,360\" \"\" \"360,380,360,360\" \"\"")
  425. CODE1 (U"\"360,360,400,360\" \"\" \"360,400,360,360\" \"\"")
  426. CODE1 (U"\"360,360,420,360\" \"\" \"360,420,360,360\" \"\"")
  427. CODE1 (U"\"380,380,320,380\" \"\" \"380,320,380,380\" \"\"")
  428. CODE1 (U"\"380,380,340,380\" \"\" \"380,340,380,380\" \"\"")
  429. CODE1 (U"\"380,380,360,380\" \"\" \"380,360,380,380\" \"\"")
  430. CODE1 (U"\"380,380,400,380\" \"\" \"380,400,380,380\" \"\"")
  431. CODE1 (U"\"380,380,420,380\" \"\" \"380,420,380,380\" \"\"")
  432. CODE1 (U"\"400,400,340,400\" \"\" \"400,340,400,400\" \"\"")
  433. CODE1 (U"\"400,400,360,400\" \"\" \"400,360,400,400\" \"\"")
  434. CODE1 (U"\"400,400,380,400\" \"\" \"400,380,400,400\" \"\"")
  435. CODE1 (U"\"400,400,420,400\" \"\" \"400,420,400,400\" \"\"")
  436. CODE1 (U"\"420,420,360,420\" \"\" \"420,360,420,420\" \"\"")
  437. CODE1 (U"\"420,420,380,420\" \"\" \"420,380,420,420\" \"\"")
  438. CODE1 (U"\"420,420,400,420\" \"\" \"420,400,420,420\" \"\"")
  439. CODE (U"numberOfReplicationsPerStimulus = 5")
  440. CODE (U"breakAfterEvery = 40")
  441. CODE (U"randomize = <PermuteBalancedNoDoublets>")
  442. CODE (U"startText = \"Click to start.\"")
  443. CODE (U"runText = \"Say whether the second or the third sound is different from the rest.\"")
  444. CODE (U"pauseText = \"You can have a short break if you like. Click to proceed.\"")
  445. CODE (U"endText = \"The experiment has finished.\"")
  446. CODE (U"maximumNumberOfReplays = 0")
  447. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  448. CODE (U"okButton = 0 0 0 0 \"\" \"\"")
  449. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  450. CODE (U"responsesAreSounds? <no>")
  451. CODE (U"responseFileNameHead = \"\"")
  452. CODE (U"responseFileNameTail = \"\"")
  453. CODE (U"responseCarrierBefore = \"\"")
  454. CODE (U"responseCarrierAfter = \"\"")
  455. CODE (U"responseInitialSilenceDuration = 0")
  456. CODE (U"responseMedialSilenceDuration = 0")
  457. CODE (U"responseFinalSilenceDuration = 0")
  458. CODE (U"numberOfResponseCategories = 4")
  459. CODE1 (U"0.04 0.24 0.4 0.6 \"first\" 30 \"\" \"\"")
  460. CODE1 (U"0.28 0.48 0.4 0.6 \"second\" 30 \"\" \"2\"")
  461. CODE1 (U"0.52 0.72 0.4 0.6 \"third\" 30 \"\" \"3\"")
  462. CODE1 (U"0.76 0.96 0.4 0.6 \"fourth\" 30 \"\" \"\"")
  463. CODE (U"numberOfGoodnessCategories = 0")
  464. NORMAL (U"In this example, the subject has to click 300 times. She sees four buttons, "
  465. "but the first and fourth buttons cannot be chosen. "
  466. "In your ResultsMFC object, you will only see the responses %2 and %3.")
  467. MAN_END
  468. MAN_BEGIN (U"ExperimentMFC 3.4. Variable inter-stimulus intervals", U"ppgb", 20130101)
  469. NORMAL (U"Praat only supports a fixed inter-stimulus interval, but sometimes you may want to test "
  470. "discrimination as a function of the inter-stimulus interval itself. You can achieve this by "
  471. "supplying an %stimulusMedialSilenceDuration of 0 and using sound files with various silences:")
  472. CODE1 (U"\"300,silence0.5,320\" \"300,silence1.5,320\" \"300,silence4.5,320\"")
  473. NORMAL (U"In this example, you have to supply the sound files ##silence0.5.wav# and so on. You can "
  474. "create them with the help of @@Create Sound from formula...@ (supply a %formula of 0).")
  475. MAN_END
  476. MAN_BEGIN (U"ExperimentMFC 4. Special buttons", U"ppgb", 20051205)
  477. INTRO (U"You can include up to three special buttons on the screen that the participant sees. "
  478. "It is probably inadvisable to use all three at the same time.")
  479. LIST_ITEM (U"@@ExperimentMFC 4.1. The replay button")
  480. LIST_ITEM (U"@@ExperimentMFC 4.2. The OK button")
  481. LIST_ITEM (U"@@ExperimentMFC 4.3. The oops button")
  482. MAN_END
  483. MAN_BEGIN (U"ExperimentMFC 4.1. The replay button", U"ppgb", 20051205)
  484. INTRO (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ contained the following lines:")
  485. CODE (U"maximumNumberOfReplays = 0")
  486. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  487. NORMAL (U"This means that that experiment did not have a replay button. "
  488. "To add a replay button along the lower edge of the screen, you do something like")
  489. CODE (U"maximumNumberOfReplays = 1000")
  490. CODE (U"replayButton = 0.3 0.7 0.01 0.07 \"Click here to play the last sound again\" \"\"")
  491. NORMAL (U"If you supply a right edge (here 0.7) that is greater than the left edge (here 0.3), "
  492. "Praat will know that you want to show a replay button.")
  493. NORMAL (U"When the participant clicks this button, Praat will play the current stimulus again. "
  494. "In this example, the button will be visible until the partipant has clicked it 1000 times.")
  495. NORMAL (U"To assign a keyboard shortcut to the replay button, do something like")
  496. CODE (U"maximumNumberOfReplays = 1000")
  497. CODE (U"replayButton = 0.1 0.9 0.01 0.07 \"Click here or press the space bar to play the last sound again\" \" \"")
  498. MAN_END
  499. MAN_BEGIN (U"ExperimentMFC 4.2. The OK button", U"ppgb", 20051205)
  500. INTRO (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ contained the following lines:")
  501. CODE (U"okButton = 0 0 0 0 \"\" \"\"")
  502. NORMAL (U"This means that that experiment did not have an OK button. "
  503. "To add an OK button in the lower right corner of the screen, you do something likw")
  504. CODE (U"okButton = 0.8 0.95 0.05 0.15 \"OK\" \"\"")
  505. NORMAL (U"If you supply a right edge (here 0.95) that is greater than the left edge (here 0.8), "
  506. "Praat will know that you want to show an OK button.")
  507. NORMAL (U"The behaviour of the experiment changes appreciably if you include an OK button. "
  508. "If you do not include an OK button, Praat will present the next stimulus as soon as the participant "
  509. "has clicked a response category (and a goodness category, if there are such). "
  510. "If you do include an OK button, it will become visible to the participant as soon as she has chosen "
  511. "a response category (and a goodness category, if there are such). "
  512. "The participant can then click the OK button, but she can also choose to click the response "
  513. "(and goodness buttons) a bit more first.")
  514. NORMAL (U"The OK button seems to be useful only if there is also a replay button, "
  515. "or if the response categories are sounds (see @@ExperimentMFC 6. Responses are sounds@).")
  516. NORMAL (U"To assign a keyboard shortcut (here, the space bar) to the OK button, do something like")
  517. CODE (U"okButton = 0.8 0.95 0.05 0.15 \"OK\" \" \"")
  518. MAN_END
  519. MAN_BEGIN (U"ExperimentMFC 4.3. The oops button", U"ppgb", 20051205)
  520. INTRO (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ contained the following lines:")
  521. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  522. NORMAL (U"This means that that experiment did not have an oops button. "
  523. "To add an oops button in the lower left corner of the screen, you do something likw")
  524. CODE (U"oopsButton = 0.05 0.2 0.05 0.15 \"oops\" \"\"")
  525. NORMAL (U"If you supply a right edge (here 0.2) that is greater than the left edge (here 0.05), "
  526. "Praat will know that you want to show an oops button.")
  527. NORMAL (U"If you include an oops button, it will become visible to the participant for every stimulus except the first, "
  528. "and it will also be visible on the pause (break) screens and on the final screen.")
  529. NORMAL (U"If the participant clicks the oops button, Praat will forget everything the participant did "
  530. "with the current stimulus and the previous stimulus. The experiment will continue with playing "
  531. "the previous stimulus again and waiting for the participant's choice.")
  532. MAN_END
  533. MAN_BEGIN (U"ExperimentMFC 5. Stimulus-dependent texts", U"ppgb", 20051205)
  534. INTRO (U"In the @@ExperimentMFC 2.1. The experiment file|example experiment@, the text at the top of the screen "
  535. "stayed the same throughout the experiment, and so did the texts on the response buttons. "
  536. "There are ways to have these texts depend on the stimulus at hand.")
  537. LIST_ITEM (U"@@ExperimentMFC 5.1. The stimulus-dependent run text")
  538. LIST_ITEM (U"@@ExperimentMFC 5.2. Stimulus-dependent response buttons")
  539. MAN_END
  540. MAN_BEGIN (U"ExperimentMFC 5.1. The stimulus-dependent run text", U"ppgb", 20051205)
  541. INTRO (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ contained the following lines:")
  542. CODE (U"numberOfDifferentStimuli = 4")
  543. CODE1 (U"\"heed\" \"\"")
  544. CODE1 (U"\"hid\" \"\"")
  545. CODE1 (U"\"hood\" \"\"")
  546. CODE1 (U"\"hud\" \"\"")
  547. CODE (U"...")
  548. CODE (U"...")
  549. CODE (U"runText = \"Choose the vowel that you heard.\"")
  550. NORMAL (U"For every stimulus, the same `run text' was written at the top of the screen. "
  551. "But suppose you want to make that text dependent on the stimulus. You would do:")
  552. CODE1 (U"\"heed\" \"Choose the vowel you heard.\"")
  553. CODE1 (U"\"hid\" \"Click the vowel you heard.\"")
  554. CODE1 (U"\"hood\" \"Select the vowel you heard.\"")
  555. CODE1 (U"\"hud\" \"What's the vowel you heard?\"")
  556. CODE (U"...")
  557. CODE (U"...")
  558. CODE (U"runText = \"\"")
  559. NORMAL (U"In this case, each stimulus comes with its own text. The %runText will only show up for stimuli "
  560. "for which you do not supply a separate text.")
  561. NORMAL (U"This feature is useful mainly in cases where the responses are sounds but the stimulus is not "
  562. "(see @@ExperimentMFC 6. Responses are sounds@) or if you want to cause some lexical priming.")
  563. MAN_END
  564. MAN_BEGIN (U"ExperimentMFC 5.2. Stimulus-dependent response buttons", U"ppgb", 20070926)
  565. INTRO (U"The @@ExperimentMFC 2.1. The experiment file|example experiment@ contained the following lines:")
  566. CODE (U"numberOfDifferentStimuli = 4")
  567. CODE1 (U"\"heed\" \"\"")
  568. CODE1 (U"\"hid\" \"\"")
  569. CODE1 (U"\"hood\" \"\"")
  570. CODE1 (U"\"hud\" \"\"")
  571. CODE (U"...")
  572. CODE (U"...")
  573. CODE (U"numberOfDifferentResponses = 5")
  574. CODE1 (U"0.2 0.3 0.7 0.8 \"h I d\" 40 \"\" \"i\"")
  575. CODE1 (U"0.3 0.4 0.5 0.6 \"h E d\" 40 \"\" \"e\"")
  576. CODE1 (U"0.4 0.5 0.3 0.4 \"h A d\" 40 \"\" \"a\"")
  577. CODE1 (U"0.5 0.6 0.5 0.6 \"h O d\" 40 \"\" \"o\"")
  578. CODE1 (U"0.6 0.7 0.7 0.8 \"h U d\" 40 \"\" \"u\"")
  579. NORMAL (U"For every stimulus, the buttons contained the same visible texts, such as \"h I d\" and \"h A d\".")
  580. NORMAL (U"But suppose you have an experiment about the perception of voicing in plosives. "
  581. "The first stimulus starts with an ambiguous /b/ or /p/, and you want the participant "
  582. "to choose between \"bath\" and \"path\". The next stimulus starts with an ambiguous /d/ or /t/, "
  583. "and you want the participant to choose between \"dart\" and \"tart\". "
  584. "You would go about like this:")
  585. CODE (U"numberOfDifferentStimuli = 6")
  586. CODE1 (U"\"bpath1\" \"|bath|path\"")
  587. CODE1 (U"\"bpath2\" \"|bath|path\"")
  588. CODE1 (U"\"bpath3\" \"|bath|path\"")
  589. CODE1 (U"\"dtart1\" \"|dart|tart\"")
  590. CODE1 (U"\"dtart2\" \"|dart|tart\"")
  591. CODE1 (U"\"dtart3\" \"|dart|tart\"")
  592. CODE (U"...")
  593. CODE (U"...")
  594. CODE (U"numberOfDifferentResponses = 2")
  595. CODE1 (U"0.2 0.4 0.7 0.8 \"\" 40 \"\" \"left\"")
  596. CODE1 (U"0.6 0.8 0.7 0.8 \"\" 40 \"\" \"right\"")
  597. NORMAL (U"In this case, the two response buttons show either \"path\" and \"path\", or \"dart\" and \"tart\".")
  598. NORMAL (U"In the ResultsMFC (see @@ExperimentMFC 2.9. How an experiment proceeds@), "
  599. "the stimuli will be recorded as \"bpath1|bath|path\" and the like, not just as \"bpath1\". "
  600. "Praat does this in order to be able to cope with balanced designs such as")
  601. CODE1 (U"\"bpath1\" \"|bath|path\"")
  602. CODE1 (U"\"bpath1\" \"|path|bath\"")
  603. NORMAL (U"In other words, the button ordering is considered part of the stimulus.")
  604. NORMAL (U"This trick can be combined with a stimulus-dependent run text:")
  605. CODE (U"numberOfDifferentStimuli = 32")
  606. CODE1 (U"\"bpath1\" \"Throw a...|bath|path\"")
  607. CODE1 (U"\"bpath1\" \"Walk a...|bath|path\"")
  608. CODE1 (U"\"bpath2\" \"Walk a...|bath|path\"")
  609. CODE1 (U"\"dtart1\" \"Throw a...|dart|tart\"")
  610. CODE1 (U"\"dtart1\" \"Carry a...|dart|tart\"")
  611. CODE (U"...")
  612. CODE (U"runText = \"\"")
  613. CODE (U"...")
  614. CODE (U"numberOfDifferentResponses = 2")
  615. CODE1 (U"0.2 0.4 0.7 0.8 \"\" 40 \"\" \"left\"")
  616. CODE1 (U"0.6 0.8 0.7 0.8 \"\" 40 \"\" \"right\"")
  617. MAN_END
  618. MAN_BEGIN (U"ExperimentMFC 6. Responses are sounds", U"ppgb", 20160925)
  619. INTRO (U"In the @@ExperimentMFC 2.1. The experiment file|example experiment@, "
  620. "the stimuli were sounds, and the responses were categories whose labels appeared on buttons. "
  621. "Sometimes you want it the other way around.")
  622. NORMAL (U"An example is the %%/i/ prototype% task: the top of the screen just says \"Please choose the best %ee\", "
  623. "and no stimulus sound is played. Instead, the participant can click repeatedly on an array of 40 buttons, "
  624. "each of which contains a different [i]-like sound. That is, if the participant clicks on a response button, "
  625. "an [i]-like sound is played, and every response button has its own sound.")
  626. NORMAL (U"Such a task can be regarded as reversing the task of the example experiment, "
  627. "in which the stimulus was a sound and the reponse was a phonological category. "
  628. "In the /i/ prototype task, the stimulus is a phonological category, and the response is a sound.")
  629. NORMAL (U"This is what the experiment file could look like:")
  630. CODE (U"\"ooTextFile\"")
  631. CODE (U"\"ExperimentMFC 7\"")
  632. CODE (U"blankWhilePlaying? <no>")
  633. CODE (U"stimuliAreSounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  634. CODE (U"numberOfDifferentStimuli = 2")
  635. CODE1 (U"\"i\" \"Choose the best \\% \\% ee\\% .\"")
  636. CODE1 (U"\"I\" \"Choose the best \\% \\% i\\% .\"")
  637. CODE (U"numberOfReplicationsPerStimulus = 1")
  638. CODE (U"breakAfterEvery = 1")
  639. CODE (U"randomize = <CyclicNonRandom>")
  640. CODE (U"startText = \"Click to start.\"")
  641. CODE (U"runText = \"\"")
  642. CODE (U"pauseText = \"You can have a short break if you like. Click to proceed.\"")
  643. CODE (U"endText = \"The experiment has finished.\"")
  644. CODE (U"maximumNumberOfReplays = 0")
  645. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  646. CODE (U"okButton = 0.8 0.95 0.45 0.55 \"OK\" \"\"")
  647. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  648. CODE (U"responsesAreSounds? <yes>")
  649. CODE (U"responseFileNameHead = \"Sounds/\"")
  650. CODE (U"responseFileNameTail = \".wav\"")
  651. CODE (U"responseCarrierBefore = \"\"")
  652. CODE (U"responseCarrierAfter = \"\"")
  653. CODE (U"responseInitialSilenceDuration = 0.3")
  654. CODE (U"responseMedialSilenceDuration = 0")
  655. CODE (U"responseFinalSilenceDuration = 0")
  656. CODE (U"numberOfDifferentResponses = 16")
  657. CODE1 (U"0.2 0.3 0.7 0.8 \"\" 10 \"\" \"i11\"")
  658. CODE1 (U"0.3 0.4 0.7 0.8 \"\" 10 \"\" \"i12\"")
  659. CODE1 (U"0.4 0.5 0.7 0.8 \"\" 10 \"\" \"i13\"")
  660. CODE1 (U"0.5 0.6 0.7 0.8 \"\" 10 \"\" \"i14\"")
  661. CODE1 (U"0.2 0.3 0.6 0.7 \"\" 10 \"\" \"i21\"")
  662. CODE1 (U"0.3 0.4 0.6 0.7 \"\" 10 \"\" \"i22\"")
  663. CODE1 (U"0.4 0.5 0.6 0.7 \"\" 10 \"\" \"i23\"")
  664. CODE1 (U"0.5 0.6 0.6 0.7 \"\" 10 \"\" \"i24\"")
  665. CODE1 (U"0.2 0.3 0.5 0.6 \"\" 10 \"\" \"i31\"")
  666. CODE1 (U"0.3 0.4 0.5 0.6 \"\" 10 \"\" \"i32\"")
  667. CODE1 (U"0.4 0.5 0.5 0.6 \"\" 10 \"\" \"i33\"")
  668. CODE1 (U"0.5 0.6 0.5 0.6 \"\" 10 \"\" \"i34\"")
  669. CODE1 (U"0.2 0.3 0.4 0.5 \"\" 10 \"\" \"i41\"")
  670. CODE1 (U"0.3 0.4 0.4 0.5 \"\" 10 \"\" \"i42\"")
  671. CODE1 (U"0.4 0.5 0.4 0.5 \"\" 10 \"\" \"i43\"")
  672. CODE1 (U"0.5 0.6 0.4 0.5 \"\" 10 \"\" \"i44\"")
  673. CODE (U"numberOfGoodnessCategories = 5")
  674. CODE1 (U"0.25 0.35 0.10 0.20 \"1 (poor)\" 24 \"\"")
  675. CODE1 (U"0.35 0.45 0.10 0.20 \"2\" 24 \"\"")
  676. CODE1 (U"0.45 0.55 0.10 0.20 \"3\" 24 \"\"")
  677. CODE1 (U"0.55 0.65 0.10 0.20 \"4\" 24 \"\"")
  678. CODE1 (U"0.65 0.75 0.10 0.20 \"5 (good)\" 24 \"\"")
  679. NORMAL (U"The participant will see 16 squares on the screen. First she will have to find the best /i/, "
  680. "then the best /\\ic/. The sound files ##Sounds/i11.wav# and so on must exist and have the same sampling frequency. "
  681. "A silence of 0.3 seconds is played just before each response sound.")
  682. MAN_END
  683. MAN_BEGIN (U"ExperimentMFC 7. Blanking the screen", U"ppgb", 20130102)
  684. INTRO (U"In all the earlier examples, the flag %blankWhilePlaying was set to <no>. This means that in all those cases "
  685. "the participant will immediately see the response categories when the sound starts playing "
  686. "(or even earlier, if there is an initial silence).")
  687. NORMAL (U"This can be changed by setting %blankWhilePlaying to <yes>. When you do that, the participant will see a blank screen "
  688. "while the stimulus is playing, and the response buttons will come up only after the sound has finished. "
  689. "This is useful if you want to prevent the participant from clicking before the sound has finished, "
  690. "or for priming experiments. Reaction times are measured from when the response buttons appear.")
  691. NORMAL (U"If you want the response buttons to come up 0.5 seconds after the sound finishes playing, "
  692. "you set the %stimulusFinalSilenceDuration to 0.5.")
  693. MAN_END
  694. MAN_BEGIN (U"ExperimentMFC 8. Running multiple experiments", U"ppgb", 20160925)
  695. INTRO (U"In all the earlier examples, either the set of stimulus sounds or the set of response sounds stayed "
  696. "the same throughout the experiment. If you want more than one set of stimuli, or more than one set of responses, "
  697. "you can run several experiments after each other, simply by selecting more than one experiment, then clicking #Run.")
  698. NORMAL (U"You can put all these ExperimentMFC objects in one text file. The following example contains two experiments. "
  699. "The second line has to contain the text \"Collection\", followed by the number of experiments:")
  700. CODE (U"\"ooTextFile\"")
  701. CODE (U"\"Collection\" 2")
  702. CODE (U"")
  703. CODE (U"\"ExperimentMFC 7\" \"i\"")
  704. CODE (U"blankWhilePlaying? <no>")
  705. CODE (U"stimuliAreSounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  706. CODE (U"numberOfDifferentStimuli = 1")
  707. CODE1 (U"\"i\" \"Choose the best \\% \\% ee\\% .\"")
  708. CODE (U"numberOfReplicationsPerStimulus = 1")
  709. CODE (U"breakAfterEvery = 0")
  710. CODE (U"randomize = <CyclicNonRandom>")
  711. CODE (U"startText = \"You are going to choose the best \\% \\% ee\\% . Click to start.\"")
  712. CODE (U"runText = \"\"")
  713. CODE (U"pauseText = \"\"")
  714. CODE (U"endText = \"Thank you for choosing the best \\% \\% ee\\% . Click to proceed.\"")
  715. CODE (U"maximumNumberOfReplays = 0")
  716. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  717. CODE (U"okButton = 0.8 0.95 0.45 0.55 \"OK\" \"\"")
  718. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  719. CODE (U"responsesAreSounds? <yes>")
  720. CODE (U"responseFileNameHead = \"Sounds/\"")
  721. CODE (U"responseFileNameTail = \".wav\"")
  722. CODE (U"responseCarrierBefore = \"\"")
  723. CODE (U"responseCarrierAfter = \"\"")
  724. CODE (U"responseInitialSilenceDuration = 0.3")
  725. CODE (U"responseMedialSilenceDuration = 0")
  726. CODE (U"responseFinalSilenceDuration = 0")
  727. CODE (U"numberOfDifferentResponses = 6")
  728. CODE1 (U"0.2 0.3 0.7 0.8 \"\" 10 \"\" \"i1\"")
  729. CODE1 (U"0.3 0.4 0.7 0.8 \"\" 10 \"\" \"i2\"")
  730. CODE1 (U"0.4 0.5 0.7 0.8 \"\" 10 \"\" \"i3\"")
  731. CODE1 (U"0.5 0.6 0.7 0.8 \"\" 10 \"\" \"i4\"")
  732. CODE1 (U"0.6 0.7 0.7 0.8 \"\" 10 \"\" \"i5\"")
  733. CODE1 (U"0.7 0.8 0.7 0.8 \"\" 10 \"\" \"i6\"")
  734. CODE (U"numberOfGoodnessCategories = 0")
  735. CODE (U"")
  736. CODE (U"\"ExperimentMFC 7\" \"u\"")
  737. CODE (U"blankWhilePlaying? <no>")
  738. CODE (U"stimuliAreSounds? <no> \"\" \"\" \"\" \"\" 0 0 0")
  739. CODE (U"numberOfDifferentStimuli = 1")
  740. CODE1 (U"\"u\" \"Choose the best \\% \\% oo\\% .\"")
  741. CODE (U"numberOfReplicationsPerStimulus = 1")
  742. CODE (U"breakAfterEvery = 0")
  743. CODE (U"randomize = <CyclicNonRandom>")
  744. CODE (U"startText = \"You are going to choose the best \\% \\% oo\\% . Click to start.\"")
  745. CODE (U"runText = \"\"")
  746. CODE (U"pauseText = \"\"")
  747. CODE (U"endText = \"All the experiments have finished. You can call the experimenter.\"")
  748. CODE (U"maximumNumberOfReplays = 0")
  749. CODE (U"replayButton = 0 0 0 0 \"\" \"\"")
  750. CODE (U"okButton = 0.8 0.95 0.45 0.55 \"OK\" \"\"")
  751. CODE (U"oopsButton = 0 0 0 0 \"\" \"\"")
  752. CODE (U"responsesAreSounds? <yes>")
  753. CODE (U"responseFileNameHead = \"Sounds/\"")
  754. CODE (U"responseFileNameTail = \".wav\"")
  755. CODE (U"responseCarrierBefore = \"\"")
  756. CODE (U"responseCarrierAfter = \"\"")
  757. CODE (U"responseInitialSilenceDuration = 0.3")
  758. CODE (U"responseMedialSilenceDuration = 0")
  759. CODE (U"responseFinalSilenceDuration = 0")
  760. CODE (U"numberOfDifferentResponses = 6")
  761. CODE1 (U"0.2 0.3 0.7 0.8 \"\" 10 \"\" \"u1\"")
  762. CODE1 (U"0.3 0.4 0.7 0.8 \"\" 10 \"\" \"u2\"")
  763. CODE1 (U"0.4 0.5 0.7 0.8 \"\" 10 \"\" \"u3\"")
  764. CODE1 (U"0.5 0.6 0.7 0.8 \"\" 10 \"\" \"u4\"")
  765. CODE1 (U"0.6 0.7 0.7 0.8 \"\" 10 \"\" \"u5\"")
  766. CODE1 (U"0.7 0.8 0.7 0.8 \"\" 10 \"\" \"u6\"")
  767. CODE (U"numberOfGoodnessCategories = 0")
  768. NORMAL (U"In this example, the participant first has to choose the best /i/ from among six [i]-like sounds, "
  769. "which are in the sound files ##i1.wav# through ##i6.wav#. After that, she has to choose the best /u/ "
  770. "from among six [u]-like sounds, which are in the sound files ##u1.wav# through ##u6.wav#. "
  771. "The percent signs in \\% \\% ee\\% mean that %ee will be italicized.")
  772. NORMAL (U"If you read this file with ##Read from file...#, you will see two ExperimentMFC objects, "
  773. "named #i and #u. They both stand selected. You then click #Run, and after the participant finishes, "
  774. "you select both ExperimentMFC objects again (probably they still stand selected), and click ##Extract results#. "
  775. "You will then get two #ResultMFC objects.")
  776. MAN_END
  777. }
  778. /* End of file manual_ExperimentMFC.cpp */