--- API: 2.1 OpenSesame: 3.3.9a3 Platform: posix --- set width 1024 set uniform_coordinates yes set title "New experiment" set subject_parity even set subject_nr 0 set start experiment set sound_sample_size -16 set sound_freq 48000 set sound_channels 2 set sound_buf_size 1024 set round_decimals 2 set height 768 set fullscreen no set form_clicks no set foreground white set font_underline no set font_size 18 set font_italic no set font_family mono set font_bold no set experiment_path "/home/ede/Desktop" set disable_garbage_collection yes set description "The main experiment item" set coordinates uniform set compensation 0 set canvas_backend psycho set background black define sequence experiment set flush_keyboard yes set description "Runs a number of items in sequence" run new_inline_script_1 always run new_loop always define notepad getting_started __note__ Welcome to OpenSesame 3.3 "Lentiform Loewenfeld"! If you are new to OpenSesame, it is a good idea to follow one of the tutorials, which can be found on the documentation site: - You can also check out the examples. These can be opened via: - Menu -> Tools -> Example experiments. And feel free to ask for help on the forum: - Have fun with OpenSesame! __end__ set description "A simple notepad to document your experiment. This plug-in does nothing." define inline_script new_inline_script set description "Executes Python code" ___run__ cv_1.show() while True: # poll a response k, t = kb.get_key() # depending on which key is pressed do something if k == 't': # if a trigger comes in, append it to a list trigger_list.append(clock.time()) elif k == 'g': cv_2.show() elif k == 'b': cv_1.show() elif k == 'y': break print(trigger_list) __end__ ___prepare__ cv_1 = Canvas() cv_2 = Canvas() kb = Keyboard(keylist = ['t', 'b', 'g', 'y']) cv_1.text("First canvas") cv_2.text("Second canvas") __end__ define inline_script new_inline_script_1 set description "Executes Python code" set _run "" ___prepare__ # a list to store the timings of each trigger that came in trigger_list = [] __end__ define loop new_loop set source table set repeat 5 set order random set description "Repeatedly runs another item" set cycles 1 set continuous no set break_if_on_first yes set break_if never setcycle 0 empty_column 1 run new_sequence define sequence new_sequence set flush_keyboard yes set description "Runs a number of items in sequence" run new_inline_script always define sketchpad welcome set start_response_interval no set reset_variables no set duration keypress set description "Displays stimuli" draw textline center=1 color=white font_bold=no font_family=serif font_italic=no font_size=32 html=yes show_if=always text="OpenSesame 3.3 Lentiform Loewenfeld" x=0 y=0 z_index=0