Hi Dave,
Thank you for your thorough responses here!
Sorry for the confusion about the correct response input - I have included the two lists here that I didn’t include last time. There are two lists as there are always two possible correct responses on each trial. I attempted to implement your suggestions below, however I discovered that the time input to errormessage and correctmessage seem to require that you specify the
duration, rather than the
onset time which is what I am looking for. I assume this because I tried to use the function you suggested - insertstimulustime() - and while the script still ran, no feedback of any kind was presented. This version runs but it presents the fixation cross at the end of the trial for the duration specified rather than
within the trial once the subject makes a response.
Below that I attempted to use the - insertstimulustime() - within branch and this did display the fixation cross within a trial (i.e. on top of the stimulus) at the onset equivalent to the latency. However, the remaining problem is that the fixation cross appears on the subsequent trial after the response has been made, rather that during the
current trial when the response was made. I tried adding this same if statement sequence into the ontrialbegin field however this did not seem to work - as I am guessing that the input needs to exist before the trial begins, before that response has been made.
From this I surmise that trial information that is logged within a given trial is usually stored and therefore accessible on the next trial? Is there a way to index and pull information from the current trial to use as input to specify the stimulus onset of the fixation cross within the same trial?
Many thanks,
Thomas
************************** approach based on your feedback***************************
<trial enc1>
/ validresponse = ("a","s","d","j","k","l")
/ trialduration = 5000
/ iscorrectresponse = [
if(trial.enc1.response > 0) {
computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue;
computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue;
};
]
/ errormessage = true(fixationGreen, 1000)
/ correctmessage = true(fixationRed, 1000)
/ stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc]
</trial>
************************** Alternate approach using branch ***************************
<trial enc1>
/ validresponse = ("a","s","d","j","k","l")
/ beginresponsetime = 0
/ trialduration = 5000
/ responseinterrupt = trial
/ branch = [
if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue)
trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency);
else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue)
trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency);
else
trial.enc1.insertstimulustime(text.fixationRed, trial.enc1.latency);
]
/ stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc]
</trial>
********************************** Other relevant code **********************************
list answersCorr1>
/ items = ("a", "s", "a", "s")
/ selectionmode = sequence
</list>
list answersCorrTS1>
/ items = ("l", "k", "l", "k")
/ selectionmode = sequence
</list>
<block enc1block>
/ trials = [1-4 = sequence(enc1)]
/ preinstructions = (encinstruc1)
/ errormessage = false
/ postinstructions = (encfeedbackpage1)
</block>
<text fixationRed>
/ items = ("+")
/ color = red
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>
<text fixationGreen>
/ items = ("+")
/ color = green
/ txbgcolor = (transparent)
/ fontstyle = ("Arial", 20pt)
</text>
<expt>
/ postinstructions = (end)
/ blocks = [1=enc1block]
</expt>
<shape blank>
/ color = (190, 190, 190)
/ shape = rectangle
/ size = (2000, 1000)
</shape>
** reminders for encoding
<text L1reminderenc>
/ items = ("Big~n 'a'")
/ vposition = (85%)
/ hposition = (15%)
/ txbgcolor = (transparent)
/ erase = false
</text>
<text L2reminderenc>
/ items = ("Light~n 's'")
/ vposition = (85%)
/ hposition = (25%)
/ txbgcolor = (transparent)
/ erase = false
</text>
<text L3reminderenc>
/ items = ("Man-made~n 'd'")
/ vposition = (85%)
/ hposition = (35%)
/ txbgcolor = (transparent)
/ erase = false
</text>
<text R1reminderenc>
/ items = ("Natural~n 'j'")
/ vposition = (85%)
/ hposition = (65%)
/ txbgcolor = (transparent)
/ erase = false
</text>
<text R2reminderenc>
/ items = ("Dark~n 'k'")
/ vposition = (85%)
/ hposition = (75%)
/ txbgcolor = (transparent)
/ erase = false
</text>
<text R3reminderenc>
/ items = ("Small~n 'l'")
/ vposition = (85%)
/ hposition = (85%)
/ txbgcolor = (transparent)
/ erase = false
</text>