Tutorial |
Using the Stop device - stop.tao |
Closing Comments |
Creating an array of strings - stringarray.taoAudio rate: 44100; String string[]= { (8.00 pch, 20 secs), (8.01 pch, 20 secs), (8.02 pch, 20 secs), (8.03 pch, 20 secs), (8.04 pch, 20 secs), (8.05 pch, 20 secs), (8.06 pch, 20 secs), (8.07 pch, 20 secs), (8.08 pch, 20 secs), (8.09 pch, 20 secs), (8.10 pch, 20 secs), (8.11 pch, 20 secs) }; Counter n=0; Param startPluck=0.0, pluckDuration=0.001; Init: For n = 0 to 11: string[n].lockEnds(); ... ... Score 5 secs: At start: n=0; ... At startPluck for pluckDuration: At start: Print "Plucking string ", n, " at ", startPluck, " seconds", newline; ... string[n](0.1).applyForce(linear(1,0)); At end: n+=1; If n <= 11: startPluck+=0.1; // pluck the next string in 0.1 seconds time Print "Pluck string ", n, " at ", startPluck, " seconds", newline; ... Else: startPluck=-1.0; // prevent any more plucks from occurring // by setting startPluck to a negative value. Print "No more strings to be plucked", newline; ... ... ... ...
| ||
Tutorial |
Using the Stop device - stop.tao |
Closing Comments |
©1999,2000 Mark Pearson
m.pearson@ukonline.co.uk April 30, 2000 |