is it possible to have a continuous sound at the same time (as the presentation of a series (loop) of image stimuli?
I’ve built my experience with Builder
my problem is that the sound ends at the end of the routine so the person perceives an interruption of the sound between 2 images
the aim of the experiment is precisely the influence of the lateralization of the sound on memorization
i tried this solution without succes
“Begin experiment”
background_sound = sound.Sound(‘sound/wind.wav’)
In the “Begin routine” tab,
background_sound.play()
i continue to perceive an interruption between each image
Why not have the two image stimuli occur in the same routine? Image 1 would have a start time of 0 seconds, and last for 10 seconds. Then image 2 starts at 10 seconds and lasts for 10 seconds. In this same routine the sound would play at 0 seconds, for a duration of 20 seconds (the trial length).
This could be a solution. but I would have to change all my excel files of stimuli
currently I present a series of 8 series of 16 images with recall test for each series x 4 conditions
all via loops with each line representing an image ($filename) via the random function.
I think that if I had to go on the proposed solution, I would have to redo my excel files and my program so that the images in the same routine are different variables by column of my xls file
ouch
I now trying to change the sound on right ear and left ear every loop
so 've created 2 files waveRight.wav and waveLeft.wav
is it possible to change de filename of my sound between LoopA and LoopB
because when i stop the sound a the end of my loopA via on Begin routine in my loopB by these instructions
i got this error message
" psychopy.exceptions.SoundFormatError: Tried to create audio stream 16000_2_128 but 44100_1_128 already exists and win32 doesn’t support multiple portaudio streams"
Does existe a other way to resolve this issue ?
because when i test my conditions ( to change the sound like below it does work as i hope
i put the commands in the Begin routine tab
if i use this condition, i only get one sound on 2 frames
on the other hand if i pass the command background_sound.play(). the sound file changes but I can hear the cuts between each image
background_sound.play()
background_sound = sound.Sound(‘sound/son_droite.wav’)
if blocA.thisN == 1:
background_sound = sound.Sound(‘sound/son_gauche.wav’)
if blocA.thisN == 2:
background_sound = sound.Sound(‘sound/son_droite.wav’)
if blocA.thisN == 3:
background_sound = sound.Sound(‘sound/son_gauche.wav’)
The issue is that you are recreating the sound object, which takes time.
If you only have two sounds to play, they how about creating two sound objects earlier (background_left and background_right) and then choosing which one to play in Begin Routine?
Personally I always create sound objects with a component, rather than using code, but with 0 volume in an earlier routine. The I set the volume to 1 at the end of that routine (e.g. sound_1.setVolume(1)). Then I play the sound with sound_1.play().