 Hello and welcome to this tutorial on OpenSesame. OpenSesame is a software package designed for the easy creation and running of psychology experiments. It can be downloaded for free from www.cogsci.nl. On this website you'll find installation instructions for all major platforms including Windows, macOS 10 and Linux. So let's look at some of the things we can do with OpenSesame. With OpenSesame we can easily build up experiments using different components that will allow us to, for example, present images, place text on the screen, play sounds and even display video clips. We can collect responses from participants and OpenSesame will write the collected data to a file for later analysis. It uses a standard file format comma separated values or CSV which can be read by virtually all data preparation and analysis packages including Microsoft Excel and SPSS. OpenSesame uses a plugin architecture allowing for the easy integration with other equipment such as the iLink eye tracker from SR Research and the serial response or SR box from PST. Finally if you know how to program using the Python language you can easily insert Python code into the experiment to do pretty much anything. In this tutorial we'll take a look at the general usage of OpenSesame and how you can implement a simple experiment in the program. Let's begin by taking a tour of the interface. So this is the main interface to OpenSesame. It's comprised of four main panels and we'll take a look at each of these panels in turn. The first panel is the main toolbar which is located at the top of the window. It's comprised of a series of icons that allows to perform basic operations inside of the program. We'll take a look at each of these group of icons in turn. The first group deal with basic file functions such as creating a new script, opening a script or saving the current script we're working on to the disk. These three options work exactly the same way as they would do in any other computer program. The next three icons allow us to actually run our experiment. We have three choices. We can run full screen which is probably how we'd normally run our experiments but we'd also choose to run the experiment in a window if we wish. We can also perform a quick run as well which will basically get the experiment up and running quite quickly just so we can check to see that everything's running smoothly. The next two icons deal with Open Sesame's tabbing system. Every time you open up a new object in Open Sesame it will create a new tab in the tab area for that particular object. Now if you've only got a small experiment with maybe two or three up to about 10 objects it's not too bad because you can easily deal with those number of tabs open at one particular time. However if you've got quite a large experiment with potentially 20-30 objects in it it can become quite unwieldily actually having all those different tabs open. So these two options allow us to actually deal with these tabs a little bit better. The first thing we can do is close all other tabs. Essentially what this will do is close every other tab apart from the selected one. So you could have say 20 tabs open, you select one of them, click on close other tabs and it will close the other 19 tabs to leave you with just the one. You can also prevent Open Sesame from opening up multiple tabs in the first place by selecting the one tab mode. This way whenever you open up a new object you'll just replace the current tab. Personally I quite like to use the one tab mode so I'm going to select it right now. It is a personal preference you may actually choose that you prefer to have all the different tabs available to you at all times. The next three icons will show or hide various windows within the main interface. The first will show the file pool which allows us to add pictures and sounds to our experiment. The second will show the variable inspector so we can actually check the names of variables, particularly useful if when we come to look at the logging item, see which variables we actually want to record to disk. And the last one will show the debug window, particularly useful if you've got an experiment that keeps crashing for some reason, you can't figure out why, or if you're using some inline Python code and you've got some problems there, the debug window will actually display output messages that you can put inside those inline scripts. The final two icons deal with Open Sesame's help system. Two straightforward options, one for offline help, basically the files that come with Open Sesame's installation and the online help which will go out to the Cogside or NL website as you can look at the latest information on the web. The next panel we'll look at is the item toolbar. The item toolbar contains a series of icons that represent different items that we can add to our experiment. For example, we could add a loop item which contains a list of all our trials or we could put in a sketch pad item that contains pictures, text and so on. These objects form the building blocks of our experiment. The next area to look at is the overview window. It contains the outline of our experiment and how our experiment is actually constructed. By default, from the default template, we have this thing called new experiment, which is a experiment object. And if we have a click on that object, you'll see in the tab area, we've got all details about the experiment, for example, what its resolution is and what the colors are and so on. We also then have a sequence object, which basically a sequence object contains a list of different objects that are going to be run throughout our experiment. So if we try to run this experiment, for example, what we'd actually see is nothing in this getting started section, because this is actually just a notepad item. We'll open that up. This is just a bit of text from the author of Open Sesame, but it would run this sketchpad item which displays some stimuli on the screen. In this particular case, it displays the message Open Sesame and the version number. By way of a quick demonstration, I'll just use the quick run feature. And you can just have a look at what would have been displayed. That's what we'd actually get in that particular sketchpad item. So that's that for the moment. If you're creating quite a complicated experiment, it's a good idea to keep an eye on what's happening with the overview window as it can help you sort out any problems that you might run into. The final area to look at is the tab area, which is located on the right hand side of the screen. It's basically where we do our main work inside of Open Sesame. For example, defining our trials and deciding where we're going to place stimuli on the screen and so on. So that's a quick tour of the interface. Let's have a look now at an experiment that we can actually implement in Open Sesame. So let's take a look at the experiment we're going to implement inside of Open Sesame. It's quite straightforward experiment where we're going to present participants with pictures of cap faces, like the one we've got the screen at the moment, and also to make a decision about whether they think that cat is male or whether they think that cat is female just by looking at the photograph. They'll indicate their responses by pressing one of two keys on the keyboard. Let's just say we'll get them to press Z if they think it's a male cat and M if they think it's a female cat. This one actually, by the way, is a female cat. This is the general structure of the experiment. We'll give them some instructions to begin with. They've got to know what they're going to do after all. We'll then present them with a fixation point, then a blank screen, and then we'll present the picture of the cat face onto the screen. Now the fixation point and the blank screen might be set for a particular duration. We may say 500 milliseconds for both, but we'll have the picture of the cat face on the screen until the participant actually makes a response. Finally, at the end of the experiment, we'll give them a thank you message to say thanks for taking part in the study. Now, of course, this will only display one particular cat face. What we'd actually want to do is display multiple cat faces. So we're going to actually run through this particular section of the experiment for the number of cat face pictures that we have, which is 40 in this particular case. We have 20 males and we have 20 female cats. Now, this is one way of drawing out this particular experiment, but if I just rotate the experiment through 90 degrees, I can just plot it slightly differently. So now we've got the instructions as the first object in the list, followed by the experiment that's going to take some kind of form, and then the thank you message at the end. We can think of this as being the global structure of the experiment. Beyond the global structure of the experiment, we actually have what takes place during the main experiment itself. In this particular case, it's the quite straightforward three objects where we display fixation points, blank screen and the particular cat face that we looked through 40 times. Now, there is a reason behind actually plotting the experiment this particular way. And that is if you think back to the part on the interface window where we looked at the overview area, you can start to see how there's some similarities between drawing the experiment out this way and the way that the experiment appears in that overview window. And as we build up the experiment, we can always think back to this particular diagram to make sure that the experiments being built up in the way that we expected it to be built up. So let's now take a look at how actually how we're going to put this experiment inside of open sesame itself. So here we are back inside of open sesame. When we open up, we've got the default template opened up, which contains a very simple structure to an experiment, which contains the sequence, which contains two objects, which is a getting started notepad message and a sketchpad item called welcome, which just displays the name of the program and the version number on the screen. Now I don't need either of these getting started notepad or welcome sketchpad displays. So I'm going to delete them out of the experiment. To do this, I just right click and select delete. Do the same for the welcome object. Now, they haven't actually been permanently deleted by this stage. And actually see if I click on this disclosure triangle here for unused items, you can see they're actually sitting down here now in this unused items section. You can think of the unused items as a bit like the recycle bin located in windows. To actually get rid of these two objects permanently, you need to select the unused items and then the option for permanently delete unused items. So I'm going to select that. And I'll say yes, I'm happy that these are all going to be permanently deleted. So now we've got a nice clean environment for our experiment to be created. Something else I'm going to do just for even start creating the experiment is go to the preferences tab and enable the option that says offer to rename new items immediately. Now every time we drag an item into the experiments, if you don't give it a name straight away, it was coming with some default names like a sketchpad and then if you had another sketchpad in it would be called underscore sketchpad. If you had a third one in it would be called underscore underscore sketchpad. And you have to basically go into each object and give it a name each time. That can get a bit tiresome. So I'm going to select the option to offer to rename new items immediately. And this basically means that whenever we put an object into the experiment, for example a sketchpad, we get a little dialogue box up asking us for the name of that object to be named immediately. And it's quite a nice little feature that one. The other thing I'm going to do before even get started on creating the experiment is click on the new experiment object. This contains some basic properties of our experiment. The first thing I can do is actually give our experiment a meaningful name, not just a new experiment anymore. So I'm going to click on that and we'll call it cat's faces study. A couple of other things I can also change. I could change the back end if I wanted to. Now the back ends are basically the way that the stimuli are actually presented on the screen. Essentially, Opossesme takes your ideas about what the experiment should be doing and tells another package exactly what to put on the screen. It's that other package that actually displays it on the screen itself. By default, on this particular version of Opossesme for OS 10, it's defaulting to the experiment back end. I'm just going to leave it on that particular back end. However, it's worthwhile checking the coccy.nl website and read the section on the different properties of the different back ends. There's some advantages to some and some disadvantages to some. So it's worth double checking that before you actually run in your experiment. The other thing I'll also do is I'm going to change the resolution that we're going to display in here. By default, it's set to 1024 by 768. I'm going to actually set it to the screen resolution that I'm running which is 1280 by 720. Like so. And the other thing I also want to change are the colors. The default is to have a white foreground and a black background. So basically you can say white text on a black background. I'm actually going to swap those over. So I'm going to have a black text appearing on a white background and that's all I'm going to change in this particular particular panel. I'm also going to save the experiment now just so I've got everything nicely set up and in case anything happens, I'm easy to go back to the clean layout we've set up. There we go. I'm just going to dump it on the desktop for the time being. I get this message about do I want to use the correct extension so I say that I will do. Okay, so if we look over at the overview area, you can see we've got this thing called cap faces study and then a single sequence called experiment. What we want to do is place our experiment onto that experiment sequence. Now if I think back to the diagram we drew earlier on where we had three objects in a list, there was the instructions at the ray-ray top followed by the experiment object followed by the thank you message. What we basically want to do is recreate that global structure initially in this overview window. To do that I'm going to display some text on the screen somehow. I then need to have a list of trials that contain my actual main experiment and then I need to have some other text on the screen so I need something else also that's going to display some text at the very end of the experiment for the thank you message. There's multiple ways we can actually display text on the screen. The most obvious one is to use the text display object which is this A over here. Now this particular plugin is no longer actively developed so it's actually we get an advice to use the the form object instead so I'll actually just add it in for the sake of it. I'm not going to name it because I'm not actually going to use it. We get this deprecation warning that forms are faster and more flexible than the text display plugin. For that reason I'm actually going to use a form instead to display our text upon our screen so I'll just get rid of that and the form item we'll actually be using is this particular form text render object over here. Now as you saw just a moment ago I can just pick up the object and drag it into the overview window but the second way that I can add objects to the experiment and that's by clicking on the sequence and then selecting from either existing items here or we can append a brand new item here. I'm going to use append new item and select the form text render and then click on the plus. I'm asked to name it immediately because we asked opossess me to offer us to rename the objects as soon as we create them. So I'm just going to call this one instructions if I can spell that properly. There we go. Now what the form text render object will do is just display some text upon the screen but it won't actually take any input from the keyboard or anything. What we really want to happen is the text should be displayed on the screen and then for opossess me to sit there and wait until the participant does something to indicate that they're ready to start the study. What we can do here to achieve this is add a new item and we can add a keyboard response in and basically what's going to happen here with this keyboard response is that opossess me will hit this particular object and then just wait until we get a key press that's going to tell the experiment to actually get going. So I'm going to select that and click on the plus. I'm going to give it a name again. I'm going to call this one space response and the reason I'm calling it space response is we're going to set it up so the only response to the space bar therefore in the instructions we'll say to the participant to press the space bar to begin the study. By calling this space response it reminds me that this particular object is going to be set up to use the space bar. So I'll click on okay. So that first little box is now completed from our diagram of the experiment. This is going to display some instructions and it's going to have something there to wait for the participant's response. Next thing we need to do is add in something that's going to contain all our trials and we add trials in using the loop sequence or loop object I should say. I'll click on the plus to add that in and we get another dialog box come up that asks us that well a loop needs another item to run and it's usually a sequence so I can actually create a new item here or I can select an existing item to add to the loop. I'm actually going to create a new item which is going to be a new sequence. This is actually going to be our experimental sequence based on that second level containing the fixation point the blank screen and then the picture of the cap face. So I'll click on the plus and master a new name for the loop I'll just call it experiment loop and new name for the sequence we'll call this trial sequence. There we are those have been created. I'm going to hide the trial sequence for the moment. So that will run through our main experiment then we need to display the thank you message at the end of the experiment and I'm going to do that exactly the same sort of way that we did for the instructions so I'm going to append a new item again which will be a text render I'll click on plus and this is going to be goodbye for the goodbye message and then I want to add in another one of these space responses because we want to happen is that the goodbye message will be on the screen until the experimenter comes along and presses a key to get rid of the experiment and I'm actually going to use the space bar again so what instead of creating a new object I can actually append an existing item that we've used already this one here called space response and just click on the tick and that adds in a second copy here of space response. It's good time to point out here actually that when you reuse objects in this particular way if you change one instance of those objects you'll actually change both of them so keep that in mind if you change one of a reused object it's going to change all other occurrences of that object as well I'll demonstrate that one in a moment so we've got the general structure of our experiment here so we've got the instructions and it's going to wait for a key press we run our main experiment and then we get the goodbye message and it's going to wait for a key press so let's just set some basic information inside of these particular objects so I'll click on the instructions text render and I've got some messages ask me for my message this is basically where I'm going to put my message for the instructions of the experiment so let's put those in now so that's our instruction setup so I'll do exactly the same thing now for the goodbye message and there's our goodbye message next thing to do is set up this space response just to make sure the open sesame sits there and waits for a key to be pressed if we look inside the space response object you see the timeout is set to infinite so it's going to sit there for an infinite period we want the participant to press the space bar in order to move on from the instructions or if we want to get rid of the goodbye message so what we can do is in the allow responses type in the special word space we can use individual keys or we can use particularly keywords like space you can find out what all of these keys are by clicking on the list available keys which is where you get key names that are valid obviously we're just collecting just a key press here to start the experiment so there's no such thing as a correct response for this particular item here so I'll leave that one blank now the one I edited was this one just underneath the instructions it's a good time to point out if I click on the one underneath the goodbye you see it's also got space in there I'll flip between the two you'll see they say the same thing if I change this one down here just for example to the a key if I go back up to the one underneath the instructions you see it's changed that one as well so that's what I was pointing out earlier that it's very important to know that if you've reused objects in this particular way that if you change one you're going to change the other one that's actually quite an powerful feature so use carefully it can actually really help you designing your studies we actually get this experiment a quick run now actually so I'm going to say just run full screen we get asked for a subject number when we try and run the experiment so I'm just going to click on okay and there we go there's our instructions presented press a space bar I'll press a few other keys and nothing happens if I press the space bar there we go it's jumped straight through now to the goodbye message at the end of the study and press space bar and that's it we're out so that was the basic structure to the experiment but I'm just going to run it again quickly just to point out something if we look at the instructions here they're all located in the top left hand corner we might want to have a title in there like welcome to the cat face experiment we might want to be in slightly larger text we actually might want the whole thing centered on the screen not just bunged up in one corner that's actually pretty easy to do inside of that form text render object so I'm going to get out of the experiment now by pressing the escape key there we go get the message saying the escape key was pressed I'll go into the instructions object and what I can do in here is actually use some basic html formatting in order to set some properties about this particular text so let's say I want to make this text slightly larger I can type in and I'm also going to put the text in bold the html tags that you can use are actually specified on the cogsai.nl website the second thing I want to do is actually make my text centered and the way we're actually going to do this is actually a little bit more hidden what we actually have to do is go over to this button over here that allows us to edit the script directly so if I click on that this is basically the code that's being run to display this particular text on the screen and right down at the very bottom here we have this thing says widget 0031 label center equals no if I change that no to a yes that will now center the text on the screen so I'll say apply and close and if I run the study again now don't want to say anything there we go we've now got the welcome to the cat faces experiment is now in bold text and it's slightly larger than the rest of the text and it's also now neatly centered press the space bar we get the thank you message which is uncentered because I haven't changed that one yet which I'll do that quickly now so it's a goodbye change that center to yes apply and close run full screen and there we go that's uh all our instructions and goodbye message neatly set up now so that's our global structure of our experiment defined what we need to do now is actually define the trials themselves and also define the trial procedure basically presenting the fixation dot the blank screen and the picture of the cat face I'm going to do the latter first because it's basically replicating what we've been doing up to this point already so I'm going to click on the trial sequence sequence object and basically just add in that particular sequence of events that we need to take place for each trial the first thing I want to add in is a fixation dot so you'll find it in the list here fixation dot and I'll add that in we get asked to rename it I'm just going to leave it actually as the default because it pretty much sums up perfectly clearly what this particular object is and we're also going to use one of them anyway so we don't have to worry about multiple fixation dots after we've presented the fixation dot the next thing we need to do is present a blank screen somehow there's multiple ways you can actually go about doing this but I'm actually going to use an object we've already been using up till now which is the text render object instead of having any text in it though we'll just have no text and that's going to basically present a blank screen to the participant so I'll go down to the text render object and I'll add that in I'm just going to call this blank because that's actually going to be a blank screen presented to the participant now of course in the instructions and in the goodbye message we have to use that keyboard response to make open sesame wait until the key was pressed similarly we have to make sure open sesame waits here as well otherwise it will just blank the screen and jump straight into the cat face picture to do that I'm going to use a advanced delay object and add that into the experiment and I'm just going to call this delay 500 that gives a meaningful name to say we can have a delay for 500 milliseconds I'll say okay so that's added that into the timeline the next thing we want to do is actually display the picture of the cat face to the participant to display pictures we use the sketch pad object so let's let a sketch pad and add that in and I'm going to call it cat face because that's actually what I'm going to be presenting on that particular object just like the instructions and the goodbye message we need to basically get a response now from the participant so the cat face cat face sketch pad item will display the picture of the cat face but it won't actually collect anything from the keyboard so what we need to do is add in another keyboard response to collect some response from the participant I'll add that in and separate this one from the other one I'm going to call this cat response and the final thing we need to do is after the participant's made a response we need to add an item that indicates to open sesame that we want it to write the data to the disk and to do that we use something called the logger object and I'll add that into the sequence ask leave it as the default name because it's the only one we're going to have in there and the name sums up what the object is it's worthwhile pointing out at this point actually that whilst reusing objects is pretty useful for many parts of experiments reusing the logger object is pretty much vital if you create a new different logger item each time you have a different sequence your data file become quite a bit of a mess so it's a good idea to always just append the same existing logger item throughout your entire experiment so that's our sequence basic setup now what we need to do is set some properties for each of these objects so let's start with the fixation dot click on that we want this to be on the screen for 500 milliseconds so I'm going to change the duration to 500 the foreground color is inheriting it from the main experiment setting where we had the foreground color being black and the background color being white so we don't need to change those and that's any change we want to make on the fixation dot that will just display a fixation point for 500 milliseconds and then move on to the next object which is our blank form text render by default you get your message in here so I need to delete that out so this is basically now going to render no text to the screen all right it's going to be a blank screen basically presented then the delay we want opossess me to sit there and wait for 500 milliseconds so I need to change the duration from a thousand down to 500 milliseconds and then we get actually presenting the picture of the cat face itself by default sketch pads have a duration of key press now the problem with this is that if we just leave it with key press we're not actually going to get any keyboard response from the participant instead instead of the sketch pad waiting for the key press we actually want the keyboard response object to wait for the key press so the way we do that is we specify the duration as being nought milliseconds essentially this basically means to open sesame run this object display whatever you need to display on for this particular item and then move straight on which in this case will be moving straight on to the keyboard response so that's the duration setup to actually put the picture of the cat face on to the screen let's rearrange the window a bit we need to click on the image tool and find the center of the screen got a nice grid layout here so if we just click here this will be in the center of the screen and it brings up the file pool window as mentioned earlier on we can actually add pictures sounds and so forth to our experiments and place them into the file pool and it is quite a useful system because it does mean that all our pictures go hand in hand with the experiment script and we don't have to worry about losing any pictures and stimuli when we move from one computer to another what I'm going to do here now is add in all the cat face pictures that we're going to use in this particular study by clicking on the plus button in my documents folder I have all the cat face pictures here they all are they're named f01 to f20.bmp for the female cats and m01 up to m20 for the male cats it's going to select all those pictures and click on open and here they all are all our cat face pictures now in the file pool what we need to do here is just select any of these pictures it doesn't matter which one because we're actually going to come back to this slide in a moment and actually modify the code for this slide to make sure that we're changing the picture of the cat face on every single trial so I'm going to select f01 for the time being and click on select and there we go the next thing is to click on the keyboard response object for the keyboard response correct response is something that we need to define on every single trial so that's something we're going to come back to in a moment after we've defined our trials but I can set up at the moment the allowed responses we're allowing the participant to press either z or m to make their responses and the way we specify those two keys that can be pressed are by literally entering them in separated by a semicolon so z and m that'll mean that if the participant presses any other key apart from z or m the uh the keyboard response object here this cat response is actually going to ignore it finally in the sequence we had the logger item by default the take is for automatically detect and log all variables personally I tend to leave it on that one it does mean that your data file is going to be quite extensive containing a lot of information you don't actually need but it does also mean that you don't lose anything either so I'm just going to leave it set to the default for that purpose next thing we need to do is actually set up our trials and we do that inside of the loop object the loop object has four main items that we need to set up we have to say what item we want to run well we want to run the trial sequence because that's what we just defined there for our trial procedure so I'm going to leave it on that setting the next option is for cycles it's set to one at the moment this basically refers to how many trials that we're going to have or how many unique trials I should say that we're actually going to have in our experiment we've got 40 cat face pictures so we're going to have 40 trials in here and there we go we can now see that this window down here is now going all the way up from one up to 40 at the very very bottom the order is going to be random which is a good idea to have random selection and repeat is set to each cycle one times we can actually change this for example to two times and basically what let's do is trial sequence will be called 40 times two or 80 times in a random order of course we didn't want to split cat picture once so each cycle only once trial sequence will be called 40 times one times basically 40 trials in a random order we now need to specify our variables on each trial there's going to be a certain number of items that are going to be different for every single trial the most obvious one is going to be that each trial is going to have a different cat face picture that we want to display to the participant also going to have a different response each time you know something if it's a female cat we're going to have one keyboard response which is the M if there's a male cat they should be pressing Z to get the trial correct so I'm going to add those variables in by clicking on add variable I'll get asked to add a variable name optionally followed by the default value I was going to call this one f name which is going to respond to the correspond to the file name that's going to be used for that particular trial I'll click on okay we see f name now appears and I'm going to add another variable in called cr which is going to stand for correct response this is going to hold the value that or the key that the participant should press in order to get that particular trial right the next thing to do is actually populate this mini spreadsheet now with all of the trials in our study which I'll do now so there are all our trials defined as well as entry in the file name I've also entered in what the correct response should be so for all the male cats the cr column has now been filled in with zeds and for the female cats they've been filled in with m's what we can now do is actually go back to our trial procedure and actually insert some of this information now into our main trials so I'll go over to the cat face object now this at the moment is just displaying this one particular cat face and basically if we run this experiment what will happen is we will always get this one particular cat face showing up what we actually want is for open sesame to change this picture of the cat face depending upon which trial we're on essentially what we want it to do is on each trial go back to this particular list here pull out whatever's in the f name column for that particular trial so let's say for example on trial number six we want it to pull out mo six dot bmp and insert that into the sketchpad object rather than this particular cat face picture here the way we do that is by right clicking on the cat face picture here and select edit and it brings up here the script that's actually being run actually makes quite a bit of sense what it's actually doing it's drawing an image at zero zero which is the center of the screen and with the file name there with the scale that's centered and we always show this one what we can do here is edit the file name from f o one dot bmp which is a literal file name that's the one that's always going to load up f o one dot bmp and we can actually tell open sesame to go back to that column called f name and find out whatever the file name should be to insert into this particular part of the script and the way we do that is we put the variable name f name and we enclose it in square brackets this basically as I say is telling open sesame go back to that loop item look for the variable called f name and pull out whatever's in that particular column for this particular trial and insert it in here it will basically mean that the picture of the cat face will change on every single trial because the value of f name is changing on every single trial when I click on okay you notice that the cat face has now disappeared and I get this notification one object is not shown because it is defined using variables the next I need to change is going to be in the cat response we can now specify what the correct response should be just like defining what the cat face picture should be we want open sesame to go back to the list and pull out whatever's in the cr column so we specify exactly the same way it's cr and we indicate it's a variable by putting it in the square brackets and I'll save the script at this point and there we go we should now have a working experiment that's going to present 40 pictures of cat faces to participants in a random order they're asked to press z or m where they think they're a male or female cat and all finish off with a goodbye message let's give it a go see what we get so I say run full screen I'm asked to enter a subject number so when actually running the experiment for real you can actually enter what the subject number is in here and here we go welcome to cat faces experiment blah blah blah blah blah all the details about how to run the study uh so I'll press the space bar to get started there's our picture of a cat I'll press key there we go fixation dot picture of the cat and so on and that would keep going for all of the 40 trials within the study I won't I won't bore you with all of those so I'll escape out and there we go that is a simple experiment in open sesame this final section of this tutorial is going to have a look at something slightly a little bit more advanced and that is how we can actually use some conditions to specify whether certain objects can be run or not in particular the reason for adding this one into this tutorial is that you might often want to give feedback to participants on each trial to say whether they've got the trial right or whether they've got the trial wrong in this particular example if I go back to the trial sequence uh order events here uh after we display the cat face and the participants made a response I'd like to indicate to the participant whether they got the trial right or wrong now if we always say something to the participants or make some kind of sound or something on every single trial they'll get annoyed quite quickly but quite often experiments will have a tone or a message to indicate that they got the trial wrong uh useful particularly in learning studies so in this particular example what I'm going to do is I'm going to add a sound that I'm going to play to the participant if they get the trial wrong so the way we do this is we need to uh add some more objects into the timeline actually I only need to add one object in and that's a pendant new item we need to add a sampler object in and then I will click on the plus and I'm going to call it uh for a reason it'll become obvious later meow and add that in there now at the moment it's sitting right at the very very end of the procedure um it can actually sit there doesn't really make any difference but I'm going to actually make it go straight after the cat response object in there and just demonstrates how you move objects about you literally just pick them up from these handles and just drag them around so I'm just going to have it straight after the cat response and then click on the object here to specify what we want uh the sound file to actually be so I only specify what the sound file is uh so I'm going to browse for it you'll bring up the file pool as per usual and I've got no sounds in here yet so I need to add one and in documents I have a cat sound for us there we go so I will add that in and I'll select it and say select now because we're going to play the same uh cat meow whenever the participant gets the trial wrong uh I don't need to specify any variables in there I can just leave it at uh sound file uh volume will be at 100% I will have it out left and right at the standard pitch uh we can also specify whether we want it to stop the sound file after a certain period whether we want to fade in the sound and also how long it should be the default is sound which is basically just to wait until that sound file has finished playing and uh that's the options I'm just going to leave this uh this option at then go back to the trial sequence what will happen now if I run the study is that if we look over on the right hand side it says run if always that basically means I'm going to get a cat meow no matter what the participant does it's always going to give me this meow um regardless of whether the trial was right or whether it was wrong what I want to do is find out some way of saying to open sesame run if they got the trial wrong and the way we do that is we have to look at the uh cat response and see whether they actually got the trial right or not now we can use the variable inspector uh to help us with this we'll open up the variable inspector and open there was a little bit further and it's a bit difficult to fit this all on the screen over here but if we look at here it says uh correct cat response and its value will depend upon the response of course you can only be right or wrong depending upon what you've actually uh key you've actually pressed and it exists in the item cat response so it's referring to this particular object here this particular keyboard response the thing that I need to note is this correct cat response basically was this object here correct uh cat response was it correct or was it not if I go back here I can then basically say run if and remember that these are variables so they must go in the square brackets run if correct cat response the variable equals zero i.e that they got that trial wrong if we wanted to play this cat sound when they got the trial right we'd have it as a one but I was wondering when they get it wrong so I'll select that to uh zero and now we'll try running this experiment again so we run full screen I've got to save the data uh it's a good point to point out here that when you start running the experiment you'll not be asked for where do you want to save the log file to I was going to dump this one on the desktop it was subject number zero so enter that in click on save so here we go these are the instructions again and I'll start running through the experiment now that one I do know is a male cat so I'm going to get this one right and when I press the z key no sound this one is also a male cat uh but I'm going to get the trial wrong and press M for a female I'm going to get the sound to tell us we're wrong this is also that she's a male cat so I'll get this trial wrong again there we go this is also a male cat so I'll press Z to indicate the trial was right and we don't get any cat sound so that's an easy way that we can give feedback to our participants using some uh conditions