Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Background music stimuli with delay

edited February 2016 in OpenSesame

Hi,
I'm doing an eye-tracking study where participants are asked to read pieces of text while listening to background music. However, what I need is that the music starts playing before the sentences are presented (e.g. 3 seconds before). How do I get this working? When I used the delay function it simply played the entire music file (about 30 seconds) before presenting the sentence.

I want music for e.g. seconds alone (blank screen) and then the sentence + the same music file as played before the delay.

Comments

  • edited 3:21PM

    Hello,

    What did you specify as the duration in the sampler item? Normally it should work if you set it to the time you need to wait (3 seconds in your case). So remove sound and replace it by 3000 and you should be set. Your sound will continue to play until it is over in both cases.

    Does this help?

    Eduard

    Buy Me A Coffee

  • edited 3:21PM

    Thank you! Worked perfectly !
    Ola

  • edited 3:21PM

    Another problem has popped up. The sound file doesn't stop playing, so that when the next sentence appears the experiment simply adds another sound file. So in the end I have four different sound files playing at once.

    Tried stopping the music using ENTER, but doesn't work.

  • edited 3:21PM

    Hi Ola,

    Would setting the stop at feature of the sampler to an appropriate value solve the issue? Say, after 30000 ms.

    Buy Me A Coffee

  • edited 3:21PM

    No cause the participants should be allowed to read the sentence for as long as they want, so needs to be a button they push or canvas change. I only want the music to play during the sentence and not the question.

  • edited 3:21PM

    Currently what I have for my sampler:

    set duration "3000"
    set fade_in "0"
    set pan "0"
    set pitch "1"
    set sample "[Noise]"
    set stop_at "ENTER" .... this doesn't work though
    set volume "1"

  • edited 3:21PM

    Hi Ola,

    Did you use an inline script to control your sound? (if not, see http://osdoc.cogsci.nl/python/sampler/)

    If you have created a sound item just like you would create a canvas, the sound should be stopped simply by your_sound.stop(). You present the sentence in the run phase of your inline_script, after which you enter a while loop (e.g. while button_pressed == false). After the while loop you place the sound.stop() command - I think that should do the trick?

    Cheers,

    Josh

  • edited 3:21PM

    I am currently not. Just using the sampler item as my different noise conditions are the variables of the the experiment. But could I make a inline script like this:
    src = [Noise] and then continue the script?
    Noise includes my four sound conditions

  • I am facing the same problem as Ola. Could anybody please lend us a hand?

Sign In or Register to comment.