Millisecond Forums

Pause between stimulus and feedback presentation

https://forums.millisecond.com/Topic11141.aspx

By kosbornecrowley - 9/3/2013

I am wondering how to insert a pause of a given number of milliseconds in between stimulus presentation and feedback presentation. Example trial code below:



<trial setAtarget1corrleft> 


/ validresponse = (lbuttondown, rbuttondown)


/inputdevice = mousekey


/ correctresponse = (lbuttondown)


/validresponse = (lbuttondown, rbuttondown)


/ posttrialpause = 1000


/stimulustimes = [0=setAtarget1left; 0=setAtarget2right]


/errormessage = (errormessage, 0)


/correctmessage = (correctmessage, 0)


/responsemessage = (lbuttondown, corr, 0)


/responsemessage = (rbuttondown, incorr, 0)


</trial>

By Dave - 9/3/2013

You'll have to present your feedback via a dedicated <trial> to do this and use the respective <trial>'s /pretrialpause. Besides, "a pause of a given number of milliseconds in between stimulus presentation and feedback presentation" does not make too much sense in the context of the code you posted as feedback is dependent on when the subject responds, not on stimulus presentation.

By kosbornecrowley - 9/4/2013

Hi Dave,



Thanks so much for your quick response! Yes I did mean a pause between response and feedback (rather than stimulus presentation and feedback).


Could you please give me an example of how to use a new <trial> to present feedback? - I'm unsure of how to make this new trial contingent on the response in the actual trial. I need the error/correct message as well as the responsemessage (which are sound files) to occur 500 milliseconds after the response is given. To make things more complicated still, I need a TTL signal locked to this feedback.



Thanks so much for your help [:)] So much appreciated!



<trial setAtarget1corrleft> 


/ validresponse = (lbuttondown, rbuttondown)


/inputdevice = mousekey


/ correctresponse = (lbuttondown)


/validresponse = (lbuttondown, rbuttondown)


/ posttrialpause = 1000


/stimulustimes = [0=setAtarget1left; 0=setAtarget2right]


/errormessage = (errormessage, 0)


/correctmessage = (correctmessage, 0)


/responsemessage = (lbuttondown, corr, 0)


/responsemessage = (rbuttondown, incorr, 0)


</trial>



By Dave - 9/4/2013

#1: Eliminate the existing <trial>'s /posttrialpause, /errormessage and /correctmessage attributes. If you want TTL signals delayed by 500 ms, too, also eliminate any /responsemessage.


#2: Create two new <trial> elements, one for correct response feedback, another for error feedback. Have them display the respective <text> and <port> stimuli as usual. Set their /pretrialpause to 500 and chose an appropriate /timeout or /trialduration.


#3: In your main <trial>, use /branch or /responsetrial to run either the correct or error feedback <trial> based on the submitted response.


Details for all of the attributes mentioned above can be found in the documentation.