waitStimEnd
Experiments
waitStimEnd makes the response window wait for the end of the stimulus. Its main use is audio/video trials: keep responses (and per-screen trial text) disabled until the media file finishes playing, regardless of what responseWindow says about the start position.
Syntax
Section titled “Syntax”Put 1 in the cell of every trial where responses should wait for the stimulus to finish. Any non-empty value switches the behavior on; there is no special value grammar. Leave the cell empty to keep it off.
Options
Section titled “Options”| Value | Behavior |
|---|---|
| empty cell | Off |
any other value (1, yes, true, even 0) | On. Even 0 ACTIVATES the feature (only an empty cell is treated as off) |
Defaults & missing values
Section titled “Defaults & missing values”When the column is absent or the cell is left empty, the feature is off: the response window opens wherever responseWindow says, and on audio/video trials any trial text appears at playback start.
Works with
Section titled “Works with”responseWindow: settingwaitStimEndforces the response window to open when the stimulus ends, discarding any start position fromresponseWindowbut keeping its timeout. SoresponseWindowof2000pluswaitStimEndof1means the window opens when the stimulus ends, then closes 2000 ms later with a recordedtimeoutresponse and auto-advance.- Audio/video trials: responses and per-screen trial text are held back until the last media file finishes playing. During playback, per-screen trial text stays hidden unless
trialTextOptionscontainsallStim,allTrialorwithStim. - Image/word trials: the override applies here too, so
waitStimEndon a non-media trial simply behaves like aresponseWindowofafterStim(the window opens after the last screen’spresTime). The media-specific trial-text deferral does not apply. typeoflearn: media learn trials auto-advance when playback ends and never open a response window.
Examples
Section titled “Examples”| type | stim1 | stimFormat | waitStimEnd | keyboard | key |
|---|---|---|---|---|---|
| test | story_clip | .mp3 | 1 | y,n | y |
type,stim1,stimFormat,waitStimEnd,keyboard,key test,story_clip,.mp3,1,"y,n",y
The y/n keys do nothing while the mp3 plays; the response window opens the moment playback ends and stays open until a response.
| type | stim1 | stimFormat | waitStimEnd | responseWindow | button1 | button2 |
|---|---|---|---|---|---|---|
| test | ad_video | .mp4 | 1 | 3000 | Like | Dislike |
type,stim1,stimFormat,waitStimEnd,responseWindow,button1,button2 test,ad_video,.mp4,1,3000,Like,Dislike
Buttons appear only when the video finishes; after 3000 more ms without a click the trial records timeout and advances (timeout preserved through the override).
Tips & gotchas
Section titled “Tips & gotchas”- With
waitStimEndset,responseWindowposition tokens (withStim,allTrial, numeric start times) are silently ignored; only a numeric timeout survives. - Combining
waitStimEndwith aresponseWindowthat already containsafterStimis harmless: the window still opens once, when the stimulus ends.