psychopy.org | Reference | Downloads | Github

How to properly loop sound?

sound

#1

Hi all,

Sorry if this got answered and feel free to delete this if its redundant.

I am trying to do very simple task - loop a sound in PsychoPy. Using latest version (1.85.6), Win10. Sound engine is “sounddevice” (tried pyo before).
I have an already build project (done by someone else) which consists of sound stimuli and some emotional scales. Each trial should have a sound in the background (list of sounds is generated off spreadsheet <- this part works), but the sound plays only once.
I have tried adding “loops=5” almost everywhere (soundX = sound.Sound(…, loops=5), tested soundX.setLoops(5), soundX.play(loops=5), looked into the code (lib/site-packages/pspychopy/sound/…), so far with no success.

My question: Is there a “proper” way how to do sound loops? I would write the whole app from scratch, but there is a big deadline coming up very soon and time is of the essence.

Thank you very much!