Generalising Generalised Time Functions 

Peter Desain and Henkjan Honing

NICI	Computational Linguistics
Nijmegen University	University of Amsterdam
PO. Box 9104	Spuistraat 134
NL-6500 HE Nijmegen	NL - 1012 VB Amsterdam
desain@nici.kun.nl	henkjan@alf.let.uva.nl

Extended Abstract

In this paper a solution is presented to problems that arise when continuous control of parameters is linked to a discrete, note-based composition framework. When a control function is coupled to a note that may later change its duration or timing in a transformation, the resulting behaviour of the time function is problematic. It is often solved by introducing different primitive stretch transformations, one for each alternative (Dannenberg, McAvinney & Rubine, 1986; Anderson & Kuivila, 1989). The solution we proposed is to generalise each control function to a function of more parameters - each parameter reflecting a different aspect of time. Instead of defining different transformations on a simple time function, we can now have simple transformations acting on a more complex time function. Furthermore, two further generalisations of the Generalised Time Functions proposal (Desain & Honing, 1991; 1992) will be described introducing the use of structure and real-time control.

In the early history of computer music composition the systems available took either a monolithically continuous approach, inspired by signal processing (Mathews & Moore, 1970; Berg, 1979), or used a discrete, note or event based technique (Hiller, Leal & Baker, 1966; Koenig, 1970). Although some early work stressed the importance of hybrid systems (Mathews, 1969; Buxton, Sniderman, Reeves, Patel & Baecker, 1978), the division became even more obvious once MIDI had lured designers into building composition systems close to this note-based protocol. With the recent advent of cheap signal-processing hardware that allows a more natural continuous control over parameters during each note’s evolvement, the quest for elegant constructs for composition languages supporting both worlds is on again. During this whole history some researchers foresaw these developments and made attempts to bridge the gap, by stating the problems (Dannenberg, Dyer, Garnett, Pope & Roads, 1989; Honing, 1991) and proposing solutions to them (Dannenberg, McAvinney & Rubine, 1986; Anderson & Kuivila, 1989). In our opinion, most are still unsatisfactory because of several reasons. Sometimes a solution is based only on global time, prohibiting the composer to think in terms of local constructs. Solutions proposed for object-oriented composition systems often suffer from a declarative/procedural confusion whereby transformations and musical objects form no orthogonal sets (each new transformation added has to take all object types and all existing transformations into account). This inevitably leads to the situation whereby some transformations cannot be done twice or some combinations cannot be done in an arbitrary order. Sometimes a way of communicating information between objects and transformations is proposed with which the problems are solved, though in a non-trivial, almost procedural way. But let us first explain a problem that became a touch-stone in the descriptions of these systems.

The problem
A most natural thought, when bored with note-based discrete systems, is passing to each note continuously variable functions of time as parameters instead of constant values. In this way continuous control can be brought to systems based on discrete events. The control functions passed are functions of the actual time, and elegant ways can be given to build and transform them. One can regard these functions as control signals that only depend on one parameter: the time elapsed since the start of the note. When such a control function is coupled to a note that may later change its duration or timing in a transformation, the resulting behaviour of the time function is problematic. For example a transformation that stretches the duration of a note several alternatives are possible, as is shown in Figure 1a. 
The time function might just repeat itself as long as the note last. It could also stretch along with the note. Or it could stay in place and define a zero value for the rest of the time. All these behaviours (and mixtures of them) are sensible in certain musical contexts. If the time function is intended as a vibrato, it should repeat itself. If it has the characteristic of a glissando, an elastic stretch is more appropriate. If it is meant to define an initial ornament or the attack of the note, the third alternative is the correct behaviour. This issue is often called the “vibrato problem” : a vibrato should not slow down when a note is stretched, but a glissando, defined by the same means, should.

Figure 1. Two examples of time transformations on an arbitrary time function: a) stretching the duration, and b) shifting the onset of the discrete structure.

A solution
A well known approach to this issue defines different stretch transformations, one for each alternative. But instead of defining different transformations on a simple time function it might be better to look for a simple transformation on a more complex time function. The solution we propose is to generalise each control function to a function of more parameters - each parameter reflecting a different aspect of time. 
Let us look first at functions of two parameters:  the duration of the note and the time elapsed since the start of the note. A time function then becomes a surface, as is shown in Figure 2. After a stretch transformation or a setting of the note's duration, a simple look-up of a cross-section of this surface yields the control envelope. 
A related concern is the use of a relative or absolute start-point for the time-base used. The use of an absolute time scale is sometimes preferred by composers because of the (false) impression of total control. However, it implies that an envelope has to be redefined each time it is used at another point in time. This can be avoided by using a time-base relative to the object under construction - this is what we did when we used “the time elapsed since the start of the note” as one of the time parameters. This does not mean that the notion of absolute time control can be ignored. It is indeed indispensable when time relations with events outside the musical piece (say the midnight church bells) are to be taken into account, or, as is the case more often, when relations between different  musical objects have to be maintained (e.g. a synchronised vibrato between different voices). The question now becomes what happens if a note and its attached time function controlling one of its attributes is shifted (or positioned) in absolute time. 
Again several alternatives make musical sense: an ornament should shift along invariantly with the note, while a vibrato that is intended to synchronise among voices should not (see Figure 1b). The same approach applies here - time functions should have one more parameter specifying the absolute start time of the note they are attached to. 
One of the advantages of generalised time functions over the use of different stretch and shift transformations is that it still works hybrid - or composed time functions. 

