Randomise video clips

PennController for IBEX Forums Support Randomise video clips

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11068
    stonek
    Participant

    Hi,

    Thanks as always for this amazing resource and for your support. I’m trying to create an experiment where the participant sees a short video clip then answers three yes/no questions about it. I want to randomise the video presentation order but not sure how – currently I have the video clips in the Resources and a controller that looks like below. The three questions are identical throughout the experiment so they can be applied to any video, as long as the response is linked to the video name in the log file. Here’s where I got to with the controller (a demo link is underneath but it’s very rudimentary):

    Template(“questions.txt”, row =>
    newTrial(“experimental-trial”,
    newVideo(“clip1”, “mudskipper.mp4”) // <– possible to randomly select an .mp4 clip from Resources?
    .center()
    .size(400,500)
    .print()
    .disable(0.01)
    .play()
    .log()
    .wait()
    ,
    getVideo(“clip1”)
    .remove()
    ,
    newText(“question1”,row.question1) // <– might be nice to randomise question order?
    .center()
    .print()
    ,
    newScale(“answer1″,”yes”, “no”)
    .labels(“bottom”)
    .center()
    .print()
    .log()
    .wait()
    ,
    newText(“question2”,row.question2)
    .center()
    .print()
    ,
    newScale(“answer2″,”yes”, “no”)
    .labels(“bottom”)
    .center()
    .print()
    .log()
    .wait()
    ,
    newText(“question3”,row.question3)
    .center()
    .print()
    ,
    newScale(“answer3″,”yes”, “no”)
    .labels(“bottom”)
    .center()
    .print()
    .log()
    .wait()
    )
    .log(“question1”, row.question1)
    .log(“question2”, row.question2)
    .log(“question3”, row.question3)
    )

    https://farm.pcibex.net/r/DISOnf/

    Apologies if you’ve already answered this somewhere!
    Many thanks,
    Kate

    #11076
    stonek
    Participant

    Ah silly me, I didn’t realise you could simply add the video names to a column in the Template file and call them with e.g. row.video as you would any other element from the Template. Problem solved 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.