Howdy, Stranger!

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

Supported by

Multiple sound files and multiple video files (one at random per trial).

Hello,

I am creating a visual perception experiment and need to include multiple sound/video files.

In brief, within each trial participants will:

1. See a fixation dot.

2. Hear one of two sound files.

3. See one video randomly selected from a pool of videos of hand movements. The video will disappear once the hand finishes its movement.

4. Provide a touch screen response on where the perceived final location of the hand was. The level of perceptual bias is measured through the difference of the actual coordinates of the hand vs the touchscreen response coordinates.

I am still learning OpenSesame (basically a novice) and I am having trouble setting up my experiment to choose one of multiple files at random, both for the sound and video files. I also need to define where the actual coordinates of the finishing point is, so that the difference to participant responses can be calculated.

I'm sure there is a simple way to do this, but all the online tutorials seem to be slightly 'off' what I'm trying to achieve and our tech team simply don't know the programme enough to help.

Any help someone can provide is greatly appreciated!

Thank you

Comments

  • Hi Robert,

    For the randomization, it is easiest to do some Python programming. If your files are named in an intuitive way that is actually quite easy.

    For example. If you want a random sound (of the two) on every trial, and you have sounds that are called 'sound1.wav' and 'sound2.wav' or something as systematic as that, you could do:

    import random
    number = random.randint(1, 2)
    var.file_name = f"sound{number}.wav"
    

    This variable you can then use in a sampler item, or further process it with the python script.

    Randomization of the videos works equivalently.

    Provide a touch screen response

    Whenever you use a mouse response item (whichever is essentially what a touch response is). Opensesame creates the variables cursor_x and cursor_y, which are the x and y variables of the response. Those ones you can compare to the variables that you used to present the stimuli and compute the deviation with any measure you want.

    Does this makes sense?

    Eduard

    Buy Me A Coffee

  • Hello Eduard,

    Thank you so much! This appears to have worked. Very excited to have my first experiment working now! :)

    Have a great day!

    Robert

Sign In or Register to comment.