psychopy.org | Reference | Downloads | Github

Simple sound generation is very distorted using 'sound device' and 'coreaudio'

OS: OSX 10.13.3; Windows 10
PsychoPy version: 1.85.6
Standard Standalone? (y/n): yes
**What are you trying to achieve?: Play sound cleanly.

Trying to play very simple sounds at the end of a routine is generating very distorted output (as if the original sound was overlayed with a square wave/v-wave).

I’m wondering if anyone is experiencing this problem, as all my students who use ‘sound device’ is having the same problem regardless of OS/platform.

Pyo and pygame do not have a distorted audio problem. It was recommended to use the ‘sound device’ audio library and ‘coreaudio’ for the audio driver by Jon and others for it having better latency and fewer crashes.

The code I am using to generate audio is the following:

Beginning of Experiment:
sound_win = sound.Sound(u’A’, secs=0.2)
sound_win.setVolume(0.5)
sound_fail = sound.Sound(u’F’, secs=0.2)
sound_fail.setVolume(0.5)

End of Routine:
sound_fail.play()
OR
sound_win.play()

Thanks,

Linus

Latency problem with pyo was fixed in version 0.8.2, current is 0.8.9.

Olivier