Figure 2. Surfaces representing  vibrato,  glissando, and ornament time functions as a function of duration and the elapsed time since the start of e.g. the note.

Time function composition
The control functions shown so far are stylised examples and rudimentary in their musical value. Much more elaborate envelopes are needed, but they can all be based on the same idea because the solution still works under time function composition. Building a comprehensive set of musically useful time functions can best be done by supplying some simple, basic time functions and ways of building complex ones by transforming and combining them. The most simple ways are plain additive and multiplicative combinations. More elaborate mixtures like interpolation are easily build on top of them. Concatenation - or switching between different time function sections as in the building of a traditional ADSR - envelope, has a straight-forward generalisation to multiple parameters. An even richer world of possibilities opens up when time functions accept time functions as arguments, their parameters may then change over time as well. Consider a vibrato that is given a ramp function to control its rate from the begin of the note to the final rate reached at the end of the note. If the note is made longer by a stretch transformation, the evolvement of the resulting vibrato will indeed slow down - reaching its final rate at a later time, but the pitch movements themselves will pass through more cycles instead of being stretched. This composibility of behaviour: combinations of time functions preserve -in a compound way- the different ways in which their constituent components deal with time, is an important characteristic of the proposed solution.

Characteristics of GTF's 
Generalised Time Functions (GTF's) have multiple times as parameters and as such nicely evade the problems that arise when transforming them. The choice of the precise time parameters to use is more or less arbitrary (e.g. absolute start time, absolute end time and actual time could be used instead of elapsed time since start, duration and absolute start time). This allows for an easy integration in the existing computer composition frameworks. 
Transformations acting on time functions are completely independent of the time functions themselves (transformations and time functions form orthogonal sets); their behaviour is encapsulated and provided automatically. They have composibility of behaviour: combinations of time functions preserve -in a compound way- the different ways in which their constituent components deal with time.
From the hardware perspective the approach has the distinct advantage of being easy to adapt to run on parallel architecture's: each note can be handled by a different processor, without the need for information passing between them, since the generalised time functions provide the necessary behaviour.

Generalising GTF's 
In the full paper two important extensions to the micro-version (see Desain & Honing 1992) will be described. First, the introduction of structure allows time functions to be linked to specific parts of a compound musical object. This generalisation of the bindingconstructs described in Desain & Honing, 1992 allows e.g. for inter/extrapolation of time functions. Second, the formalism is extended to deal with real-time situations where duration is not (yet) known, towards an integration of the real-time and non-real-time aspects of time functions in one abstraction. 

References
Anderson, D. A. & R. Kuivila. (1989) Continuous Abstractions for Discrete Event Languages. Computer Music Journal 13(3).
Berg, P. (1979) Pile, A Language for Sound Synthesis. Computer Music Journal 3(1). 
Buxton.W., R. Sniderman, W. Reeves, S. Patel & R. Baecker. (1978) The Use of Hierarchy and Instance in a Data Structure for Computer Music. Computer Music Journal 2(4). 
Dannenberg, R., L. M. Dyer, G. E. Garnett, S. T. Pope, & C. Roads. (1989) Position papers. In Proceedings of the 1989 International Computer Music Conference. San Francisco: ICMA.
Dannenberg, R., P. McAvinney & D. Rubine. (1986) Artic: A Functional Language for Real-time Systems. Computer Music Journal 10(4).
Desain, P. & H. Honing. (1988) LOCO: A Composition Microworld in Logo. Computer Music Journal 12(3).
Desain, P. & H. Honing. (1991) Generalized Time Functions. In Proceedings of the 1991 International Computer Music Conference. San Francisco: ICMA.
Desain, P. & H. Honing. (1992) Time Functions Function Best as Functions of Multiple Times. Computer Music Journal 16(2).
Hiller, L., A. Leal & R. A. Baker. (1966) Revised MUSICOMP manual. Technical Report 13. University of Illinois, School of Music, Experimental Music Studio.
Honing, H. (1992). Issues in the Representation of Time and Structure in Music. In Music and the Cognitive Sciences, edited by I. Cross and I. Deliege. Contemporary Music Review. London: Harwood Press. (forthcoming)
Koenig, G. M. (1970) Project 2. Computer programme for calculation of musical structure variants. Electronic Music Reports 3. Utrecht: Institute of Sonology. 
Mathews, M. V. & F. R. Moore. (1970) GROOVE: A Program to Compose, Store and Edit Functions of Time. Communications of the ACM 13(12)
Mathews, M. V. (1969) The Technology of Computer Music. Cambridge, Mass: MIT Press.