I am new to Psychopy, and I’m trying to build my first experiment.
The propose of the experiment is to run a movie (let’s say for 15 sec) and while the movie run, the participant can rate the movie as many times he wants. I want to keep track of the rate and the second the participant rate.
For example, if I rate at second 5 the movie as 4, at second 10 I can rate to 5, and so on.
Important to say, the movie needs to run without stops for rating.
I succeed to build an experiment that plays the movie and rate the first number I choose, but once I selected the rate, I cant change it.
Is there an option to run the movie with multiple rating?
Thanks in advance!
Here is the code I did:
Create some handy timers
globalClock = core.Clock() # to track the time since experiment started
routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine
------Prepare to start Routine “trial”-------
t = 0
trialClock.reset() # clock
frameN = -1
continueRoutine = True
update component parameters for each repeat
keep track of which components have finished
trialComponents = [movie, rating]
for thisComponent in trialComponents:
if hasattr(thisComponent, ‘status’):
thisComponent.status = NOT_STARTED
-------Start Routine “trial”-------
# get current time
t = trialClock.getTime()
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *movie* updates if t >= 0.0 and movie.status == NOT_STARTED: # keep track of start time/frame for later movie.tStart = t movie.frameNStart = frameN # exact frame index movie.setAutoDraw(True) # *rating* updates if t >= 0.0 and rating.status == NOT_STARTED: # keep track of start time/frame for later rating.tStart = t rating.frameNStart = frameN # exact frame index rating.setAutoDraw(True)