# Experiment Designer Tutorial

## Designing

### Populating the Flow

When opening the Experiment Designer an empty experiment is created. We can add a routine to the flow by clicking on the Add Routine button. We give it the name "trial" and leave the position in the flow at "0". Our flow now shows the newly created routine. Next we want to insert a loop to repeat the routine "trial" four times. Clicking on Add Loop brings up a dialog where we enter the values as seen in the screenshot. This will create a loop that will be followed four times and each time will select either "sync" or "async" in a balanced way. Now we want to insert a short pause that will last between 1 and 1.5 seconds after the trial. After clicking on Add ISI we set the following values: The position corresponds to the little circles that are shown in the flow: The flow of our experiment is now finished and the Experiment Designer should look like this:

### Creating an instance of component

Before we can run the experiment we have to define what exactly happens inside our experiment. We will use a text component. To create an instance of the HudText component ('HUD' stands for head-up display), we have to press on the corresponding button in the Components pane on the right side of the window: This brings up the following dialog. We leave the name as "hudText", but we could change it to any label we like. The other settings are for defining what exactly our text component does in each configuration. We first give a text to be shown in the default configuration, and do not change the other settings (bellow on the left). We then create another configuration that we call e.g. 'asynchronous'. For the 'asynchronous' configuration, we can change the text accordingly by checking off the flag 'as in standard' (bellow on the right). This text component is now added in the list of experiment components (in the left of the window):

### Defining Experimental Conditions

As you can see at the top of the centre pane, there are already two experimental conditions async and sync. These where set up automatically because the routine trial is inside the shuffle loop that defines these two variables. We now need to add our hudText component to the conditions. To do this, click on the component on the left and choose add to all conditions: This pops up the following dialog. This allows us to define display and activation timings. For now we just leave 1 second duration for each: We now have a time-line of 1 second activation (blue) and display (red) bars in both conditions. To have the text component perform something different in each of the conditions, click on the combo-box in the trial: async tab under the label of the component and select the async configuration: Our experiment is now ready; it has a flow with looping trials, our trial routine has two conditions, and each condition contains 1 second of text component using a different configuration.

### General Settings

We want this experiment to be rendered on a normal screen in full-screen. To do that we click on Display Settings in the top button pane: In the dialog we check the fullscreen option.

## Testing

Before creating instances of our experiment, we want to be sure everything works as expected. To do this, we have to save our experiment (extension is *.exp.xml). Do this over the File > Save menu or by using the corresponding shortcut. Then we click on the Test Experiment button: We can see the alternating texts displays as bellow. Everytime we test the experiment, the order of the experimental conditions is shuffled. When we test the experiment multiple times, we should see different sequences of Synchronous and Asynchronous.

## Running

Finally, we can generate an instance of our experiment. An instance is basically a file that describes the exact order of experimental conditions and the lengths of the ISIs. This is useful to be able to check after having run an experiment what exactly happened when or to run the exact same experiment multiple times. To generate an instance, you can either select Experiment > Generate Instance from the menu or click on the corresponding icon in the toolbar: Type a file name or leave the default proposed filename in the file dialog which pops-up (extension is *.inst.xml). Clicking on the start experiment button in the toolbar (or selecting Experiment > Execute Instance) brings up another file dialog that lets u select the saved instance. Once you selected the file, the experiment is executed.

That's it. Well done!

Last update: 11.10.2011 | Authors: Tobias Leugger, Bruno Herbelin