Millisecond Forums

How to accept input during the stimulusframe?

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

By jzhuang8 - 9/20/2016

I am implementing a flashing "x" on the screen, and the user will need to tap on the "x" as soon as it shows up on the screen. However, in order for the "x" to flash, I defined as following:  
<trial target>
/ stimulusframes = [1 = crossRed,beepsound; 20 = crossGreen, beepsound;
                               40 = crossRed,beepsound; 60 = crossGreen, beepsound;
                               80 = crossRed,beepsound; 100 = crossGreen, beepsound;
                               120 = crossRed,beepsound; 140 = crossGreen, beepsound;]
/ validresponse = (crossRed,crossGreen)
/ correctresponse = (crossRed,crossGreen)
/ timeout = parameters.timeOut
</trial>
In this script, I have the cross to be flashing between red and green. But the inquisit does not accept the tap input until the 140 frames are completed. 
I am asking if there is any way to let the inquisit accept users' input during the defined stimulus frames? So the user can tap on the cross while the cross is flashing. If not, is there anyway to create a flashing object?

Thanks,

Jia




By Dave - 9/20/2016

> I am asking if there is any way to let the inquisit accept users' input during the defined stimulus frames? So the user can tap on the cross
> while the cross is flashing. If not, is there anyway to create a flashing object?

Yes. If you want the <trial> to accept responses prior to completion of its stimulus presentation sequence, you can do so by specifying the <trial>'s /beginresponsetime or /beginresponseframe attribute as in:

<trial target>
/ stimulusframes = [1 = crossRed,beepsound; 20 = crossGreen, beepsound;
                               40 = crossRed,beepsound; 60 = crossGreen, beepsound;
                               80 = crossRed,beepsound; 100 = crossGreen, beepsound;
                               120 = crossRed,beepsound; 140 = crossGreen, beepsound;]
/ validresponse = (crossRed,crossGreen)
/ correctresponse = (crossRed,crossGreen)
/ beginresponseframe = 1
/ timeout = parameters.timeOut
</trial>
By jzhuang8 - 9/27/2016

Thank you!!!