| Reference | Downloads | Github

soundStimuli demo does not work on El Capitan

The soundStimuli demo does not work on my Mac Pro (late 2013) under El Capitan. Any hint?

The output error is:

Using pysoundcard(with None) for sounds
Traceback (most recent call last):
File “/Applications/”, line 29, in
highA = sound.Sound(‘A’, octave=3, sampleRate=44100, secs=0.8, bits=8)
File “/Applications/”, line 336, in init
self.setSound(value=value, secs=secs, octave=octave)
File “/Applications/”, line 152, in setSound
File “/Applications/”, line 186, in _setSndFromNote
self._setSndFromFreq(thisFreq, secs, hamming=hamming)
File “/Applications/”, line 200, in _setSndFromFreq
File “/Applications/”, line 438, in _setSndFromArray
File “/Applications/”, line 668, in init
’input’, idevice, ichannels, idtype, ilatency, samplerate)
File “/Applications/”, line 700, in _get_stream_parameters
info = device_info(device)
File “/Applications/”, line 267, in device_info
raise RuntimeError(“Invalid device”)
RuntimeError: Invalid device

In preferences you can set different sound libraries. Try one of the others

Thanks a lot Jon. I could make it work by changing the default audio libraries in preferences [‘pysoundcard’,‘pygame’] to [‘pygame’]. If I try to change it to [‘pyo’] the experiment crashes with the following error message:

Fatal Python error: (pygame parachute) Segmentation Fault

Since I am working with multisensory temporal order judgments (flash / tone), I don’t know how bad I should want pyo to work, since the latencies are supposed to be lower than in pygame.

Give us some clues. What version of PsychoPy are you using?
The latest version of psychopy comes with a new back end “sounddevice” that seems to have excellent timing

I am using version 1.84.2 (for OSX 64bit). I guess you would suggest using the sounddevice module? I’ll try to give it a go and share the outcome.