Towards a Borgean Musical Space: An Experimental Interface for Exploring Musical Models

Musical compositions can be the object of advanced computational modelling. We develop this idea by creating formal models allowing the study of musical works from the repertoire and conceiving corresponding computational tools. From this perspective, one can aim to model, produce and evaluate different instances and configurations of such models. In this paper we discuss an experimental tool, as an attempt to visualise the space of instances that can be generated from a musical piece’s model. This tool consists in an interface attached to a class in the OpenMusic environment, where parameter values are compared with the result of analytical descriptors, as that of ‘cognitive-sonance’ from the “Sonic Object Analysis Library” (SOAL). We demonstrate how this interface works by exploring it with a previously built model of James Tenney’s piece, the Spectral Canon for Conlon Nancarrow.


INTRODUCTION
It was demonstrated that existing musical scores can be rebuilt or generated using computer models (Riotte & Mesnage 2006) and it was suggested that neighbouring variants can also be produced by such procedure: [...] for us, to model a musical score is to model the composition process by an algorithm able to reproduce, either the score or the neighbouring variants obtained by a different set of parameters.(Rokita 1996).However, it was not clear then if these variants were of any musicological or creative interest.
Our premise is that a musical score is one single occurrence of a system's particular configuration.Musical variants are envisaged by modelling the behaviour of such systems and by modifying its parameters values.
We call those variants the different instances of a piece.Being similar or unlike, instances are ontologically related.Their study results in further knowledge about the musical work's inherent attributes and open for new creative possibilities.Hypotheses about a musical composition's structural attributes can be verified by simulation and conclusions can be made methodically.The original score could prove to be, or not, an optimal occurrence of the system.
The model is a computer program consisting of a group of subroutines that allows the reconstruction of the musical score or some of its specific aspects.We test different settings of such model, generating and analysing instances for explicative and speculative means.The model inputs are parameter values, its output is symbolic musical data.
The subroutines implement music composition techniques and related musical tasks.
Aspects of a musical score that reflect compositional "choices" are implemented as parameters.The model conception is based in preliminary musical analysis of the chosen piece.The analysis of the musical score and its different instances generally follows musicological practice.
In this paper, we discuss a tool we developed as a first attempt to address the large number of variants a model can produce.Argentinian writer Jorge Luis Borges in his short history "The Library of Babel" envisaged a space that is finite but contains a countless number of instances.We try with our tool to visualise such a space and create relationships between the instances figured in it.
For this purpose, we use a model we built previously, reconstructing James Tenney's piece Spectral CANON for CONLON Nancarrow (see De Paiva Santana et al. 2013).

THEORETICAL FRAMEWORK
Musical and extra-musical models, as well as the use of modelling, played different roles through the evolution of most civilisations' music practice, displaying rich interactions between human knowledge and human activity.André Riotte and Marcel Mesnage remark that the concept of model "cover a entire hierarchy of attitudes and operations", the concept being always underlying in music history (Riotte and Mesnage 2006).Examples as old as the Pythagorean and Chinese scales (mathematics), the construction of the organ and violin (acoustics) or the musical initiation through the àkonés in Central Africa and the Indian bandish (pedagogy and cognition) exist among many others.In western music composition, we identify the use of models from the medieval canon and isorhythm to the utilisation of mathematical models in the music of Iannis Xenakis and Jean-Claude Risset.Acoustic models are used in the socalled spectral music.
According to the tripartite system proposed by Jean Molino, in the case of musical composition "it makes sense to speak, for a work or part of a work, of musical system and to focus on the complexity of that system" (Levy 2004).Modelling, a recurring theme in computer music, aims to "formalize various aspects of musical phenomena and to construct the corresponding computer models, with the objective of understanding or analysis, at first, then often creating and producing music" (Bresson 2007).

Concept of Modelling and Simulation in the present work
In our work, we consider a model as a "simplified representation of a complex process which allows a simulation conforming the reality within given limits" (Rokita 1996).
The reconstruction of the musical score is a simulation of the musical composition that is not necessarily faithful to the real act of the composer (or the poietic levelsee next section) (ibid.).Such simulation can serve the purposes of either verification and observation (explicative) or the production of similar processes (creative) (Assayag 1993).

