Guest User

jjh_OS

a guest
Jul 5th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. # Generated by OpenSesame 0.27 (Frisky Freud)
  2. # Fri Jul 05 15:19:00 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.csv")
  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.csv")
  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.csv")
  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.csv")
  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. word = stimlist.pop()
  165. exp.set("word", word)
  166.  
  167. wordpic = word + ".bmp"
  168. path_pic = exp.get_file(wordpic)
  169. exp.set("wordpic",path_pic)
  170. __end__
  171. set _prepare ""
  172. set description "Executes Python code"
  173.  
  174. define loop loop_listen_speak
  175. set repeat "1"
  176. set description "Repeatedly runs another item"
  177. set skip "0"
  178. set offset "no"
  179. set item "seq_listen_speak"
  180. set column_order ""
  181. set cycles "5"
  182. set order "random"
  183. run seq_listen_speak
  184.  
  185. define loop loop_listen_write2
  186. set repeat "1"
  187. set description "Repeatedly runs another item"
  188. set skip "0"
  189. set offset "no"
  190. set item "seq_listen_write2"
  191. set column_order ""
  192. set cycles "5"
  193. set order "random"
  194. run seq_listen_write2
  195.  
  196. define loop loop_listen_write1
  197. set repeat "1"
  198. set description "Repeatedly runs another item"
  199. set skip "0"
  200. set offset "no"
  201. set item "seq_listen_write1"
  202. set column_order ""
  203. set cycles "5"
  204. set order "random"
  205. run seq_listen_write1
  206.  
  207. define sequence seq_listen_write2
  208. set flush_keyboard "yes"
  209. set description "Runs a number of items in sequence"
  210. run wordpop "always"
  211. run display_word "always"
  212. run play_sound "always"
  213.  
  214. define inline_script wordpop
  215. set _run ""
  216. ___prepare__
  217. word = stimlist.pop(1)
  218.  
  219. exp.set("wordx", word)
  220.  
  221. global wordx
  222. __end__
  223. set description "Executes Python code"
  224.  
  225. define sequence seq_listen_write1
  226. set flush_keyboard "yes"
  227. set description "Runs a number of items in sequence"
  228. run wordpop "always"
  229. run display_word "always"
  230. run play_sound "always"
  231.  
  232. define sampler play_sound
  233. set volume "1"
  234. set description "Plays a sound file in .wav or .ogg format"
  235. set sample "[wordx]"
  236. set pitch "1"
  237. set duration "sound"
  238. set stop_after "0"
  239. set pan "0"
  240. set fade_in "0"
Advertisement
Add Comment
Please, Sign In to add comment