|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Psychtoolbox updated |
| 4 | +categories: news |
| 5 | +author: kleinerm |
| 6 | +--- |
| 7 | + |
| 8 | +Psychtoolbox 3.0.22.1 "Little Miss Sunshine!" was released at 11th July 2025. |
| 9 | + |
| 10 | +You can download it as a zip file from the following link: |
| 11 | + |
| 12 | +<https://github.com/Psychtoolbox-3/Psychtoolbox-3/releases/download/3.0.22.1/3.0.22.1.zip> |
| 13 | + |
| 14 | +**This release is strongly recommended to upgrade to if you are a user of |
| 15 | +Psychtoolbox 3.0.20 on macOS or Windows, as it allows most reliable and |
| 16 | +smooth use under the new paid software license subscription model. |
| 17 | +Also if you are a user of Matlab R2025a, as it fixes various compatibility issues.** |
| 18 | + |
| 19 | +The complete development history can be found in our GitHub repository. |
| 20 | +The release tag is “3.0.22.1”, with the full tree and commit logs under the URL: |
| 21 | + |
| 22 | +<https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.22.1> |
| 23 | + |
| 24 | +[This Psychtoolbox release was partially sponsored by Mathworks under the year 2024/2025 |
| 25 | +contract for improving compatibility with Matlab R2025a.](https://www.mathworks.com/solutions/neuroscience.html) |
| 26 | + |
| 27 | +### Compatibility changes wrt. Psychtoolbox 3.0.22.0: |
| 28 | + |
| 29 | +- Establish basic compatibility with Matlab version R2025a and later. |
| 30 | + |
| 31 | +- Make use with GStreamer 1.26 on MS-Windows more robust. |
| 32 | + |
| 33 | +### Highlights: |
| 34 | + |
| 35 | +- Compatibility fixes for Matlab R2025a with its new JavaScript based GUI and WebGL based |
| 36 | + graphics and plotting system, and the split process design between compute and GUI. |
| 37 | + Substantial work was needed to repair ListenChar, CharAvail, GetChar and FlushEvents, |
| 38 | + and to avoid annoying beep tones on key presses under macOS + R2025a. GetChar should |
| 39 | + work mostly as in the past, although limitations persist in some areas, some possibly |
| 40 | + hard or impossible to fix. A part of this compatibility work was sponsored by Mathworks. |
| 41 | + |
| 42 | +- Brightness control of at least internal displays now also works on Apple Silicon Macs. |
| 43 | + |
| 44 | +### All: |
| 45 | + |
| 46 | +- ``GetChar()/CharAvail()/ListenChar()/FlushEvents()``: Do no longer use the Java path on |
| 47 | + Matlab R2025a and later. Matlab R2025a and later ditched the Java based GUI in favor of |
| 48 | + a completely new GUI and graphics backend, based apparently on JavaScript + the Chromium |
| 49 | + embedded "web browser" framework + WebGL rendering. It also split off all GUI and plotting |
| 50 | + code into a separate Matlab application process from the main process that executes the |
| 51 | + Matlab interpreter with all user script code and all of Psychtoolbox, completely isolating |
| 52 | + these two processes from each other, with only a restricted and proprietary communication |
| 53 | + link between them (most likely based on local IP loopback connections). |
| 54 | + |
| 55 | + This makes our GetCharJava implementation completely non-functional, with no known way to |
| 56 | + salvage it. As of now, I wouldn't know how to do an alternative implementation hooking |
| 57 | + into the new JavaScript GUI, but first investigation suggests it is likely impossible, at |
| 58 | + least without significant help from Mathworks - they'd need to implement special purpose |
| 59 | + functionality for us. |
| 60 | + |
| 61 | + Therefore we now fall back to our KeyboardQueue based GetChar et al. implementation, just |
| 62 | + as on Octave, on MS-Windows, and for Matlab in "matlab -nodesktop" mode. |
| 63 | + |
| 64 | + New limitations caused by this: |
| 65 | + |
| 66 | + 1. The same keyboard queue related restrictions as on MS-Windows, ie. no concurrent use of |
| 67 | + KbQueues for the default keyboard and GetChar/CharAvail/FlushEvents/ListenChar on macOS |
| 68 | + and Linux. |
| 69 | + |
| 70 | + 2. Less reliable handling of composed characters, or no such handling at all. Less extra |
| 71 | + information as aux info, only timestamp, no other modifier keys state reporting etc. |
| 72 | + |
| 73 | + 3. Suppression of typed characters spilling into the Matlab command window does no longer work |
| 74 | + in GUI mode on Matlab R2025a and later. Such is life... |
| 75 | + |
| 76 | +- IsGUI(): Fix for Matlab R2025a and its non-Java GUI. |
| 77 | + |
| 78 | +- No longer add the Psychtoolbox/PsychJava/ folder to Matlab's Java class path on Matlab |
| 79 | + R2025a and later, as we can no longer use Java for our purposes, so no point in adding |
| 80 | + our Java class to the Matlab path. |
| 81 | + |
| 82 | +- PlayMoviesWithoutGapDemo1.m: Refine for more robustness with short movies. |
| 83 | + This should help issues like described in: |
| 84 | + |
| 85 | + https://psychtoolbox.discourse.group/t/invalid-movie-handle-provided-error-message/5719 |
| 86 | + |
| 87 | +- Add ``MacBoynToLMS()`` to invert ``LMSToMacBoyn()``. Contributed by David Brainard. |
| 88 | + |
| 89 | +- Various other smaller refinements, bug fixes and documentation updates. |
| 90 | + |
| 91 | +### Linux: |
| 92 | + |
| 93 | +- Psychtoolbox was built and tested against Matlab R2025a and Octave 6.4 under |
| 94 | + Ubuntu 22.04.5-LTS. Now only works on Ubuntu 22.04-LTS and later. |
| 95 | + |
| 96 | +- PsychLinuxConfiguration(): Adapt for Matlab R2025a and later. No need for JOGL |
| 97 | + "Java OpenGL" related workarounds anymore for R2025a+, now that WebGL is used. |
| 98 | + Matlab still needs the "broken override Vulkan loader" workaround though. |
| 99 | + |
| 100 | +### Windows: |
| 101 | + |
| 102 | +- Psychtoolbox was built against Matlab R2024b and tested against Matlab R2025a. |
| 103 | + |
| 104 | +- help GStreamer: Update link to MS-Windows MSVC GStreamer 1.22. |
| 105 | + The old download was removed, so adapt link from 1.22.5 to 1.22.12 as closest |
| 106 | + to the last tested version. |
| 107 | + |
| 108 | +- Add robustness of GStreamer setup if GStreamer version 1.26 or later is used. |
| 109 | + GStreamer 1.26 changed the default installation location on MS-Windows. Normally |
| 110 | + the proper location of GStreamer runtimes is communicated to Psychtoolbox via an |
| 111 | + environment variable. If this isn't the case in some cases then a probe sequence |
| 112 | + for common default installation locations was used. The probe sequence is now |
| 113 | + updated to search and hopefully find GStreamer 1.26+ at its default install locations, |
| 114 | + avoiding startup failure. |
| 115 | + |
| 116 | +### macOS: |
| 117 | + |
| 118 | +- Psychtoolbox was built and tested against native Matlab R2025a and against native |
| 119 | + Octave 9.4 from HomeBrew, on macOS 13.7.5 Ventura for Intel Macs, and on macOS 15.5 |
| 120 | + Sequoia for Apple Silicon Macs. |
| 121 | + |
| 122 | +- Fix keyboard input focus restoration after closing opaque fullscreen onscreen windows |
| 123 | + on Intel Macs. Substantial work was needed to achieve this with the new Matlab R2025a |
| 124 | + dual-process design (Psychtoolbox process separate from Matlab GUI process). |
| 125 | + |
| 126 | +- Fix a new bug, where in fullscreen window mode on R2025a, every keypress causes an |
| 127 | + annoying beep tone from macOS. This is also due to the new split dual-process design, |
| 128 | + but workarounds have been implemented to hopefully fix it. |
| 129 | + |
| 130 | +- Screen: Implement new method for ``Screen('ConfigureDisplay', 'Brightness')`` which |
| 131 | + also works on (at least) the internal displays of Apple Silicon Macs. Also removed |
| 132 | + support for 'AutoBrightnessMode' which did not ever work with any macOS release, so |
| 133 | + give up on it. |
| 134 | + |
| 135 | +- TwoStateQuery(): Cleanup, and reenable good questdlg() for Matlab R2025a+ on macOS |
| 136 | + for Apple Silicon Macs. |
| 137 | + |
| 138 | +Enjoy! |
0 commit comments