Response question


Author
Message
nashby
nashby
Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)
Group: Forum Members
Posts: 78, Visits: 159
I am designing a task where two streams of numbers will be shown (120 trials). I need participants to be able to press and hold a mouse button or key down while these trials go while recording these responses (i.e., if they hold the left mouse button down every trial should record that the left mouse button is down). When I try to do this I get 1) the first response ends the trial even though the trial has a set duration and 2) only the first response is saved (i.e., holding the button down is not recorded on subsequent trials). Any ideas?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Example code, please. For what it's worth,

> if they hold the left mouse button down every trial should record that the left mouse button is down

won't work. The approach would have to be

- register / detect a left button *press* (lbuttondown) in the 1st trial, and
- register / detect the button *release* (lbuttonup) in all subsequent trials
If no response / no release is registered, the button can be assumed to still be down / pressed.

nashby
nashby
Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)Guru (8.8K reputation)
Group: Forum Members
Posts: 78, Visits: 159
I thought of that, and tried it, but even if I set the duration of the trial to 500ms if a response is registered the screen flashes and moves to the next trial. Is there a way for there to be responses where they are recorded but dont terminate/interfere with the time course of the trial?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
There are several ways.

- You could work with /isvalidresponse. The trick is to consider the response *invalid* (false), yet store it in a variable (a <values> entry logged to the data file). See e.g. https://www.millisecond.com/forums/FindPost15812.aspx and https://www.millisecond.com/forums/FindPost16752.aspx for examples of that.
- If you simply want the stimulus to remain on-screen once a response has occurred, set the stimulus's /erase attribute to false
- If the trial presents multiple stimuli over time and you don't want to interrupt its stimulus presentation sequence upon response, set the trial's /responseinterrupt to frames (the default is immediate).

Hope this helps.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search