I’ve created an oddball paradigm for an infant study. Infants watch a 10 minute video clip of Fantasia cartoon and during it they receive auditory beep pairs or single beeps. Infants can get easily distracted so we’d like to add a pause function that can pause study and resume from the point it was stopped. The experiment initially was 6 trials of repeated 40s clips and I managed to get a pause function (with the help of psychopy community) that restarts the trial when unpausing. However, now we decided to use a continuous video and trial lasting 10 mins and I am not sure how to do bold.
I’ve attached experiment file in the thread. Any direction or examples on how to do this would be super appreciated. This is the final bit left to get the experiment live…
Hello @wakecarter . I’ve tried this code but nothing happens when i press space
for key in event.getKeys():
if key in ['escape', 'q']:
win.close()
core.quit()
elif key in ['space']:
# To pause the movie while it is playing....
if fantasia.status == PLAYING:
print('PAUSING')
fantasia.pause()
elif fantasia.status == PAUSED:
# To /unpause/ the movie if pause has been called....
print('UN-PAUSING')
fantasia.play()
keys = event.getKeys():
if 'escape' in keys or 'q' in keys:
win.close()
core.quit()
elif 'space' in keys:
# To pause the movie while it is playing....
if fantasia.status == PLAYING:
print('PAUSING')
fantasia.pause()
elif fantasia.status == PAUSED:
# To /unpause/ the movie if pause has been called....
print('UN-PAUSING')
fantasia.play()
keys = event.getKeys()
for keys in event.getKeys():
if 'escape' in keys or 'q' in keys:
win.close()
core.quit()
elif 'space' in keys:
# To pause the movie while it is playing....
if fantasia.status == PLAYING:
print('PAUSING')
fantasia.pause()
elif fantasia.status == PAUSED:
# To /unpause/ the movie if pause has been called....
print('UN-PAUSING')
fantasia.play()
keys = event.getKeys()
if 'escape' in keys or 'q' in keys:
win.close()
core.quit()
elif 'space' in keys:
# To pause the movie while it is playing....
if fantasia.status == PLAYING:
print('PAUSING')
fantasia.pause()
elif fantasia.status == PAUSED:
# To /unpause/ the movie if pause has been called....
print('UN-PAUSING')
fantasia.play()