OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.1.4
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?:
I’m trying to implement a passive listening task in which participants will listen to 400 auditory stimuli in a randomized order. I want that every 50 trials a two-back test is presented to the participants with a text component displaying "Was this word presented two trials ago? Press “M” if yes or press “Z” if not. The stimulus presented in this case should be either the actual two-back trial stimulus or a stimulus presented way earlier (say 25 trials earlier). If this could be randomized, it would be great but it wouldn’t be a great issue if this was fixed (i.e., if at trial 50, there would be the correct two-back stimulus, at trial 100 it presents a 25-back stimulus, etc.).
I don’t need any feedback or any break in between, I just want that every 50 trials the two-back test occurs.
What did you try to make it work?:
Since I’m inexperienced with Psychopy, I looked for related threads in here but no one seemed to be looking for the same things as I am.
I created a loop called “pas_list” with three routines inside: one with a fixation cross (i.e., a polygon component), the next routine with the sound component and the last routine one with a code component with the following scripts:
(Begin experiment tab) # Set a junk value for the first trial, as by definition we can't have a one-back value there: two_back = 'Not applicable'
(Begin routine tab)# set whatever keypress values are appropriate for this trial: if stims_famaud == two_back: #stims_famaud is the name of the variable in the .csv sheet whcih reports all the relative directory to the folder with the audio stimuli correct_response = 'm' else: correct_response = 'z'
(End routine tab) # update the one-back value for the *next* trial: two_back = stims_famaud
in this last routine I put a text component with the question, a sound component with the $stims_famaud variable and a keyboard response component to which I linked the variable correctAns of the condition .csv sheet.
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.
The n-back test is presented at every trial with the stimulus that was presented right before (i.e., one-back instead of two-back). I reckon that I’m missing in the code component of the last routine something that counts the trials and specifies that every 50 trials the two-back test should occur but I don’t know how to program it
Thanks in advance!