Dear community,
I am using the last stanalone Psychopy version (3.1.0) in a Macbook pro (Mojave 10.14.4).
I am trying to reproduce sounds with sounddevice using the next piece of code:
from psychopy.sound import Sound
low = Sound(600, sampleRate=44100, secs=0.3, stereo=True ,loops=200, hamming=True)
low.play()
low.play()
I find two problems:
- The first one and more important, my code only reproduces the sound the first time that I call low.play(). If I want to reproduce the sound two times in a row I need to create again the sound variable (low = Sound(600, sampleRate=44100, secs=0.3, stereo=True ,loops=200, preBuffer=1,hamming=True).
Following previous posts I have tried to fix it by removing “sounds” from self.sounds.remove(thisSound) -> self.remove(thisSound) but it does not make a difference.
I would appreciate very much if someone could help me to solve this because I am bit stucked.
- My second question relates to the arguments. Although I am expressing that I would like to loop the sound 200 times (just for fun), it is only reproduced once. Thus, I have the impression that the hamming and loop arguments are not being taken into account. Am I doing something wrong?
Thank you very much