Millisecond Forums

Ist it possible to play background music during the presentation of visual stimuli?

https://forums.millisecond.com/Topic16335.aspx

By july1810 - 5/18/2015

Hello this is my code, that just presents some statements. I'd like to play a piece of mood inducing music during the presentation of block A, but I do not know, but I cannot get this to work. Your advice would be very much appreciated!
Thank you.
Julia

P.S. Here is the code.
<trial A>
/stimulustimes = [0=blankscreen; 250 = visual1, visual2, 20250 =blankscreen; 20500=fixation]
/validresponse = (noresponse)
/trialduration = 21500
</trial>

<block A>
/preinstruction = (intro)
/trials = [1-24=noreplace (A)]
</block>

By Dave - 5/18/2015

Define a <sound> (if your music is in WAV format) or <video> (if your music is in a different format) element:

<video mybackgroundmusic>
/ items = ("backgroundmusic.mp3")
/ loop = true
...
</video>

Present the <sound> or <video> element via the <block> element's /bgstim attribute:

<block A>
/ bgstim = (mybackgroundmusic)
...
</block>
By july1810 - 5/20/2015

Thanks =)