Hi,
I'm designing a routine in which an auditory stimulus will play throughout the routine while visual stimuli get updated by a loop.
I'm using a code component for the auditory stimulus as specified in the response
here, which includes these instructions.
-- Insert a Code component in the routine. Right click on it and move it to the top so that it occurs before your image stimulus.
-- In the "Begin Experiment" box, type:
soundStarted = False
-- In the "Begin Routine" box, type:
if not soundStarted:
sound.Sound('mySound.wav').play()
soundStarted = True
I'm getting the following error message.
sound.Sound('list1.wav').play()
NameError: name 'sound' is not defined
I've checked that my sound file is in the same directory as my experiment. I've tried assigning the sound file to a variable name (list1='list1.wav'). But I keep getting the same error message. Any suggestions about what I'm doing wrong?
Thanks!
Tricia