MODELING AND IMPLEMENTING TILING RHYTHMIC CANONS IN THE OPENMUSIC VISUAL PROGRAMMING LANGUAGE CARLOS AGON AND MORENO ANDREATTA HIS ARTICLE PRESENTS tools for the construction of tiling rhythmic canons, implemented in the OpenMusic visual programming language . After a brief presentation of OpenMusic, we will focus on the description of the MathTools environment and its most relevant objects, which enable a composer to produce several classes of tiling rhythmic canons by means of constraint programming, group factorizations , and polynomial representations. Examples of tiling rhythmic canons include canons by translation (from the simplest cases to the cyclotomic canons and Vuza canons) and by augmentation (i.e., canons obtained by affine transformations). T Modeling and Implementing Tiling Rhythmic Canons 67 1. THE OPENMUSIC VISUAL PROGRAMMING LANGUAGE AND THE MATHTOOLS ENVIRONMENT OpenMusic (OM) is a visual programming environment dedicated to music composition, designed and developed at IRCAM. It allows for the creation of and experimentation with compositional models through programming by means of a graphical interface that represents musical structures and processes. In order to facilitate the understanding of the illustrations in this paper, the basic concept of patch will be explained in this section.1 A patch is a graphical representation of a program. In a patch, boxes represent functions, each one having a set of inputs (at the top of the box) and a set of outputs (at the bottom of the box). These boxes can be connected together in order to create the functional layout of the program—i.e., what it will do. OM possesses a number of functions of varying complexity and specialization and new ones may be created by the user. Example 1 shows a simple patch using the functions for the addition and multiplication of integers. It is the graphical equivalent of the expression 36×100. If the number 3 in the expression 36×100 is made into a variable, the result is a single-parameter function defined as follows: f x =x6×100. Example 2 shows the patch corresponding to this function, where the initial value 3 is replaced by a variable x. From a graphical point of view, this variable is represented by an EXAMPLE 1: A PATCH THAT CORRESPONDS TO THE EXPRESSION 36×100 68 Perspectives of New Music arrow-shaped box (at the top of Example 2) whereas the output arrow (at the bottom) specifies the value that results when the patch is calculated. The patch in Example 2 can, in turn, be considered as a function call, and may be used in the form of a graphical box in other patches. This makes it possible to create functional abstractions that can then be used in various contexts. Example 3 shows the patch from the previous example in the form of a box, with the number 5 as its argument. The result of the calculation in this patch will therefore be f 5/10= 56×100/10=110. This demonstrates the embedding character of the patch object—i.e., the possibility of nesting a patch within a second patch (and so on). Data structures (classes) can be used in the patches in order to create and manipulate objects (particularly musical ones). These structures are also shown as graphical boxes with inputs and outputs that provide the program access to their content. Example 4 shows a patch for generating a musical sequence algorithmically. It contains a BPF-type object (break-point function), a chord sequence (represented in absolute time values), and a voice (chord sequence in musical rhythmic notation). Among the OpenMusic objects which are most frequently used by composers are the following musical classes: CHORD, CHORD-SEQ, POLY (polyphony made up of several voices), MIDIFILE, SOUND (audio file), etc. Each object class possesses a graphical editor, enabling the display and manual editing of musical data. Example 5 shows the graphical editor of the voice type object that was constructed in Example 4. EXAMPLE 2: A PATCH THAT CORRESPONDS TO THE FUNCTION f x =x6×100 Modeling and Implementing Tiling Rhythmic Canons 69 EXAMPLE 3: THE RECURSIVE CHARACTER OF THE PATCH OBJECT EXAMPLE 4: CREATING A MUSICAL SEQUENCE IN A PATCH WHERE THE PITCHES ARE GENERATED FROM THE DATA...