This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MouseMotionRecordingDemoPimped | |
% MouseMotionRecordingDemoPimped - Record mouse motion via KbQueues. | |
% | |
% This demo shows very basic recording of mouse/touchpad motion | |
% movement data under Linux. | |
% | |
% Press a key on the keyboard to end the demo. | |
% | |
% It requests recording of raw motion, ie. of the device itself, | |
% in device and operating system specific distance units, not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DelayedSoundFeedbackDemo(reqlatency, duplex, freq, minLatency, device) | |
% DelayedSoundFeedbackDemo([reqlatency=150 ms][, duplex=0][, freq]=48000[, minLatency=10 ms][, device]) | |
% | |
% CAUTION: TEST TIMING OF THIS SCRIPT WITH MEASUREMENT EQUIPMENT IF YOU | |
% DEPEND ON ACCURATE FEEDBACK TIMING!!! | |
% | |
% Demonstrates usage of the new Psychtoolbox sound driver PsychPortAudio() | |
% for audio feedback with a controlled delay. | |
% | |
% Sound is captured from the default recording device and then - with a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trial_number = 90; | |
% Input set of images: | |
test_images = [1,2,3,4,5] | |
nrImages = length(test_images); | |
% Present each 3 times: | |
max_image_presentations = trial_number / nrImages | |
tic | |
if 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ee98f3b1c9d0239b460f7c772cbf0e1c0da33682 Mon Sep 17 00:00:00 2001 | |
From: Mario Kleiner <[email protected]> | |
Date: Tue, 25 Jan 2022 23:32:57 +0100 | |
Subject: [PATCH] Hacks for testing cursor control by server for a leased out | |
drm/randr output. | |
- Allow enable of atomic modesetting under modesetting-ddx to test how | |
an atomic server would behave. | |
- Disable some checks to allow X-Server to control cursor appearance and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debugPseudogray(plotstim) | |
if nargin < 1 | |
error('Specify plotstim as 0, 1 or 2 !'); | |
end | |
KbName('UnifyKeyNames'); | |
UpArrow = KbName('UpArrow'); | |
DownArrow = KbName('DownArrow'); | |
LeftArrow = KbName('LeftArrow'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function BasicSoundPhaseShiftDemoPimped(showit, targetChannel) | |
% BasicSoundPhaseShiftDemoPimped([showit=1][, targetChannel=1]) | |
% | |
% Demonstrates how one can play back a phase-shifted sine tone, with dynamically | |
% adjustable phase shift, free of audible artifacts during phase shift change. | |
% | |
% This uses PsychPortAudio's realtime mixing and some trigonometric math to | |
% synthesize a cosine wave of selectable phase in realtime from the weighted sum | |
% of a pair of a cosine + sine wave with different relative amplitudes. | |
% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function data=MeasureLuminancePrecision | |
% data=MeasureLuminancePrecision | |
% INSTRUCTIONS: [Currently this program requires a Cambridge Research | |
% Systems photometer, but you could easily adapt it to use another | |
% photometer.] Plug your photometer's USB cable into your computer, | |
% carefully place your photometer stably against your computer's screen, | |
% set PARAMETERS (below), then run. The results (including the best-fitting | |
% n-bit-precision model) will be displayed as a graph in a MATLAB figure | |
% window, and also saved in three files (in the same folder as this file) | |
% with filename extensions: png, fig, and mat. The filename describes the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ dx, dy, sx, sy ] = RawMouse2(devIndex) | |
% Parse raw HID datastream from a mouse to implement | |
% raw mouse movement from HID reports. | |
% | |
% This is just an example! The data format is mouse | |
% dependent, this is for a DELL LaserMouse. | |
% | |
% Must be run "sudo" root unless proper udev rules | |
% are defined to allow non-root raw access to mouse | |
% on your system. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ dx, dy, sx, sy ] = RawMouse(devIndex) | |
persistent sx; | |
persistent sy; | |
if isempty(sx) | |
sx = 0; | |
sy = 0; | |
end |