Global frame counter and accurate timing programming

2 ビュー (過去 30 日間)
Yu Takahashi
Yu Takahashi 2021 年 2 月 15 日
コメント済み: Yu Takahashi 2021 年 2 月 18 日
Dear members
I am currently programming for a very timing-snsitive experiment. I was wondering whether there is a way to setup a global frame counter, which starts upon the program initiated, keeps counting till the program terminated, so that I could check and specify different actions(e.g., present images or text) accourding to the specific frames reached. In other words I am looking for a tic toc timer or internal cpu clock alternative(e.g., using the function GetSecs).
The reason behind trying to sdopt this rather cumbersome method is due to the fact that according to the Accurate timimg demo it seemed better to count the number of frames rather than specify the duration of each event. At the same time, a potential concern for using this frame counting strategy is I am not sure whether dropping frames (perhaps due to hardware limitations) would messed up the sequences entirely. For example, using a 240Hz display dropping 1 frame would advance the entire sequence forward by 1/240 second, as more frames were dropped the effect would accmulate resulting further timing deviations? I am pretty new with this type of programming, perhaps this is a misunderstanding?
Any comments or suggestions would be great! Thanks in advance!
p.s. I am using psychtoolbox for better timing accuracy
  8 件のコメント
Walter Roberson
Walter Roberson 2021 年 2 月 17 日
There is very slim hope of doing any of this with regular MATLAB; you would either need psychtoolbox facilities or build your own that are similar to psychtoolbox. Psychtoolbox already works are to ensure that screen flips are in synch with monitor refreshes.
Yu Takahashi
Yu Takahashi 2021 年 2 月 18 日
@Walter Roberson Thanks! I think I might try to contact someone from the dev team.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeTiming and presenting 2D and 3D stimuli についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by