The time machine is designed to exploit a major advantage of additive synthesis: the ability to smoothly manipulate the rate and time when timbral prototypes are used indepently of other parameters such as pitch.
Most of the kinds of timbral prototypes in CAST have the notion of producing a set of timbral data given a particular "virtual time" (AKA "vtime"). For example, the timbral prototype that plays back data from a .fmt file uses the virtual time input to index to a particular point in the file. The Time Machine establishes the notion of a virtual time for each voice in the synth and provides a number of ways to manipulate that vitual time.
|rate||rate||float||Determines how fast virtual time changes in relation to real-time. So a value of 1.0 means forward in real-time. -2.0 means twice as fast as real-time and backwards. 0.0 means time is frozen. This is a good way to explore a timbral prototype.|
|goto||seconds||float||Sets the virtual time immediately to the given value. Virtual time will then advance according to the rate. "goto 0." is the standard way to play a dataset from the beginning|
|goto-rel||Position in file from 0.0 to 1.0||float||Just like goto, except that instead of the argument being a time in seconds, it's a ratio from 0. (the beginning of the file) to 1. (the end of the file). This is good for building scrub interfaces that work on any length file.|
|approach||seconds||float||This parameter is used in applications where you want the time machine to be a slave to a client side time base. When the time machine recieves an approach value it adjusts the rate of its clock to arrive at this value 50mS in the future. Repeated "approach" messages therefor cause the time machine to follow the client's time values smoothly.|
|max_vtime||seconds||float||Sets a maximum value for the voice's vtime. When the voice reaches that time, it will "stick" there indefinitely until you make the rate negative or jump to an earlier time.|
|max_partials||# partials||int||Sets the maximum number of partials that will be heard for this voice. It's a kludge for this parameter to be in the time machine; it's here because the time machine is the very first transform, so if we limit the number of partials here none of the other transforms will process the extra partials.|
|target_max_speed||rate||float||Maximum allowed speed to reach target.|
|target_min_speed||rate||float||Minimum allowed speed to reach target.|
|target||Desired vtime in seconds, real time to get there in seconds||2 floats||Sets a target.|
|timed-goto||Desired vtime in seconds, real time to get there in seconds||2 floats||Sets the rate so the given vtime will be reached in the given amount of time. (See below for details.)|
|timed-goto-rel||Position in file from 0.0 to 1.0, real time to get there in seconds||2 floats||The goto-rel version of timed-goto|
The target feature allows you to schedule a voice to arrive at a given vtime at a certain number of seconds in the future. Until the voice reaches the target vtime, it is still possible to control the rate and/or absolute vtime position of the voice explicitly. However, at some point, the target feature will take over control of the rate of the voice to ensure that the target is reached at the correct time.
If a target has been set, then on every synthesis frame, the synth calculates the average speed that would be required to reach the target vtime from the current vtime in the time remaining. As long as that speed is within the limits set by the target_max_speed and target_min_speed messages, the synth allows the user to control the rate and position of the voice. But if the required average speed is outside the acceptable range, the synth ignores the rate requested by clients and instead sets the rate so as to reach the target correctly.
These features are like the target feature in that they allow the user to specify a virtual time that will be reached at a certain point in the future. The difference is that the target feature is designed to allow the user to control the rate (within limits) until the target is reached, while the timed goto features set the rate to a constant value until the target is reached. After the target is reached, the rate reverts to the value of the most recent rate message for the voice.
Forward full ahead:
/voices/0/tm/goto 0.0 /voices/0/tm/rate 1.0
/voices/0/tm/goto-rel 1.0 /voices/0/tm/rate -1.0
Forwards double speed:
/voices/0/tm/goto 0.0 /voices/0/tm/rate 2.0
Forwards half speed:
/voices/0/tm/goto 0.0 /voices/0/tm/rate 0.5
Steady state browse:
/voices/0/tm/goto 0.5 /voices/0/tm/rate 0.0 /voices/0/tm/goto 1.0 /voices/0/tm/rate 0.0 /voices/0/tm/goto 1.5 /voices/0/tm/rate 0.0 /voices/0/tm/goto 2.0 /voices/0/tm/rate 0.0
Play back a dataset and have it take exactly 3.14159 seconds (regardless of the length of the dataset):
/voices/0/tm/goto 0. /voices/0/tm/timed-goto-rel 1. 3.14159