| Reference | Downloads | Github

Preloading next stimulus in Builder?

I feel like I’m being dense here, but: I’ve got a bunch of brief stimuli followed by an ITI; I want to record keypress RT during both periods. I’d also like to preload the next stimulus so I don’t have a loading delay at the start of the trial.

I get how I’d do this if I put the ITI at the beginning of my routine, but I’m not sure how to do it with the ITI at the end. Putting the ITI at the beginning, however, would mess up where keypresses are stored.

What’s the right way to go about this?


I’m not sure why the ITI at beginning would mess up keypress storage. Could you elaborate? Is it just that you want to allow responses? Why not have a response period at the end of your trial as well as a brief ITI to load the stimuli at the beginning. The participant doesn’t know that this single apparent ITI was constructed from the end and beginning.

Loading an image for a future trial should be doable with code components. e.g. this in the End Routine block will set this iamge for the next trial

nextTrial = trials.getFutureTrial(1)
im1.image = nextTrial['im1file']

The thing that’s going to be confusing is that, if you typically set the image at the end of your trials, you’ll need to add some additional way to load the very first one.

1 Like

The main idea is: If I have a 300ms stimulus presentation and a 900ms ITI, I’d like to record keypresses for the whole 1200ms. Putting, say, a 50ms preload period up front might be okay though…

Would doing the End Routine (really, I guess I want it as soon as the stimulus ends) prevent it from re-loading the image at the start of the next trial?

Hi, did you end up getting an answer for this?