Show element during whole Template

PennController for IBEX Forums Support Show element during whole Template


Viewing 1 post (of 1 total)
  • Author
  • #11025

    Dear Forum,
    Dear Jeremy,

    I would like to implement an experiment where the participant hears music while him are shown black triangles. I would like the triangles to change every two seconds. If the participant sees a triangle directing to the right he shall click on the spacebar. First I implemented this by showing the participant a video in which black triangles are shown (changing every two seconds) while music is playing in the video itself. The whole video takes around 1.5 minutes.

    The problem is that (1) the video loads too long and has different loading times for different participants (which is bad because I want to measure reaction times) and (2) it seems to be not compatible with Apple.

    Therefore, I implemented a “Template” in which only IMAGES of black triangles are shown. Every two seconds the next iteration starts.

    Here, the problem is that I cannot simply write “newAudio(‘XXX’, ‘XXX’).play()” into the “newTrial” of the Template because then the music would start over and over again from the very beginning with every iteration of the Template.

    Here is a link to an example of the experiment:

    Do you have any ideas to solve this problem? Below are some of my ideas on how to solve the problem but maybe you have got a better idea or an idea on how to implement that idea I wrote below.

    Thank you very much for your help!

    Some of my ideas so far:
    (1) Hardcode it: Implement 45 Trials with every Trial containing only a very small part (two seconds) of that piece of music.
    (2) Somehow overgo the automatically implemented “clear()” when an iteration ends and instead delete the elements manually (except for the music-element).
    (3) Make a new PCIbex experiment (e.g. called “beta”) with the triangles showing up as described in the already implemented Template. Then make a new Trial in the actual PCIbex experiment (e.g. called “alpha”) in which the other PCIbex experiment (“beta”) is loaded into via an HTML (or maybe you have got an idea for another way on how to load one experiment into another). Then start to play the Audio [ newAudio(“XXX”, “XXX”).play() ] in the Trial from the actual PCIbex experiment (“alpha”)

    Here is my simplified (pseudo-)code so far (I particularly left out the implementation of the click on the spacebar):
    Template(“file.csv”, row =>
    newAudio(“audio”, “audio.mp3).play()
    newImage(“triangle”, row.triangle).center().print()
    newTimer(“waiting”, 2000).start().wait()

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.