Howdy, Stranger!

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

Supported by

[open] panning a sound defining the channel through another variable

edited May 2013 in OpenSesame

hello. I have to present some words and sound simultaneously on either the left or the right. The location of the words in the sketchpad has been randomized to coordenates 300 and -300, so when the location is 300 the sound should use the right channel. I know this has to be done with the pan sampler function, but just dont really know how to write the code, or where.


  • edited May 2013

    Hey airenos,

    Learning python scripting is certainly a good idea, but if you feel very insecure about this, you can avoid scripting altogether in this case. It sounds like you've set up your experiment pretty much like the gaze_cueing tutorial, so in that case I suggest the following:

    Add 2 sampler-items to your trial sequence; one panned to the left, the other to the right. Then, in your trial sequence, simply use the "run if" statement, saying something along the lines of: [stim_loc] = -300
    and [stim_loc] = 300

    If the sound to be played is not the same on every trial, you can add a variable 'sound_file' to your loop table, which describes which file to use on which trial. Then, in both sampler items, and write [sound_file] in the field 'Sound file'

    Does this make sense?

    EDIT: I worked out an example for you, see ; the bark.ogg file used is here:

Sign In or Register to comment.