# Mworks Stimulus Question

**URL:** <https://mworks.discourse.group/t/mworks-stimulus-question/895>\
**Category:** Support\
**Created:** [June 14, 2023, 4:14pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895 "2023-06-14T16:14:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgouldin](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sgouldin](https://mworks.discourse.group/u/sgouldin)\
**Post date:** [June 14, 2023, 4:14pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/1 "2023-06-14T16:14:10Z")

</div>

Hi Chris,

I have an experiment we want to run which involves showing 840 videos once. However, these videos have a particular order in which they need to be seen, and we want to track any that needed to be repeated if the monkey broke fixation during that trial.

I have 30 folders named `Seq_*`, each has a sequence of 28 videos, `vid_*.mp4`.

I want to show all videos from Seq\_1 in order, then all videos from Seq\_2 and so on. What is the best way to go about showing these videos in the correct order, and can we somehow tag them so we know which sequence they are from?

Thank you,  
Sarah

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 14, 2023, 8:58pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/2 "2023-06-14T20:58:15Z")

</div>

Forwarded the above email



---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 14, 2023, 9:27pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/3 "2023-06-14T21:27:03Z")

</div>

Made this topic public on June 14, 2023, 9:27pm UTC



---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 15, 2023, 6:20pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/4 "2023-06-15T18:20:54Z")

</div>

Hi Sarah,

I’m working on an example to demonstrate an approach you could take.

One question: How do you want to handle the repeated videos? If the monkey breaks fixation duration a sequence, do you need to repeat the whole sequence, or will you just repeat the specific video(s) during which fixation was broken?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![sgouldin](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sgouldin](https://mworks.discourse.group/u/sgouldin)\
**Post date:** [June 15, 2023, 6:51pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/5 "2023-06-15T18:51:35Z")

</div>

Hi Chris,

Thanks so much! Just repeating that one video if the monkey breaks fixation is fine. I think it sort of tracks those repetitions with fixation failures, as long as we have a way to see how many times each video was repeated (if necessary).

Thanks again!  
Sarah

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 15, 2023, 7:33pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/6 "2023-06-15T19:33:56Z")

</div>

Hi Sarah,

Thanks for the additional info.

Here’s the [example experiment](https://www.dropbox.com/s/a3dgbo5jltk5p0g/video_order.zip?dl=0). It presents four sequences, each of which contains three videos. Each video is selected and loaded as needed, based on the current values of the variables `current_seq` and `current_vid`. If fixation is broken while a video is playing, the experiment appends the pair of seq/vid numbers to the list in variable `repeated_videos`; it then restarts the video.

When the experiment completes, `repeated_videos` will contain the full list of all repetitions. For example, if `Seq1/vid_2.mp4` was repeated twice, and `Seq4/vid_3.mp4` was repeated once, the final value of `repeated_videos` will be `[[1,2], [1,2], [4,3]]`.

I hope the example makes sense. If you have any questions or need help adapting this approach to your experiment, please let me know!

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![sgouldin](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sgouldin](https://mworks.discourse.group/u/sgouldin)\
**Post date:** [June 19, 2023, 9:56pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/7 "2023-06-19T21:56:01Z")

</div>

Thanks Chris! That worked perfectly, I appreciate the help!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 21, 2023, 4:07pm UTC](https://mworks.discourse.group/t/mworks-stimulus-question/895/8 "2023-06-21T16:07:32Z")

</div>

Closed on June 21, 2023, 4:07pm UTC


