Well, now this is not really a psychological mailing list, but still… A
short answer.
I am part experimental psychological and part computer scientist (or what
the english term is).
My current job is programming libraries for use at my university. So what
the granularity should be is not really up to me, since the libraries is
used by other scientists. I just want it as good as possible.
Reaction times is really many things. For example we want subjects to hit
space when a line has reached a ceartain point on the screen. The line is
growing steadily. In this case reaction times is very precise, because the
subject knows in advance when they want to hit the key. If we want to
regsiter the time or the line length, then 10 ms. can be way off. At least
compared to optimum.
Also our eyetracker system has a granularity of 2 ms, so if we want to
synchronize keypresses with it, then 10 ms. is also suboptimal.
E-prime, a commercial experiment enviroment, brags that the have
"millisecond precision". This is actually verified by a third party. So 10
ms is really far from what is possible.
Of cousre this only works when all othe processes is terminated or sleeping
and E-prime runs at “Realtime priority”, which is not really realtime on
win32.
I am not really concerned with overhead from SDL to directinput, since this
is probably less than a microsecond. But any sleep like ops would be
annoing.
But thanks for the replies. I think I have to do a couple of tests, with
external analog equepment to
really find the answer to this (off) topic.
-Martin>From: Christophe Pallier
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] Q: timing of SDL events
Date: Fri, 18 Mar 2005 09:52:29 +0100
Donny Viszneki wrote:
On Mar 17, 2005, at 1:32 PM, Martin Lange wrote:
SDL_WaitEvent waits 10 ms between polls in the eventqueue. This delay is
unacceptable for me.
Are you sure you read that right? I have, and have helped, friends running
many types of psychological (mostly cognitive psychology – really the
only place computers are used in psychology) experiments. Do you realize
10ms occurs 100 times in a single second?
What is your experiment reading that requires more granularity than that?
10 msec precision is not a big issue when measuring reaction times (the
standard deviation of rt in humans is at least 100msec),
but latencies of 10 milliseconds or more (which happen in standard Linux
kernel, especially when X window is running)
make it very difficult, if not impossible, to do do subliminal
presentation of images.
There you need frame-by-frame control to be sure that the stimuli are
presented for a precise number of millisec.
(at 50 ms, a stimulus can be invisible, and be visible when presented 60 ms
or more).
Latencies, and lack of precision, is also problematic when you synchronise
the PC with an external equipment (e.g. an electroencephalogram system)
that must be syncrhonised at the millisecond.
When using audio, a delay a fraction of a millisecond between the right
and the left hear change the perceived location of the sound.
Therefore you sometimes need to able to synchronise sounds at the sample
level. Few audio libraries allow that…
SDL (or even pygame) is fine for many psychology experiments, but cannot be
used, alone, for all of them.
Christophe Pallier
http://www.pallier.org
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Find det, du s?ger p? MSN S?g http://search.msn.dk