If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): OS X 10.14.6
PsychoPy version (e.g. 1.84.x): 3.1.5
My question is about how to best time sounds in Builder. Having read the documentation, I thought I would use the PTB sound device, but I can see that this is not listed in the preferences.
So I added it there, and that throws an error
ValueError: audioLib pref should be one of [‘sounddevice’, ‘pyo’, ‘pysoundcard’, ‘pygame’], not ‘PTB’
I also tried to set this in a custom code component at the start of the experiment:
prefs.hardware[‘audioLib’] = [‘PTB’]
from psychopy import sound
That does NOT throw an error, but when I then use the code adapted from the documentation
sound_2.play(when = now+interval)
I get the following error:
TypeError: play() got an unexpected keyword argument ‘when’
Some more research revealed that this is probably because sound device is
Any tips on how to ensure decent sound timing, esp. when loading sound from files & using builder?
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.