Modelling and Tripartition
From a semiological position, our modelling is based mostly on the immanent properties of the musical score (its neutral level), rather than how the composer made the score (poietic level) or how the piece is perceived by the listener (esthesic level).
The modelling of musical scores can though relate to all levels, as they may not be independent from each other.From Molino's tripartition, Jean-Jacques Nattiez devised six different categories of musical analysis (Figure 1) from which correspondent categories of score modelling can be envisaged (see Nattiez 1987).

Methodology
Our work on the modelling of musical pieces can be separated into three main steps: 1) the formalisation (which includes musical analysis in a broader sense), 2) the elaboration of a corresponding computer model and 3) the exploration of the model (the simulation of compositional decisions and experimentation of variants).
Some pieces were chosen in the very beginning as 'simple' case studies.We opted for pieces displaying a higher degree of clarity in their formal processes, as seen through the reading of the scores or in their audition.In this paper we shall work with an algorithmic piece composed by James Tenney.
We use OpenMusic computer-aided composition environment (Bresson et al. 2011), which offers a large set of ready-to-use functions, performing musical tasks and where new routines can be easily programmed and integrated.In this environment, the output of the model can be heard as an audio or MIDI file, seen as a musical score and fine-tune edited.

SIMULATION OF COMPOSITIONAL DECISIONS IN A PIECE BY JAMES TENNEY
The Spectral CANON For CONLON Nancarrow is a piece for player piano by American composer James Tenney (1934Tenney ( -2006) ) based on the idea of a correspondence between duration and frequency interval ratios.The piece consists of a 24 part canon, where all voices share a same series of decreasing durations (accelerando), which is then reversed (forming a palindrome), and are superimposed following a precisely determined pattern.In Tenney's original version, the piece suddenly stops when a point of synchronism is reached.Another version, conceived in collaboration with composer Clarence Barlow, uses the same specifications as the original but the piece stops when each voice forms a complete palindrome.Our examples in this paper follows Barlow's version.
The key to understand the canonic construction and its uniqueness rely in one idea presented in the influential book New Musical Resources (1930) by Henry Cowell.It consists in a way to correspond durations and frequencies where each element in a series of partials multiplies the frequency and the number of rhythmic beats of a given fundamental.
In the example of Figure 2, the second partial of a fundamental 16 Hz plays twice its frequency and its beats, the third partial thrice and so forth.It can also be viewed as an illustration of the mechanism behind the Rhythmicon, a keyboard instrument capable of playing rhythmic ratios with corresponding pitches invented by Cowell.

Figure 2: Henry Cowell's model to match frequencies
and durations based on the harmonic series.Reproduced from New Musical Resources (1930, p.47).
It proposes a model to correspond frequency and durations based on the harmonic series.
Cowell called 'rhythmic harmony' the selection and superposition of durational ratios in an analogy to the construction of chords based in the harmonic series.The C major chord can be formed from the third, fourth and fifth overtones represented as 5:4:3.He proposed that the same proportion could be rendered as a rhythm.James Tenney used a similar idea when constructing his piece as shows Figure 3.The mathematical formalism that constitutes the base of our model is shown in Figure 4.  Different values for each of the model's parameters were tested.Although we constructed our model from a "neutral perspective", considering mostly its immanent properties, we were able to make assumptions about the composer creative choices, which would correspond to a poesis inductive analysis, from the neutral level to the poietic.
By varying the first duration of the piece, we have concluded that around four seconds, the value used by Tenney is ideal for the listener not to loose interest in the piece, avoiding extremely long durations in the beginning and to not exceed the threshold of onset differentiation in its densest part.
One of the parameters which has the strongest effect in the musical texture is the initial ratio of the series of durations.An instance of the model generated using an initial ratio of 2:1 (Figure 5) rather than 9:8 for the durations leads to an equally well-structured piece but its texture in the "forward segment" is more "choral" than the polyrhythmic one Tenney intended in his homage to Nancarrow.Likewise, keeping the initial 9:8 ratio for all the series (Figure 6), the pitch ambitus becomes too narrow and the canon looses most of its timbre richness and perceptual features.

