Update History

Bug fixes and documentation revisions included in all updates.

2024-12-11

  • Reverted default behaviour to loading all element content for the experiment into memory at experiment startup since the alternative was too easily causing inter-trial interval length problems. This can still be set manually using experiment/trial/element object property preload.
  • Element type programming: Trial object property profilerFileName allows using MATLAB profiler to profile element type code execution time. Element type profiler discontinued.
  • Minor additions/changes: More convenient usage for screenRecorder property minNumDigitsInFileName
  • Minor additions/changes: Tools fullPath, var2cell
  • Minor additions/changes: Tool randomChoose can output randomization indexes, like other randomization tools

2024-12-01

  • Element types dartboard, dartboardRetinotopy: Options for radial phase drift and internally balanced radial phase drift, adding to the existing angular variants
  • Element types checkerboardRetinotopy, dartboardRetinotopy: New properties apertureStep, apertureInterval for a simpler interface to setting bar/wedge/ring retinotopy by separating movement and time increments. (The old interface based on apertureVelocity still works for backward compatibility but is now deprecated/undocumented.)
  • Element types checkerboard, checkerboardRetinotopy, dartboard, dartboardRetinotopy: Improved implementation of phase drift animations, avoiding alpha blending artifacts

2024-11-24

  • Arrows and dashes images in the materials folder

2024-11-21

  • Much improved memory management—and as a side benefit, experiment startup time. Until now PsychBench loaded all element content for an experiment into memory at experiment startup. This could potentially cause memory overflow problems, at least on older systems. Now the default is to load content into memory only before the trial each element runs in, then release it after the trial. This minimizes memory usage. The tradeoff is that PsychBench needs to do more processing in inter-trial intervals. Generally this is not a problem but in case it is, loading at startup can be selected using a new property preload available at the experiment, trial, and element levels.

2024-10-28

  • Element type checkerboardRetinotopy to do bar retinotopy on a rectangular checkerboard
  • Added a materials folder containing some standard stimulus media. Currently includes images for playing cards and Wisconsin task cards
  • Element types sound, movie, sequence, checkerboardRetinotopy, dartboardRetinotopy, dotPath, bmlWalker: Property maxNumLoops allows setting a specific number of times (possibly fractional) to repeat the stimulus, after which the object ends
  • Element types sound, movie, dotPath, bmlWalker: All have property times allowing to use part of the source file/data.
  • Element types gabor, grating, checkerboard, checkerboardRetinotopy, dartboard, dartboardRetinotopy: All have properties for flicker and phase drift. Also internally counterbalanced phase drift for the four checker and dartboard types.

2024-09-05

  • Element type checkerboard: Properties for orientation and internal phase shift velocity
  • Element type programming: Options to set alpha blending, color mask directly at element_openTexture call.

2024-08-04

  • Element type grating shows a rectangular or sinusoidal grating with an option for drift
  • Element type mask: By default displays in front of all other elements, so you don't need to set property depth for anything most of the time. You can still set depth if you want to change this.
  • pb help command shows properties hierarchically
  • Element type programming: Record property this.propertySetNames lets you check which input properties the user set as opposed to left at default

2024-07-28

  • Visual method in Google Sheets automatically replicates out property dropdown menus so you don't have to copy them
  • Element type text: Show dynamic values like current trial number
  • Added tool images2movie to make a movie file from a set of image files
  • Enhancements to element types screenRecorder, soundRecorder and tool recordElements

2024-07-12

  • Visual method: Dropdown menus, quick docs (tooltips), documentation links in Google Sheets
  • Visual method: An About sheet that lets you type a long description of an experiment which will then show at the MATLAB command line when it is loaded with loadExperiment
  • Visual method: A general DOCS sheet provides links to all documentation
  • Visual method: Message trial templates
  • Visual method: Start from a growing menu of example experiments
  • Visual method: Examples now accessible at website documentation
  • Visual method: Ignore whole sheets (not just columns) using %
  • Improvements to structuring of online documentation with dropdown menus for navigation, tabs for input/record properties, quick property lists, and more

2024-05-22

2024-03-03

  • Element type screenRecorder and command recordElements: Set image/movie file size (px), specific multiple file names

