Howdy, Stranger!

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

Supported by

How to incorporate random tone in experiment

Hi there,

I'm extremely new to opensesame, have just began using it as part of an assignment in university. I need to modify a gaze cue experiment and am trying to make a tone occur randomly throughout the trial sequence as a distraction however I cant find a way to program the sample to happen at random and not just when a key is press etc. I originally assumed I would be able to do it through the 'run if' section of the trial sequence but it doesn't seem possible.


I would really appreciate any guidance that could be given on this!

Comments

  • Hi @ceri910,

    Can you describe what happens in your trial? What are the different events and how long do they last? What is you trial structure?

    Should the sound occur at purely random times within a certain interval or would it be ok to have it occur at a random time within a set of fixed intervals (e.g., after 50ms, after 100ms, after 150ms, etc.). Or are there any other constraints (e.g., what is the maximum interval? Can it be presented after the participant's response)?

    If you want a purely random interval between the trial's onset and the end of the trial, and if you're planning to run the experiment in Open Sesame and not through the browser (OSWeb), then at first sight your best bet would be to use the coroutine to have your trial run in parallel to a second time line in which you'd have to use code to generate a random value between 0 and the maximum delay you're preparared to use, have that time line sleep until the interval selected has gone by, and then have the sound play.

    Hope this helps,

    Fabrice.

    Buy Me A Coffee

Sign In or Register to comment.