Howdy, Stranger!

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

Supported by

[solved] Auditory stimuli in Opensesame: Pitch change?

edited April 2013 in OpenSesame


At the moment I am implementing auditory stimuli (i.e. spoken words) into opensesame. I noticed that the pitch in opensesame is different than in the original .wav file (played in windows media player). In opensesame I have to change the pitch to .94 to make it sound like the original file.

Did anybody else encountered the same problem? And if so, why does this happen? And how can you make the .wav file in opensesame sound exactly the same as in windows mediaplayer?

I program in opensesame 0.26 in the legacy backend. I am using an inline script with the following code:

# prepare phase
self.SW_file = self.experiment.colorD2[TMC2] # select the correct .wav file (i.e. correct color)
self.experiment.SW_sampler=sampler(self.experiment, self.experiment.get_file(self.SW_file))
self.experiment.SW_sampler.pitch(self.experiment.pitch) # I have to change the pitch to let it sound ok

# run phase




  • edited 9:10AM

    Hi Floor,

    By default, OpenSesame uses a sampling frequency of 48 Khz, and doesn't automatically resample files with a different sampling rate. If, for example, your file has a sampling rate of 44.1 Khz, you will need to pitch it down by a factor of

    44.1 / 48 = .92

    There's nothing really wrong with pitching down your samples, as long as you know the exact factor, but it's probably easier to change the sampling rate of OpenSesame under the back-end settings. Or to change the sampling rate of your sample with a tool like Audacity.

    Hope this helps!


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

  • edited 9:10AM

    Thanks Sebastiaan! That was easily solved :)

Sign In or Register to comment.