EXPLORATION OF THE SPACE OF THE MODEL INSTANCES
In our previous examples we used a 'diacronic' representation of the model instances; how its pitch and durational content evolves in time.With this relatively traditional way of representing the instances we were able to appreciate the singularities of a single or small set of parameters variation.We would like, as a further step in our exploration, to show each instance as a point in a space and make relations between a greater number of them.
Such approach has the advantage of demonstrating the 'sensibility' of each parameter, how each of them has an effect in specific characteristics of a large group of instances.
Our idea was to consider those instances 'outside time' and then visualise this space with a graphical interface.We call this tool the Model Xplorer.In its graphical interface one can visualise 2D or 3D plots relating analytical measurements and parameters values on top of the possibility of listening and visualising the score of each instance.It was conceived to be adaptable to other models.
We have tested this tool with our implementation of Tenney's piece discussed above, which is perhaps the simplest model we built in terms of computational power required to generate a large number of instances (see Shvets and De Paiva Santana 2014, for a collaborative modelling of Arvo Pärt's Spiegel im Spiegel).
The Model Xplorer is a special class in the OpenMusic visual programming environment, which takes as an input the functional implementation of the model, and as another input a list of values representing the model parameters and analytical data.The analytical data is the output of descriptors computed on generated instances that can give to the user an estimation of some characteristics these instance.
The tool works in two steps.In a first step a function called "generate-instance" requires a set of values for each parameter to be passed to a subroutine containing the model implementation and the analysis modules.The creation of MIDI files for each instance is possible inside this subroutine.
The function "generate-instance" then saves each instance's parameter and analytical values in a text file in the computer hard disk.
For the examples in this paper, we considered the four parameters of our first implementation of Tenney's piece: fundamental, first duration, number of voices and initial ratio.For the analytical modules we considered the value of the 'last onset', 'mean-frequency and 'cognitive-sonance'.
The first two analytical measurements were chosen as a very simple way to evaluate how the pitch and durational content of the instances change with parameter variation.For instance, as our model is deterministic (no stochastic process is involved), one would expect that the more voices the canon has, the higher is the mean-frequency and the bigger is the last onset, showing a linear relationship.That being the case, the Model Xplorer functions as a way of validating the consistence of the model construction, each parameter variation reflecting a 'reasonable' equivalent effect on the piece's features.
On the other hand, the measurements of the 'cognitive-sonance' module should show a less linear relationship with parameter variation.This analytical function is part of a library developed for OpenMusic called Sonic Object Analysis Library (SOAL).Its description is given as the following: A vector from "maximum consonance" to "maximum dissonance", evaluates the contiguous dyads of the input file (s) on the basis of a weighting of their relative dissonance, according to a pre-defined cognitive/cultural background, and extracts an average value for the whole MIDI file, its "sonance" rate.(Guigue 2010).
In other words, "sonance" indicates how consonant or dissonant a musical file could be perceived according to a weighted table of intervals given as an input based on "cognitive or cultural  'Generate-instances' passes every parameter value in a loop to the subpatch called 'ModelandAnalysis', which contains the functional implementation of the model and the analytical modules.This process could take hours or days to calculate; some information about the current state and results is printed in the OpenMusic console at each step.
The resultant text file is then passed as an input to the 'Model Xplorer' class, which also requires the functional model implementation in order to generate instances inside the interface.
Figure 10 shows the default interface of the Model Xplorer.On the left pane the parameters are represented in movable sliders.Clicking the button "gen instances" will generate a new instance and show a compact representation in the bottom of the right pane.It can also show the score in the appropriate OpenMusic 'score object' editor.Figure 11 shows a window after an instance is generated with some parameter values selected inside the Model Xplorer interface.Note that while the number of voices is fixed (the slider is disabled), the other parameters can still be modified in the left-hand pane.As an experiment, we modified our model to change the value of the 'k' constant (cf. Figure 4) each time an instance is created.Using a similar principle, we also incorporated a function to 'stretch' proportionally the intervals between the frequencies.Those modifications were made using random numbers and were programed to affect 'moderately' the features of the instances.

