Count number of key presses during video presentation?


Author
Message
inq778
inq778
Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)
Group: Forum Members
Posts: 2, Visits: 7
I would like to play a video and count the number of times that a participant presses a key (e.g., spacebar) during the video presentation. During the video they will be searching for objects, and each time they see it they will press the key. I have loaded the video into the inquisit script, but I cannot figure out how to record the data such that I have this count. Any advice on code for this?
I've read through the tutorials, but this is my first time conducting a study with inquisit so there are many things I am still learning.
Thanks in advance for any help!
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: 12K, Visits: 98K
You have essentially two options to do that. See https://www.millisecond.com/forums/FindPost16437.aspx

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: 12K, Visits: 98K
Here's a simple, self-contained example for the 2nd (more complicated) option using /isvalidresponse:

<values>
/ spacebarpresscount = 0
/ latencies = ""
</values>

<block myblock>
/ trials = [1-2=mytrial]
</block>

<trial mytrial>
/ ontrialbegin = [values.spacebarpresscount=0; values.latencies=""; ]
/ stimulusframes = [1=mytext]
/ trialduration = 5000
/ validresponse = (57)
/ isvalidresponse = [if(trial.mytrial.response==57){values.spacebarpresscount += 1; values.latencies=concat(concat(values.latencies, trial.mytrial.latency),","); false}; ]
</trial>

<text mytext>
/ items = ("Imagine a video being played...", "Imagine another video being played")
/ select = sequence
</text>

<data>
/ columns = [date time subject group blocknum blockcode trialnum trialcode response latency values.spacebarpresscount values.latencies]
/ separatefiles = true
</data>


inq778
inq778
Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Great, thank you so much!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search