Expressions |
Mathematical Functions |
Compiling and Executing a Tao Script |
The time-varying functions linear and exponTwo simple time varying functions are provided for use in a score:linear(<initial>,<final>) expon(<initial>,<final>) The time interval over which they change is determined by the scope
in which they appear in the score. In other words they take their
start and end times from the Audio rate: 44100; Init: ... Score 1 sec: Every 0.1 secs: Print "At time ", Time, " linear value=", linear(0,1), " expon value=", expon(0.001,1), newline; ... ... When invoked this script produces the following output: At time 0 linear value=0 expon value=0.001 At time 0.1 linear value=0.1 expon value=0.00199526 At time 0.2 linear value=0.2 expon value=0.00398107 At time 0.3 linear value=0.3 expon value=0.00794328 At time 0.4 linear value=0.4 expon value=0.0158489 At time 0.5 linear value=0.5 expon value=0.0316228 At time 0.6 linear value=0.6 expon value=0.0630957 At time 0.7 linear value=0.7 expon value=0.125893 At time 0.8 linear value=0.8 expon value=0.251189 At time 0.9 linear value=0.9 expon value=0.501187 At time 1 linear value=1 expon value=1 It should be noted that in the current version of Tao the tools provided for generating time varying functions are somewhat lacking when compared to Csound and its plethora of function table generators and its ability to create multi-segment linear or exponential curves. This deficiency will be addressed in a future version, probably with the introduction of a completely new set of table-based objects for use within a script.
| ||
Expressions |
Mathematical Functions |
Compiling and Executing a Tao Script |
©1999,2000 Mark Pearson
m.pearson@ukonline.co.uk April 30, 2000 |