In PsychoPy everything is organised in reference to time
We don’t have “slides” that simply follow each other like in some packages
Things overlap in time
Things can change their attributes in time
You could use this, for instance, to:
gradually reveal an object
make an object move to make the task harder
make an object more interesting for participants (e.g. developmental)
rainbow text
throbbing heart
Most dialog entries have the option to take raw Python code if you start your entry with $ (or have that by default).
You can use this as more than a variable from your conditions file e.g.:
set stimulus position to travel in a circle with
$[ sin(t*2*pi), cos(t*2*pi) ]
and set this to update every frame
$”You won $5” [include quotes]
You won \$5
When moving online, the features of the mouse can make for some really cool dynamic experiments that translate to touchscreens Mouse inputs .. _heartThrob:
Download an image of a “love” heart, preferably one with a transparent background.
Let’s put that into a PsychoPy experiment and set its size to vary on every frame.
Getting the maths to look right here is going to be the key.
It’s something based on a sinusoid. Recall that sin(t) varies smoothly between -1 and 1:
sin(t) : too small
50*sin(t) : big enough (50 pixels) but it goes negative
100+50*sin(t) : varying nicely between 50 and 150 pixels
That’s a good start. If we want to make it more pulse-like we need to raise the value to a power before scaling it up:
100+50*sin(t)**4
Inside the examples zip file, look under:
builder/dynamic
You’ll find working examples of a range of these stimulus setups