Loop audio until condition met in sound component?

Hi there,

I’m creating an experiment in Builder where I’m trying to create a visual&audio attention getter for infants.

I’ve used the PsychoPy book to help me create dynamic stimuli that repeats until a button press which works perfectly. I’d like to have accompanying audio that also repeats until a button press (essentially loops until told to stop).

Is there a way to achieve this looping using the sound component? It looks like there isn’t but seems like there may be ways to achieve this from looking at some of the options here https://www.psychopy.org/api/sound.html.

I’m assuming I’d need to use some code component to do this but not sure where to begin exactly.

Any advice would be great!

Hi,
Did you ever find a solution to this?

Elle