Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
www.cognitology.eu
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
Well, voila, there you go, it should now flicker. Of course, nothing is randomised, but it should work, and I think you might be able to take it from there. Also, no code yet.
Best,
Michiel
Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
www.cognitology.eu
-----Original Message-----
From: e-p...@googlegroups.com [mailto:e-p...@googlegroups.com] On Behalf Of pati-confidence
Sent: 06 July 2011 06:17
To: E-Prime
Subject: Several flickering tasks run simultaneously
--
Setting aside your incommensurate flicker rates,
can E-Prime do this? Well (as Mich already
said), yes, in principle; but in practice, for
this particular task you might be far better off
using something like Presentation, or MATLAB with
the Psychophysics Toolkit (my own first choice
for your task). You would like a toolset that
includes pre-made objects that can flicker
themselves at specified rates, and then set those
running. AFAIK, EP has no such facility, but
maybe Presentation or MATLAB or Psychopy do, and then Bob's your uncle!
Next, you could try Mich's fine suggestion, but
once again I fear that incommensurability will
raise its ugly head. Now you not only need a
common divisor, but you need a List that contains
the pattern of on-off images for each time point
until the entire temporal pattern repeats, and
that will not happen until you reach the
least-common-multiple of the individual period
times, and in your case that will be greater
than, say, 83.3 * 113.3 = 9.5 s, and perhaps as
great as 83.3 * 100 * 116.3 * 113.3 = 30.7
h. Yikes! Of course, if you are not wedded to
these period times, then you might adust them to
more workable values (there's a nice academic exercise for you).
But I said E-Prime could do this, and here's
how. It would require some intricate code, the
same way that you could do it in any
full-featured programming language, such as C or
C++ or even JavaScript, and I have done things
like this myself in C. You would need to
contruct your own "event loop" (do a search of
the Group or the Forum on that phrase to see
where I have discussed this before). In short,
you create an array that holds the upcoming
transition time for each object (in this case,
your four flickering targets). Each time through
the loop it just checks each of these times
against the current clock time, and when any one
reaches its next transition time then the loop
updates that target and adjuts its transition
time for the next one. Your loop just does that
for the duration of the display. Here is some
pseudo-code for that (using my own odd mixture of C-like and other notation):
while( presentation_ongoing )
for( i = 1 to nTargets )
if( Clock.Read >= target[i].tNext )
target[i].toggle
target[i].tNext = target[i].tNext + target[i].tPeriod
Of course, you also have to initialize .tPeriod
and .tNext for each target, and I left out the
mechanics of how to implement anything like a
.toggle method to redraw a target between its two
states, but I leave those as exercises.
-- David McFarlane, Professional Faultfinder
(P.s. For those who know more C-like notation,
the pseudo-code above could be more nicely written as
while( presentation_ongoing )
for( i = 1 to nTargets )
if( Clock.Read >= target[i].tNext )
target[i].toggle
target[i].tNext += target[i].tPeriod
Isnt' that nice?)
-- David McFarlane, Professional Faultfinder
(Now next time someone asks this, I will try to
direct them to the thread from today :))
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.