Output Statement

The output statement is used to feed floating point samples to an Output device. The samples can be generated by arbitrary mathematical expressions but are usually derived from expressions involving access points.

    Output out1(stereo), out2(mono);
    .
    .
    Score 10 secs:
        out1.chL: string1(0.1);
        out1.chR: string1(0.9);
    
        out2.ch1: string1(0.5);
        ...

As the previous example shows, the output statement consists of the name of an Output object followed by one of the methods ch1, ch2, chL, chR. This is then followed by a colon and then the expression representing the floating point value to be written out to the Output's associated file as an audio sample.

Note that when an access point expression appeears in an output statement, e.g. string(0.1), it evaluates to a floating point value representing the displacement of the instrument along the z axis at that point. It is as if the expression string(0.1).getPosition() had been typed. This short-hand notation makes it easier to read where the output samples are coming from. Of course if you want to use the velocity of the string at that point you could write instead:

    .
    .
        out1.chL: string(0.1).getVelocity();
        out1.chR: string(0.9).getVelocity();

For a more detailed description of Tao's expression syntax see section *.


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