Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Flashing stimuli & overlayed sketchpads?

edited February 2012 in OpenSesame

Hi Sebastian,

I've been enjoying OpensSesame so far, it's great to work with!

I was wondering if it is possible to have visual stimuli (something simple, a fixation dot will do) flash on and off a number of times (the number of times it flashes will be determined by a loop variable)

To complicate things, I need it to be flashing while other sketchpad items remain constant on the screen... I was thinking it might involve multiple canvases overlayed on each other?

Any advice?



  • edited February 2012

    Hi Jamie,

    Yes, sure. There are many ways to do this, but the easiest way (which will require minimal inline coding) is probably as follows:

    • Create a "template" sketchpad that contains the constant image and add it somewhere to the start of the experiment. You can give it a 0ms duration to make sure you don't notice it—it's only there to serve as a template.

    • Add a variable to the block_loop that contains the number of repetitions. Let's call it "repetitions".

    • Add the following to the run phase of an inline_script in the trial sequence. This will show a flashing display:

    my_canvas1 = self.copy_sketchpad("template")
    my_canvas2 = self.copy_sketchpad("template")
    for i in range(self.get("repetitions")):

    I guess the code is fairly self explanatory. For more canvas functions, please refer to the documentation:

    Hope this gets you started!


  • jpgjpg
    edited 12:51PM

    Thanks Sebastian, that worked! :)

Sign In or Register to comment.