PERSPECTIVES AND CONCLUSIONS
At this stage, our tool is certainly still limitative.Visualising only one measurement at a time can be restrictive, especially if such a small number of analytical descriptors are used.On the other hand, this attempt has granted us the possibility of better understanding how the model and its parameters behave.It could be used as a quick way to have a global view of the space of instances and after that select a few ones to be considered in a more detailed analysis.
We hope to develop further this tool and share it with the community to discover new and better ways of using it.For instance, we consider that the exploration of a model's various instances would greatly improve with the incorporation of optimisation or search algorithms.Instead of generating a large number of variations at once, we could run simulations until the computer program finds an instance (or a group of them) that corresponds to pre-determined features.To do so, we envisage the implementation of algorithms as simple as the simulated annealing.This strategy would open new applications for our models.
At the same time, with the integration of a greater number of analytical descriptors, the implementation of search algorithms would serve as a useful tool in the hands of many composers who are used to model their compositional processes or to the users of computer assisted composition software in general.It could work in an analogous way to constraint programming in computer music (Truchet & Assayag 2011).

Figure 1 :
Figure 1: Nattiez's six categories of analysis based on Molino's Tripartion: the neutral level, the poietic level (composer's perspective) and the esthesic level (reception)

Figure 3 :
Figure 3: Cowell's original figure modified to show how Tenney adapted the Rhythmicon idea.The fundamental multiplies the rhythmic beats of each new partial Starting from the implementation of the canon's generative process, we built a global model highlighting a number of parameters: first duration of the series, frequency fundamental, number of voices and initial ratio.This model corresponds to the simplest and most explicit generative process, reduced to its essential number of parameters.

Figure 4 :
Figure 4: Reduced formal representation of the series of duration shared with each canonic voice in Tenney's piece.K is a constant representing the value of a "durational octave" from which the first duration of the series (and the first duration of the piece) can be controlled (Source: De Paiva Santana et al. 2013)

Figure 5 :Figure 6 :
Figure 5: An instance of the canon with initial ratio of 2:1 generated from our model.In this instance the musical texture does not feature the polyrhythms of the original version (Source: De Paiva Santana et al. 2013)

Figure 9 :
Figure 9: OpenMusic patch with all the functions and generation of parameter values required by the 'Model Xplorer ' class; the list of parameter values is controlled by the function 'arithm-ser'; with the values showed in the patch, about sixty thousand instances are generated

Figure 9
Figure 9 shows the OpenMusic visual program with all functions required by the class 'Model Xplorer'.The parameter values are generated by the function 'arithm-ser'.It outputs a series based on an initial value, an end value and a step.In this example only five values are calculated for the fundamental (2100 to 6900 by 1200), while there are ten different values to be used as first duration (1 to 10 by 1), 31 for number of voices and 41 for initial ratios.With these settings about sixty thousand instances are generated in one evaluation.

Figure 10 :
Figure 10: Model Xplorer default view.In the left pane parameters are selected using sliders Figure 12 now shows a 2D pane illustrating how the parameter 'number of voices' is related with the 'cognitive-sonance' of each instance in a somewhat unpredictable way, while Figure 13 shows how the number of voices has a logarithmic relationship with the values of the last onset.

Figure 11 :Figure 12 :
Figure 11: View of Model Xplorer window after an instance is (re) generated and showed in a score object (smaller window).A preview of the instance is shown in the bottom of the main window

Figure 14 :Figure 15 :
Figure 14: 3D pane showing how the fundamental and the number of voices are related with the mean-frequency; the mean frequency is represented as shades of grey

Figure 16 :
Figure 16: 3D pane showing the relation between the parameters 'first duration' and 'number of voices', and the value of the last onset of a set of instances, when the value of k is changing randomly each time

Figure 17 :Figure 18 :
Figure 17: 2D pane showing the relation between the number of voices and the value of the last onset when k is changing randomly