Statements |
Label Statement |
Connection Statement |
Method StatementThere are a number of object methods for each class which return no value but are usually associated with setting the attributes of an object such as an instrument or device. These methods are not listed here since they are covered in detail in section *.Briefly though examples of the kind of things which we might do with object methods include setting the amount of damping for a region of an instrument; setting the height from which a hammer should be dropped; and setting the velocity and downward force for a bow. The example below shows how these tasks would be implemented in practice in a script: Rectangle rect(100 Hz, 200 Hz, 20 secs); Bow bow; Hammer hammer; Init: // Damp the bottom left hand corner of the rectangular // sheet with a value of 0.5 rect.setDamping(left, 0.1, bottom, 0.2, 0.5); // Set the drop height of the hammer hammer.setHeight(10.0).reset(); // Set the initial velocity and downward force of the // bow bow.setVelocity(0.0).setForce(1.5); ...
| ||
Statements |
Label Statement |
Connection Statement |
©1999,2000 Mark Pearson
m.pearson@ukonline.co.uk April 30, 2000 |