How to minimise delay at end of sequence in javascript
Hi there,
I was hoping to get some advice regarding reduction of a slight delay that occurs at the end of my sequences.
My experiment consists of a series of triplets being presented within blocks. So in a given block, I have a sequence called images and within that sequence there are three sub-sequences (E1 to E3seq). This is set up such that I can present these trials so that three stimuli always occur together but then at the end of each triplet it will move onto one of the other triplets.
https://forum.cogsci.nl/uploads/448/MYE6H368QIVO.pngThe problem is when it gets to the end of E3seq it takes a very slight (but importantly noticeable) delay to load the next set of three trials.
Is there a way to get OpenSesame to load all of the trials in a given block (there are 24 triplets so 72 trials in a block)? I need to use javascript as I want my task to run online, so any inline scripts would have to use javascript. I know that an alternative is to simply list all the trials in order in a loop - I can do that if its the only solution but for the purposes of analysis and introducing randomisation I would prefer to keep it the way I have set it up!
Thanks in advance for any help.
Regards,
Matthew
Comments
Here is the experiment in case that is helpful to see how the task is laid out (I had to remove all the images to get it to upload - apologies!).
Thanks,
Matthew
Hi Matthew,
Not sure whether this helps, but you could get rid of the three individual sub-sequences and put everything into a single sequence (i.e. merging E1-E3seq). Also that extra loop around the loggers is weird (and should probably go.
The general problem (for you) is that sequences are processed in 2 phases: prepare and run, first all the items of a sequence are prepared, and then all of them are run. This has the advantage that the run phases of the individual items (what is seen by the participant) is temporally super tight. However, when the experiment switches to the next sequence, it first need to prepare everything again.
That being said, the timing between sequences will always be worse compared to the timing within sequences, and for the bulk of experimental psychology that is fine. The only solution is to put everything into a single sequence (or take care of the timing yourself by using inline_scripts). In how far this is possible for you, I can't really say. For that I don't understand your script and your goal well enough.
Hope this helps,
Eduard
Hi Eduard,
Thanks for this. My goal is to ensure that the timing between presentation of stimuli is consistent (across and within these sequences). I think you're probably right that the best solution is to put everything into a single sequence. I can't think of many appropriate inline_scripts I could write that would speed up timing between these sequences and perhaps its more elegant to get rid of these E1-E3 seq anyway.
Thanks!
Matthew
P.S. re the extra loop around the loggers: Yes this is weird but I read somewhere else that this is the only way to get the experiment to pass the compatibility check for running the task online whilst using multiple linked loggers. Perhaps there is a more efficient/elegant way to do this but if I take the loops out the exp fails the compatibility check.