Flashing two dots at different frequencies.

David McFarlane mcfarla9 at msu.edu
Wed Dec 9 14:44:22 UTC 2009


Ben,

Standard reminder:  1) I do not work for PST.  2) PST's trained staff 
really does like to take any and all questions at 
http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive 
to respond to all requests in 24-48 hours.  So don't be shy there.  3) 
If you do get an answer from PST Web Support, please extend the courtesy 
of posting their reply back here for the sake of others.

That said, here is my take ...

Hmm, it would make it rather easier if one frequency were an integral 
multiple of the other.  In that case the slower dot appears only in 
conjunction with the faster one, and you could simply use two different 
Slides with a List that cycles through them at the right frequency.  But 
I assume that your situation is not so simple.

Back when I did this sort of thing in C, at the start of the session I 
would create an array with all the scheduled times and events, and then 
just roll that out through an event loop.  E.g., if each dot persisted 
for 200 ms, and one dot flashed every 500 ms while the other every 750 
ms, then my array might look like

t_ms  event
----  -----
    0  dot500on
  200  dot500off
  500  dot500on
  700  dot500off
  750  dot750on
  950  dot750off
1000  dot500on
1200  dot500off
1500  dot500on
1500  dot750on
1700  dot500off
1700  dot750off
2000  dot500on
2200  dot500off

(Actually, I would add the start time of the session to all those 
times.)  In principle you could do this with E-Prime, but I am not about 
to demonstrate that myself.

I call this general approach an "in advace" technique.  If you prefer an 
"on the fly" technique, then you might consider using inline script to 
select which dot(s) appear next, and to manipulate 
SetNextTargetOnsetTime for that dot to appear (or use .CustomOnsetTime & 
.CustomOffsetTime if you prefer) -- see the online E-Basic Help. 
Because one dot might need to turn on or off during the duration of 
another dot, you might still need to set the Duration of the dots to 0 
and use script to turn them off at the appropriate time.

I sure hope someone else chimes in with a better idea!

-- David McFarlane, Professional Faultfinder
"For a successful technology, reality must take precedence over public 
relations, for nature cannot be fooled."  (Richard Feynman, Nobel 
prize-winning physicist)


Ben wrote:
> For a SSVEP experiment I need to flash two dots on an image at
> different frequencies. My problem is that I haven't been able find a
> way to set different timings for each dot to turn on and off
> independently.
> I am new to E-Prime and would appreciate your help.
> 
> Thank you,
> Ben.

--

You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list