random presentation of random sounds
Hello,
I'm trying to have a random sound at random points in specific parts/moments of a temporal reproduction task.
The experiment is structured as follows:
- 4 numbers appear on the screen for a few secs
- temporal reproduction task starts (a 'beep' sound of variable duration is delivered for encoding)
- participants press a key to start the second 'beep' sound (reproducing)
- participants press a key when they think the sound reached the same duration as the previous one
- 1 number appears asking if it was present or not among the firsts at the beginning (WM task)
I have 6 different sounds, and I want to present them randomly during the task but NOT when the 'beep' sound is delivered (in both encoding and reproducing phases). It means that it should be delivered during the 4 numbers presentation or right after that/before the encoding part or after the reproducing part/during the WM task (1 number presentation). Also, the random sound should be delivered in ~6% of the trials (60).
I managed to set up the rest of the experiment, but I'm having trouble with this. Can you suggest a way to implement it?
Thank you!
Comments
Hi @gl2508 ,
I would define a variable in the block loop (
distractor) that decides which, if any, distractor sampler should be played, for example by using 0 for no distractor, 1 for just before the memory display, 2 for right after the memory display, etc. Next you insert asamplerwith the distractor sound at each of these points in the trial sequence, and use run-if statements to determine which distractor sampler, if any, should be played back, for example[distractor] = 1for the distractor sampler just before the memory display.If you don't want to define the
distractorvariable manually, but simply want a distractor to be played at a random moment on 6% of trials, you can also use a Pythoninline_scriptat the start of the trial to define thedistractorvariable (this should be in the prepare phase):Do you see the logic? Hope this helps!
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!