Press "Enter" to skip to content

Tutorial: Adjusting the timing of stimuli with barriers

This is the first in a series of three tutorials that will cover how to adjust timing of stimuli, responses, and trials in your FindingFive study. Many studies rely on components that must run for a certain amount of time before another study element occurs. For example, you might have a trial where an audio clip should play through completely before a participant is allowed to give feedback about the stimulus.

In this tutorial, we’ll go through the basics of using the barrier property of stimuli to achieve this result, and provide a few examples of ways that barrier can help you adjust the timing of stimuli and responses in your study. All of these examples are implemented in a tutorial demo study on FindingFive; we encourage you to try it out and see first-hand how the barrier property works!


Barrier basics

The barrier property can be set for audio, video, and tokenized text stimuli. A stimulus with its barrier property set to true must complete its own presentation before all subsequent stimuli and responses on the same trial can be displayed. By default, all audio, video, and tokenized text stimuli are assumed to act as barrier stimuli. In other words, FindingFive assumes you want stimuli to play through to completion before progressing on to other trial elements, so stimuli have barrier set to true by default. If you don’t want a particular stimulus to act as a barrier to the progression of other stimuli or responses in a trial, simply set the barrier property to false.

Example #1: Play an audio stimulus then collect participant ratings of that stimulus

Let’s consider a simple example where, on each trial, we want to collect participant ratings of an audio stimulus. But in order to make sure participants aren’t clicking-through each trial of our study without being exposed to the entire audio stimulus, we only want participants to be able to provide a rating after that stimulus has completely finished playing. The logical way to set this up is to create a trial template with the audio stimulus listed in the stimuli property of the trial, and the rating scale listed in the responses property of the trial:

"tt_rate_audiostims": {
	"type": "basic",
	"stimuli": ["sound_barrier_on"],
	"responses": ["sound_rating_scale"]
}

Since we want to force participants to be exposed to the entire audio stimulus before being allowed to rate it, the audio stimulus will serve as a barrier to the continuation of other elements of the trial. This means the barrier property of the audio stimulus should be set to true. Since this is the default behavior for audio stimuli in FindingFive, our stimulus definition doesn’t need to explicitly set the barrier property; we only need to define the stimulus as an audio stimulus and provide the stimulus filename as the content property:

This will only show our rating scale after the entire audio clip has played:

If, on the other hand, we want participants to be able to respond at any point during the audio stimulus and move onto the next trial even before the audio clip has finished playing, this means the audio stimulus shouldn’t act as a barrier. Thus, we would explicitly set the barrier property of the audio stimulus to false; this use case will be demonstrated in the next example.

Using barriers to implement a speed-accuracy trade-off paradigm

Example #2: Participants must respond as quickly as possible to an audio stimulus; the response ends the trial.

In an auditory speed-accuracy trade-off study (e.g., Green & Luce, 1973), participants are presented with background noise that either does or does not have a pure tone present. They are given a 2 alternative forced-choice response of either “Yes” or “No” to whether they detected the pure tone. On each trial, participants should respond as quickly as possible, then move onto the next trial. Thus, the auditory stimulus does not act as a barrier to the choice response, and we should set the barrier property to false.

"tt_sound_detection": {
	"type": "basic",
	"stimuli": ["sound_barrier_off"],
	"responses": ["sound_detection_choice"]
}

This will allow participants to make a choice response at any point during the entire audio clip; the participant response will stop the audio clip and move onto the next trial.

Using barriers to control the timing of side-by-side video stimuli

Before we look at controlling the timing of video stimuli, it may be helpful to check out how to customize how trial templates realize stimuli. The examples in this section will use trial templates where the stimuli are specified as a list of dictionaries, each of which represents one stimulus (or a set of stimuli) to be used on a single realized trial. This method allows us to specify the location of stimulus presentation on each trial, which conveniently corresponds to the relative priority of each stimulus on each trial.

The stimuli dictionaries must define two properties: which (containing the stimulus names to be used on a single trial realized from this template) and location (taking a list of location indices of the same length as which, specifying the locations where the stimuli should be displayed). The location indices should be between 1 and 9, referring to locations arranged from left to right and from top to bottom in a 3×3 grid:

