murthylab / fly-vr

FlyVR is code for design and control of multisensory virtual reality experiments for flies.
https://github.com/murthylab/fly-vr
3 stars 5 forks source link

More control of video playback from experiment.py files. #18

Open davidt0x opened 2 years ago

davidt0x commented 2 years ago

Allow writing experiment.py files (e.g. to present video1 for 60 sec, then randomly sample among videos 1, 2, and 3 for 15 sec each for a total of 180 sec, then present video 1 for 60 sec). Max has kindly helped me take a look at this but we haven't figured out an elegant solution. The current set up writes a new playlist instance/toc line for every single video frame, this is not good. The current workaround is to run a separate flyVR experiment for the different stimulus segments, or hardcode the order of these items using a long and repetitive playlist.

nzjrs commented 2 years ago

Not sure about the one TOC per frame, that seems odd, but there should already be enough hooks in the Experiment base class to achieve the experiment you describe - you might pay the setup latency cost, but a play_backend_item call with correctly formatted yaml payload should work