I want to fix time-- SOA! It is between the two stimulus change according to the participant’s reaction

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): WIN 10
PsychoPy version (e.g. 1.84.x): v2021.2.3
Standard Standalone? (y/n) If not then what?: y
Hi, I meet a new problem and hope you can help me .I am designing an Audio Pronoun Task (HeorShe), which listen two Chinese sentences and choose he or she define one of two persons. One is for going to press the key (d or k), after that, the next trial. I want to the SOA between the two stimulus change according to the participant’s reaction .The original soa = 3.2s, if the participant response time is 1s, then wait 2.2s in next trail. If the participant response time is 3s, then wait 0.2s in next trail. In builder, I write codes at the beginning of the routine (response) and the end of the routine respectly.
The paradigm:


(at the begining of the routine)
soa=3.2
(at the end of routine)
WT=0
#WT is wait time
if pract_response.rt<3.2:
WT=soa-pract_response.rt
#if the participant response time is 1s, then wait 2.2s in next trail
continueRoutine = True
if pract_response.keys!=None:
continueRoutine = True
the whole program can run, but when I examine the result in excel find it may not be exacty what I want. Am I wrong ,if so ,how to revise?

Hello

does this PsychoPy-experiment do what you want?
WaitingTime.psyexp (14.6 KB)

Best wishes Jens

Hi Jens

Thank you for your helping!

I try to run the task, and I miss an important information: My response duration is 3.2s! if I don’t press any response, I need to wait long time in next trail.

So, I modified your paradigm to test the total time for finishing task.

If I don’t press the space, total time about 1 min 18s.

If I press the space as soon as possible, total time about 49s.

I modified your paradigm:

WaitingTime333.psyexp (14.6 KB)

textReact:duration(s): 3.2 and [set every repeat]

key_resp:duration(s): 3.2 and [set every repeat]

Hello df467

ok, cool. I hope it is now running as expected. Notice that you only have to use set every repeat when things change from trial to trial (repeat to repeat). Space as key_resp does not change from trial to trial, at least not in the toy experiment. Also textReact:duration does not change. So, not need for set every repeat, but also no harm.

Best wishes Jens

Hello Jens
My paradigm is each stimulus pair with a response, so I need to set every repeat.
For example:
trial 1:
(audio stimulus 1)Bob was so miss his dad, (audio stimulus 2)because he was often on business trip.
response: who is “he”? Bob(press ‘Left’) Dad (press’Right’)
trial 2:
(audio stimulus 1)Linda doesn’t like Amy, (audio stimulus 2)because she often lie.
response: who is “she”? Linda(press ‘Left’) Amy (press’Right’)
I don’t kown how to do to run the task.
thank you for your helping.

Hello,

that is not the way you specified the response. The response is always “space” in your setup. If you want want the “left” and “right” cursor key as possible response, you need specify those and not space.

grafik

Best wishes Jens

Hello Jens
Thanks your recommendation.
The duration of the task isn’t the same everytimes.
If I didn’t press anything, its’ duration about 2min 20secs.
If I press the space, its’ duration about 1min 50secs.
Because each trial is different character(like $ press_space: ‘a’ or ‘b’), so I set every repeat.
Thank you for your helping.

Hello

I do not quite understand you. It the experiment now running as expected?

With regard to the response-button that is certainly one way to do it. The other option is to specify a corrButton. PsychoPy can compare the corButton and the button pressed and record it as correct (1) or incorrect (0).

Best wishes Jens