If this template helps then use it. If not then just delete and start from scratch.
OS (Win10):
PsychoPy version (v2021.2.3):
I am trying to do four different things, that would add themselves to my initial experiment, made of multiple loops.
1) I have sound stimuli that the participant need to repeat. Stimuli are displayed sequentialy.
If participant don’t hear the stimulus (because of an external reason for instance), I want them to be able to play them again (with no limited number of times).
I tried to add a loop with a code (shown below) with the conditions being “doNew” but this does not work because Psychopy does not recognize the condition and I don’t know how to fix the problem : do I have to create a xlsx file ? If so, what should I write in it ?
Code :
if(Bilo_reponses.keys==‘space’):
doNew=1
else:
doNew=0
2) I want to add stop criterion to my inside loops, that is to say that if the participant gets 4 consicutive zeros, the trial would end.
I tried to add this code to my components but this does not seem to be exact :
trials.finished=True
if key_resp_celf.keys is not None and len(key_resp_celf.keys)>4 :
trials.finished=1
3) I added a list of Groups as Experiment settings and more specificaly in Experiment info. I want the trials to be different, depending on the group the participant is in and if possible, I’d like to randomize the order of the selected trials.
For example, if I choose the group “MS”, I want the participant to access trial 1;3; 5 and more specificaly only the items 1;5;6;7;8;9;…;end within the trial 3.
I tried to add a .xlsx file “chooseGroup” with $cond_file having the list of trials depending on the group and then added a general loop taking all my trials together, but that does not seem to be sufficient.
4) I want the participant to be able to lower the Psychopy window and do something else in between two trials. Do I have to add a specific code or should I just not selct “Full-scree window” in the Experiment settings ?
Thank you very much for your help. Tell me if I forgot to tell anything or if I am not clear within my explanations.
I can’t wait to read you.
Olivia