Control Structures

Tao's score language provide a set of constructs for scheduling events in a performance. These are referred to as control structures and include the following:

    At <t>: <body> ...
    At <t1> for <t2>: <body> ...
    From <t1> to <t2>: <body> ...
    Before <t>: <body> ...
    After <t>: <body> ...
    ControlRate <k>: <body> ...
    Every <t>: <body> ...

In each case <body> is the code which is to be executed at the scheduled time. In the case of At the code is executed once at the given time <t>. For At..for and From..to the <body> is executed on every tick in the interval defined by <t1> and <t2>.

Before and After also define time intervals during which the <body> is executed on every tick but the behaviour is slightly more context dependent as we will see later in this section. For ControlRate the code is executed on every <k>'th tick and finally, for Every the code is executed repeatedly once every <t> seconds (other units can be specified).

In each of the control structures introduced above there is a head part which determines when the body will be executed. For most of the control structures the head consists of some sort of test to see what the value of the system variable Time is compared to the given values. This variable keeps track of the amount of sound synthesised so far - i.e. performance-time - not real-time. If the particular condition specified is met then the body of the control structure is executed.

What follows is a more detailed look at the syntax and behaviour of the various control structures.

  • At
  • At..for
  • From..to
  • Every
  • ControlRate

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