I have a question and/or request regarding running experiments with mWorks which allow for showing different stimuli on different monitors simultaneously.
I have a psychophysics experiment, for which I use mWorks+moog. My experiment is a social experiment, where two players play an interactive game together. Up until now, the design has allowed me to show the same series of stimuli to both subjects, which is achievable by having two monitors connected to a mac mini. However, at this point, I need to change the design to one where I need to show different stimuli on each subject’s monitor for a while at the beginning of the trial and for the remainder of the trial, show the same screen to both subjects (each subject has their own monitor).
I consulted Mehrdad about whether it would make sense to alter the design to bypass the need for this feature for now (with the cost of putting more cognitive load on subjects). However, the conclusion was to pursue the more sustainable solution of adding this feature to mWorks sooner than later. We would greatly appreciate if you could help us in adding this feature. Is it possible for us to also get an estimate of how long this process will take?
Thanks in advance for your support.
This topic has come up a few times before.
The biggest potential issue with drawing stimuli on two separate displays is that the displays won’t be synchronized. In fact, if the displays have the same refresh rate, one will lag the other by exactly half a refresh period, as the graphics hardware alternately renders first one, then the other. I don’t know if this matters for your experiments, but it’s something to keep in mind.
In the past, a nice way around this issue has been to use special hardware (specifically, a Matrox DualHead2Go) that makes two displays function as a single display. This means the displays are updated synchronously (because macOS sees them as a single display), and no changes to MWorks are required. Unfortunately, the DualHead2Go doesn’t seem to be available any more, possibly because it isn’t compatible with recent versions of macOS and/or newer video-transfer protocols, and I haven’t been able to find a replacement.
Another possible alternative that wouldn’t require changes to MWorks is to use an ultra-wide display with some kind of physical partition in the center to separate the participants. This would avoid the display-synchronization issue, but obviously it would impose limitations on your experimental setup.
If you need physically separate displays and can live with the lack of synchrony between them, then, yes, I can certainly modify MWorks to support this. In terms of your MWorks experiment code, this would likely mean defining multiple stimulus display devices and then explicitly specifying one of them when queuing stimuli or triggering an update. You would also need to define two copies of any stimulus you wanted to draw on both displays simultaneously. I would have to think about how to adapt #stimDisplayUpdate and #stimDisplayCapture to work with multiple displays. I’m not sure how long these changes would take, but I could probably have it ready to use within 3-4 months.
Let me know how you’d like to proceed!
Thanks for the detailed explanation.
The wide display will be very tricky to use. But the lack of synchrony should not be a huge issue in our experiments at this stage. In terms of timing, I’m currently in the middle of running an experiment, so I will have to think of other ways that would not require two monitors for now. But it would be great if we could have this feature at your earliest convenience.
Thanks again for your support.
I am also interested in using two displays (and can work with the difference in refresh rates). Is this something that you are actively working on?
This is on my to-do list, but I’m not working on it at present, and I don’t know when I’ll get to it.
Hi Setayesh & Lindsey,
After an unfortunately long delay, support for multiple monitors is now available in the MWorks nightly build. It works pretty much as I said it would:
Your experiment must include a stimulus display device for each display you want to use. The display_info parameter specifies the configuration of each display, using the same format as #mainScreenInfo.
Every stimulus must be associated with a specific display. This is set by the display parameter of the stimulus. A consequence of this requirement is that if you want to show identical stimuli on multiple displays, you’ll need a separate copy of the stimulus for each display.
Display update and clear actions also must specify a display, again via the display parameter.
Actions pertaining to individual stimuli (e.g. load, queue) do not need to specify a display, since the stimulus itself is already associated with a display.
An experiment can define as many fullscreen and/or windowed displays as required, although there will be practical limits to how many physical displays the graphics hardware can drive. If the hardware is struggling, you’ll see a lot of warnings about skipped refresh cycles.
For an example of multiple displays in action, please see this experiment. If you have any questions or comments, please let me know!