Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 3 of 3

Thread: Count button presses while watching video (case 3988)

  1. #1
    Join Date
    Dec 2012
    Posts
    1

    Count button presses while watching video (case 3988)

    I'm trying to add a feature to my experiment in which participants view a video and press a button on the keyboard every time they see something they deem 'important.' Does anyone know how I can record the frequency and timing of these button presses?
    Last edited by jason_reed; 08-07-2014 at 12:06 PM.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,093

    Use comination of DirectRT and MediaLab

    Hi admitchell!


    You should be able to accomplish this by using DirectRT in conjunction with Medialab. First, make sure that your video is compatible with Windows Media Player as an easy test to see if DirectRT will handle it. Save your video file; let's call it "video1.mpg"? for this example. (Side note: You can save it anywhere, but it's preferable to keep it in a folder named something like "stim"? in a folder for all of your DirectRT files for this experiment.)


    Next, create a very simple Direct RT input file to tell it to play your video; I've attached an example .csv file for your reference. The most important thing is to type _<name of movie file>( _video1.mpg for us), in the stim column of the file. Because you want to record multiple key presses, you will define what keys are acceptable in the time column. The current entry of "rt:any"? means that any key pressed on the keyboard will be recorded. If you want to define specific keys, you can find a list in the DirectRT manual here: http://www.empirisoft.com/directrt/h..._key_codes.htm


    You can then pass this file into a Medialab questionnaire by selecting DirectRT item type. When you run MediaLab, it will then pass control to DirectRT to run the video and record the keypresses. Importantly, you will find the data for all of the keypresses for a given video in the log folder in the Data folder for your DirectRT files.



    I hope that this helps!
    Attached Files Attached Files
    Last edited by jason_reed; 08-07-2014 at 12:08 PM.

  3. #3
    Join Date
    Aug 2012
    Posts
    75
    If you are also interested in capturing additional keypresses (beyind the first) with the same stimulus, you could add additional columns in the input file. If you repeatedly add the stim, loc, time sequence of "~", "0,0,0", "rt:57,28>-100" you will allow for multiple presses of the SPACEBAR without adding anything visual to the screen (just a blank text stimulus). The second code, "28" is the ENTER key and the negative value of -100 means the skip to trial 100 will be executed immediately--breaking out of the trial without requiring the subsequent keypresses.

    Hope that helps!

Similar Threads

  1. summary page after count down is up for experiment (case 1134)
    By jd62 in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 01-15-2015, 10:55 AM
  2. data file character/word count
    By beklab in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 02-19-2010, 10:01 AM
  3. Multiple key presses for only two words
    By freuenm in forum DirectRT Older Versions: General Questions
    Replies: 0
    Last Post: 11-02-2009, 10:33 PM
  4. Display Timer: count UP rather than countdown??
    By curlieq in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 10-28-2009, 07:58 AM
  5. monitoring button presses over a specified period of time
    By mixelflik in forum DirectRT Older Versions: How Do I...
    Replies: 1
    Last Post: 10-02-2006, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •