# Two parallel and independent streams of stimuli within the same loop

OS (e.g. macOS High Sierra):
PsychoPy version (e.g. 1.85.2):

What are you trying to achieve?:
Hello!
I have an experiment. It is RDK task where participants is looking at the circle within which dots are moving randomly. Then for 200 ms dots are moving coherently. Then dots are moving randomly again. participants are instructed to press one of two buttons when he/she sees that gray circle changes it’s color. This coherent motion is a sign that circle will change its color soon. So, it a cue.
roughly saying there are 2 conditions. First one is with fixed SOA (interval between cue and target) and here there is no any problem.
However there is a second condition with random SOA and it means that there are two independent sources of stimuli that are totally independent to each other. So, the timing of targets is determined by spacing consecutive targets by 1 s plus a random exponential interval with a mean of 1.33125 s. Precisely the same formula is used to determine the spacing of consecutive signals. → here is illustration how it happens

So I do not understand how to do that within the same routine and loop. Let’s say I have 2 lists with 40 values in ms each - one for S, another one is for T. And I want that during 40 trials or loops (where my csv file is attached with correct answers), intervals between signals were determined by these values from the list. the same story for the targets. So, some how I need a variable that i will put into start window of the cue that will allow me to present it exactly the way I described. But again, I have no idea how to do that and how to define this variable. And the response is stored when participant gives an answer. So, this action leads no next trial
And I see a few problems.

1. there might be a few S, whereas only 1 T within trial or visa versa. How to make it possible within one trial also?
2. there is a short feedback after answer whether it was correct or not and this feedback should be included in that “1 s plus a random exponential interval with a mean of 1.33125 s.” time.

I am bad at programming, so I did not find out the way to do that with a code component.
Just in case I attache the exp file. I am stucked with NC_Cue and NC_noCue routines. There is everything the same as in C_Cue and C_noCue routines now, just because I totally do not know how to implement above described idea in code or in builder.

Thanx a lot in advance!
I realise that the task as well as the problem might no be so clear, so I will answer any questions!

Dot_G1.psyexp (116.7 KB)

target_color.xlsx (26.5 KB)