Reply To: timing accuracy

PennController for IBEX Forums Support timing accuracy Reply To: timing accuracy

#6479
Jeremy
Keymaster

Hi Kimi,

When you use the .log command on an Audio element, it will report a line in the results file for when the audio starts and stops playing. When you use the .log command on an Key element, it will report a line in the results file for when (one of) the key(s) was pressed. You can then compare the different timestamps to determine how fast your participants were to press a key after the audio started or stopped playing

Timing accuracy will vary depending on a range of factors for each of your participants, but it’s usually rather fine-grained, with margins of just tens of milliseconds (although accuracy will drop the more a participant’s browser lags)

I’m not sure what you have in mind in terms of synchronizing things, but if you need to invite your participant to press a key in the middle of the audio, you can do something like this:

newAudio("myAudio.mp3").log().play()
,
newTimer(1000).start().wait() // wait 1s
,
newText("Now press F or J").print()
,
newKey("FJ").log().wait()
,
getAudio("myAudio.mp3").wait("first")

If your wait time is not constant, and assuming you are generating your trials in a template from a CSV table, you can make it so each row has, in addition to a column containing an audio filename, another column indicating how many milliseconds to wait, and refer to that column in place of 1000 in the sample code above

Let me know if you have any questions

Jeremy