Trial Block
The trial
block provides a framework to set up a trial to present to a participant. It offers interaction between stimulus
blocks and response
blocks. The structure of this block is summarised below.
Parameters
- id
- Optional, defaults to increasing numbers.
String that determines thetrialId
column in the results. The default value is increasing numbers throughout the experiment, so e.g. '1' for your first trial and '2' for your second trial. These numbers are automatically prefixed with 'INC-' or 'SPR-' if the trial comes from an include file orselfpacedreading
block.Tip
We recommend you supply this parameter. This parameter can later, during your analysis of results, help identify which trial a result belongs to.
- description
- Optional.
String that determines thetrialDescription
column in the results. This can include useful information for later analysis of the results, such as which answer is correct for this trial. - max_duration
-
Optional.
Integer that indicates the maximum number of milliseconds the experiment waits for an answer before continuing.
The experiment will continue regardless of whether a (required) response has been given by the participant. If no response has been given yet, any response values in the results will also be empty, even if required.
Alternatively, if asound
orvideo
element is specified, this element may be defined as KeywordMEDIA
. In this case, the experiment will automatically continue to the next slide when the media finishes playing.If
max_duration
is not specified, an appropriateresponse
block, one that is able to continue the trial, needs to be specified in order to be able to continue with the experiment.Tip
If the trial continues because of its
max_duration
, this will be reflected in thetrigger
column in the experiment results. As such, you can distinguish between the participant not providing an optional response (in e.g. atextfield
) or running out of time. - pre_delay
- Optional.
Integer that indicates the number of milliseconds the trial waits before starting, hiding any display meanwhile. - post_delay
- Optional.
Integer that indicates the number of milliseconds the trial waits before ending, hiding any display meanwhile.
Members
- stimulus / s
- Optional.
stimulus
block that can present a stimulus to the participant. - response / r
- Optional.
response
block that can request a response from the participant. - font
- Optional.
font
block that specifies the font used for the current block.
Example usage
The code below illustrates how the trial
block might be used.
experiment {
trial {
id = "intro_exp"
description = "Introduction to experiment"
post_delay = 3000
stimulus {
text = "Welcome to this experiment"
}
response {
button = "Start"
}
}
}