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.
When to use it
Section titled “When to use it”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.
Trial file
Section titled “Trial file”| type | content | stimFormat | stim1 | audio | button1 | button2 |
|---|---|---|---|---|---|---|
| instructions | Rate how calm or tense each scene makes you feel. | Start | ||||
| test | .jpg | scene1 | rain.mp3, until: loop | Calm | Tense | |
| test | .jpg | scene2 | Calm | Tense | ||
| test | .jpg | scene3 | Calm | Tense | ||
| test | .jpg | scene4 | stop | Calm | Tense | |
| test | .jpg | scene5 | Calm | Tense |
type,content,stimFormat,stim1,audio,button1,button2 instructions,Rate how calm or tense each scene makes you feel.,,,,Start, test,,.jpg,scene1,"rain.mp3, until: loop",Calm,Tense test,,.jpg,scene2,,Calm,Tense test,,.jpg,scene3,,Calm,Tense test,,.jpg,scene4,stop,Calm,Tense test,,.jpg,scene5,,Calm,Tense
How it works
Section titled “How it works”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.
Variations
Section titled “Variations”- Give the track a fixed lifespan instead of a stop row:
until: 5tinaudiostops it after 5 trials end (counting the trial that started it), anduntil: 1m30safter 90 seconds. Beware minutes-only values:until: 2mis read as spreadsheet row 2, so write2m0s. - Stop at a labelled trial:
until: quietBlockinaudiostops the track when the trial whoselabelcell isquietBlockstarts, which survives row insertions that would break a row-number target. - Fade the onset later into the trial with
start: 500msinaudio; playback begins 500 ms after the inter-trial interval ends. - Play the track once, not looped, with
until: endinaudio; note a laterstopcannot cut a track started this way, it runs until the file finishes or the experiment ends.