MWorks 0.8 released
MWorks 0.8 is now available. Highlights of this release include:
- MWorks Experiment Language (MWEL)
- Greatly expanded user manual
- Color management of stimulus display
- Full support for “Retina” (i.e. high-pixel-density) displays
- Improved drifting grating and white noise background stimuli
- Expanded support for Firmata devices
- Expanded support for embedded Python code execution
Note that MWorks now requires OS X 10.11 “El Capitan” or later. In addition, the MATLAB tools now require MATLAB R2015b or later.
For a full list of changes in this release, please see the release notes below.
MWEL
MWorks Experiment Language (MWEL) provides a user-friendly, programming-language-like alternative to the XML-based experiments created by MWEditor. It is designed to be read and written via a text editor and is optimized for conciseness and clarity, with minimal syntactic “noise”.
At runtime, MWEL experiments are translated into MWorks’ XML, after which they are parsed and executed in exactly the same way as traditional, XML-based experiments. This ensures that equivalent experiments written in MWEL and XML perform identically.
For more information, see the MWEL reference.
Core
Expressions
-
Added several new functions:
display_bounds
,filenames
,py_call
,py_eval
,osname
,size
, andtype
-
rand can now be called with no arguments
-
Long function names now include underscores between words (e.g.
nextframetime
is nownext_frame_time
). For compatibility with existing experiments, the old, underscore-free names are still available. -
String/string and list/list addition is now supported. In both cases, the result is the concatenation of the operands.
-
Range expressions can now include a third term (step)
-
Fixed bug in evaluation of dictionary literals
Paradigm Components
-
Added goto transition
-
Issue a real error message when a task system state has no transitions
-
Fixed bug that caused replicated protocols, blocks, trials, and lists to always have default selection parameters
Actions
-
Added clear stimulus display action
-
Added move mouse cursor action
-
Added unconditional (“else”) action, useful only in conjunction with conditional branching (“if/else”)
-
Added while action
-
Python actions (run_python_file and run_python_string)
-
Now change the current working directory to the experiment’s working path before executing Python code
-
Added
stop_on_failure
parameter -
In addition to
getvar
andsetvar
, there are now Python functions for retrieving the variable codec and registering event callbacks (details)
-
-
Added aliases for some action types
Visual Stimuli
-
Stimuli are now rendered at the full resolution of the display (by default; can be disabled in #mainScreenInfo)
-
Stimulus display now performs color management (by default; can be disabled in #mainScreenInfo)
-
Most stimuli with a
color
parameter now accept an arbitrary expression for each color component -
Many stimuli now support fullscreen drawing
-
Most stimuli with
x_size
andy_size
parameters now allow one of them to be omitted. The missing dimension is set to the value of the provided one. -
Added
redraw_on_every_refresh
parameter to stimulus display device -
Improved appearance of several stimulus types
-
Stimulus display no longer issues “updating main window display is taking longer than two frames” errors, as the warnings controlled by #warnOnSkippedRefresh are more accurate and informative and can be disabled if desired
-
-
Now computes grating and mask values dynamically on the GPU (instead of using pre-computed values stored in textures)
-
All drawing parameters can now be changed at run time
-
Added
color
parameter -
Added
compute_phase_incrementally
parameter -
Gaussian mask normalization can now be disabled
-
Fixed bug in application of masks when
x_size
andy_size
are not equal
-
-
Frame list now ensures that
ending
andended
are set only once in a given play-through -
-
Added
text_alignment
parameter -
Fixed scaling on Retina displays
-
-
-
Now generates noise on the GPU
-
Added
grain_size
,grayscale
,rand_seed
, andrandomize_on_draw
parameters
-
I/O Devices
-
Most I/O devices now have an
autostart
parameter. If this is set toYES
, the device will start I/O automatically when the experiment starts running. -
Added support for EasyEye devices
-
EyeLink no longer sends periodic sample acknowledgements to the tracker, as they aren’t useful and can eventually fill the tracker PC’s hard drive
-
-
Added support for analog input, analog output, and servo control
-
Added support for devices connected via Bluetooth low energy (BLE)
-
Prevent reporting of analog input pins and ignore other input values reported by device before start_io_device is invoked
-
-
Mouse input parameter
mouse_down
is now optional -
-
Added analog_read_timeout parameter
-
Compiled plugin no longer links to a specific version of NI-DAQmx Base
-
-
Requests sent via an Open Ephys Network Events Client now fail immediately when not connected to an Open Ephys network events module
-
Added support for RCB-LVDS devices
Other
-
Added support for resource declarations, which allow an experiment to declare explicitly the supporting files it requires (instead of letting them be inferred from component parameters)
-
Added Python file resources, which evaluate Python code when the experiment loads
-
Added #stopOnError system variable
-
Variable declarations may now omit the
type
parameter -
Added support for
type="any"
to variable_assignment -
Errors raised during experiment loading now include source location when possible
-
Removed debugger-related variables and associated functionality, as they just weren’t very useful
Applications
Client
-
Now uses
localhost
(instead of127.0.0.1
) as the default server address -
Eye window
-
Now handles fullscreen stimuli
-
Fixed terrible drawing performance under macOS 10.13
-
-
Reward window now issues an error message if reward variable is not found
-
Variables window
-
Now supports changing the data type of a variable’s value even when the old and new values compare equal (e.g.
1
totrue
) -
Fixed crash-inducing bug
-
Server
-
Now uses
localhost
(instead of127.0.0.1
) as the default listening address -
Display parameters shown in preferences window are now accurate even when those parameters are missing from
setup_variables.xml
Python and MATLAB Tools
-
Python
mworks
package now supports Python 3.6 (in addition to Python 2.7) -
Removed methods for running and stopping the application main loop from the Python conduits. (They were intended for use with matplotlib, but matplotlib already provides equivalents.)
-
Added MATLAB functions
getCodec
andgetReverseCodec
Documentation and Examples
-
Extensive expansion of user manual
-
Added some new example experiments (and removed some old, unhelpful ones)
-
Converted RSVPDemo to MWEL
-
Fixed some issues in
RSVP_analysis.m
Internals/Development
-
With the exception of some Mac-only I/O devices, MWServer has been ported to iOS
-
Reworked all stimulus-drawing code to be compatible with OpenGL 3.3 Core profile and OpenGL ES 3.0
-
Removed GLEW and shader classes
-
Replaced numeric
ScheduleTask
priorities with abstractTaskPriority
enum class -
Reworked thread priorities to align better with those of system-created threads
-
mprintf
and friends now support arbitrary-length messages -
MWComponents.yaml
files now specifyallowed_child
instead ofallowed_parent
and can include platform support info -
Refactored Xcode configuration files into variants for different platforms and target types
-
Fixed some memory leaks
-
Upgraded to new versions of several supporting libraries:
- boost: 1.62.0 ➞ 1.66.0
- zeromq: 4.1.6 ➞ 4.2.3
- msgpack: 2.0.0 ➞ 2.1.5
- cppunit: 1.13.2 ➞ 1.14.0
- matlab-xunit: 4.0.0 ➞ 4.1.0
-
Removed several supporting libraries that are no longer used (libpng, jpeg, tiff, and DevIL)
-
Removed network stream support from Scarab