# Programming Help

**URL:** https://psychtoolbox.discourse.group/c/for-problems-with-your-ptb-code/8.md?page=1

[Latest](https://psychtoolbox.discourse.group/latest.md) · [Categories](https://psychtoolbox.discourse.group/categories.md) · [Tags](https://psychtoolbox.discourse.group/tags.md)

**Page:** 2

---

## [Synchronous Audio-visual speech stimuli presentation](https://psychtoolbox.discourse.group/t/synchronous-audio-visual-speech-stimuli-presentation/5628)

<div class="topic-metadata">

**Author:** [@fasumed](https://psychtoolbox.discourse.group/u/fasumed)\
**Replies:** 2\
**Last updated:** [January 25, 2025, 1:46pm UTC](https://psychtoolbox.discourse.group/t/synchronous-audio-visual-speech-stimuli-presentation/5628 "2025-01-25T13:46:42Z")

</div>

Hi everyone, I am designing an experiment where I will present AV speech ( a video of a person narrating a story) in a background of a mixture of noise. I need to play the audio and the visual of the AV talker separatel…

---

## [Warning and Screen error](https://psychtoolbox.discourse.group/t/warning-and-screen-error/5623)

<div class="topic-metadata">

**Author:** [@blob](https://psychtoolbox.discourse.group/u/blob)\
**Replies:** 2\
**Last updated:** [January 21, 2025, 5:34pm UTC](https://psychtoolbox.discourse.group/t/warning-and-screen-error/5623 "2025-01-21T17:34:17Z")

</div>

So here is my error message! maybe someone has encountred it! (for the record, I am trying to run this line: \[win1,winRect\] = Screen(‘OpenOffscreenWindow’,-1,\[128 128 128\]); %-1 ) PTB-WARNING: Mismatch between measured…

---

## [Running Tobii Pro Eye Tracker on Linux - possible xorg file conflict?](https://psychtoolbox.discourse.group/t/running-tobii-pro-eye-tracker-on-linux-possible-xorg-file-conflict/5612)

<div class="topic-metadata">

**Author:** [@DeborahA](https://psychtoolbox.discourse.group/u/DeborahA)\
**Replies:** 32\
**Last updated:** [January 17, 2025, 6:26pm UTC](https://psychtoolbox.discourse.group/t/running-tobii-pro-eye-tracker-on-linux-possible-xorg-file-conflict/5612 "2025-01-17T18:26:57Z")

</div>

NJU739EE- 2022520114942:01f960c54c9ad357c32d17714aaa8fa8ea0a07f592d5cd5afa54092162e72bb3 Hi all, I have recently purchased a Tobii Pro Spectrum eye tracker and am trying to set it up to run on my Ubuntu 22.04 setup (Ub…

---

## [Problems installing 3.20.1 on M4 Macbook Pro](https://psychtoolbox.discourse.group/t/problems-installing-3-20-1-on-m4-macbook-pro/5621)

<div class="topic-metadata">

**Author:** [@arenart](https://psychtoolbox.discourse.group/u/arenart)\
**Replies:** 3\
**Last updated:** [January 17, 2025, 3:02pm UTC](https://psychtoolbox.discourse.group/t/problems-installing-3-20-1-on-m4-macbook-pro/5621 "2025-01-17T15:02:18Z")

</div>

Hi I’m trying to install Psychtoolbox on a Macbook Pro (Nov 2024, Apple M4 Pro, Sequoia 15.1), to be used with Matlab R2024a. I installed first GStreamer 1.24.10 without any apparent issues. I downloaded the Psychtoolbo…

---

## [Inconsistent timing of stimulus event code and photosensor](https://psychtoolbox.discourse.group/t/inconsistent-timing-of-stimulus-event-code-and-photosensor/5593)

<div class="topic-metadata">

**Author:** [@engell](https://psychtoolbox.discourse.group/u/engell)\
**Replies:** 10\
**Last updated:** [December 30, 2024, 11:14pm UTC](https://psychtoolbox.discourse.group/t/inconsistent-timing-of-stimulus-event-code-and-photosensor/5593 "2024-12-30T23:14:46Z")

</div>

PTB: 3.0.19 Matlab R2022a Linux Ubuntu 20.04 Stim timing issue: event code sometimes precedes visual stimulus, sometimes follows it. Hello, I was hoping someone might have some helpful insight regarding a timing iss…

---

## [Unable to install psychtoolbox on windows](https://psychtoolbox.discourse.group/t/unable-to-install-psychtoolbox-on-windows/5599)

<div class="topic-metadata">

**Author:** [@sternlas](https://psychtoolbox.discourse.group/u/sternlas)\
**Replies:** 2\
**Last updated:** [December 23, 2024, 6:09pm UTC](https://psychtoolbox.discourse.group/t/unable-to-install-psychtoolbox-on-windows/5599 "2024-12-23T18:09:51Z")

</div>

Hi, I am trying to install Psychtoolbox on Windows 10. I have previously been successful with installing it on this machine. I have tried different recent versions of Matlab but get the same error message. The error is: …

---

## [Solved: Invalid MEX file ubuntu 24.04 -\> Run PsychLinuxConfiguration](https://psychtoolbox.discourse.group/t/solved-invalid-mex-file-ubuntu-24-04-run-psychlinuxconfiguration/5601)

<div class="topic-metadata">

**Author:** [@jkawa](https://psychtoolbox.discourse.group/u/jkawa)\
**Replies:** 1\
**Last updated:** [December 21, 2024, 1:53pm UTC](https://psychtoolbox.discourse.group/t/solved-invalid-mex-file-ubuntu-24-04-run-psychlinuxconfiguration/5601 "2024-12-21T13:53:35Z")

</div>

Hi, I have the following problem of invalid MEX file ‘/usr/share/psychtoolbox-3/PsychBasic/moglcore.mexa64’: libglut.so.3: cannot open shared object file: No such file or directory, when running VBLSyncTest with pscht…

---

## [NetStation 'Synchronize' question](https://psychtoolbox.discourse.group/t/netstation-synchronize-question/4793)

<div class="topic-metadata">

**Author:** [@overmyhead](https://psychtoolbox.discourse.group/u/overmyhead)\
**Replies:** 4\
**Last updated:** [December 21, 2024, 8:59am UTC](https://psychtoolbox.discourse.group/t/netstation-synchronize-question/4793 "2024-12-21T08:59:01Z")

</div>

H!! I have a very basic question - What exactly does the NetStation(‘Synchronize’) command do and what are the consequences not meeting the default 2.5 ms parameter? More specifically, I get the following warring: “Ne…

---

## [Screen Number Definition Behavior](https://psychtoolbox.discourse.group/t/screen-number-definition-behavior/5586)

<div class="topic-metadata">

**Author:** [@lmattar](https://psychtoolbox.discourse.group/u/lmattar)\
**Replies:** 5\
**Last updated:** [December 13, 2024, 6:34pm UTC](https://psychtoolbox.discourse.group/t/screen-number-definition-behavior/5586 "2024-12-13T18:34:35Z")

</div>

I am having an issue with proper detection of screen numbers in the most up to date version of psychtoolbox. We are running this program on a computer with windows 11, an AMD Ryzen 7 7700X CPU, and Gigabyte GAMING OC Rad…

---

## [PTB-WARNING: Flip for window 10 didn't use pageflipping for flip. Visual presentation timing and timestamps are likely unreliable!](https://psychtoolbox.discourse.group/t/ptb-warning-flip-for-window-10-didnt-use-pageflipping-for-flip-visual-presentation-timing-and-timestamps-are-likely-unreliable/5588)

<div class="topic-metadata">

**Author:** [@DEC\_labmanager](https://psychtoolbox.discourse.group/u/DEC_labmanager)\
**Replies:** 1\
**Last updated:** [December 13, 2024, 6:28pm UTC](https://psychtoolbox.discourse.group/t/ptb-warning-flip-for-window-10-didnt-use-pageflipping-for-flip-visual-presentation-timing-and-timestamps-are-likely-unreliable/5588 "2024-12-13T18:28:54Z")

</div>

Hello, we bought several laptops with an AMD Rembrandt iGPU and an AMD dGPU Navi 33 \[Radeon RX 7700S/7600/7600S/7600M XT/PRO W7600\], we installed the last version of Matlab 2024b and Psychtoolbox version 3.0.19.16 We h…

---

## [Matlab crashing as soon as Screen('OpenWindow') or PsychImaging('OpenWindow') invoked](https://psychtoolbox.discourse.group/t/matlab-crashing-as-soon-as-screen-openwindow-or-psychimaging-openwindow-invoked/5584)

<div class="topic-metadata">

**Author:** [@autopoiesis](https://psychtoolbox.discourse.group/u/autopoiesis)\
**Replies:** 1\
**Last updated:** [December 12, 2024, 9:53pm UTC](https://psychtoolbox.discourse.group/t/matlab-crashing-as-soon-as-screen-openwindow-or-psychimaging-openwindow-invoked/5584 "2024-12-12T21:53:37Z")

</div>

I have installed GStreamer (the correct variant) and Psychtoolbox per the instructions specified on the ptb site. GStreamer was installed BEFORE Psychtoolbox, as instructed. When trying to launch our experiment, we only …

---

## [Psychtoolbox and PC crashes entirely after purple logo screen appears](https://psychtoolbox.discourse.group/t/psychtoolbox-and-pc-crashes-entirely-after-purple-logo-screen-appears/5580)

<div class="topic-metadata">

**Author:** [@autopoiesis](https://psychtoolbox.discourse.group/u/autopoiesis)\
**Replies:** 3\
**Last updated:** [December 12, 2024, 9:54pm UTC](https://psychtoolbox.discourse.group/t/psychtoolbox-and-pc-crashes-entirely-after-purple-logo-screen-appears/5580 "2024-12-12T21:54:19Z")

</div>

I am unable to run even a simple script where I just Screen(‘OpenWindow’) and display some text. Our ptb experiments work perfectly fine on other PCs in the lab. We followed the same installation procedures that we used …

---

## [Playing movie on ProPixx with color correction](https://psychtoolbox.discourse.group/t/playing-movie-on-propixx-with-color-correction/5574)

<div class="topic-metadata">

**Author:** [@marc](https://psychtoolbox.discourse.group/u/marc)\
**Replies:** 10\
**Last updated:** [December 6, 2024, 5:35pm UTC](https://psychtoolbox.discourse.group/t/playing-movie-on-propixx-with-color-correction/5574 "2024-12-06T17:35:00Z")

</div>

Dear community, My main objective is to play movies on a VPixx PROPixx projector with accurate color rendering. This projector has its own unique color gamut, and linear gamma, plus high bit-depth modes. I’m still a b…

---

## [Psychtoolbox on Mac Sequoia 15.11](https://psychtoolbox.discourse.group/t/psychtoolbox-on-mac-sequoia-15-11/5572)

<div class="topic-metadata">

**Author:** [@leon.jozzi](https://psychtoolbox.discourse.group/u/leon.jozzi)\
**Replies:** 3\
**Last updated:** [November 26, 2024, 6:58pm UTC](https://psychtoolbox.discourse.group/t/psychtoolbox-on-mac-sequoia-15-11/5572 "2024-11-26T18:58:19Z")

</div>

Hello all! I am using Matlab 2021a with Psychtoolbox Version 3.0.19 and, unfortunately, a MacBook Pro running on Sequoia 15.11 (Graphics: AMD Radeon Pro 5300M 4 GB, Intel UHD Graphics 630 1536 MB). I have the Psychtoolb…

---

## [Setupsychtoolbox-issue appearing in mac mini m4](https://psychtoolbox.discourse.group/t/setupsychtoolbox-issue-appearing-in-mac-mini-m4/5570)

<div class="topic-metadata">

**Author:** [@kate](https://psychtoolbox.discourse.group/u/kate)\
**Replies:** 5\
**Last updated:** [November 25, 2024, 9:21pm UTC](https://psychtoolbox.discourse.group/t/setupsychtoolbox-issue-appearing-in-mac-mini-m4/5570 "2024-11-25T21:21:19Z")

</div>

hi, i have downloaded matlab r2024b version and the newest version of psychtoolbox. i put the psychtoolbox in the /application folder, when i type setuppsychtoolbox, it applies with as the picture like Running post-i…

---

## [Error Running Psychophysics Experiment Code](https://psychtoolbox.discourse.group/t/error-running-psychophysics-experiment-code/5547)

<div class="topic-metadata">

**Author:** [@rav](https://psychtoolbox.discourse.group/u/rav)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 6:26am UTC](https://psychtoolbox.discourse.group/t/error-running-psychophysics-experiment-code/5547 "2024-11-22T06:26:46Z")

</div>

While running a psychophysics experiment code on 3.0.19 Flavor on my M1 MacBook air with macOS Sequoia 15.1, Matlab2024b , I got this error, changed my version of psychtoolbox and matlab but didn’t seem to get any luck…

---

## [Unknown problem playing movies with Gstreamer on Ubuntu Linux](https://psychtoolbox.discourse.group/t/unknown-problem-playing-movies-with-gstreamer-on-ubuntu-linux/4876)

<div class="topic-metadata">

**Author:** [@snoah](https://psychtoolbox.discourse.group/u/snoah)\
**Replies:** 12\
**Last updated:** [November 21, 2024, 7:29pm UTC](https://psychtoolbox.discourse.group/t/unknown-problem-playing-movies-with-gstreamer-on-ubuntu-linux/4876 "2024-11-21T19:29:50Z")

</div>

Hello, I’m having problems getting movies to play with Psychtoolbox on my Ubuntu stimulus laptop. The same movie-playing script works fine on a different laptop running a mac operating system. My script is supposed to …

---

## [Driving a Step Motor with a Teensy Board Using PsychToolbox](https://psychtoolbox.discourse.group/t/driving-a-step-motor-with-a-teensy-board-using-psychtoolbox/5560)

<div class="topic-metadata">

**Author:** [@leeyeonjoo](https://psychtoolbox.discourse.group/u/leeyeonjoo)\
**Replies:** 2\
**Last updated:** [November 20, 2024, 7:48am UTC](https://psychtoolbox.discourse.group/t/driving-a-step-motor-with-a-teensy-board-using-psychtoolbox/5560 "2024-11-20T07:48:57Z")

</div>

function \[moved, currPosition\] = moveResp(respDevice, newPosition, unitscale) rescale = 1; % rescale motor step values try if rescale % Rescale new position input to motor step value \[motorStepVal\] …

---

## [Non-uniformity correction](https://psychtoolbox.discourse.group/t/non-uniformity-correction/5538)

<div class="topic-metadata">

**Author:** [@MrAndre89](https://psychtoolbox.discourse.group/u/MrAndre89)\
**Replies:** 2\
**Last updated:** [November 11, 2024, 2:14am UTC](https://psychtoolbox.discourse.group/t/non-uniformity-correction/5538 "2024-11-11T02:14:28Z")

</div>

Are there any routines in Psychotoolbox to correct spatial non-uniformities of displays, either at luminance (more important) or color (less important) levels?

---

## [How to apply color profile + gamma correction in Psychotoolbox](https://psychtoolbox.discourse.group/t/how-to-apply-color-profile-gamma-correction-in-psychotoolbox/5499)

<div class="topic-metadata">

**Author:** [@MrAndre89](https://psychtoolbox.discourse.group/u/MrAndre89)\
**Replies:** 6\
**Last updated:** [November 11, 2024, 2:04am UTC](https://psychtoolbox.discourse.group/t/how-to-apply-color-profile-gamma-correction-in-psychotoolbox/5499 "2024-11-11T02:04:42Z")

</div>

I am conducting a visual stimulation experiment where I am using sinusoidal gratings. Two requirements are necessary: Linearize the display, so that there is a linear relationship between pixel value and luminance. Th…

---

## [How to perform "Flip" on multiple displays without reducing the frame rate?](https://psychtoolbox.discourse.group/t/how-to-perform-flip-on-multiple-displays-without-reducing-the-frame-rate/5521)

<div class="topic-metadata">

**Author:** [@mantiuk](https://psychtoolbox.discourse.group/u/mantiuk)\
**Replies:** 6\
**Last updated:** [November 7, 2024, 10:34pm UTC](https://psychtoolbox.discourse.group/t/how-to-perform-flip-on-multiple-displays-without-reducing-the-frame-rate/5521 "2024-11-07T22:34:25Z")

</div>

We are trying to play video/animation on a haploscope. Left-eye and right-eye displays are on separate XWindow screens. Running Screen( ‘Flip’ ) on both displays reduces the frame rate by half (e.g., from 30 to 15 or fr…

---

## [How to Achieve Consistent CFF (Critical Flicker Fusion) Presentation on a 240Hz Screen?](https://psychtoolbox.discourse.group/t/how-to-achieve-consistent-cff-critical-flicker-fusion-presentation-on-a-240hz-screen/5513)

<div class="topic-metadata">

**Author:** [@LinJiajia](https://psychtoolbox.discourse.group/u/LinJiajia)\
**Replies:** 2\
**Last updated:** [October 10, 2024, 5:12pm UTC](https://psychtoolbox.discourse.group/t/how-to-achieve-consistent-cff-critical-flicker-fusion-presentation-on-a-240hz-screen/5513 "2024-10-10T17:12:11Z")

</div>

Hello everyone, I am currently using MATLAB’s Psychtoolbox to conduct a visual stimulation experiment, aiming to achieve CFF (Critical Flicker Fusion) presentation. The refresh rate of the monitor I am using is 240Hz. H…

---

## [Best practice: TTL event triggers in PTB stimulus presentation loop](https://psychtoolbox.discourse.group/t/best-practice-ttl-event-triggers-in-ptb-stimulus-presentation-loop/4659)

<div class="topic-metadata">

**Author:** [@johannesjuliusm](https://psychtoolbox.discourse.group/u/johannesjuliusm)\
**Replies:** 6\
**Last updated:** [October 5, 2024, 2:30am UTC](https://psychtoolbox.discourse.group/t/best-practice-ttl-event-triggers-in-ptb-stimulus-presentation-loop/4659 "2024-10-05T02:30:14Z")

</div>

Dear community, I am working on an auditory experiment in which multiple short sounds (400ms long) are played in random order, which is controlled by a loop. For every sound onset, I wish to send an event marker (TTL pu…

---

## [How to get the participant reaction time from audio](https://psychtoolbox.discourse.group/t/how-to-get-the-participant-reaction-time-from-audio/5509)

<div class="topic-metadata">

**Author:** [@Acolverson](https://psychtoolbox.discourse.group/u/Acolverson)\
**Replies:** 4\
**Last updated:** [October 8, 2024, 10:45am UTC](https://psychtoolbox.discourse.group/t/how-to-get-the-participant-reaction-time-from-audio/5509 "2024-10-08T10:45:38Z")

</div>

Hello, I seek guidance on how to accurately measure timing information of interchanging inputs from two participants. Specifically, participants will interchange their tapping on an external hardware device while listeni…

---

## [Program is crashing (maybe) during data collection "break"](https://psychtoolbox.discourse.group/t/program-is-crashing-maybe-during-data-collection-break/5504)

<div class="topic-metadata">

**Author:** [@moorek](https://psychtoolbox.discourse.group/u/moorek)\
**Replies:** 2\
**Last updated:** [September 27, 2024, 7:31pm UTC](https://psychtoolbox.discourse.group/t/program-is-crashing-maybe-during-data-collection-break/5504 "2024-09-27T19:31:45Z")

</div>

Hi everyone, I am not a novice to psychtoolbox–I wrote my first experiment 20 years ago in Matlab–but recently I encountered a problem that might be coding problem or a Windows problem, and I was hoping someone could he…

---

## [Stimulus timing issue](https://psychtoolbox.discourse.group/t/stimulus-timing-issue/5490)

<div class="topic-metadata">

**Author:** [@bono.kat](https://psychtoolbox.discourse.group/u/bono.kat)\
**Replies:** 5\
**Last updated:** [September 18, 2024, 12:35pm UTC](https://psychtoolbox.discourse.group/t/stimulus-timing-issue/5490 "2024-09-18T12:35:11Z")

</div>

Dear Community, Info: Psychtoolbox-3 (3.0.19) MATLAB platform (2021b) ubuntu (22.04) I have implemented an easy finger tapping reaction time task using Psychtoolbox. First, the participants are presented with a whi…

---

## [PTB x MATLAB: screen error](https://psychtoolbox.discourse.group/t/ptb-x-matlab-screen-error/5470)

<div class="topic-metadata">

**Author:** [@chiara](https://psychtoolbox.discourse.group/u/chiara)\
**Replies:** 2\
**Last updated:** [September 5, 2024, 2:05pm UTC](https://psychtoolbox.discourse.group/t/ptb-x-matlab-screen-error/5470 "2024-09-05T14:05:53Z")

</div>

Hi there! I run a demo from Scarfe Lab: Scarfe Lab: Oval an got the following error: Invalid MEX-file ‘C:\\Users\\Chiara Maria Mariani\\AppData\\Roaming\\MathWorks\\MATLAB Add-Ons\\Collections\\Psychtoolbox-3\\Psychtoolbox\\Psy…

---

## [Sending trigger via parallel port](https://psychtoolbox.discourse.group/t/sending-trigger-via-parallel-port/4595)

<div class="topic-metadata">

**Author:** [@Yaprak](https://psychtoolbox.discourse.group/u/Yaprak)\
**Replies:** 13\
**Last updated:** [September 1, 2024, 1:31pm UTC](https://psychtoolbox.discourse.group/t/sending-trigger-via-parallel-port/4595 "2024-09-01T13:31:58Z")

</div>

We try to send triggers via the parallel port for our EEG setup. However, we have approximately ten years old Brain Products hardware, and we were unable to use the older functions for parallel ports when we used the new…

---

## [Timing of multiple slave devices for audio recording](https://psychtoolbox.discourse.group/t/timing-of-multiple-slave-devices-for-audio-recording/5457)

<div class="topic-metadata">

**Author:** [@chiomatic](https://psychtoolbox.discourse.group/u/chiomatic)\
**Replies:** 1\
**Last updated:** [August 27, 2024, 3:16pm UTC](https://psychtoolbox.discourse.group/t/timing-of-multiple-slave-devices-for-audio-recording/5457 "2024-08-27T15:16:25Z")

</div>

Hello I use PsychToolBox to record audio data and play sounds from a sound card. I have multiple slave devices for audio recording, because each slave is dealing with a distinct stream of audio data and I prefer to keep…

---

## [Problem with 'Screen' function - PTB just installed](https://psychtoolbox.discourse.group/t/problem-with-screen-function-ptb-just-installed/5451)

<div class="topic-metadata">

**Author:** [@gtrumpy](https://psychtoolbox.discourse.group/u/gtrumpy)\
**Replies:** 15\
**Last updated:** [August 19, 2024, 2:08pm UTC](https://psychtoolbox.discourse.group/t/problem-with-screen-function-ptb-just-installed/5451 "2024-08-19T14:08:11Z")

</div>

EEJDHUP7-20248131369:2ebe50a9f3c3fd2ab4d9300f9593b3b4bbd33d2c95b2f4f736b5296314c4c852 Hi, I have a problem with the ‘Screen’ function. I recently downloaded PTB the ‘Screen’ function gives me the following: Invalid M…

[Previous page](https://psychtoolbox.discourse.group/c/for-problems-with-your-ptb-code/8.md)

[Next page](https://psychtoolbox.discourse.group/c/for-problems-with-your-ptb-code/8.md?page=2)