2024-02-21

  • Option to use vector trial definition numbering for organizing trial definitions into groups in multiple dimensions (e.g. block + condition within block) in complex experiment designs

2024-02-18

  • Element type screenRecorder and command recordElements: Improved handling of frame rate, saving series of images in folders, revamped documentation

2024-02-08

A major update including a visual interface and broad revamp of documentation:

  • Visual interface based on tables made in any spreadsheet app (Microsoft Excel, Apple Numbers, Google Sheets, etc.). The coding method of making an experiment is unchanged and remains as an option.
  • Better handling of saved screen measurements for multiple screens
  • Better handling of keyboard input when multiple keyboards are attached
  • Interface for setting element and/or trial timing from synchronization triggers is now analogous to setting timing from without triggers: element start/end.t_sync, trial object start/end.t_ sync
  • Element type backColor: Functionality for setting background color for part of a trial is now in backColor elements. Setting broader experiment and/or trial background color in experiment/trial object properties is unchanged.
  • Getting started / Making an experiment documentation is now online
  • All documentation online is searchable
  • Element type programming manual is greatly shortened by focusing only on making visual stimulus element types, which is what 99% of people need
  • pb <><object type><> at the MATLAB command line now shows a quick alphabetical list of properties with their default values before asking to open full documentation
  • Many minor additions/changes

2023-07-04

  • Use custom GLSL shaders for any visual element with property shader

2023-06-07

  • Added element property addDisplay to add any element display pixel-wise to whatever is behind it on screen to make a superposition (sufficient graphics hardware required)
  • Element type noise: If addDisplay is enabled, noise will add to whatever is behind it on screen, typically another element. This allows the full flexibility of noise elements in adding noise to any other elements.
  • Minor additions/changes: Element property layerdepth, pixeResolutionchannelResolution (backwards compatibility with old code is preserved)
  • Minor additions/changes: Added screen object properties bufferChannelResolution, clampChannels

2023-05-25

  • Added a tutorial combining a scanner + staircase experiment
  • Minor additions/changes: element type line now has a default (just for quick display purposes)
  • Element type programming: streamlined making a quick class by making core option screen default

2023-05-16

  • Minor additions/changes: Improvements to text rendering

2023-05-14

  • Introductory tutorial video posted on the homepage
  • Element type textInput allows the subject to type text during an experiment

2023-04-29

  • Use operating system-independent key names for keyboard input. Use the command line tool showKey to see them.

2023-04-17

  • Minor additions/changes: Timing from trigger for trials (trial object start.timeFromTrigger) now automatically extrapolates to set a maximum end time for the last trial in a sequence consistent with the other trials, which can simplify writing experiment scripts

2023-04-09

  • Fleshed out system requirements information in all documentation
  • Minor additions/changes: Options to see all property names and defaults for an object type with the pb command

2023-03-29

  • Minor additions/changes: Flag to apply small angle approximation tanθ ≈ θ in tools deg2px, px2deg

2023-03-26

  • Element type picture: Added ability to show multiple pictures either arranged spatially or in a sequence across time
  • Added element types checkerboard, dartboard
  • Important bug fixes to pb_update
  • Minor additions/changes: Added screen distance unit <cds>"deg-"<cds>, which is degrees visual angle with small angle approximation tanθ ≈ θ applied. You can use this if you need degrees that scale linearly with regular distance units like cm, px, etc.
  • Minor additions/changes: recordElements: option to set recording duration directly in elements

2023-03-14

  • Element type programming: Use custom index properties in element_setShared, element_doShared

2023-03-10

  • Added property colorMask for all visual elements, allowing to modulate RGB color channels for an element display
  • Added property filterGrayscale for all visual elements, allowing fastering filtering (e.g. convolution) for grayscale elements
  • text elements now have transparent background by default

2023-03-06

  • Added element type polygon

2023-02-26

  • Added tool recordElements to make recording/capturing any visual elements to single images, series of multiple images, or movie files easy. Uses screenRecorder elements under the hood.
  • Property backColor for visual elements allows tweaking how alpha blending for antialiasing works on some elements

