Video Loop ad infinitum


Author
Message
AnthonyFCollinsSussex
AnthonyFCollinsSussex
Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)Partner Member (769 reputation)
Group: Forum Members
Posts: 52, Visits: 250
Hi there
I hope all is well?

I am struggling with two key issues I need to resolve before making my final experiment live, I was hoping to ask for some support after some marked attempts:

1. Participants are aurally presented with 50 everyday ambiguous scenarios. For a given scenario, once audio is finished, they are prompted with a textual comprehension question (requiring a yes/no response), followed by correct/incorrect feedback (depending upon their response). This all works fine. However, they also need to do a breathing exercise for 2 minutes (in a separate trial depicted by a breathing pacer animation), and this should occur after every 10 scenarios. I have the code in place to branch after the 10th scenario's feedback trial, but I do not know how to adapt it so that this breathing trial is interspersed after every 10 scenarios (e.g., 20th, 30th etc). How to change == 10 to something elegant enough to arrive after every 10 scenarios of the 50:

<trial correctfeed>
/ontrialbegin = [values.numberoftrialsrun= values.numberoftrialsrun+ 1]
/branch = [if (values.numberoftrialsrun == 10) trial.breathcount]
/ stimulusframes = [1=text.correctfeed]
/ trialduration = 950
/ showmousecursor = false
/ recorddata = false
</trial>

<trial incorrectfeed>
/ontrialbegin = [values.numberoftrialsrun= values.numberoftrialsrun+ 1]
/branch = [if (values.numberoftrialsrun == 10) trial.breathcount]
/ stimulusframes = [1=text.incorrectfeed]
/ trialduration = 950
/ showmousecursor = false
/ recorddata = false
</trial>


2. During the 2 minute breathing trial, a giff is presented on loop, the giff is a bar that rises and then falls as the breathing pacer. If I do not loop the giff, it goes up and down only once. So, if I want participants to engage with it for 2 minutes, the giff must be on loop to continue its animation. However, this results in the giff looping forever, even when I set the breathing trial itself to two minutes (via timeout or trial duration) - the loop seems to override the trial's specified duration, and does not terminate. i also tried to amend stimulusframes to stimulustimes, but does not rectify this issue. Participants need not press anything in this two minute period, merely see the pacer on screen. After two minutes, it should resume back to the next ambiguous scenario (according to above) until another 10 scenarios have passed, and so on. The only solution I can think of is pre-recording the giff animation for 2 minutes, and presenting this instead, albeit this is sub-optimal due to refresh-rate precision of the bar's movement. The giff provides a reasonably unlaggy motion, hence my desire to keep it if possible.

<video 6BPM>
/ items = ("6BPMGIF.gif")
/ playthrough = true
/ loop = true
/ position = (49.4, 65)
/ stream = false
/ size = (300, 300)
</video>

<trial breath>
/ stimulusframes= [1=video.6BPM]
/ recorddata = false
/ response = noresponse
/ trialduration = 120000
</trial>

I would truly appreciate your help and guidance on how best to proceed

Many thanks in advance
AC



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search