[solved] Flashing stimuli & overlayed sketchpads?
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?
Jamie

Comments
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") my_canvas2.fixdot() for i in range(self.get("repetitions")): my_canvas1.show() self.sleep(100) my_canvas2.show() self.sleep(100)I guess the code is fairly self explanatory. For more canvas functions, please refer to the documentation:
Hope this gets you started!
Regards,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks Sebastian, that worked!