PennController for IBEX › Forums › Support › About timeouts › Reply To: About timeouts
August 3, 2023 at 7:59 am
#10803
Larissa_Cury
Participant
@Jeremy, If I include an audio effect, will I bias the reaction time and the time out ? Like this:
does it influence the rt and the timeout?
...
newAudio('keyPressAudio', "keyPress1.mp3")
,
newKey("answerKey","SK")
.log("all")
.callback( getTimer("timeout").stop(), // the key stops the time
getAudio('keyPressAudio').play()) ////////////////// <--------------------- HERE
,
getTimer("timeout").wait() // wait for the timeout to finish (no keypress, the time isn't stoped) ???
,
getImage('stimuli').remove()
,
// Check for the correct key press or timeout
getKey("answerKey")
.test.pressed(row.correctKey) // check keys
.success(
// Display "Correct" message and wait for positive feedback timer
newText("Correct ✅").center().print(),
newTimer('wait-positive-feedback', 500).start().wait()
)
.failure(
// Check for timeout before displaying "Incorrect" message
getKey("answerKey").disable().test.pressed()
.failure(
// Display "Timeout" message and wait for feedback timer
getVar('errorCount').set(v=> v+1),
newText("Timeout ⏰").center().print(),
newTimer('wait-feedback', 500).start().wait()
)
.success(
// Display "Incorrect" message and wait for negative feedback timer
getVar('errorCount').set(v=> v+1),
newText("Incorrect ❌").center().print(),
newTimer('wait-neg-feedback', 500).start().wait()
)
)