Overview

Psychtoolbox interfaces between Matlab or Octave and the computer hardware. The PTB core routines provide access to the display frame buffer and color lookup table, reliably synchronize with the vertical screen retrace, support sub-millisecond timing, expose raw OpenGL commands, support video playback and capture as well as low-latency audio, and facilitate the collection of observer responses. Ancillary routines support common needs like color space transformations and the QUEST threshold seeking algorithm.

Psychtoolbox has many active users, an active forum, and is widely cited. PTB-3 is based on the deprecated Psychophysics Toolbox Version 2 with its Matlab C extensions rewritten to be more modular and to use OpenGL on the back end. The current version supports Matlab R2012a+ and Octave 3.8 and later on Linux, and Octave 4.2 on MacOSX, and Windows.

Psychtoolbox News

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.14 “Kalsarikännit” was released at 11th June 2017. As usual, the complete development history can be found in our GitHub repository. The release tag is “PTB_Beta-2017-06-11_V3.0.14”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2017-06-11_V3.0.14

This release mostly contains bug-fixes, small improvements and minor new features.

Btw. I’ve observed on some MS-Windows systems that UpdatePsychtoolbox - or more accurately the underlying svn Subversion command line tool - didn’t do anything. It claimed a successfull update, but didn’t update anything. This was also reported once in our Issue tracker. I don’t know if this is a Windows specific svn bug, or something more widespread. Anyway, if UpdatePsychtoolbox doesn’t upgrade/change about 60 files then something went wrong, and you’ll need to use DownloadPsychtoolbox for a completely fresh download. Let us know if this happens on other systems than Windows.

New features and improvements:

All operating systems:

  • Fix PsychImaging ‘EnableCLUTRemapping’ task. Did only work in scripts, not functions, due to a bug introduced in last beta. Also had off-by-one indexing errors for > 256 slot LUTs. CLUTMappingBugTest.m allows to test for proper functioning of this now, ie. verifies the bug-fix.

  • Fix use of Screen(‘PutImage’) when Psychimaging NormalizedHighRescolorRange task is used. PutImageTest.m verifies the bug fix.

  • Improve Screen(‘LoadNormalizedGammatable’) compatibility with functions that expect return values for loadOnNextFlip setting 2 – where those return arguments are meaningless, but return them anyway with faked values to simplify user scripts.

  • NetStation() go back to January 2017 version, as the version from the latest beta contains show-stopper bugs curtesy of myself and Justin Ales. This needs more work before a proper update to NTP synced synching is possible.

  • Remove all traces (and users) of the long dead SerialComm() serial port driver for 32-Bit Matlab on OSX. This wasn’t used by default by anything, and everything has higher quality IOPort based implementations.

  • Final fixes and prep work for the ready-for-release, but unreleased, new OculusVR1 driver for Oculus HMD’s which need the 1.x runtime.

  • Add compat code to the general VR handling routines like PsychVRHMD, and add some compat routines for functions freshly exposed on the Oculus-1 driver.

  • Pimp some VR related demos a bit.

Linux:

  • Provide anti-aliased round dots on RaspberryPi via Screen(‘DrawDots’). Raspian can do this now with its current Mesa vc4 driver version.

  • Update “help SyncTrouble” and “help HybridGraphics”, as well as some flip warning messages, to reflect our current knowledge about this stuff on Linux.

  • Fix NVidia Optimus detection on Linux with the proprietary NVidia driver. Turns out our detection code only worked by chance on the NVidia 840M laptop by chance. Increasing hardware samples to n=2 with the Razer Blade 2016 showed it was broken. Now works (hopefully) on all such laptops.

  • XOrgConfCreator: Add automatic setup code for 30 bit native framebuffers (Intel, NVidia, amdgpu-pro), and setup for special 16 bpc framebuffer experimental code on Linux + AMD Sea Islands gpus.

Windows:

  • Make ColorCal2() driver work on Windows by use of virtual COM port, by a dedicated code path.

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.14 “Spooling up the spinner!” was released at 12th May 2017. As usual, the complete development history can be found in our GitHub repository. The release tag is “PTB_Beta-2017-05-12_V3.0.14”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2017-05-12_V3.0.14

