MWorks 0.10 released

September 8, 2020 Posted by Christopher Stawarz


MWorks 0.10 is now available for Mac and iPad. Highlights of this release include:

MWorks 0.10 requires a Mac running macOS High Sierra (10.13) or later or an iPad running iPadOS 13.7 or later.

For a full list of changes in this release, please see the release notes below.


Visual Stimuli

  • Added render actions stimulus, which simplifies animation of other stimulus types

  • Most stimulus types now have blending parameters that allow detailed control over color and alpha blending

  • Image file

    • Added option to disable image load/unload messages

    • Blending is now handled correctly, even if the image file has an alpha channel

  • Movie and frame list stimuli with no frames now issue an error when starting to play

  • In previous releases, enabling redraw_on_every_refresh caused the stimulus display to continue updating even when the experiment was paused. This is no longer the case; display updates are now paused when the experiment is paused and resume when the experiment resumes.

  • Layer stimulus now renders in to a half-precision float, RGBA framebuffer texture. This resolves a potential, subtle blending issue on Mac’s with Intel graphics hardware.

  • Fixed an intermittent crash in video stimulus

  • MWorks now prevents the creation of two stimuli with the same name

I/O Devices

Expression Parser

  • Added support for variable and expression interpolation in string literals

  • Added functions acos, asin, atan, atan2, date, and fmod

  • Modulus (%) operator now warns when truncating either of its operands

  • $varname and ${varname} are now accepted as variable names (and are equivalent to plain varname)

Event Files

  • Added support for automatic, experiment-side data file management via the new data file device (more info)

  • When creating an event file, MWorks now prepends the standard data file path only if the user-provided filename is not itself an absolute path. This allows users to store event files in any directory, as long as they provide an absolute path as the filename (more info).

  • Resolved potentially severe reduction in data file write speed when system is under heavy I/O load

  • Removed #announceStimulus system variable, as its values were 100% redundant with #stimDisplayUpdate and served only to increase event file size


  • Task system state now forbids the placement of actions after transitions. (Previously, actions placed after transitions were silently moved to the end of the action list and always executed before transitions were evaluated.)

  • Wait for condition can now execute outside of the main state system (e.g. in a scheduled action)

  • MWEL now accepts $id (in addition to ${id}) as an identifier part

  • MWorks now prevents the creation of two variables with the same name


  • Removed MWEditor along with all related files and documentation. (Existing XML-based experiments remain fully supported, but new experiments should be written in MWEL.)

  • MWorks for iPad now supports Dark Mode


  • Added Image Viewer window, which enables viewing of images logged by a face recognizer

  • Python bridge window

    • Now requires the user to specify the Python executable to invoke (must be Python 3.5 or later)

    • Now sets the PYTHONPATH environment variable to /Library/Application Support/MWorks/Scripting/Python

    • Now truncates displayed script names at the beginning (instead of in the middle or at the end)

    • Now limits length of recent Python scripts list

  • Variables window now displays <binary data> in place of values that cannot be converted to text

  • All plugin windows now include the server address in their title

  • Added tooltips containing the entire, non-truncated paths of the experiment and data file

  • Saved variable set names are now sorted

  • Now limits length of recent servers list

Python and MATLAB Tools

  • Python plugin now embeds Python 3.8 (instead of 3.7)

  • Python plugin now supports ctypes on both Mac and iPad (although its usefulness on an iPad is very limited)

  • Python tools now support Python 3.5 and later, but no longer support Python 2

  • Python tools no longer require NumPy but still interoperate with it when available

  • Added _stop_main_loop method to Python conduit classes

  • Added context manager methods __enter__ and __exit__ to Python conduit classes; the former initializes the conduit, and the latter finalizes it

  • Added dump_codec and dump_events scripts to Python tools. They are installed in /Library/Application Support/MWorks/Scripting/Python.

  • MATLAB tools now require MATLAB R2017b or later


  • Upgraded to new versions of many supporting libraries:

    • boost: 1.69.0 ➞ 1.73.0
    • cppunit: 1.14.0 ➞ 1.15.1
    • msgpack: 3.1.1 ➞ 3.3.0
    • numpy: 1.16.2 ➞ 1.19.1
    • openssl: 1.1.1b ➞ 1.1.1g
    • python: 3.7.3 ➞ 3.8.5
    • sqlite: 3.27.2 ➞ 3.32.3
    • zeromq: 4.3.1 ➞ 4.3.2
  • Added libffi 3.3 and libusb 1.0.23 to supporting libs

  • Removed matlab-xunit from supporting libs

  • Removed all MWLibrary.xml files

  • Reworked build and installation to avoid the need to change permissions on system directories. Updated build instructions accordingly.

  • macOS installer package is now notarized

  • macOS and iOS builds now use separate code signing config files

  • C++ code is now compiled using the C++17 language standard

  • All Objective-C/Objective-C++ code now uses Automatic Reference Counting (ARC)

  • Added MWorksSwift framework, which aims to enable development of MWServer, MWClient, and client plugins in Swift (and Objective-C), without requiring any C++ code

  • Moved embedded Python out of PythonPlugin and in to the new MWorksPython framework (which PythonPlugin uses)

  • MWEL scripts now invoke a custom, private Python executable (which links against the MWorksPython framework)

  • Addressed issues raised by Python test suite on iOS

  • NumPy is no longer built against Accelerate, as it seems to make things worse rather than better

  • Replaced all usage of /bin/bash (and some usage of /bin/sh) with /bin/zsh