OS : Mac OS 10.15.6 PsychoPy version : StandalonePsychoPy-2021.2.3-macOS Standard Standalone? (y/n) y What are you trying to achieve?:
I am trying to create a sound stimulus that plays at the start of my “reward” component. Ultimately, I have 4 sounds and I would like one of the four to randomly be selected and played.
allSounds = [‘sound1.wav’, ‘sound2.wav’, ‘sound3.wav’,‘sound4.wav’,‘sound5.wav’,‘sound6.wav’,‘sound7.wav’,‘sound8.wav’,‘sound9.wav’]# list must contain all possible sounds
shuffle(allSounds)
thisSound = allSounds[0]