Skip to content

Ambient audio across trials

Start a looping background track on one trial and cut it at a later trial, leaving the rest of the block silent.

You want a soundscape running underneath a stretch of visual trials, rain during the first half of a rating block, silence after, without the sound being a stimulus in its own right. Making the track an audio stimulus will not work: stimulus audio belongs to one trial and ends with it. The audio column plays alongside the visual stimuli and takes start and stop conditions, so one cell starts the track and a later cell silences it. If participants must respond to the sound itself, use an audio stimulus trial instead.

typecontentstimFormatstim1audiobutton1button2
instructionsRate how calm or tense each scene makes you feel.Start
test.jpgscene1rain.mp3, until: loopCalmTense
test.jpgscene2CalmTense
test.jpgscene3CalmTense
test.jpgscene4stopCalmTense
test.jpgscene5CalmTense

The audio cell on the first test row names the file with its extension included; unlike the stim columns, this column never has the stimFormat extension applied. until: loop is what lets the track outlive its trial: without an until: condition a background track’s lifetime is exactly one trial, stopping when the trial ends. With it, rain.mp3 loops on across scenes 2 and 3.

The bare keyword stop on scene 4’s row cuts whatever background audio is still playing at that trial, so scenes 4 and 5 run in silence. Placement matters: background audio only plays on image and word trials, and stop written on an instructions, survey or media-stimulus row does nothing. Both cells here sit on image trials. (The row-number and label forms of until: are the exception; those fire on any trial type.)

The visual side is an ordinary rating block: .jpg scenes that stay up until a button click, with the clicks recorded as button numbers and left unscored since there is no key.

Practicalities: stick to .mp3, the only format the media preloader supports for this column. Any filled audio cell counts as media, so the run opens with the automatic “enable media autoplay” screen. And test the conditions in a real run, because the editor preview plays the file but ignores until: and start: entirely.

  • Give the track a fixed lifespan instead of a stop row: until: 5t in audio stops it after 5 trials end (counting the trial that started it), and until: 1m30s after 90 seconds. Beware minutes-only values: until: 2m is read as spreadsheet row 2, so write 2m0s.
  • Stop at a labelled trial: until: quietBlock in audio stops the track when the trial whose label cell is quietBlock starts, which survives row insertions that would break a row-number target.
  • Fade the onset later into the trial with start: 500ms in audio; playback begins 500 ms after the inter-trial interval ends.
  • Play the track once, not looped, with until: end in audio; note a later stop cannot cut a track started this way, it runs until the file finishes or the experiment ends.