Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

[solved] Flashing stimuli & overlayed sketchpads?

jpgjpg Posts: 7
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?



  • sebastiaansebastiaan Posts: 2,959
    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!


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • jpgjpg Posts: 7
    edited 5:52PM

    Thanks Sebastian, that worked! :)

Sign In or Register to comment.