Stimulus Block
The stimulus
block provides the ability to present the participant with a certain type of stimulus. This can either be done via text or media (audio/image/video), encapsulated in a stimulus
block. The structure of this block is summarised below.
Parameters
- max_duration
-
Optional.
Integer that indicates the number of milliseconds after which the stimulus is hidden. Alternatively, if playable media (audio or video) is specified, this element may be defined as KeywordMEDIA
to hide the stimulus after the media finished playing.Example:
max_duration = 10000
ormax_duration = MEDIA
.If the
max_duration
of astimulus
is larger than themax_duration
of thetrial
it is part of, this parameter has no effect.
Members
Tip
Use the shorthands below instead of a block members, if you do not need the extra parameters of the block.
- text
- Optional.
text
block that presents a simple text stimulus to the participant. - media
- Optional.
media
block that presents a media stimulus to the participant (audio/image/video). - link
- Optional.
link
block that presents a link stimulus to the participant.
Shorthands
- text
- String that specifies a
text
stimulus with the text set to the provided String. - image
- String that specifies a
media
stimulus with an image stimulus set to the provided String. - audio
- String that specifies a
media
stimulus with an audio stimulus set to the provided String. - video
- String that specifies a
media
stimulus with a video stimulus set to the provided String.
Example usage
The code below illustrates how a stimulus
block might be used.
experiment {
trial {
stimulus {
text = "In the next trials, a word will briefly appear.\n\
Press the left arrowkey if the word contains at most one vowel\n\
and the right arrowkey if the word contains more than one vowel.\n\n\
For each trial, answer within 3 seconds." //(1)
}
response {
button
}
}
trial {
max_duration = 3000 //(2)
stimulus {
max_duration = 500
image = "sample_image.png"
}
response {
keyboard = [ARROW_LEFT, ARROW_RIGHT]
}
}
}
- Confused? See Preliminaries for a refresher on how linebreaks work.
- Take care! Both
trial
andstimulus
have amax_duration
parameter with a different effect.