Guest User

Untitled

a guest
Jul 5th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Generated by OpenSesame 0.27 (Frisky Freud)
  2. # Fri Jul 05 15:26:53 2013 (nt)
  3. # <http://www.cogsci.nl/opensesame>
  4.  
  5. set foreground "white"
  6. set subject_parity "even"
  7. set description "Default description"
  8. set title "New experiment"
  9. set sampler_backend "legacy"
  10. set coordinates "relative"
  11. set height "768"
  12. set mouse_backend "xpyriment"
  13. set width "1024"
  14. set compensation "0"
  15. set keyboard_backend "legacy"
  16. set background "black"
  17. set subject_nr "0"
  18. set canvas_backend "xpyriment"
  19. set start "experiment"
  20. set synth_backend "legacy"
  21.  
  22. define inline_script prep_read_speak
  23. set _run ""
  24. ___prepare__
  25. path_list = exp.get_file("list4.txt")
  26.  
  27. import numpy as np
  28. stimlist = np.loadtxt(path_list, dtype = str)
  29.  
  30. import random
  31. random.shuffle(stimlist)
  32.  
  33. global stimlist
  34. __end__
  35. set description "Executes Python code"
  36.  
  37. define advanced_delay advanced_delay
  38. set duration "1250"
  39. set jitter "0"
  40. set description "Waits for a specified duration"
  41. set jitter_mode "Std. Dev."
  42.  
  43. define sequence seq_listen_speak
  44. set flush_keyboard "yes"
  45. set description "Runs a number of items in sequence"
  46. run wordpop "always"
  47. run display_word "always"
  48. run play_sound "always"
  49. run advanced_delay "always"
  50. run play_sound "always"
  51. run logger "always"
  52.  
  53. define sketchpad sketchpad
  54. set duration "keypress"
  55. set description "Displays stimuli"
  56. draw image 0 0 "[wordpic]" scale=1 center=1 show_if="always"
  57.  
  58. define inline_script prep_listen_write1
  59. set _run ""
  60. ___prepare__
  61. path_list = exp.get_file("list2.txt")
  62.  
  63. import numpy as np
  64. stimlist = np.loadtxt(path_list, dtype = str)
  65.  
  66. import random
  67. random.shuffle(stimlist)
  68.  
  69. global stimlist
  70. __end__
  71. set description "Executes Python code"
  72.  
  73. define inline_script prep_listen_write2
  74. set _run ""
  75. ___prepare__
  76. path_list = exp.get_file("list3.txt")
  77.  
  78. import numpy as np
  79. stimlist = np.loadtxt(path_list, dtype = str)
  80.  
  81. import random
  82. random.shuffle(stimlist)
  83.  
  84. global stimlist
  85. __end__
  86. set description "Executes Python code"
  87.  
  88. define sketchpad display_word
  89. set duration "keypress"
  90. set description "Displays stimuli"
  91. draw textline 0 0 "[wordx]" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  92.  
  93. define inline_script prep_listen_speak
  94. set _run ""
  95. ___prepare__
  96. path_list = exp.get_file("list1.txt")
  97.  
  98. import numpy as np
  99. stimlist = np.loadtxt(path_list, dtype = str)
  100.  
  101. import random
  102. random.shuffle(stimlist)
  103.  
  104. global stimlist
  105. __end__
  106. set description "Executes Python code"
  107.  
  108. define sequence experiment
  109. run randomize_conditions "always"
  110.  
  111. define logger logger
  112. set ignore_missing "yes"
  113. set description "Logs experimental data"
  114. set auto_log "no"
  115. set use_quotes "no"
  116. log "word"
  117.  
  118. define sequence conditions
  119. set flush_keyboard "yes"
  120. set description "Runs a number of items in sequence"
  121. run prep_listen_speak "[condition] = listen_speak"
  122. run loop_listen_speak "[condition] = listen_speak"
  123. run prep_listen_write1 "[condition] = listen_write1"
  124. run loop_listen_write1 "[condition] = listen_write1"
  125. run prep_listen_write2 "[condition] = listen_write2"
  126. run loop_listen_write2 "[condition] = listen_write2"
  127. run prep_read_speak "[condition] = read_speak"
  128. run loop_read_speak "[condition] = read_speak"
  129.  
  130. define loop randomize_conditions
  131. set repeat "1"
  132. set description "Repeatedly runs another item"
  133. set skip "0"
  134. set offset "no"
  135. set item "conditions"
  136. set column_order "condition"
  137. set cycles "4"
  138. set order "random"
  139. setcycle 0 condition "listen_speak"
  140. setcycle 1 condition "listen_write1"
  141. setcycle 2 condition "listen_write2"
  142. setcycle 3 condition "read_speak"
  143. run conditions
  144.  
  145. define sequence seq_read_speak
  146. set flush_keyboard "yes"
  147. set description "Runs a number of items in sequence"
  148. run inline_script "always"
  149. run sketchpad "always"
  150.  
  151. define loop loop_read_speak
  152. set repeat "1"
  153. set description "Repeatedly runs another item"
  154. set skip "0"
  155. set offset "no"
  156. set item "seq_read_speak"
  157. set column_order ""
  158. set cycles "1"
  159. set order "random"
  160. run seq_read_speak
  161.  
  162. define inline_script inline_script
  163. ___run__
  164. __end__
  165. ___prepare__
  166. word = stimlist.pop()
  167. exp.set("word", word)
  168.  
  169. wordpic = word - "wav"
  170. wordpic = wordpic + ".bmp"
  171. path_pic = exp.get_file(wordpic)
  172. exp.set("wordpic",path_pic)
  173. __end__
  174. set description "Executes Python code"
  175.  
  176. define loop loop_listen_speak
  177. set repeat "1"
  178. set description "Repeatedly runs another item"
  179. set skip "0"
  180. set offset "no"
  181. set item "seq_listen_speak"
  182. set column_order ""
  183. set cycles "5"
  184. set order "random"
  185. run seq_listen_speak
  186.  
  187. define loop loop_listen_write2
  188. set repeat "1"
  189. set description "Repeatedly runs another item"
  190. set skip "0"
  191. set offset "no"
  192. set item "seq_listen_write2"
  193. set column_order ""
  194. set cycles "5"
  195. set order "random"
  196. run seq_listen_write2
  197.  
  198. define loop loop_listen_write1
  199. set repeat "1"
  200. set description "Repeatedly runs another item"
  201. set skip "0"
  202. set offset "no"
  203. set item "seq_listen_write1"
  204. set column_order ""
  205. set cycles "5"
  206. set order "random"
  207. run seq_listen_write1
  208.  
  209. define sequence seq_listen_write2
  210. set flush_keyboard "yes"
  211. set description "Runs a number of items in sequence"
  212. run wordpop "always"
  213. run display_word "always"
  214. run play_sound "always"
  215.  
  216. define inline_script wordpop
  217. set _run ""
  218. ___prepare__
  219. word = stimlist.pop(1)
  220.  
  221. exp.set("wordx", word)
  222.  
  223. global wordx
  224. __end__
  225. set description "Executes Python code"
  226.  
  227. define sequence seq_listen_write1
  228. set flush_keyboard "yes"
  229. set description "Runs a number of items in sequence"
  230. run wordpop "always"
  231. run display_word "always"
  232. run play_sound "always"
  233.  
  234. define sampler play_sound
  235. set volume "1"
  236. set description "Plays a sound file in .wav or .ogg format"
  237. set sample "[wordx]"
  238. set pitch "1"
  239. set duration "sound"
  240. set stop_after "0"
  241. set pan "0"
  242. set fade_in "0"
Advertisement
Add Comment
Please, Sign In to add comment