2023-02-20

  • Added element type gaussian for a Gaussian blob
  • Added element type mask for a rectangular/elliptical/Gaussian occluding aperture
  • Element type bmlWalker: Added property showMarkerNums to give a static display with marker dots replaced by numbers. Useful if you want to visualize what numbers correspond to what markers in a motion data set.
  • All element type documentation pages now have a uniform section near the top documenting whether and how objects of the type can end on their own (without needing to set property end). Before this was kind of mixed into the documentation in different ways and different places across types. This change hopefully makes this important factoid easy to check for any type.
  • Element type programming: Type script tool element_openTexture replaces element_openDrawTexture and covers both opening blank textures for draw commands and loading image matrixes onto textures.

2023-02-15

  • Element types movie, sound, dotPath, bmlWalker: Added properties to show specific time ranges in the source file/data
  • Element type programming: Improved support for deprecated properties.

2023-02-10

  • bmlWalker element type: Can load marker motion data from .c3d files. Can use property nn_markers to only use some markers in the data.
  • showElements: option to group elements horizontally or vertically when showing multiple elements at a time

2023-02-07

  • New timing option: Element end.cancel tells the element not to run anytime after the condition if the element has not started yet (as opposed to the default, which is ignore the end condition if the element has not started yet)
  • New timing option: Trial object property end allows setting end conditions for a whole trial
  • Added defaults for inputs to tools deg2px and px2deg to make them more automatic and easy
  • Minor additions/changes: tweaks to pbLog.txt file output for debugging element timing

2023-01-28

  • Core visual option to set different gamma decoding for different elements. Also a special gamma option for filters (intensity, contrast, convolution, noise) to apply them in luminance space as opposed to gamma-encoded RGB space. These complement the existing option to set the graphics card gamma for the whole display. In all cases you can use a lookup table or simple power law gamma.
  • Core visual option to use pixel resolutions (bit depths) > 32 bit RGBA for an element display
  • Option in showElements to show multiple elements at the same time instead of consecutively
  • Added distance unit wwh which scales x coordinates by window width and y coordinates by window height in a vector or matrix value, e.g. <cd>[1 1]<cd> = window size.
  • Easier and more flexible interface and other improvements for screenRecorder elements

2023-01-16

  • Core visual option for contrast scaling
  • picture element options for grayscale, custom image transformation code
  • movie element option for grayscale
  • screenRecorder elements can be set to find and record the display area of a specified element
  • Element type programming: function element_predraw for lower latency drawing of static displays; deprecate properties

2022-12-10

  • Option to not shuffle MATLAB's random number generator for all randomization tools randomNum, randomOrder, etc.
  • Option to repeat random patterns by using a seed for MATLAB's random number generator in noise and bmlWalker elements. Tutorial 7 (stereo display) updated to show a random dot stereogram using this feature.
  • Options to use a rectangular distribution and quantize intensity (e.g. binary intensity) in noise elements

2022-12-07

  • Use property vary to set drift/movement on any time-dependent path for any visual element, and more generally to vary element properties in real time when the element is running

2022-11-25

  • Added element type noise for white Gaussian noise.
  • Added property noise to picture elements to apply noise using any of the options available in MATLAB imnoise.
  • Added record property frameRate to trial objects, recording instantaneous frame rate for all frames in a trial.

2022-11-22

  • Added element type screenRecorder to record/capture displays to a single image file, sequence of multiple image files, or movie file

2022-11-15

  • Option to set trial repetition and order directly in trial definitions with an optional trial run number input to addTrial, instead of using setTrialList
  • Option to save and reuse exact random scrambling patterns across bmlWalker elements

2022-11-10

  • Important bug fixes to functionality in MATLAB versions earlier than R2021a (down to R2017a): pb_install, pb_update, results csv file writing, pb_prefs
  • Minor additions/changes: catch scripts can now use properties changed or added in a script that halted on error (element type programming)

2022-11-03

  • Added element type profiler. This runs the MATLAB code profiler for code debugging and assessment.

2022-10-29

  • Results also write to a .csv file for analysis in apps other than MATLAB
  • Use a flag input to runExperiment to test the experiment by running it in auto-response mode to simulate a subject run unattended

2022-10-11

  • A family of helper tools for working with strings/substrings (strcontains, strstarts, strends, and i variants)
  • keyPress elements now default to using Psychtoolbox KbCheck for responses, keyboard queue for triggers

