Howdy, Stranger!

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

Supported by

Line timing/animation


I'd like to set up an experiment where lines are drawn, of varying lengths and duration, from left to right across the midpoint of the screen. I have two conditions, one where the lines are drawn at a constant draw rate (approx 0.167 pixels per millisecond) and the other where the following lengths and durations are fully crossed to give a variable draw rate:

Length (px) Duration (ms)
350 2000
425 2500
500 3000
575 3500
650 4000

The participants task is to estimate the duration of the line.

Is it possible to set this up in OS (I'm using version 3.0.7) to give accurate lengths and durations as well as a smooth animation?



  • Hi Biff,

    Quite certainly, yes. This shouldn't be a problem. If you browse the forum, you should find a few discussion that might get you started.

    Good luck and if you get stuck let us know.


  • Hi Eduard

    Thanks, I have used the search function and looked through the first dozen or so pages but haven't found anything so far - I'll keep looking.

    I'm new to OS but I have worked through the basic and advanced tutorials so I have a basic understanding of how to construct an experiment. I haven't seen anything in the GUI which is able to do what I'm asking. Am I right in thinking that this will need some Python code in an inline script?


  • Yes, that's right.

    If I have time in the next days, I will write a little template for you.

    If you look for " moving stimuli" you'll probably (hopefully) find something. Also keep in mind that the new Opensesame (3.2) comes with very relevant changes for you. Accessing the items on an inline_scriptwill probably make the coding much easier and efficient.

    Good luck.

  • Thanks Eduard

    Unfortunately, my university stipulates that I have to use version 3.0.7 so I'm not able to upgrade. I've tried a forum search for "moving stimuli" but haven't yet come across anything which helps. As I don't have any experience of Python coding I've asked the university for help so hopefully they'll be able to give me some code with which to make a start.

    Thanks for your help

  • edited March 2

    Please ignore this, issue now resolved

  • You mean the entire discussion? If you managed, could you share your code for other users that might have similar ideas?


Sign In or Register to comment.