Embeds elements of the pattern into the stream until the duration comes close enough to dur.
The duration in beats after which the stream should end, derived from the event keys
The pattern to cut short. This should be an event pattern (returning a stream of events).
measuring tolerance for the total duration to avoid jitter