Problem with collecting voice response
gilis
giladsabo at gmail.com
Wed Jun 16 15:44:55 UTC 2010
In my experiment prticipants have to respond to stimuli both with
mouse click and voice response, there is no importance to what come
first (mouse click or voice response) but the program excpecting two
responses (manual and vocal) in each trial.
If on click the mouse more than once, then the program will collcet
only his or her first response and regardless if he/she continue
clicking the mouse, the next trial will start only after he/she will
also give vocal response. And vice versa, the same goes in case when
the vocal response came first.
To make this, I wrote these three inlines:
'This inline is the first and main inline, it checks what was the
first response in the trial, collect it and then go to the device yet
not was used (i.e., mouse or SRB).
Dim theResponseObject As RteRunnableInputObject
Set theResponseObject =
CRteRunnableInputObject(Rte.GetObject("Stimuli"))
'If the assert below fires, then the object named in the line above
does not exist
Debug.Assert Not theResponseObject Is Nothing
Dim nIndex AS Integer
For nIndex = 1 To theResponseObject.InputMasks.Responses.Count
'Access the response and check to see if it is a mouse response.
Dim theSRBoxData As SRboxResponseData
Set theSRBoxData = CSRBoxResponseData
(theResponseObject.InputMasks.Responses(1))
If Not theSRBoxData Is Nothing Then
c.SetAttrib "VocalResponse" & 1 & "RT", theSRBoxData.RT
c.SetAttrib "KeyPress" & 1 & "RESP", theSRBoxData.RESP
Goto MouseLabel
End If
'Access the response and check to see if it is a mouse response.
Dim theMouseResponseData As MouseResponseData
Set theMouseResponseData =
CMouseResponseData(theResponseObject.InputMasks.Responses(1))
If Not theMouseResponseData Is Nothing Then
c.SetAttrib "MouseClick" & 1 & "RT", theMouseResponseData.RT
c.SetAttrib "MouseClick" & 1 & "RESP", theMouseResponseData.RESP
Goto SRBoxLabel
End If
NEXT nIndex
'These are the second and the third inlines:
'If in the first inline, the SRBox Data was not nothing then collect
the mouse response now:
Dim theResponseObject As RteRunnableInputObject
Set theResponseObject =
CRteRunnableInputObject(Rte.GetObject("MouseStimuli"))
'If the assert below fires, then the object named in the line above
does not exist
Debug.Assert Not theResponseObject Is Nothing
Dim nIndex as Integer
Dim theMouseResponseData As MouseResponseData
Set theMouseResponseData =
CMouseResponseData(theResponseObject.InputMasks.Responses(1))
If Not theMouseResponseData Is Nothing Then
'Log reaction time and response for each mouse click.
c.SetAttrib "MouseClick" & 1 & "RT", theMouseResponseData.RT
c.SetAttrib "MouseClick" & 1 & "RESP", theMouseResponseData.RESP
End If
'The third inline do the same as the second inline, but for the SRBox:
Dim theResponseObject As RteRunnableInputObject
Set theResponseObject =
CRteRunnableInputObject(Rte.GetObject("SRBoxStimuli"))
'If the assert below fires, then the object named in the line above
does not exist
Debug.Assert Not theResponseObject Is Nothing
Dim theSRBoxData As SRboxResponseData
Set theSRBoxData =
CSRBoxResponseData(theResponseObject.InputMasks.Responses(1))
If Not theSRBoxData Is Nothing Then
c.SetAttrib "VocalResponse" & 1 & "RT", theSRBoxData.RT
c.SetAttrib "KeyPress" & 1 & "RESP", theSRBoxData.RESP
End if
Now, in when I used keyboard input instead of SRB, it worked fine. But
now I get strange bug: Everything works well aside for trials where
the participant first respond vocally-in this case the following
mouse click is considered as the first response and then the program
wait to another vocal response and the next trial start only after
it's given. I understand where the problem is, would appreciate your
help.
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
More information about the Eprime
mailing list