I’m trying to code a visual experiment relying on frame numbers.
It is a SSVEP experiment and presenting 2 stimuli at the same time.
They are changing based on certain frequencies.
It seems that I am “missing” some frame.
My trial are 60 seconds at 60Hz so I’m expecting that the last frame of my trial would be 3600 but it is usually somewhere around 3550. From different tests, I have the impression that it is because of the size of the stimuli, even though they are quite small, they need to be load several times during the trial (4 stimuli during one trial)
I was wondering if there is a way to preload stimuli at the beginning of the trial and just called them when they are needed.
I’m using the Builder and PsychoPy v2020.1.3
I’m not sure, if that would help in your case, but did you look into the Static component?
How many different images are you using? Would it be an option for you to create an image component for every image and then hide all images, which are not relevant for that trial? That might be another way to approach your problem.
Does your Experiment Runner warn you of dropped frames?
I will look at Static component.
The Experiment runner is not warning me about dropping frames but I’m printing out the last frame of the trial, and it is not the good one (except if I keep the same stimuli for the entire trial).
I’ll also see about hiding not relevant mages. I have 4 images during trials, but if possible, I’d like to use more.
As @LukasPsy mentionned, I’m using the Builder but I also have code components so I’ll see if I can do that like this.
I’m not updating in a frame when it doesn’t change from the previous one.
I am currently working on a similar issue as OP, and am wondering if the template you linked to here is still available? I don’t seem to be able to access it - or if you have any further guidance on using code components to draw stimuli?