Bow Methods

The main attributes of a Bow device are the force with which it is applied to the instrument (which has a marked effect on the bow's ability to sustain the frictional forces needed to move the instrument), and its velocity. The following methods are available with a bow.

    setForce(<force>)
    setVelocity(<velocity>)
    getForce()
    getVelocity()
    (<accessPoint>)
    (<instr>, <x>)
    (<instr>, <x>, <y>)

The last three methods provide three different ways to apply a bow to an instrument. The first specifies an access point, the second an instrument and a single x coordinate (for a string), and the third an instrument and both x & y coordinates.

Although these methods are available in a script an alternative syntax is usually used for applying a bow to an instrument at a specific point. This consists of the access point specification (the instrument name followed by the instrument coordinates enclosed in parentheses) followed by the apply operator: --, followed by the name of the bow. For example in the following code fragments the left and right hand sides are exactly equivalent:

    Bow bow;
    
    Init:
        bow(string(0.1));    <==>    string(0.1) -- bow;
        bow(rect(0.5,0.7));  <==>    rect(0.5,0.7) -- bow;
        ...


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