How can I present three emotion conditions in random order in an experiment

We have an expertiment preseting participants with angry, happy, sad and fearful expressions of three types (face, voice and combination of face voice/crossmodal) but we curently have the same emotion presented consequtively for each expression type (angry face, angry voice, angry combination/crossmodal)- how can we randomise the order of emotions across the three types (face, voice and combination). I would be extremely grateful for your help! Georgia crossmodal_part1.xlsx (10.1 KB)
crossmodal_task_part1.psyexp (35.4 KB)

Could you not just do the same as the stoop video tutorial and have a conditions file with something like:

Img  | Voice| Condition
Angry| Happy| Incongruent
Angry| Angry| Congruent

Then you could just set your trial handler to random in the loop.
That’s probably the easiest way.



Thank you Oli. I will try that!

This sort of question suggests you would benefit from the workshop!

Thanks Jon. I just see this. I am still stuck and would appreciate some help. Is this soemthing that can be solved online or do I need to attend the workshop? I invigilate exams on Wed but could travel Thus&Friday. I would also benefit from some help with adding EEG markers in Psychopy. Would I be able to find asnwers to these questions in the workshop. The workshop link does not seem to work… Thanks very much, Georgia

Oli, thank you for your suggestion. I tried what you suggested. Unfortunately, it doens’t work because all of my face and voice combinations are congruent. Let me explain this in a bit more detail.

I have two main variables. The first variable is modality. This variable has three levels: 1. Face 2. Voice and 3. Face plus Voice combination (that is both face and voice presented simultaneously). The second variable is Emotion. This has four levels 1. Angry, 2. Happy, 3. Sad and 4. Fear. I ask child participants to see the stimulus (face, voice or both) and press a key to indicate how the person feels. The only option which I currently see Psychopy to give me is to create three routines in a row: one which I named image (where I inserted the ‘image/face’ as the stimulus), the second which I named Sound (where I inserted the ‘sound/voice’ as the stimulus) and the third named ‘ImageAndSound’ (where I inserted both ‘image/face’ and ‘sound/voice’ occurring simultaneously). ALL stimuli are congruent in my experiment so that the same emotion is expressed in face and voice combinations (happy voice always goes with happy face).

When I create the excel file for the above conditions I have the following columns:

image sound Emotion CorrAns
name.JPG name. wav angry 2

I loaded this excel file with these conditions and clicked ‘random’ loopType. However, this leads to Psychopy presenting the same emotions in a row for all modalities in a row. For example, Angry Face, Angry Voice and the Angry Face plus Voice combination (and the same for happy and so on). I am so sad :disappointed: … not sure what I need to do to make this work. What I want Psychopy to do is to randomise both modalities and the emotions at the same time. In other words, I want Psychopy to present a Happy Face, then an Angry Voice then a Sad Face plus Voice Combination and so on until all the possible emotion x modality combinations are covered in random order. Is this clearer now?

I would greatly appreciate some help if this is possible in Psychopy. I might also copy-paste this clearer description as a new topic so that hopefully other users can see it and benefit from a response.

Thanks very much for your time. Please let me know if there is anything I can do to help you :slight_smile:


Hi Georgia,

I think what you are describing is a pseudorandom order, in that the different trials are not free to vary in all dimensions…

By that I mean you could easily shuffle trials by just having a spreadsheet such as:

Image    | Sound       | Condition| CorAns
angry.jpg| angry.wav   |     Multi| 2
None     | angry.wav   |     Sound| 2
angry.jpg| None        |     Image| 2

For each emotion - when this was randomised you would get true randomisation such that two emotions could occur next to each other and two modalities could occur too.

It sounds like you want no two consecutive trials to contain the same emotion or modality… is that right? Because the easiest way to do that would be to create a number of spreadsheets that meet this criteria present them sequentially. Doing this in code for each session on the fly would be quite involved. Have a think and see if the above works for you. if the None entries don’t work (I’ve not tested this) you could replace them with blank jpg and wav files.

Best wishes,


1 Like

Thank you so much Oli for your time to respond to this: ) Yes this is exactly what I mean, no two consecutive trials to contain the same emotion or modality. I have not tried that one before so let me test it and tell you if it works (so basically in the routine choosing both stimuli ‘sound’ and ‘image’ and then in the excel file putting ‘none’ or blank in the excel row), best for now, Georgia

Thanks for your help, this is now resolved!

hi, we are doing similar experiment. Do you mind sharing your Psychopy experiment and excel sheet pattern. It will help me immensely. Thank you

hi, we are doing similar experiment. Do you mind sharing your Psychopy experiment and excel sheet pattern. It will help me immensely. Thank you