stim lists, varied timing

Hey there,

I have a question about writing a program that will display 160 photos, 4 times each, each presentation having a different timing, all randomly. so i want to display A for 33ms then B for 506, then C for 238, A for 256, ect. I also want a mask to come on after my stimuli for however long it takes to complete a whole second, ie if my stimulus is on for 33ms, the mask needs to be 967, if it’s 506ms, the mask needs to be 494.

Is there a way to do this short of just putting everything in individually? Perhaps with stimulus lists? It’s quite a simple idea, but the random timings and mask are making it complicated in my head; any help would be much appreciated.

Thanks so much!

Perhaps the trial-end feature could help do what you need.

Greg Shenaut

In addition, 4.0.6 added the ability to decide whether a trial should be presented based on a small set of traits, including the number of times it has been presented. Therefore, you can get randomization with replacement in this scenario.

  1. Set up a macro that will end the block after 4*160=640 trials have been presented. Evaluate this after each trial.
  2. Set up a macro that repeats the block always. Evaluate this after each trial. This must happen after the macro in step one.
  3. Set up each trial to present until the number of times the trial has been presented is four. (When to Present in the Trial Editor)

With respect to Greg’s recommendation, also set a time limit of 1000ms on each trial (End in the Trial Editor). Note that this will not end an event that is in progress, so this would not be compatible with a need to record a response during the mask. Your stimuli will select a time limit randomly from a Trial Variable (Input in the Event Editor), and your mask will end immediately. Note that each potential random time for your stimuli will need to be entered into your trial variables. Also note that the real-world random time will depend on your refresh rate, so effectively your times will be rounded up to the nearest screen refresh.

You may also be interested in seeing the verbose log after an experiment run while you are trying to set this up. Directions for how to enable this are included here for Windows and here for Mac OS X.