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.0 on MacOSX, and Windows.

Psychtoolbox News

Psychtoolbox beta updated

kleinerm

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

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2018-05-26_V3.0.14

New features and improvements:

All operating systems:

  • Fix a crash on Linux or MacOSX with Matlab R2018a if CTRL+C is pressed while KbQueues are active.
  • PsychtoolboxPostInstallRoutine: No longer perform any online registration.
  • No longer prompt for any participation in the 1st Psychtoolbox user online survey.
  • Various help text updates. Various minor updates in debugging output.
  • Ask(): Fix formatting / text alignment. Fix by user jonasvannijnatten.
  • psychrethrow(): Handle MException objects.
  • EyelinkGazeContingentDemo: Fix issues due to recent Matlab case sensitivity.
  • New types of procedural shaders by Ian Andolina: Add smoothed edge disc and sine gratings, add square wave grating.
  • LoadOBJFile: Fix error if texture coordinates or normal vectors are missing. Reported and partially fixed by user wangsen131. Additional fixups by kleinerm
  • PsychPortAudio: Handle lifecyle issues and some other bugs. Fixes contributed by user bmtran. Some minor other improvements by kleinerm.
  • Screen: Fix Screen(‘Close’, window) logic.
  • Screen: No longer report ‘dacbits’ in Screen(‘ReadNormalizedGammaTable’) - it’s bs. There’s no way we can faithfully detect and report it, so just report 0 from now on as “I don’t know”. Better no info than wrong info.
  • Fix creation of procedural shaders on multi-window, multi-screen setups under certain corner cases.
  • PsychColorimetric: New function ComputeDE2000_Lab by David Brainard’s lab. Other minor improvements, e.g., to SplineSpd().
  • Quest: Improvements by Denis Pelli: “Enhanced to allow for monotonically DECREASING psychometric function. Formerly we assumed it was monotonically INCREASING. Now it can be either. This new feature has not been extensively tested.”. Some optional animated graph for QuestDemo.
  • New ProceduralSmoothedDiscMaskDemo by Ian Andolina.
  • Small “help GStreamer” fix.
  • Welcome splash is no longer asking for donations.

Linux:

  • XOrgConfCreator improvements:
    • Handle multi x-screen setups better if modesetting-ddx video driver is used, as on latest Ubuntu 16.04.3+ LTS systems for Intel graphics chips.
    • Force the NVidia proprietary graphics driver to report/allow VR HMDs instead of hiding them. By default such HMDs get hidden, unless a proper xorg.conf is created to force them to show up.
    • Allow selection of color depth 30 on a per-x-screen basis. Not needed for AMD gpu’s, but useful for NVidia proprietary and for future depth 30 support on NVidia open-source and Intel open-source drivers.
  • Screen: Allow logging and delay of NVision3D trigger timing. setenv(‘PTB_NVISION3D_DELAY’, ‘SECONDS’); allows to delay trigger emission by SECONDS after vblank, in case we need to phase-shift the trigger emission. This will also swap emission of left-eye and right-eye triggers. This temporary debug setting should allow to better find out how to get this actually working ok’ish.

  • Build fixes for latest Debian upstream.

  • Minor improvements to low-level gpu control code.

  • Add AMD DCE12 as supported display engine for low level functions - Untested due to lack of hardware, assumed to work like older generations DCE10/11.

  • Screen: Disable GstDeviceMonitor/DeviceProvider support on Linux. It only provided minor to no benefit so far, we can easily do without it. This removal allows to build PTB on Ubuntu > 14.04 in the future while hopefully retaining backward compatibility for basic features to Ubuntu 14.04 for its remaining 1 year life-span.

Windows:

  • Timeglue: Improve single-core locking on Windows. This to avoid a potential failure in very rare circumstances. In fact, only one failure incident was reported in over 10 years, not reproducible, so this may be a pointless improvement, but who knows?

OSX:

  • GetMouseWheel(): Fix potential compatibility issue with some mice when using this low-level trickery. May or may not help. May or may not hurt.
  • GetKeyboardIndices/GetKeypadIndices: Filter out locationID zero on OSX. Just like default logic for KbCheck does, to deal with the broken MacBookPro 2016+ touch-bar.

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.14 “Yellow Alert!” was released at 8th October 2017. As usual, the complete development history can be found in our GitHub repository. The release tag is “PTB_Beta-2017-10-08_V3.0.14”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2017-10-08_V3.0.14

New features and improvements:

All operating systems:

  • PsychPowerMate: Add ‘List’ function for enumerating multiple PowerMates, and the ability of ‘Open’ to select among them. Add timeout ability to ‘WaitButton’ and ‘WaitRotate’. Add a ‘wait for button release’ ability to ‘WaitButton’. Help text updates.
  • PsychtoolboxConfigDir: Cleanups and error handling improved.
  • Screen(‘ConfigureDisplay’,’Brightness’) - Fail gracefully on pure brightness queries: Return a -1 “unsupported” status code on unsupported setups instead of error out.
  • Screen: Make blue-line stereo sync lines 3 scanlines high. Increases robustness against slightly buggy display drivers and picky stereo goggle sync equipment.
  • NetStation: Add response check to GetNTP synchronization. For improved error handling. Contributed by Andreas Widmann.

Linux:

  • Research-grade Multi-Touch touchscreen and touchpad support. “help TouchInput” for a starter. MultiTouchMinimalDemo.m for a simple demo. MultiTouchDemo.m for an advanced demo.
  • PsychHID: Motion and valuator change recording in KbQueue event buffers, e.g., for time-stamped background recording of mice/joysticks/gamepad/controller movements etc.
  • PsychHID: Add new KbQueueCreate flag 4 for raw motion event delivery. Mostly useful for capturing raw motion dynamics of pointing devices or joysticks.
  • PsychPowerMate: New functions for background recording of knob turns and knob presses. Also acts as a demo for how to use the new motion/valuator change recording of PsychHID.
  • help Hybridgraphics simplified, now that Ubuntu 16.04.3-LTS makes many things simpler.
  • Improve some timing related info/warning messages.

Windows:

  • help DrawTextPlugin: Give more detailed troubleshooting instructions for Matlab + Windows.

OSX:

  • help PsychtoolboxKernelDriver: Update for Apples latest train wreck.
  • PsychHID/DaqDeviceIndex: Improve USB-HID interface detection. This may make DaqDeviceIndex work more reliable on the train wreck.
  • Add new warning message when running on OSX with broken AMD graphics, so people don’t waste time trying to get reliable timing on an unfixable setup. Clarify various other mostly OSX related warning messages.

Psychtoolbox beta updated

kleinerm

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

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/PTB_Beta-2017-08-19_V3.0.14

New features and improvements:

All operating systems:

  • ConfirmInfo/TwoStateQuery: Remove brain-dead, broken GUI mode on current Matlab R2014b+, use sane text mode instead.
  • Helptext updates for KbName and DrawTextPlugin.
  • Make glShaderSource() command more robust against awkward/funky formatted GLSL shader code.
  • Fix ClockRandSeed() for compatibility with Octave, and with current Matlab.
  • Some improvements to ComputeCIEConeFundamentals.m by David Brainard.
  • Add new optional ‘GetNTPSynchronize’ command to NetStation(), which allows to NTP synchronize event timestamps on suitable EGI Netstation systems for much higher timestamp accuracy. Successfully tested on a 400 series amp with Linux as client and MacOs Netstation amp machine. Also a new helper function GetNTP() which is an OS independent simple NTP client. Code contributed and tested by Andreas Widmann and Urte Roeber, with helpful input by Justin Ales.
  • Add matching/selection of devices by productName, serialNumber or locationID to all of GetKeyboard/Mouse/Gamepad/KeypadIndices, ie. wherever this was missing.
  • VideoMultiCameraCaptureDemo: Make it write movies in a format that even Apples dumb Quicktime player can comprehend, similar to ImagingStereoDemo.

Linux:

  • PsychOpenHMDVR driver for virtual reality headsets (HMDs) supported by OpenHMD. See “help PsychOpenHMDVR” for help and setup instructions. OpenHMD currently supports the Oculus Rift DK1/DK2/CV1, the HTC Vive, the Sony PSVR, and some more exotic devices. No controller input is supported so far. Only head orientation/rotation tracking supported, no absolute position tracking, as that is wip in OpenHMD. Also less sophisticated latency/blur compensation. The driver is so far tested with the Rift DK2 and Rift CV1 on standard PC and the DK2 on RaspberryPi-2. Use of the CV1 requires running openhmdkeepalivedaemon.
  • Clear screen in multi-x-screen config properly to black in stereomode 4/5 at window close.
  • Support transparent windows on 10 bpc / 30 bit color depth setups.
  • Handle use of software renderer wrt. to stimulus timing a bit more intelligently - avoid false warning.
  • VRHMDDemo: Allow selection of HMD via optional deviceIndex parameter.
  • KbQueues: Fix failure to detect key events on multi-x-screen setups if mouse pointer is on other screen than X-Screen 0.

Windows:

  • Handle backwards compatibility bugs in AMD’s proprietary display drivers for Windows, which cause failure to load identity lut’s in LoadIdentityClut() or failure to disable digital display dithering when requested to do so. Investigated and fixes contributed by Mark Repnow.

  • Some build system improvements and code formatting cleanups by Diederick. Also removal of dead tests for ancient Matlab 4/5 bugs on ancient MacOS 8/9.

News Archive