In order to render two video stimuli on a single trial so that they are side-by-side and centered, we can specify "stimuli": [{"which": ["vid1", "vid2"], "location": [1, 3]}]. This also means that vid1 will be realized before vid2 since vid1’s location index is lower than vid2’s location index, which will come in handy when we want to play with each video’s barrier property.

Example #3: Two videos play sequentially, after which participants choose one of the two videos

For each trial in this example, a participant will see one video play to completion, then a second video play to completion right next to it. After both videos are done playing, the participant will be prompted to make a choice response. In this case, both videos will be barrier stimuli, just like the stimuli from Example #1: the first video will block the second video from starting, and the second video will block the choice response from appearing. After creating both video stimuli and setting both of their barriers to true, we can set up a trial template like this:

tt_sequential_vids":{
    "type": "basic",
    "stimuli": [{"which": ["vid1_barrier_on", "vid2_barrier_on"], "location": [1, 3]}],
    "responses": ["vid_choice"]
}

Example #4: Two videos play simultaneously side-by-side, after which participants will see some instruction text.

Since we want both videos to play simultaneously in this example, the first video will not act as a barrier to the second video. But since we want participants to see some text stimulus only after both videos have played through, the second video will act as a barrier to the text. So: video 1 will have barrier turned off, and video 2 will have barrier turned on, and our trial template will look basically the same as in Example #3 with the addition of the text stimulus:

tt_simultaneous_vids":{
    "type": "basic",
    "stimuli": [{"which": ["vid1_barrier_off", "vid2_barrier_on", "info_text], "location": [1, 3, 5]}]
}

NOTE: both videos must be the same length in order for this to work, or vid2 must be the longer of the two videos. The first video has barrier set to false, so it doesn’t block the second video or the instruction text from appearing. Even if vid2’s content is shorter than vid1, it is important to make it the same length as vid1, possibly by padding either end of the video so that it blocks the appearance of other stimuli or responses. Another option is to switch the location of the two videos, so that the shorter video is always the one with barrier set to false. A final option is to set the delay of the instruction text stimulus to be as long as the length of vid1.

Example #5: Two videos play simultaneously side-by-side, and the participant chooses between them by clicking on one of the two videos.

For this example, we’ll construct a classic comprehension task using videos. Participants will see two videos play side-by-side simultaneously. After both videos are done playing, participants will click on whichever video best matches the meaning of a sentence or word. Just like Example #4, we want the first video to have barrier set to false, and the second video will have barrier set to true. However, instead of listing the two videos as stimuli for our trial template, we’ll instead make them choices in a choice type response:

And create a trial template that only presents our vid_select response:

  "tt_simultaneous_vids_choice": {
    "type": "basic",
    "responses": ["vid_select"]
  },

Using barriers with tokenized text

A tokenized text stimulus is similar to the text stimulus, with additional options for manipulating the stimulus on a token-by-token basis (in most cases, a token is a word). A tokenized text stimulus can be particularly useful for creating a self-paced reading study. As with audio and video stimuli, the default barrier setting for tokenized text is true, and most uses of tokenized text will probably want to keep this default setting. The next example describes one type a trial where you might not want your tokenized text stimulus to act as a barrier.

Example #6: A sentence unfolds automatically on the screen, and participants must click on the picture that correctly corresponds to the meaning of the sentence as soon as they can

This is as simple as setting the barrier property of the tokenized text stimulus to false:

We then create a choice response with two pictures:

  "tts_sentence_comprehension": {
    "type": "basic",
    "stimuli": ["tts_circles"],
    "responses": ["tts_choice"]
  }

Because the tokenized text stimulus has barrier set to false, the two pictures will appear and are clickable as soon as the sentence starts playing out on the screen:

Early in the trial, as the tokenized text stimulus has started to play on the screen.

The participant can make a choice at any point during the trial, which will stop the tokenized text stimulus and move onto the next trial:

Later in the trial, after the participant has chosen the second image as their response.

Note that if there is no response collection for this trial, setting the barrier property to false won’t allow participants to skip ahead using the “continue” button. Instead, they’ll have to wait until the entire text stimulus plays out.


To see all of these examples in action, check out this Barrier Tutorial study on FindingFive.

If you have questions about FindingFive, or ideas for other topics that would make good tutorial posts, please don’t hesitate to contact us at researcher.help@findingfive.com!