Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Need help with fast presentation of stimuli

Hi there,

I am relatively new to OpenSesame and need some help. I am trying to present a set of 60 images really fast so that it looks like a moving picture. I was wondering if there was an easy way OpenSesame can pull up each image in succession so I don't have to create a sketchpad item for each image? Any help is appreciated!

Comments

  • Hi,

    You could create a list of Canvas objects in an inline_script item (in the Prepare phase probably). Here's an example of a series of Canvas objects with different strings of text, but you can do it analogously for different images, using canvas.image().

    clist = []
    for i in range(60):
        c = Canvas()
        c.text('Frame {}'.format(i))
        clist.append(c)
    

    And then you would later show all these Canvas objects (in the Run phase), possibly with a delay in between:

    # Show them one at a time
    for c in clist:
        c.show()
        clock.sleep (10)
    

    Alternatively, you could create a movie from your images, and use the media_player_mpy item to play it. That might be easier.

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • Thank you!

Sign In or Register to comment.