White noise background plugin

Hey Paul,

Here’s the MWorks plugin for generating white noise backgrounds. You’ll need to be running a recent MWorks nightly in order to use it. To install, unpack the attached zip file and move WhiteNoiseBackground.bundle in to /Library/Application Support/MWorks/Plugins/Core. (You’ll need to restart MWServer in order for it to see the plugin.)

I’ve attached an example experiment that demonstrates how to use the plugin. It generates five random backgrounds, displaying each for 2 seconds. It also reports how long each randomize_background action takes, which should give you a sense of how well the plugin performs on your setup. (On my Mac Pro, each randomization takes about 29ms.)

Please test this out and let me know if it meets your needs. If it seems like it will be useful, I’ll start including it in nightly builds.

Thanks,
Chris

Attachment: example.xml (2.08 KB)

Hey Paul and Elias,

Since the white noise background plugin seems to work reasonably well, I’ve added it to the DiCarlo lab core plugin repository and incorporated it into the MWorks build process. It will be in tonight’s nightly build.

Chris

Hey Paul,

As we discussed offline, I changed the white noise background plugin so that the generated image data is stored in memory managed by the video driver (much like regular image stimuli). In addition, the data are transferred to the video driver during the randomization action, rather than during the display update. This does increase the time spent during randomization (the 29ms figure I quoted previously is now 31ms on my machine), but it should eliminate any delays that the WNB was causing in the display update. Please re-run your tests and let me know whether the timing issues you observed have been resolved.

In addition, I modified the plugin so that it stores the image data in RGBA format. This fixes an issue where the plugin’s drawing performance was severely degraded when a color image was displayed over it.

All of these changes will be in tonight’s nightly build.

Chris