Hey Najib & Ha,
I’ve been working on your movie-playing question, and I have at least a partial solution.
The attached experiment demonstrates how to play a set of movies (of varying length) in random order. The movies are all defined within a stimulus group called “movies”. The range replicator “Trial Replicator” iterates over the stimulus group and generates one trial per movie. The block “New Block” runs through all the trials in random order.
Within each trial, the relevant movie is loaded, queued, played, dequeued, and unloaded. The loading/unloading depends on a change I implemented last Friday, which lets you load/unload all the frames of a movie by loading/unloading the movie stimulus (i.e. it saves you the trouble of having to loop over the frames yourself). Thus, you’ll need a very recent nightly build in order to run the example.
The only issue that I haven’t resolved to my satisfaction is how to specify the frames for each movie. In my example, the stimulus groups containing the frames are hard-coded, i.e. there’s a separate definition for every group and every frame within each group. Obviously, specifying things this way gets unwieldy when you’re dealing with thousands of frames. I thought I would be able to use some combination of range and list replicators to define the frames concisely. However, there’s a bug in the XML parser that prevents this from working, and I don’t see any easy fix for it.
At this point, I think your best bet is to use a Python script to generate the XML that defines the movie frames, and then copy that into your experiment XML. Although it’s a far from ideal solution, it is something that will work right now, and it also will let you organize and name your image files however you want.
Thinking a little longer term (i.e. not for this week), do you guys have any suggestions for how you would like to specify your movie frames? Apart from making the range/list replicator approach work, I can imagine various other ways of doing it. For example, the movie stimulus could take a directory name and find all the image files in it, or you could specify the frame list in a text file. Any thoughts on what would be most appealing?
Chris