Within a routine, I would like a new component to start precisely at 3 seconds after the previous component has finished. For example, I have one audio stimulus (.wav) file, then I wish to have exactly 3 seconds of silence/delay, and a new audio stimulus (.wav file) to start exactly 3 seconds after the previous stimulus has FINISHED.
So far within a routine for the second component I do:
start (time, seconds): $PreviousComponent.getDuration() + 3
where PreviousComponent is the first audio stimulus, and it starts at 0.0 of the new routine
However, this is not precise, as it does not account for a possible delayed start of the first stimulus, but instead is based on the pure theoretical duration of the previous sound, rather than when it actually ended.
I would like a simple statement to start a new stimulus exactly 3 seconds after the FINISH of the previous component.
something like this:
start (time, seconds): $PreviousComponent.status==FINISHED() + 3
However, this does not work: no error, but that stimulus simply never starts. Identical situation when I put start as ‘condition’ instead of ‘time’. I believe it is because I am mixing conditional statement for .status and time in seconds.
Could you please suggest a builder statement/code component to achieve a start of a new component precisely after x amount of time after the FINISH of a previous component, whilst keeping them both in the same routine?