Representing timing dependencies

You can represent timing dependencies with syncable clocks. Multiple clocks can be synchronized to the same master clock, which allows you to build clock hierarchies. You can use these clock hierarchies to determine the timing dependencies based on the clocks in the hierarchy. If you need to change the timing dependencies, you can change the clocks instead of recalculating time or delays.

NOTE You should use a different clock for each different timing dependency that you want to represent. That way, you can change any timing dependency by simply changing the clock.

For example, an animation can be described on a clock that indicates when each frame should display. By synchronizing the animation clock with another time source, you can play the animation in sync with audio, MIDI, or video.

The animation can control internal timing aspects by using different clocks. If the animation depicts a butterfly that flaps its wings as it moves across the horizon, the rate at which the wings flap might be dependent on how fast the butterfly moves. If you control the flapping rate with one clock, and the butterfly's speed with another, you can control the dependency by synchronizing the clocks and setting the desired rate.


You can take it further and base the butterfly's speed on the video playback rate, and the flapping rate on the sound playback. To accomplish this, you would synchronize the butterfly speed clock with the video clock, and the flapping rate clock with the sound clock.


By using different clocks for each timing dependency and synchronizing the clocks, you can move the butterfly in sync with a video background and flap its wings to the beat of the sound track. The animation would still be synchronized to the real-time clock because it would still be drawing at a real-time frame rate.

NOTE By default, the rates of the sound and video clocks are based on the system clock.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker