In order to synchronise our visual stimuli, we are using photodiodes.
This means we would like to have a square in the corner that we change when the stimuli changes.
How can we create such a square that is superimposed on top of gratings, images, colours and such?
Screen DrawRect or FillRect
I’ve tried to do this but it doesn’t work?
It just opens a black screen and freezes, I can hear the MATLAB error sound too.
Ah sorry, drawrect isn’t a thing, its FillRect or FrameRect. Check your error message, it would probably tell you
Btw., while the fillrect stuff is the only method that most people without specially supported timestamping equipment like the one from VPixx or a Videoswitcher will use, it is the poor man’s solution to the problem.
Our own VRRTest script currently uses this together with the PsychPhotodiode
driver to turn a sound-card + photo-diode into a visual stimulus onset timestamping device.
Ideally we’d have a built-in PsychImaging() task to draw suitable markers in a way that is guaranteed to always work, regardless of display mode or configuration, e.g., use of HDR or VRR modes, stereo display modes, geometric display correction, panel fitting etc. The “draw a fillrect in a corner” method only works for simple scripts on simple setups. If people wanted that, they could file a GitHub issue with a feature request and post their authentication codes from “priority support” to prove they paid a membership to contribute funding to such work. If enough of those would come together, one could add such functionality. Crowd-funding again… However, i won’t work on such a feature until enough proof has accumulated or somebody else would pay for such a feature in a different way, or i get really bored – unlikely to happen anytime soon.
Until then, dumb non-portable fragile solutions it is…
-mario