Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Play a .wav file during an entire loop?

EvanEvan Posts: 7

I am running an experiment testing the effects of binaural beats on memory and relaxation. Is there a way to make an audio file play for the duration of a full loop?

Comments

  • sebastiaansebastiaan Posts: 2,856

    Hi Evan,

    If you set the duration of a sampler item to 0, then the sound will keep playing in the background. So if you insert a sampler before your loop, and if your sound sample is long enough, then it will play for the duration of the entire loop.

    After the loop, you can then stop the sound with a simple inline_script (assuming that your sampler is called my_sampler):

    items['my_sampler'].sampler.stop()
    

    Cheers,
    Sebastiaan

    Thanked by 1Evan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.