Using the Stop device - stop.tao

This script illustrates the use of the Stop device.

    Audio rate: 44100;
        
    String string1(200 Hz, 40 secs);
    Stop stop;    
    Param position, amount=0.0;
        
    Init:
        string1.lockEnds();
        ...
            
    Score 0.3 secs:
        At 0 secs for 0.1 msecs:
            string1(0.9).applyForce(10.0);
            ...
        
        position=linear(0.1, 0.9);
        	
        string1(position) -- stop;
        
        From 0.05 secs to 0.1 secs:
            amount=linear(0,1);
            stop.setAmount(linear(0,1));
            ...
        
        From 0.20 to 0.25 secs:
            amount=linear(1,0);
            stop.setAmount(linear(1,0));
            ...
        
        Every 0.005 secs:
            Print Time, " ", amount, newline;
            ...
        ...


©1999,2000 Mark Pearson m.pearson@ukonline.co.uk April 30, 2000