OS: Win10
PsychoPy version: 3.1.3
Standard Standalone?: y
Description of a simplified version of our experiment:
We have two routines. In the first routine, there is a text along with a code component in which some variables are defined.
In the second routine, there is only a movie component, whose filename is one of the variables defined in the first routine.
What are you trying to achieve?:
Currently, although the first routine is supposed to last 5 seconds, it lasts around 8. When I change the filename of the movie component from a variable ($narrative1
) to a certain filename (video1.mp4), this delay disappears. I would like to overcome any timing issues when using the variable as the movie filename.
Question 1: Are these 3 seconds spent by the program in order to “understand” what filename the variable $narrative1
corresponds to? Shouldn’t this has been done at the very beginning of the experiment?
What did you try to make it work?:
I inserted a Static component in the second routine and set the movie filename to update during the ISI, but this didn’t solve the problem.
What specifically went wrong when you tried that?:
When compiling the script in the Builder, I can see that the ISI part of the script is below that of the movie. That is to say, first the movie component is defined, along with its movie filename, and later in the script the ISI just offers the line movie.setMovie(narrative1)
. However, this line of code (and therefore the entire ISI) seems to be pointless, since the movie filename has been loaded beforehand.
Question 2: Why anything related to the ISI appears in the script after any other component in that routine? (I right clicked on the Static component, selected “move to top” but the script remained the same)
Question 3: What’s wrong in the way I’m using the ISI?
Question 4: Is the whole idea of the Static component not very appropriate in this case? Is there any other approach you would recommend to avoid the delay?
I would really appreciate any help! I hear that PsychoPy has made huge progress regarding timing in late versions, and it’s a shame not to be able to take advantage of it!