Playing sound with low latency and jitter in OpenSesame

OpenSesame is probably the greatest software for creating experiments for psychology, neuroscience, etc. It has a graphical interface for the most useful components, such as playing a sound file (sampler) or creating own tone (synth). However, the way these components are implemented (using PyGame) may not provide good temporal accuracy (latency), meaning the sound can be delayed, which might not be that bad, neither good temporal precision (jitter), meaning that the delay may vary from trial to trial, which can be very bad (for things like ERPs, etc.). You should read about these matters here.

In this post I want to show how I managed to significantly improve the timing of my auditory stimuli using inline code, PyAudio and ASIO API, even using onboard sound card in Windows 7.

Continue reading