Add sound in posttrialpause


Author
Message
Nesard
Nesard
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 17, Visits: 153
Hi,

I've set a posttrialpause = 1000. I need to play a quick sound (like a beep) at the beggining of this pause, and also show a grey screen during all the posttrialpause. Can you tell me how can I do this?

This is the trial code: 
<trial FF_recall>
/ontrialbegin = [values.picturescore = 0]
/ontrialbegin = [values.picturecount += 1]
/stimulusframes = [1 = famousface]
/response = timeout(3000)
/posttrialpause = 1000
</trial>

I need to add the sound because I'm going to record the facial reaction of the subjects with a webcam. Since Inquisit doesn't support webcam recording, I'm going to put a microphone in front of the speakers. Then, when I analize the videos, I will use the beeps as a guide to know which stimuli was looking the participant.

Thanks.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
You can display both the <sound> as well as as grey <shape> during the /posttrialpause by specifying /responsemessage attributes in the <trial>. From the documentation:

"Syntax
/ responsemessage = (responsevalue, stimulusname, duration)

Parameters
responsevalue A valid response value for the trial. See validresponse for possible response values.
stimulusname The name of a stimulus element defined elsewhere in the script.
duration An integer specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks
The stimulus is shown for duration milliseconds. If the duration is 0, the stimulus is presented for the duration of the posttrialpause. This attribute can be listed multiple times in a given trial to specify different feedback stimuli for different responses. "

I.e.:

<trial FF_recall>
...
/ responsemessage = (anyresponse, beep, 0)
/ responsemessage = (anyresponse, greyscreen, 0)
</trial>

<sound beep>
/ items = ("beep.wav")
...
</sound>

<shape greyscreen>
/ shape = rectangle
/ color = (grey)
/ size = (100%, 100%)
...
</shape>
Nesard
Nesard
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 17, Visits: 153
Dave - Monday, August 10, 2015
You can display both the <sound> as well as as grey <shape> during the /posttrialpause by specifying /responsemessage attributes in the <trial>. From the documentation:

"Syntax
/ responsemessage = (responsevalue, stimulusname, duration)

Parameters
responsevalue A valid response value for the trial. See validresponse for possible response values.
stimulusname The name of a stimulus element defined elsewhere in the script.
duration An integer specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks
The stimulus is shown for duration milliseconds. If the duration is 0, the stimulus is presented for the duration of the posttrialpause. This attribute can be listed multiple times in a given trial to specify different feedback stimuli for different responses. "

I.e.:

<trial FF_recall>
...
/ responsemessage = (anyresponse, beep, 0)
/ responsemessage = (anyresponse, greyscreen, 0)
</trial>

<sound beep>
/ items = ("beep.wav")
...
</sound>

<shape greyscreen>
/ shape = rectangle
/ color = (grey)
/ size = (100%, 100%)
...
</shape>

Hello,
This worked perfectly for /posttrialpause. Now I am trying to do the something similar in other experiment with /pretrialpause. Can you tell me how to add the grey screen and the beep during a /pretrialpause?

This is what I tried but it did't worked:

<trial negative_intensity1>
/pretrialpause = 1000
/responsemessage = (anyresponse, beep, 0)
/responsemessage = (anyresponse, greyscreen, 0)

/ontrialbegin = [values.emotion = "negative"; values.intensity = 1]
/stimulusframes = [1 = negative_intensity1]
/ontrialend = [values.stimulusitem = picture.negative_intensity1.currentitem]
/ontrialend = [values.encoder = picture.negative_intensity1.currentitemnumber]
/timeout = values.stimulusduration
/branch = [surveypage.emotionprofile_negative]
/recorddata = false
</trial>

Thanks.






Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Nesard - Friday, February 24, 2017
Dave - Monday, August 10, 2015
You can display both the <sound> as well as as grey <shape> during the /posttrialpause by specifying /responsemessage attributes in the <trial>. From the documentation:

"Syntax
/ responsemessage = (responsevalue, stimulusname, duration)

Parameters
responsevalue A valid response value for the trial. See validresponse for possible response values.
stimulusname The name of a stimulus element defined elsewhere in the script.
duration An integer specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks
The stimulus is shown for duration milliseconds. If the duration is 0, the stimulus is presented for the duration of the posttrialpause. This attribute can be listed multiple times in a given trial to specify different feedback stimuli for different responses. "

I.e.:

<trial FF_recall>
...
/ responsemessage = (anyresponse, beep, 0)
/ responsemessage = (anyresponse, greyscreen, 0)
</trial>

<sound beep>
/ items = ("beep.wav")
...
</sound>

<shape greyscreen>
/ shape = rectangle
/ color = (grey)
/ size = (100%, 100%)
...
</shape>

Hello,
This worked perfectly for /posttrialpause. Now I am trying to do the something similar in other experiment with /pretrialpause. Can you tell me how to add the grey screen and the beep during a /pretrialpause?

This is what I tried but it did't worked:

<trial negative_intensity1>
/pretrialpause = 1000
/responsemessage = (anyresponse, beep, 0)
/responsemessage = (anyresponse, greyscreen, 0)

/ontrialbegin = [values.emotion = "negative"; values.intensity = 1]
/stimulusframes = [1 = negative_intensity1]
/ontrialend = [values.stimulusitem = picture.negative_intensity1.currentitem]
/ontrialend = [values.encoder = picture.negative_intensity1.currentitemnumber]
/timeout = values.stimulusduration
/branch = [surveypage.emotionprofile_negative]
/recorddata = false
</trial>

Thanks.






You can't use /pretrialpause for that. A trial does not and cannot display stimuli during /pretrialpause. What you need to do is use the <trial>'s /stimulustimes instead:

/ stimulustimes = [0=greyscreen, beep; 1000=negative_intensity1]


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search