Hello,
I am looking through some code from a student and the program line
tone = sound.SoundPygame(value='C', secs = 0.1, octave=5, sampleRate=44100, bits=16)
gives the following error message
########## Running: /Volumes/EURESIS/Experiment 2/Exp2 - BareBones.py ##########
Traceback (most recent call last):
File "/Volumes/EURESIS/Experiment 2/Exp2 - BareBones.py", line 155, in <module>
tone = sound.SoundPygame()
File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/sound.py", line 255, in __init__
if not mixer.get_init():
NameError: global name 'mixer' is not defined
If the tone is defined with paramaters such as
tone2 = sound.SoundPygame(value="E", secs = 0.1, octave=4, sampleRate=44100, bits=16)
I get the same problem.
And I also get the same problem when I run that code from the shell.
I don't understand what to do with that.
Different code that defines sounds from a waveform array works fine, though.
Does anyone have any pointers?
Thanks,
marc