Hi!
I'm having a problem with controlling the duration of trials involving sounds and other stimuli. I hope somebody can give me a tip here.
I'm trying to write a script for a program that alternates between playing a sound and presenting a moment of silence (for sake of testing, I now filled the silence with two visual stimuli, just to play around with different parameters).
- Both the sound trial and the silence trial are supposed to last for different, randomly chosen durations, which I specified using the timeout attribute.
- Participants are supposed to respond by the sound/silence by pressing the space bar as soon as they detect it. I want the trial to continue after the response until the timeout duration is reached. I used the responseinterrupt attribute for that.
My problem is that neither the timeout nor the responseinterrupt attribute function like I want them to. On sound trials, the sound always plays the full length of the .wav file (about 1 minute), regardless of the timeout and regardless of whether a response is entered or not. On silence trials, the trial is always aborted as soon as a response is entered. Any idea what could be going wrong here?
Thanks in advance!
Here is my script:
<sound rainsound>
/ items = ("rain.wav")
/ volume = -1000
/ erase = true
</sound>
<shape soundshape>
/ color = (0, 251, 231)
/ size = (20, 20)
/ erase = true (white)
</shape>
<shape nosound>
/ color = (255, 35, 117)
/ size = (20, 20)
/ erase = true (white)
</shape>
<counter tonetime>
/ select = noreplace(10000-59000)
</counter>
<counter silencetime>
/ select = noreplace(10000-59000)
</counter>
<trial toneon>
/ stimulusframes = [1=rainsound]
/ correctresponse = (57)
/ responseinterrupt = trial
/ timeout = (tonetime)
</trial>
<trial soundshape>
/ stimulustimes = [1=soundshape]
/ correctresponse = (57)
/ responseinterrupt = trial
/ timeout = (silencetime)
</trial>
<trial toneoff>
/ stimulustimes = [1=nosound]
/ correctresponse = (57)
/ responseinterrupt = trial
/ timeout = (silencetime)
</trial>
<block tones>
/ trials = [1-200 = sequence (toneoff, soundshape, toneon)]
</block>
<expt>
/ blocks = [1=tones]
</expt>