Repeat using While - Increasing Responses

The second example defines a composition that repeats as long as the response times are below a set value. The Increasing response times clip uses a message and a script that detects any Max Response Time above 700ms to set a track property to false and stop play. The composition will repeat so long as the response times stay below a set value. If any response time exceeds the set value, the composition will stop naturally at the end of the current clip play.

The "Increasing response time" clip has been set up to have messages that will gradually increase their response time and an increase of the current repeat index by 10 per play.

The script in the clip is going to look at the response time of the previous message and, if greater than 700s, will set a track property called While control to false.

The clip in the composition has the repeat type of "While".

The While control track property is initialized to true but is set to false as soon as the script detects a response time that exceeds the specified value (700ms).

When the composition is played, it will continue to play until the While control track property is set to false (exceeding 700ms in our example).