Sound to signal a key press

174 views
Skip to first unread message

River

unread,
Jun 26, 2009, 10:57:23 AM6/26/09
to E-Prime
Hi,

This seems like a potentially simple thing to do but I can't figure it
out-is it possible to make the computer or SR box emit a beep when a
response key is pressed?
Participants will be viewing stimuli on a computer screen and
responding to it by pressing one of two buttons on the SR box (they
will press a key on every trial). I'm looking at reaction times so I
don't want them to have to look down to make sure they have made a
response (i.e. light flashes by the keys aren't ideal) however its
been mentioned that a noise to confirm a response has been recorded
would be useful....

Does anyone know if this is possible or should I just ask them to
press the keys down firmly!? I'm currently running version 1 of
Eprime.

Many thanks,

River

Rinus

unread,
Jun 27, 2009, 10:23:32 AM6/27/09
to E-Prime
I presume the length is not infinite (otherwise the stimulus will not
go away untill they press)..
Might it be helpful just to do a simple beep with inline? Something in
the line of:

if TextDisplay1.RESP <> "" then beep

(TextDisplay or whatever you're using that is).

Kind regards,

Rinus

David McFarlane

unread,
Jun 29, 2009, 2:23:51 PM6/29/09
to e-p...@googlegroups.com
Are these self-paced trials, with no time limit? If so, you could
just put a SoundOut with a beep.wav after whatever object you use to
present your stimulus & get response, e.g.,

- TrialProc
- StimSlide
- BeepSound

If trials are self-paced but with a time limit, then you could use an
If-Then either to make a beep in script as Rinus sugessts (although
the E-Basic beep command does not work on some computers), or with a
label to skip past the BeepSound, e.g.

- TrialProc
- StimSlide
- CheckResponseScript
(If StimSlide.RT = 0 Then goto NoResponseLabel)
- BeepSound
- NoResponseLabel

If trials are not self-paced then things get considerably trickier.

-- David McFarlane, Professional Faultfinder

River

unread,
Jul 24, 2009, 7:01:09 AM7/24/09
to E-Prime
Firstly, thankyou to Rinus and David for your speedy replies! I have
be unable to look at your suggestions until now however I have managed
to get an InLine version to work whereby an image is displayed, a
keypress response is made and then, once the image is no longer
displayed (it is displayed for a set duration regardless of responses
made by the participant) the beep will sound to inform the participant
that a response was made.
Although this is on the right track I was hoping to be able to cause a
beep to be emitted at the same time as a response key is pressed,
therefore allowing you to press the key again (while the stimulus is
still being displayed) if the beep didn't sound to signal that a
response had been recorded.

Do either of you know if this might be possible? I can't seem to find
a way to put the sound and the image together in a way that the sound
is contingent on a response to the image being made as well as
allowing the sound to occur AS the response is being made.

Thanks again in advance,

River
> > > River- Hide quoted text -
>
> - Show quoted text -

David McFarlane

unread,
Aug 17, 2009, 4:03:19 PM8/17/09
to e-p...@googlegroups.com
River,

(I have been off on holiday for a few weeks, just getting back into
the swing of things...)

Hmm, I just posted a response to a problem very much like this in the
PST Forum (http://support.pstnet.com/forum/Topic3323-8-1.aspx ). In
short, yes, it is possible to do what you wish, though not simple (as
I hinted in my earlier reply). It will require the use of Extended
Input, plus some script, Clock.Read, and possibly .IsPending(),
although .RT, .RTTime, or .RESP should work fine in your case.

So, suppose you want your stimulus image to remain for 2500 ms
regardless of when the subject responds. You would set its Duration
to 0 and its Time Limit to 2500. You would then follow that with
inline script, and the script would take care of filling in the 2500
ms as well as detecting any response and then sounding a beep. You
can probably fill in the details from there.

For more info, please look at Appendix C of the User's Guide that
came with E-Prime (for the Extended Input example), the Clock.Read
and InputMask.IsPending topics in the online E-Basic Help, and the
"Process Responses Template" and "Clear Stimulus-Leave More Time for
Response" samples downloadable from PST.

-- David McFarlane, Professional Faultfinder

Reply all
Reply to author
Forward
0 new messages