2022-09-21

  • All reference documentation (core and element types) is now online. Non-reference documentation remains in /docs but is also available online.
  • Revamp of MATLAB help: All documentation is now hyperlinked, including all function help text, Contents.m files summarizing files and folders, all options in pb_prefs, and the pb command menu. Added files summaries for /tools and /element type programming/basic. Now uses the standard MATLAB ver command for version information.
  • Compatibility options which are especially useful to avoid problems that Psychtoolbox experiences on Macs. See pb_prefs → screen tab → sync tests and compositor.
  • Save and resume any experiment run quit part-way through (type help runExperiment for details)
  • Any property that uses deg visual angle can also use px, wh (window height), ww (window width), or cm units using <cd>{value, <cd><cds>"unit"<cds><cd>}<cd> syntax
  • All visual element types now have all core visual options (rotation, alpha, convolution filter, etc.). (Previously some did not implement these options, e.g. line, linearDotMask, etc.)
  • Added intensity scaling as a core visual option
  • New input options to element_draw, _redraw for element type programmers
  • Minor additions/changes: Optionally use one number for symmetric dimensions in size properties across many element types (e.g. one number for a square side length as opposed to a rectangle). Added fit/fill/px sizing options to element types picture and movie. Can set Gaussian convolution filter width. Can specify separable custom convolution kernels. And more.

2022-07-29

  • Graphical interface for setting general preferences (default property values for trial, experiment, and device objects) using command pb_prefs. Especially useful for easily setting common parameters like Psychtoolbox sync tests; experiment window size; sound device, sample rate, and quality; etc.
  • Results output is now organized by object, not object class. More readable and each trial always uses one row.
  • Second results output now uses nan and <><missing><> values where possible to preserve numeric and string arrays for easier analysis
  • Option to set trial repetition and order directly in trial definitions using trial object property n. An alternative to the command setTrialList for unusual cases.
  • Added tools randomDistribute, randomDistributePerms for use in experiment scripts. Added an output to randomOrder to facilitating inverting order.
  • Added element type dotPath: arbitrary dot motion based on (x, y) time series data
  • Minor additions/changes: Default volume = on for movie elements

2022-06-29

  • Sound input functionality using Psychtoolbox PortAudio, and element type soundRecorder to record sound to file
  • A sound-based Stroop demo where the subject responds verbally
  • Minor additions/changes: Set a break interval in a repeating display for element type bmlWalker

2022-06-20

  • Added support for Cedrus response pads, and element type cedrusPress
  • Streamlined framework for devices (screen, PortAudio, keyboard queues, ports, button boxes, etc.) in element type code
  • Reduced start latency of keyPress, portSender, portReceiver, and other elements that use keyboard queues or ports

2022-06-09

  • All response handler elements can now register triggers as well as record responses from subject, allowing you to use any response handler modality for triggers
  • Element type keyPress now uses a keyboard queue by default for better time measurement precision and never missing a key press. Polling functionality (Psychtoolbox KbCheck) is still available as an option.
  • Merged element type keyReceiver into keyPress
  • Add latency and buffer size properties to speaker device objects, which allows control over those technical settings in Psychtoolbox PortAudio. This is necessary to prevent crackling on some systems.
  • Added multisampling (general antialiasing) option to screen device objects

2022-05-31

  • Added a second results output from runExperiment which contains results compressed into a numeric matrix or other arrays for extracting/plotting/analyzing with MATLAB functions. The first results output remains easily viewable as a table in MATLAB's visual variable editor.
  • Added an option in addTrial to define distinct trial groups by number, which can be useful in complex experiments
  • Stroop and biological motion demo experiments

2022-05-19

2022-05-17

  • Simplified the interface for setting timing from sync with a scanner or other external device
  • Minor additions/changes: Fast step sizes now default to regular step sizes for fixed step staircases

2022-05-14

  • Can now use any static visual elements in pre-trial intervals, not just fixation crosses

2022-05-07

  • Minor additions/changes: Can now load motion data directly from files for bmlWalker elements. Faster opening of bmlWalker elements when many there are many elements using the same motion data in an experiment.

2022-05-06

  • PsychBench 1 beta