This release contains the accumulated work of 4 months, 200 separate improvements in 176 files, changing about 27000 lines of code. Major work was done under the hood for Linux improvements and prep work for VR HMD support improvements.

Btw. I’ve observed on some MS-Windows systems that UpdatePsychtoolbox - or more accurately the underlying svn Subversion command line tool - didn’t do anything. It claimed a successfull update, but didn’t update anything. This was also reported once in our Issue tracker. I don’t know if this is a Windows specific svn bug, or something more widespread. Anyway, if UpdatePsychtoolbox doesn’t upgrade about 176 files then something went wrong, and you’ll need to use DownloadPsychtoolbox for a completely fresh download. Let us know if this happens on other systems than Windows.

New features and improvements:

All operating systems:

  • New function Screen(‘ConstrainCursor’); for Linux/X11 and MS-Windows: Allows to constrain cursor movements to subareas of an onscreen window. Not supportable on OSX due to lack of OS facilities.

  • DrawFormattedText: Optionally return per-word bounding boxes to define AOI’s, e.g., for text perception + eye tracking studies.

  • Brand-new DrawFormattedText2() function and DrawFormattedText2Demo by Diederick Niehorster. More flexible in its formatting and text transformation options than DrawFormattedText. This is considered beta quality for now, bugs may linger in this large new piece of code. I added the ability to return per-word bounding boxes, like in DrawFormattedText, but that code has the limitation that it doesn’t yet work with complex compound transforms.

  • VideoIPWebcamCaptureDemo: Add sample mode for screencasting. Setup code and example gst-launch lines for live screen-casting from Linux X11 (tested) or Windows (untested) to PTB’s videocapture, so random windows from the desktop can be live-displayed into a PTB fullscreen onscreen window.

  • Screen(‘GetImage’) can now automatically handle multi-sample anti-aliased drawbuffers without need for manual intermediate steps for readback of such buffers as MSAA resolved images.

  • PsychImaging ‘PseudoGray’ task can now also boost 10 bpc and 12 bpc framebuffers by up to 2.8 bits in grayscale precision in principle, although this is only very lightly and incompletely tested due to lack of suitable native 10/12 bpc display devices.

  • New PsychImaging ‘UseSubpixelDrive task to allow to drive special medical imaging high precision grayscale displays with high precision, e.g., the “Eizo RadiForce GS-521”.

  • New GetSecs subfunction [getSecsClock, wallClock, syncErrorSecs] = GetSecs(‘AllClocks’); returns not only regular GetSecs() timestamp as ‘getSecsClock’, but also a wall clock timestamp ‘wallClock’ in UTC world time. This ‘wallClock’ time can be OS synchronized to external time references, e.g., via NTP, to synchronize it with the clocks of other computers. Measures seconds since some reference point, 1.1.1970 00:00:00 UTC on Linux and OSX with microsecond resolution, seconds since 1.1.1601 00:00:00 UTC on MS-Windows with millisecond resolution. This may come in handy for interoperation with EGI Netstation EEG systems.

  • Some improvements to PsychColorCal routines by the Brainard lab.

  • Various fixes and small improvements.

  • Large amount of under the hood infrastructure prep work for supporting new VR HMD devices, but no support for new devices yet. Check for potential regressions if you use Psychtoolbox Oculus Rift DK1/DK2 support!

OSX:

  • help PsychtoolboxKernelDriver: Update setup instructions / help text for OSX 10.11+.

  • Document 10/11 bpc framebuffer mode behaviour on OSX 10.11/10.12, improve setup code. Thanks to Denis Pelli and Hoermet Yiltiz for testing on their machines.

  • Some fixes for MacBookPro 2016’s brokeness.

Windows:

  • Screen(): Disable the magic “@” master abort key.

  • Better support for compose/compound/dead keys handling for GetChar / KbEventGet by Diederick.

  • PsychRTBox: Fix box serial port probing for Octave on Windows. Although Xiangrui Li found an even better solution, which is not part of this update yet.

  • Fix Optical() brokeness due to compatibility bugs introduced by MS into Windows-7. Credit: Andreas Widmann.

