Hello,
in order to achieve an increase of my monitors black level, I am presenting my stimulus screen and a white screen in a frame-to-frame alternating method on a 150Hz display.
It works quite well for most of the time and I achieve a stable looking 75Hz display. But from time to time I get a flash on the screen, which probably indicates, that timing went wrong at that incident.
Question: Is there a built-in-function, which supports such a procedure? Other than getting a faster GPU/CPU or maybe switching the OS(I use WinXP), does anybody have an idea, how I could get rid of the (rare) flashes?
I was scanning the psychtoolbox forum, but couldn't find a hint, why my system does not run my script 'smooth'. VBLSyncTest.m does report a good timing in single-display mode. You can find my code attached below. It's really not a very sophisticated realization of what I want from my computer, so I am happy for any hint, how this can be done well.
Thanks in advance!
Markus
------------------
% Find out how many screens and use largest screen number.
whichScreen = max(Screen('Screens'));
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'FloatingPoint32BitIfPossible');
[window winRect] = PsychImaging('OpenWindow', whichScreen);
Screen('FillRect',window,0);
lacer = 0;
Priority(2);
for i=128:64:256
resp = 0;
while ~KbCheck
switch lacer
case 1
Screen('FillRect',window,255);
case 2
Screen('FillRect',window,0);
Screen('FillRect',window,i,[500 300 800 600]);
end
Screen('DrawingFinished', window);
lacer = mod(lacer,2)+1;
Screen('Flip',window);
end
while KbCheck
switch lacer
case 1
Screen('FillRect',window,255);
case 2
Screen('FillRect',window,0);
end
Screen('DrawingFinished', window);
lacer = mod(lacer,2)+1;
Screen('Flip',window);
end
end
cls
-----------------------------
in order to achieve an increase of my monitors black level, I am presenting my stimulus screen and a white screen in a frame-to-frame alternating method on a 150Hz display.
It works quite well for most of the time and I achieve a stable looking 75Hz display. But from time to time I get a flash on the screen, which probably indicates, that timing went wrong at that incident.
Question: Is there a built-in-function, which supports such a procedure? Other than getting a faster GPU/CPU or maybe switching the OS(I use WinXP), does anybody have an idea, how I could get rid of the (rare) flashes?
I was scanning the psychtoolbox forum, but couldn't find a hint, why my system does not run my script 'smooth'. VBLSyncTest.m does report a good timing in single-display mode. You can find my code attached below. It's really not a very sophisticated realization of what I want from my computer, so I am happy for any hint, how this can be done well.
Thanks in advance!
Markus
------------------
% Find out how many screens and use largest screen number.
whichScreen = max(Screen('Screens'));
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'FloatingPoint32BitIfPossible');
[window winRect] = PsychImaging('OpenWindow', whichScreen);
Screen('FillRect',window,0);
lacer = 0;
Priority(2);
for i=128:64:256
resp = 0;
while ~KbCheck
switch lacer
case 1
Screen('FillRect',window,255);
case 2
Screen('FillRect',window,0);
Screen('FillRect',window,i,[500 300 800 600]);
end
Screen('DrawingFinished', window);
lacer = mod(lacer,2)+1;
Screen('Flip',window);
end
while KbCheck
switch lacer
case 1
Screen('FillRect',window,255);
case 2
Screen('FillRect',window,0);
end
Screen('DrawingFinished', window);
lacer = mod(lacer,2)+1;
Screen('Flip',window);
end
end
cls
-----------------------------