Page  185 ï~~Dynamic Intonation for Keyboard Instruments Roger C. Munck-Fairwood Department of Computer Science, University of Copenhagen Universitetsparken 1, DK-2100 Copenhagen, Denmark rogf~diku.,dk Abstract Two schemes for dynamic tuning of a standard keyboard are presented. The first is tonality-based where the sequence of notes being played is used to infer the tonality at any time; this information is used to select a non-equal-tempered tuning. The second scheme is chord-based and aims to keep the currently sounding intervals pure. Finally, a way of combining these two schemes is presented. 1 Introduction The standard keyboard adopts the compromises of 12 notes per octave and equal tempering. The availability of electronically tunable sound generators opens up the possibility of automatically achieving (near-) perfect intonation, rather than the usual approximations to perfect intervals. The practicalities of fine-tuning each note of a synthesizer dynamically (i.e. during performance) are surmountable; the more challenging problem - rarely addressed - is to decide what pitches to assign to notes. We are not considering here the following: keyboards having more than 12 keys per octave; nonclassical harmony; and input in some form of a score (facilitating note prediction and tonality inference). The system is given only the knowledge of the sequence of notes being played. While several authors [CMJ, 1987] have studied the problem of assigning frequencies to notes to achieve, for example, 'perfect' or more consonant intervals, it still seems unclear what the actual requirements are for the pitches of notes in a real musical context where melodic and harmonic considerations may conflict. It may be thought that 'just' intonation is the ideal (although limited in range of usable tonalities (keys)). Here, tonic, dominant and subdominant chords are perfectly consonant. However, even this intonation is unacceptable in practice because it follows that the chord on the supertonic (II) is far from consonant. Thus, even a 'just' intonation which could be adapted to different tonalities (manually or automatically) is virtually useless. This is the reason why other non-equal temperings have been used historically, e.g. meantone, which gives reasonable approximations to consonant intervals in a limited range of tonalities. A poorer approximation is the ubiquitous equal temperament which has the advantage of being acceptable (to some listeners) - although equally poor - in all tonalities. We present here two major areas of improvement to non-equal static approximations (such as meantone) in order to achieve closer approximations to consonant intervals: * An automatically movable tonality-base applied to a good non-equal approximation (e.g. meantone). * Finer tuning of the approximated intervals according to the chord currently being sounded. We now examine these two approaches and then see how they can be combined. 2 Movable tonality base Meantone tempering is still used for some pipe organs and gives good results (although not perfect) in a small range of tonalities. We suggest here making the base of the approximation move according to the sequence of notes being played. This requires some kind of tonality inference [Longuet-H., 1987,Holtzman, 1977], a task which is in general difficult, possibly ambiguous and to some degree subjective. However, our approach here (which we believe is novel) is to capitalize on the facts that (a) the almost unavoidable ambiguities in inferred tonality are likely to lie in a harmonically related neighbourhood and (b) a non-equal tempering is likely to sound reasonable in a neighbourhood related harmonically to the base tonality. For example, if the actual tonality of the music being played was A major and the inferred tonality E major (an error of one sharp too many), then the tuning would be based on E major; but this would give reasonable results for the music played in A major. ICMC Proceedings 1994 185 Interactive Performance

Page  186 ï~~Because of this graceful error tolerance, our method for tonality inference can be very simple. The only input information considered is the 'next note played' (N) (e.g. a 'key-on' MIDI event); the concept of history is implemented by a 'current tonality' variable (T) which only changes when necessary. A necessary change is initiated when N does not belong to the note-set of T. The change in T is the minimum harmonic distance (i.e. minimum number of steps around the 'circle-of-fifths') necessary to accommodate N. Minor tonalities are handled by equating them to their relative majors, since a minor tonality should have the same tonality-base (for tuning purposes) as its relative major. Thus, the note-set of the Cmajor/A-minor tonality is {c, d, e, f, f#, g, g#, a, b }. There are 12 such sets. Each set includes the ascending- and descending-melodic and harmonic minor scale steps as well as the relative major scale steps. This avoids the need to consider any details of note sequences, but makes the system fairly 'inertial' or tolerant to would-be accidentals or essential tonality-inferring notes. Many improvements are of course possible, but this approach is likely to be acceptable given the error tolerance mentioned above. 3 Chord-based intonation Even with perfect tonality inference, the above scheme only provides an approximation to the intervals of a single tonality (e.g. the fifths are not pure in meantone). The alternative strategy considered here is to examine all the notes actually sounding at any one time and adjust their pitches so as to achieve perfect intervals. We consider for simplicity only the cases of major and minor triads, or isolated thirds and fifths. Octaves are assumed to be always perfect. While it is straightforward to determine whether a triad is being sounded it is not at all obvious how to adjust the pitches. Blindly adjusting pitches for perfect intervals can lead to gross pitch drifting (such as can easily occur with a choir). Thus, we adopt a nominal pitch-centre for each note, based on, say, the equal-tempered pitches. Pitch adjustments must not take the notes further than a certain distance from these pitches. However, this compromises the melodic stability since it follows that voices (parts) do not necessarily intone exactly the expected scale steps of the tonality. It can even mean that repeated or tied notes must change pitch to match a changing harmony. We have decided to allow such melodic compromises because (a) melodic intonation is subjectively not as critical as harmonic consonance and (b) this corresponds to the flexibility practiced by groups of non-keyed instruments (where tied notes may in deed change in pitch). 4 Combining techniques A part of our scheme (which we believe to be novel) is to combine the tonality- and chord-based strategies by using the tonality-based pitches as the centre-pitches for the chord-based fine-tuning. Thus, the nominal pitch - from which a note must not wander too far in adapting to other notes - is related to the inferred key and thus is a better approximation than, say, an equal-tempered pitch. Thus, this combined strategy can be thought of either as (a) fine-tuning of a dynamically adapting non-equal tempered scale, or (b) providing keydependent nominal pitches for chord-tuning. In this way, the weaknesses of each strategy can be supported by the other strategy. It also corresponds roughly to the practice of string-orchestra players who both listen-and-adjust and have a sense (aural and tactile) of centre-pitch. 5 Preliminary results Our preliminary results will be presented at the Poster Session. Acknowledgements I thank Marc Walker and Otto Wittner for work on an initial implementation of the tonality-based approach, undertaken at the University of Surrey, U.K. I am grateful for the facilities provided at the Department of Computer Science, University of Copenhagen, Denmark, where this paper was written, and especially thank Jens Arnspang for his encouragement. References [CMJ, 1987] [Holtzman, 1977] [Longuet-H., 1987] Various authors. Special issue on tuning and temperament. Computer Music Journal, 11 (1), 1987. S. R. Holtzman. A Program for Key Determination. Interface, 6: pp. 29-56, 1977. H. C. Longuet-Higgins. Mental Processes, MIT Press, Cambridge, Massachusetts, 1987. Interactive Performance 186 ICMC Proceedings 1994