Psychtoolbox interfaces between Matlab or Octave and the computer hardware. The PTB core routines provide high performance 2D and 3D graphics with the highest color and luminance precision, timing precision and control. This both on standard displays, as well as with special visual stimulators, and with High Dynamic Range displays, and with a wide variety of Virtual/Augmented Reality devices. They expose raw OpenGL commands, support video playback and capture, as well as low-latency precisely timed audio playback and capture. They facilitate the collection of observer responses with high timing precision via various input modalities like keyboard, mouse, game controllers, multi-touch touch screens, response boxes, gaze trackers, and digital / analog i/o equipment. Ancillary helper routines support common needs like color space transformations, calibration, and psychometric procedures like, e.g., the QUEST threshold seeking algorithm and others.

Various 3rd party frameworks and higher level toolboxes are built on top of Psychtoolbox to make implementation of research data collection especially easy in specific sub-domains of neuroscience. For beginners or certain domains there also exist user friendly 3rd party graphical user interfaces, e.g., PsyBuilder.

You can also run some of your Psychtoolbox studies online, via VPixx Labmaestro service under https://vpixx.com/products/labmaestro-packngo.

Psychtoolbox has many active users, an active forum, and is widely cited. The current version supports at least Matlab R2023b on Linux, Windows and macOS, and Octave 5 and later on Linux, Octave 7.3 on Windows, and Octave 8 on macOS.

Psychtoolbox News

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.19 Beta update “Bitty Bits” was released at 26th March 2024. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.19.10”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.10

Compatibility changes wrt. Psychtoolbox 3.0.19.9:

  • None.

Highlights:

  • None, just bug fixes and minor improvements, and Octave 9.1 on macOS support.

All:

  • PropixxImageUndistortionThrowaway.m: Fix stupid bug. Don’t close the onscreen window and then try use it again afterwards!

  • Fix wrong definition of glPathGlyphIndexRangeNV().

  • Sound input demos: Allow specification of number of input channels. For BasicSoundInputDemo and DelayedSoundFeedbackDemo, allow to specify the number of inputs, to also deal with sound cards which only provide one mono input channel. Continue to default to 2 stereo channels.

  • Various internal cleanups with no immediate user facing benefit.

Linux:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • Screen: Fix idiotic bug in Screen('GetFlipInfo') there since day 1! If a query for a flip info struct was made, but no new struct was available, the function errored out, instead of returning an empty [] return argument!

    This was not ever noticed due to the way our only test scripts for this PerceptualVBLSyncTestFlipInfo2 had try-catch-end statement placed just so that the error was swallowed and never showed up!

    Fix this properly by returning an empty [] return argument in this case, as expected.

Windows:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

macOS:

  • Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4 from HomeBrew. It also works on the new Octave 9.1 from HomeBrew

  • Enable use with the brand-new Octave 9.1.0 from HomeBrew.

Enjoy!

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.19 Beta update “Tag games” was released at 16th March 2024. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.19.9”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.9

Compatibility changes wrt. Psychtoolbox 3.0.19.8:

  • None

Highlights:

  • Apriltags fiducial marker tracking support on Linux.

All:

  • New helper function PsychCamIntrinsicsToGLProjectionMatrix(). Given camera intrinsic parameters from some camera calibration software, and the desired zNear and zFar clipping planes of the view frustum, compute and return a projection matrix for use as GL_PROJECTION_MATRIX for OpenGL rendering with a virtual pinhole camera that approximates the properties of the real camera.

Linux:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • (Re-)add PsychCV() mex file for Octave and Matlab, with support for vision based tracking of AprilTag fiducial markers (aka tags) by use of the apriltag library. This PsychCV mex file will only work on Ubuntu 22.04-LTS and later, not on Ubuntu 20.04-LTS anymore.

Windows:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

macOS:

  • Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4 from HomeBrew.

Enjoy!

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.19 Beta update “CamJam” was released at 14th March 2024. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.19.8”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.8

Some of this Psychtoolbox release was sponsored by Mathworks under the year 2023/2024 contract., and our partner SR-Research, makers of the Eyelink gaze trackers.

Compatibility changes wrt. Psychtoolbox 3.0.19.7:

  • dontOpenExisting non-zero flag in Eyelink('OpenFile') now error aborts, instead of trying to implement something unsupportable.

Highlights:

  • None. Mostly a small refinement release.

All:

  • Eyelink('OpenFile'): Error out if optional dontOpenExisting flag is set to a non-zero value. Update help text. According to feedback from SR-Research this is simply not supportable with all current and past Eyelink runtimes and tracker host software. Game over for this feature, just warn users about it.

  • Gamepad() / Joystick() et al.: Improve docs, help, setup instructions. Especially for proper choice of joystick driver on Ubuntu 20.04/22.04-LTS.

  • Downloaders/Updaters etc.: Update again for final SVN death on GitHub. In combo with website updates, to make clear that functions DownloadPsychtoolbox and UpdatePsychtoolbox and DownloadAdditionsForLinux are currently dead.

  • SetupPsychtoolbox(): Dead code removal, cleanup, docs updates.

Linux:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • XOrgConfSelector: Add error handling and error resolution tips. There wasn’t error handling in case of delete() or copyfile() failure. Add something, and try to give some helpful feedback and advice, e.g., running PsychLinuxConfiguration().

  • Allow selection of a different clock to be used as the general GetSecs clock for (almost) all timing and timestamping, e.g., by GetSecs, WaitSecs, PsychPortAudio, Screen, etc. Since the year 2007, the so called wall clock, or gettimeofday() clock, or Posix CLOCK_REALTIME clock was used for this, and it continues to be the default. But now one can use the new PsychTweak function PsychTweak('GetSecsClock', clockid); at the beginning of a script (before any other calls to Psychtoolbox mex files!) to select a clock with a different clockid. A clockid setting of 0 uses the default CLOCK_REALTIME clock, as in the past. A clockid setting of 1 uses CLOCK_MONOTONIC instead. CLOCK_MONOTONIC, as opposed to default CLOCK_REALTIME, does not maintain time in seconds since 1st January 1970 0:00:00 UTC, but has an unspecified zero point, but usually 0 denotes time of operating system boot. CLOCK_MONOTONIC is always guaranteed to be monotonically increasing, not subject to step adjustments by the system administrator, NTP, PTP, or other external clock reference sources. This prevents synchronization to other computer on the network/setup, but may avoid clock trouble caused by time jumping in certain situations. CLOCK_MONOTONIC behaves like the GetSecs clocks for Psychtoolbox on MS-Windows and macOS. For now the new monotonic mode is only lightly tested, and only available on Psychtoolbox for Intel processors, not yet for RaspberryPi - this will follow in a future release.

    This improvement was sponsored by a Mathworks sponsored support incident under our 2023/2024 contract.

Windows:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

macOS:

  • Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4 from HomeBrew.

  • Detect futile attempt of running under native Matlab for Apple Silicon / ARM, ie. not under Rosetta2 emulation and bail with more enlightening messages.

Enjoy!

News Archive