Linux:

  • Improved hybrid graphics laptop support: Detail work and improved setup documentation for hybrid graphics with the open-source drivers (Intel + AMD, Intel + NVidia), and verified that NVidia Optimus (Intel + NVidia) also works ok with NVidia proprietary drivers, as tested on Ubuntu 17.04 “Zesty Zappus”. Add extra setup instructions specifically for NVidia + Ubuntu 17.04. Tested on two separate Optimus laptops, a Lenovo Ideapad Z50-70, and a Razer Blade 2016 with GeForce Pascal.

  • Improved compatibility with amdgpu-pro hybrid graphics driver, for the very few cases where that driver is beneficial over the standard AMD open-source drivers, e.g., certain 144/165/240 Hz refresh rate displays.

  • Improved 11 bpc / 16 bpc native framebuffer support for AMD gpu’s, and better setup instructions.

  • NVidia NVision 3d stereo emitter support for NVidia stereo goggles on regular consumer class GeForce gpu’s, AMD gpu’s and Intel gpu’s should now work with more emitter models, especially - as tested - with some NVision-2 emitters, whereas before only original NVision-1 emitters worked.

  • GetMouseWheel() now also works on Linux.

  • Improve GetMouse() coordinate handling on multi-x-screen.

  • Make PR-670 photometer work out of the box on Linux by adding workarounds for that devices broken firmware. Note: PR-670 remains broken on OSX 10.11, but seems to work on OSX 10.12.

  • Improve default keyboard selection if exotic or broken keyboard like devices are connected.

  • Various improvements, bug fixes, too many to mention.

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.14 “Standby FTL!” SP1 was released at 3rd January 2017. As usual, the complete development history can be found in our GitHub repository. The release tag is “PTB_Beta-2017-01-03_V3.0.14”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2017-01-03_V3.0.14

This is the initial v3.0.14 release. It drops all support for MacOSX 10.10 Yosemite. Psychtoolbox will not work at all anymore on OSX 10.10. Going forward only 10.11 El Capitan and 10.12 Sierra are expected to work, but only 10.12 Sierra is officially supported.

This release also cancels support for 64-Bit Octave 4.0 on OSX and Windows and introduces support for 64-Bit Octave 4.2.0 on OSX and Windows.

New features and improvements:

All operating systems:

  • Various help text updates, some refinements to some demos.

OSX:

  • Terminate support for OSX 10.10 “Yosemite”. Psychtoolbox will no longer work at all with 10.10.
  • Without OSX 10.10 our own kernel driver based 10 bit framebuffers on AMD graphics cards won’t work anymore, as Apple sabotaged this functionality on 10.11 and later. Therefore remove our own 10 bpc support code.
  • Introduce support for OSX 10.11.4+ native 10 bit framebuffers on supported Apple hardware. This is untested due to lack of suitable hardware, but Apple docs claim it should work “under some conditions” on the 2013 MacPro with “suitable displays” and on the late 2014 and late 2015 iMac 27 inch Retina 5k models.
  • OSX 10.12 “Sierra” is now the only officially supported and lightly tested Apple OS, although PTB should continue to work on 10.11.
  • Implement a workaround for the MacBook”Pro” 2016 touchbar brain-damage. This will probably make KbCheck and KbQueues work again, but while the problem has been diagnosed, the fix is so far untested.
  • Some new workarounds for OSX sync failures on some iMac Retina 5k models, likely only minimally effective.
  • Terminate support for 64-Bit Octave 4.0.
  • Introduce support for 64-Bit Octave 4.2. Octave 4.2 is currently available via the HomeBrew and MacPorts package managers. Psychtoolbox has been only tested with Octave-4.0.0 from HomeBrew. You need to install/compile Octave from source if you want functional audioread/audiowrite functions for reading and writing wav audio files, e.g., via

    brew install -s octave –with-docs –with-java –with-sndfile

Windows:

Linux:

  • Some compatibility fixes to XOrgConfCreator on Linux + Matlab + NVidia by Ian Andolina.

News Archive