Voronoi Diagrams of Music

download Voronoi Diagrams of Music

of 16

Transcript of Voronoi Diagrams of Music

  • 7/30/2019 Voronoi Diagrams of Music

    1/16

    Voronoi diagrams of music

    Alex McLean

    February 2006

    1 Introduction

    The Voronoi diagram is a mathematical tool applied across many scientific disciplines, but some-how rarely in the field of music. The diagram is described in this essay along with some of its

    mathematical properties which have found many uses since the 17th century. Recent applicationsin the fields of medicine and data visualisation, and a solitary but inspiring paper in the field ofmusic are then explored. From there I explore the practicalities behind mapping musical structuresto the diagram, and finally introduce some ideas and experiments towards introducing possiblynovel applications of the Voronoi diagram to music.

    1.1 The Voronoi diagram

    A Voronoi diagram, as pictured in figure 1, shows boundaries between neighbours. The neighbours,termed sites, are shown as dots, and the boundaries, shown as black lines mark locuses of halfwaypoints between neighbouring sites.

    The black line around each site contains the sites region. The regions are always concave.

    A line between two regions is termed an edge. An edge is always shared by exactly two regions.Where three or more edges meet is termed a vertex. There are always at least three edges ata vertex, but there may be more.

    A Voronoi diagram tessellates, that is, it consists of polygons that fill an entire space withoutgaps or overlaps.

    By connecting all the sites on a Voronoi diagram that share an edge, we find its dual, theDelaunay tessellation.

    The properties described so far have been of the 2D Voronoi diagram generated by point sitesin a Euclidean space. This is the most common form of the diagram, and the one focussed uponin this essay, although other forms will be described with different properties.

    1.2 Terms

    The following terms are used uniformly to refer to the different parts of a Voronoi diagram in thisessay.

    Site A feature belonging to the set from which a Voronoi diagram is generated. Also knownas a generator. These sites are commonly points, but they may also be lines, curves,and multidimensional forms such as discs, spheres, hypercubes and so on.

    Edge A locus of points halfway between two sites. 1

    Vertex A point where Voronoi edges meet.

    Region A region containing the points closest to a site.

    1An edge may also be considered as a pair of half-edges with one half-edge belonging to each neighbour. This

    is useful for considering the direction of a half-edge to be (for example) clockwise in relation to its generating site,where a pair of half-edges would run in opposite directions.

    1

  • 7/30/2019 Voronoi Diagrams of Music

    2/16

    Diagram Unless otherwise specified, in this essay the phrase Voronoi diagram refers to anearest-point Voronoi diagram in two dimensional Euclidean space, generated by pointsites.

    Other terms which may otherwise be ambiguous;

    Live The word Live is used here in the context of live music performance. An analogousphrase in the context of computational geometry would be on-line, where an algorithmruns continually with a live stream of data.

    Music For the purposes of this essay I term music as a series of sound events. That is, musicas it is either played directly by a musician, generated automatically by an algorithm,or livecoded by a musician/programmer.

    Livecoding The act of changing an algorithm during its execution phase, either for the purposesof fast, involved development or during a performance with an audience.

    1.3 History

    The recorded history of Voronoi-like diagrams goes back to the 17th century, when Descartesdrew Voronoi-like diagrams to describe fragmentation of space by the stars, although he does notdescribe rules that would allow us to credit him with inventing the diagram outright. [1, 6][2,203-204] That honour goes to Dirichlet, who described the diagram formally in 1850. Since thenthe diagram has been independently rediscovered many times across many fields of research, andas a result has acquired a number of names.2 Despite their long history, research into Voronoidiagrams are still very much ongoing, spurred on by the influence of computational geometry,which began exploring them in 1975. [7]

    1.3.1 Pre-history - Voronoi diagrams in nature

    Voronoi-like forms occur in nature, most often in growth patterns, for example figure 3 showsflorets growing from sites in the head of a daisy and meeting to form Voronoi regions. [1, p. 470]The sites are arranged in a spiral pattern, which is accentuated by the Voronoi edges. Voronoi-likeforms may also be found in spherulite growing patterns, sand parapets around mouth-breederfish territories[1, p480], giraffe and turtle markings, mud crack patterns and in large scale rockformations such as the giants causeway. These occurrences make it probable that their studyextends earlier than that documented, even before Descartes, as early philosophers spent sometime looking at patterns in nature. [1, p6]

    1.4 Solutions offered

    Some applications of Voronoi Diagrams are explored in greater detail in section 2, but to furtherexplain the nature of the Voronoi diagram, here are some mathematical problems the diagrammost directly helps solve.

    1.4.1 Nearest site problem

    Given a set of sites, what is the closest site to a given point? This is also termed the post officeproblem, after the example of finding the closest post office to a particular building. This is perhapsthe most direct application of a Voronoi diagram, and is applied in many fields including consumerbehaviour analysis [3, Ohyama, pp. 279-290] where the journeys of consumers are modelled asmoving between Voronoi sites, making choices based on distance. Nearest sites calculations arealso central to coding and decoding signals in telecommunications, where a discreet value for amulti-dimensional analogue signal may be found by matching its Voronoi region.[5, Intro, pp. 1-20]

    2Sack and Urrutia [2, 203] list the following names; the medial axis transform in biology and physiology, the

    Wigner-Seitz zones in chemistry and physics, domains of action in crystallography, and Thiessen polygons inmeteorology and geography. Klein [8] also notes its reinvention in the field of Art as the regents graphic.

    2

  • 7/30/2019 Voronoi Diagrams of Music

    3/16

    Figure 1: A Voronoi diagram of random points rendered with qhull and geomview

    Figure 2: Voronoi-like diagram by Descartes, published 1644

    3

  • 7/30/2019 Voronoi Diagrams of Music

    4/16

    1.4.2 Closest pair

    Given a set of sites, which pair are closest together? Without a Voronoi diagram, we might resort

    to searching every combination of sites to find the closest pair. Once we have constructed ourdiagram however, we need only search the distances between neighbours. 3 One example of thisproblem is collision detection and motion planning, where we look for sites most in danger ofcolliding.

    1.4.3 Largest empty circle

    Where is the centre of the largest circle that does not contain any sites? This problem may besolved by finding the Voronoi vertex the furthest distance away from its generating sites, and isalso known as the toxic waste dump problem after its use in placing undesirable objects away fromsites sensitive to them.

    1.5 Dimensions

    In theory, Voronoi diagrams may be constructed in spaces with any number of dimensions. Withsites in Euclidean space the following geometrical forms are generated (with the special case ofpoint sites in brackets):

    Dimensions Edge Region

    1D Point Straight line2D Line (Straight line) Area (Polygon)3D Area (Polygon) Volume (Polyhedron)4D Volume (Polyhedron) 4D Hyper-volume (4D Polytope). . . . . . . . .

    The simplest case is a one dimensional diagram, represented by a line marked with the pointsites along it and Voronoi edges as single points halfway between each neighbouring site. A Voronoi

    region consists of the locus of points between the two edges of a given site. In two dimensionalspaces point sites generate Voronoi edges that are lines, and regions that are polygons. When weadd a third dimension, the edges become facets, and the regions polyhedra.

    It is theoretically possible to keep adding dimensions, and useful to do so for the purposesof abstract geometry, however beyond the seventh dimension we begin to run out of computingpower and storage necessary to keep track of all the data.

    1.6 Space

    When constructing Voronoi diagrams, we generally use Euclidean straight-line distance throughspace. There are alternatives however, including Manhattan distance, 4 where we calculate distanceas if travelling along the lines of a grid. This measure is particularly appropriate when the Voronoidiagram represents geographical space within cities, particularly those with grid-like layouts.

    Further, distance may weighted, for example boat on a river distance, where greater effortis required to travel in one distance than the other, giving a skew. We might imagine spaces withgrid-like paths on a steep hill, which could be analysed using Manhattan distance that is alsoweighted.

    1.7 Beyond point patterns

    Voronoi sites need not be single points in space, depending on the number of dimensions availablethey may be straight or curved lines, areas such as discs or polygons, or 3D objects such as spheresor polyhedra. The complexity of the Voronoi sites have some bearing on the complexity of the

    3If we have a constructed a Delaunay tessellation things are even simpler - the shortest line of the tessellationis the closest pair.

    4

    Manhattan distance is also known as taxicab and city block distance.

    4

  • 7/30/2019 Voronoi Diagrams of Music

    5/16

    regions generated by them. For example, point sites alone may only generate straight line Voronoiedges, but sites that are lines may generate curved edges. A paper showing music mapped as linesis cited in section 2.3.

    2 Current applications

    Voronoi diagrams are a truly cross-disciplinary area of research. This makes the absence of litera-ture about Voronoi diagrams in music conspicuous - only one reference could be found, describedlater in section 2.3. I first visit two other recent papers which give some flavour of how they areapplied within other fields of study, which lead to some ideas about how they may be applied tomusic.

    2.1 Topological analysis in medicine - cancer diagnosis

    Computational diagnostic tools allow automated identification of cancer cells, with the possibility

    of faster and more objective decision making than by human pathologists. As described by Demir& Yener [13], Voronoi diagrams may aid this diagnosis of cancer by describing the topology ofcells within tissue samples. Figure 4 shows such a Voronoi diagram applied to cells found throughautomatic feature extraction.

    Figure 5 shows how different ways of distributing sites generate Voronoi regions with certainfeatures; regular distributions exhibit regions with low variance in the number of edges per re-gion, random distributions show high variance in the number of edges per region, and clustereddistributions exhibit high variance in the area of regions. These features can be captured in met-rics easily calculated during the construction of the diagram, and matched against the clustering,crystallising or randomising effects of disease.

    Similar techniques could be applied in the field of musical analysis, to examine the topologyof a piece of music. Without wanting to be crass, an analogy might even be drawn between

    the relationships between benign and malignant tumours and dissonant and resonant musicalstructures.

    2.2 Data visualisation - treemaps

    The treemap was invented by Ben Shneiderman in 1990 as a compact, spatial visualisation of a treestructure. Figure 6 shows a treemap of a stock market, representing the total value of the marketproportionally divided into market sectors. Each rectangle within a sector represents a company,coloured according to rising or falling value. We can gain some insights into the comparativeperformance and makeup of the sectors, but such a treemap has some problems. The aspect ratiosof the individual rectangles vary enormously, leading to difficulty of comparison by the humaneye. Further, rectangle edges either side of a boundary often meet, leading to false intersectionsand therefore unclear segmentations. Efforts to correct the former problem tend to exasperate the

    latter.[15, p. 2]Balzer et al [15] introduce a method of constructing treemaps as hierarchical Voronoi diagrams,

    consisting of polygons rather than rectangles. In order to properly reflect the data spatially, theirVoronoi diagrams have sites that are weighted and centroidal5. Each site is weighted so thatit produces an area of the correct proportion to the value mapped to it, and centroidal so thatthe polygons are easily compared with one another by the human eye. Their results are visuallystunning and overcome the problems they identify with rectangular treemaps.

    Producing a weighted centroidal Voronoi diagram is computationally expensive, involving manyiterations. Each iteration involves looking at each site in turn, moving it to the centre of theVoronoi region it generates, adjusting the weighting of the site in the direction of its target area,then regenerating the diagram. An iteration does not directly produce either a centroidal or

    5The centroid of a polygon can be described as its mean average point or centre of gravity.

    5

  • 7/30/2019 Voronoi Diagrams of Music

    6/16

    Figure 3: Daisy florets growing to form Voronoi regions. Photo (c) Kenneth Peterson

    Figure 4: Cancer cells as sites on a Voronoi diagram (dotted line) and Delaunay tessellation (solidred line)

    (a) Regular distribution (b) Random distribution (c) Clustered distribution

    Figure 5: Voronoi diagrams of different topologies. See appendix 1 for java applet.

    6

  • 7/30/2019 Voronoi Diagrams of Music

    7/16

    correctly proportioned diagram, but rather is an adjustment towards such an ideal. The numberof iterations required depends on the amount of accuracy required.

    Lerdahl & Jackendoffs General Theory of Tonal Music [18] describes a tree structure behind

    tonal music of groups within groups, for example notes within phrases within themes withinmusical works. Perhaps a Voronoi treemap could be constructed around such groups.

    More generally, the idea of well spaced sites of central gravity within their Voronoi region couldtranslate to musical structure. An experiment in this area is introduced in section 5.3.

    2.3 Grouping - musical polyphony

    In their paper Applying Voronoi Diagrams in the Automatic Grouping of Polyphony,[17] Hamanaka& Hirata describe an application of Voronoi diagrams with reference to Lerdahl & JackendoffsGenerative Theory of Tonal Music (GTTM) [18]. They consider music as a two dimensional space,with one dimension representing pitch interval and the other representing time. Hamanaka & Hi-rata mention two of the seven Grouping Preference Rules (GPR) of the GTTM; GPR2 and GPR3.

    GPR2 is the rule of proximity (in time) and GPR3 is the rule of change, so here they relate GPR2to their time axis and GPR3 to their pitch axis.Hamanaka & Hirata point out a problem of scaling. By mapping time and pitch interval

    to the Euclidean space of a Voronoi diagram they mix three different systems of measurements.How much distance is dedicated per time measurement governs how much weight time has overdistance, with great influence over the results. This amounts to a conflict between GPR2 andGPR3.6

    Hamanaka & Hirata offer a single rule for how groups should be found; the smallest Voronoicell is first merged to an adjacent group. They do not go into further detail in their paper, leavingsome questions. In particular, what happens where there isnt an adjacent group, or if there ismore than one adjacent group? The subject of constructing and grouping within Voronoi diagramsis explored further in the following sections, and an experiment showing a similar approach tomapping but in the area of live music visualisation is introduced in section 5.1.

    This is an interesting paper reporting good results, but covers only a small section of theGTTM, leaving room for further work in this area.

    3 Constructing Voronoi diagrams around music

    As weve seen so far, there is a great body of knowledge surrounding Voronoi diagrams, but littleapplied in the field of music. Our greatest problem is how to map music, in particular live music,to form sites within a Voronoi diagram. Taking the archetypal example of a 2D Euclidean diagram,we have two axes to somehow map the many possible dimensions of a musical event to.

    We must map between a musical space and a Voronoi space, a process called Voronoi assign-ment. Okabe et al [1, pp. 454] define four assumptions as the Voronoi assignment model with Isummarise:

    VAM1 Each point is located simultaneously before any assignment procedure occurs

    VAM2 Each point remains fixed throughout the assignment process

    VAM3 Each point is of equal importance

    VAM4 This assumption describes the Voronoi model and is not reproduced here.

    With live music, VAM1 and VAM2 present a problem for us, we want to construct a diagram live,while the music is played or generated. We see two possible ways around this problem in section??. VAM3 also presents a problem, clearly every musical sound is not of equal importance, to

    6This kind of conflict is to be expected. The GTTM is an application of Gestalt theory to music, and as such

    contains a number of conflicting rules. Research is ongoing to quantify the relationships between and weightings ofthe rules which cause conflicts. Hamanaka & Hiratas scaling amounts to such a quantification.

    7

  • 7/30/2019 Voronoi Diagrams of Music

    8/16

    Figure 6: Stock market treemap from smartmoney.com

    Figure 7: Voronoi treemap of the static structure of the packages, classes, methods and attributesof the software system jfree. A rectangular treemap generated using the slice and dice methodis shown for comparison.

    8

  • 7/30/2019 Voronoi Diagrams of Music

    9/16

    consider them as such is a simplification. Whether such a simplification is acceptable depends onthe context, but we could consider disregarding VAM3 by constructing a Voronoi diagram withindividually weighted sites.

    3.1 Representing the dimension of time

    If we are to represent live music, a temporal art form, it follows that we have to represent timesomehow. If we choose to map time to an axis on our diagram, we have the possibility of creatingVoronoi diagrams on-line using Fortunes sweep method. This method is explored further insection 3.4.

    As mentioned earlier, we may weight a Voronoi diagram, most simply in a single given direction,so should we weight in favour of the direction of time? If a musical event is remembered for a longerperiod of time than it is anticipated then perhaps it may make sense to add such a weighting.This would be another interesting area of research.

    An alternative to showing time as an axis is to render a diagram of a snapshot of time,

    representing the musical events triggered, in progress or reverberating around a space at thatparticular moment. A sequence of these snapshots could be played in quick succession to produceanimated video. This would free up a dimension for the mapping of an extra musical parameterat the expense of losing the full context of time from the diagram.

    3.2 Representing time interval

    How time interval is represented depends on the geometry of the Voronoi sites. The examples inthe paper cited in section 2.3 represents musical notes as lines, with each lines length representingthe duration of the note mapped to it. As a result the generated Voronoi regions reflect the restinterval between the notes.

    An alternative is to use sites that are single points that represent the trigger point, or onset,of the musical event. The duration of the event is therefore not represented, and the generated

    Voronoi regions represent the inter-onset interval (or IOI) of the musical events.Both approaches are valid in music analysis, capturing different aspects of the music. However

    using point sites and their generated IOIs would seem the most suitable approach for rhythmicmusic where the musical sounds are percussive in nature.

    3.3 Representing other musical dimensions

    There are many parameters with which we may describe a musical event such as pitch, timbre,volume, resonance and distortion, each parameter adding a new dimension to a musical space. Ifwe are constraining ourselves to a simple 2D diagram, and have already assigned one dimensionto time, we only have a one dimensional axis remaining to encode all these parameters. Even ifwe do not represent time in the diagram, or to construct a 3D diagram, that still few dimensions

    in which to describe many.Hamanaka & Hirata only represent one of these parameters - pitch. This is adequate for tonalmusic where pitch is the primary property, but what of sections of music dominated by rhythm,where sounds vary primarily in timbre rather than pitch?

    One solution would be to divide the axis between different instruments, for example withpercussive sounds constrained to half of the axis and tonal sounds on the other half. This is theapproach taken in the example shown in section 5.1.

    Another solution could be to take the lead from Lerdahl and Jackendoff, who in the contextof grouping describe all of these parameters within one rule named change. Instead of mappingvalues directly to the axis we could map rates of change from sound to sound. Therefore a steadybeat of bass drum would produce little change and be placed at the bottom of the axis, and aroaming melody would produce large amounts of change and be placed at the top. This is worthfuture experimentation.

    9

  • 7/30/2019 Voronoi Diagrams of Music

    10/16

    3.4 Fortunes sweep-line algorithm

    Sweep algorithms are useful for solving many geometrical problems, where a plane sweeps across a

    space, from left to right7

    , calculating values across the plane as it goes. This is akin to calculatinga series of n-1 dimensional spaces in order to solve an n dimensional space and can be an efficientas well as easy to understand approach. However a sweep line can only calculate values in responseto events across its plane and to the left of it. This makes things difficult when using a sweep-lineto find Voronoi vertices, we cant calculate vertices only based on sites already seen, as sites foundduring later iterations are likely to interfere with them.

    Steve fortune published an elegant solution for this problem in 1987[6]. He found that whilevertices cannot be calculated along the sweep-line, they can be calculated with certainty halfwaybetween the sweep-line and the closest sites. These points of certainty between a site and thesweep-line forms a parabola, and where the parabolas of two closest sites touch, we know aVoronoi edge crosses. Where this crossing lies at the centre of a circle with its edges touching itssites and also the sweep-line, we know the crossing is a Voronoi vertex.

    Fortunes sweep-line is both elegant and efficient, but there is another reason for highlightingit here. It allows us to ignore VAM1 as described earlier. If one of the Voronoi axes is time, wecan place the sweep-line on this axis and have it progress with the movement of time. This allowsus what is termed on-line construction of a Voronoi diagram of live music. An example of this isintroduced in section 5.1.

    4 Automatic grouping

    As mentioned in section 2.3, some success with grouping musical notes has already been reported,but not in detail. In this section I turn to more general literature, which refers to grouping assegmentation, to learn more about how Voronoi diagrams may aid automatic grouping of musicalevents. Duyckaerts et al [11] outline a straightforward method for segmentation which I summarise:

    1 Find the smallest Voronoi region and label it the reference region.

    2 Examine each neighbouring region in turn, and add it to the reference regions groupif its area does not exceed that of the reference region by a given global threshold.

    3 Repeat step 2 for each region newly added to the reference regions group until nofurther neighbouring regions within the threshold can be found

    4 Remove the grouped regions from the Voronoi diagram (in that they may not be chosenagain, the remaining regions are not recalculated).

    5 Repeat from step 1 until no further regions remain

    Ahujan and Tuceryan [10] give a more complex method of segmentation, where each segment isclassified as one of the following five types; an isolated point, a curvilinear structure, a clusterwith an empty interior, a boundary around a cluster or a cluster within a boundary. They assignsites to these segments using properties such as compactness, area, elongation and eccentricity ofsites in relation to their neighbours. Such an approach has been applied to identifying channelsin macro-molecular assemblies and texture segmentation in images. [1, p527]

    It is reassuring that such detailed structural analysis of a point pattern is possible, that we canidentify and separate for example the curvilinear cluster of a rising melody from isolated, perhapsrhythmic notes around it. It seems possible that a detailed comparison between musical formsusing the five types of groupings suggested by Ahujan and Tuceryan would unearth some usefulanalytical techniques.

    7The direction of the sweep can of course be arbitrary, but left to right is assumed here for the ease of explanation.This is in common with the general western perception of time (although some cultures imagine time flowing

    upwards).

    10

  • 7/30/2019 Voronoi Diagrams of Music

    11/16

    5 Proposed applications of Voronoi diagrams to live music

    5.1 Visual reference for musicians and audience members

    Here we visualise the on-line construction of a Voronoi diagram towards two different ends. One isas a reference for the musicians, so they may get a visualisation of the music they are producing.This use deserves experimentation but if we assume that musicians should place all their focus onthe sounds theyre producing, it would follow that such a visualisation would be too distractingto be useful.

    The second proposed use is as a reference for audience members. Again, we could say thatthe audience should be focussing on the music itself, but let us consider the increasingly commonscenario of the laptop performance. Here a performer gazes into their computer laptop screentaking actions unseen to the audience, appearing to be motionless and sometimes disinterested, ina way incongruous to the often highly dynamic sound produced. This perceived distance betweenthe performer and their performance can also be reflected in the audiences sense of involvementand therefore immersion in the performance. Here an on-line Voronoi diagram projected behindor even onto the performer, representing some aspects behind the structure of the music mightlend some visual dynamism to the performance.8

    In order to explore this idea further, I adapted some software by Odgaard and Nielsen so thatit could be controlled by my live music generation software.9 Figure 8 shows screenshots of thesoftware in use. When a musical event occurs, it is represented as a Voronoi site at the sweep-line,shown on the far right of the diagram. The sites position on the Y axis is chosen according to theinstrument and pitch. The regular events shown at the bottom of the diagram represent a simplerhythm, and the clustering patterns above represent a melodic structure. Several features relatedto the Voronoi diagram can be displayed including sites, Voronoi edges, the beachline, Delaunayedges and Delaunay circles. The Voronoi diagram is incrementally calculated at a high framerateallowing smooth transitions, particularly evident in the beachline.

    This software was trialled during a performance by myself and Dave Griffiths at the Make Art

    festival in Poitiers, France early 2006. The results were visually pleasing and later feedback fromaudience members was encouraging.

    5.2 Automatic application of effects to groups of musical events

    As we have seen, Voronoi diagrams allow us to identify clusters of musical events, and calculatemetrics revealing some data about the topology of such clusters. This could allow effects that reactto the structure of the musical events behind the sounds that are being effected. For example,a dense cluster of notes might be enhanced so that each sound can be better distinguished, andmore widely spaced sounds might have some time varied modulation applied to accentuate theirpresence. This process of effecting sounds based on Voronoi metrics would be akin to sonificationof the diagram, the result being an accentuation of topological features of the music.

    Because there is a lag between seeing a site and gathering enough context to construct itsregion, such an approach to live music would introduce a great deal of latency, undesirable wherehuman performers work with sounds directly and require immediate feedback in order to feel inthe moment. It would be most suitable then for performances where humans are manipulatingalgorithms, as their distance from the actual sounds triggered by the algorithms would mean afew seconds latency would not be crucial.

    What is the point though of analysing musical data that has just been produced by an algo-rithm? Surely we have full knowledge of structure of the music as it is being generated, and topost-process it in order to add further musical parameters is not worthwhile? We should considertwo points, firstly there may be several algorithms running concurrently, with the Voronoi analysis

    8Performers are encouraged to show at least some part of their computer music interface to the audience, sothey make further connections with the performance.

    9The original software is viewable as an applet at http://www.diku.dk/hjemmesider/studerende/duff/Fortune/

    . The software was modified with permission of the authors. The modified version is available athttp://doc.gold.ac.uk/ma503am/software/ , and is controllable via the Open Sound Control protocol.

    11

  • 7/30/2019 Voronoi Diagrams of Music

    12/16

    applied to the total output, not that of individual algorithms. Secondly, we may want to keepour algorithms simple for ease of understanding and development, particularly in the case of liveprogramming [14].

    5.3 Spacing musical events

    An occasionally derided but nonetheless useful tool common in music sequencing software is thegroove quantiser. Having marked a discrete set of musical events on a time line, the composerturns to the quantisation tools to automatically shuffle the onset of the events backwards andforwards slightly, usually according to a preset groove pattern, to hide some of the computer aidedprecision behind their method. This is similar to processes of blurring in graphics.

    To investigate whether Voronoi diagrams could aid such shuffling, I conducted an experimentwhere I generated a simple melody and deformed it towards a Centroidal Voronoi Tessellation(or CVT, as seen in section 2.2). Appendix 2 contains audio figures of the melody at differentnumbers of CVT iterations 10.

    An accompanying visualisation for each audio figure, rendered with qhull and geomview, canbe see in figure 9.The hope behind this experiment was that the deformation would make this simplistic, uni-

    form melody sound more natural, has structural qualities accentuated, and perhaps develop aninteresting layer of symmetry. These first results were encouraging, but only during the earlyiterations. The first iteration does indeed add an interesting shuffle effect, but from there themelody quickly becomes unrecognisable. By the time an approximation of a CVT is achieved, themelody is lost, becoming more like a series of chords. Further research might be best focussed onthe early iterations.

    From the first results of this experiment it seems possible that further research might reveal thefirst iteration to be the most useful. It shold be pointed out that at that first stage the outcomeis simply a set of centroids taken from the initial Voronoi diagram, and not an approximation ofa CVT.

    6 Conclusions

    The Voronoi diagram is a cross-disciplinary tool applied widely throughout the sciences, butlittle in the field of music. This essay showed how musical structures can be mapped to Voronoidiagrams, and highlighted some areas where existing techniques may be adapted in the productionand analysis of music, with some focus on live music. Two experiments were introduced, oneapplying Fortunes sweepline algorithm to the visualisation of live music and the other applying aCentroidal Voronoi Tessellation algorithm to a simple melody. While they have not yet met fullanalysis, early results were shown which the author feels exhibit interesting and useful musicalpossibilities.

    An explanation for the lack of literature in the area of Voronoi diagrams and music could notbe found. The early successes of the experiments introduced in this essay and also in the work ofHamanaka and Hirata, as well as the breathtaking range and depth of work in other fields, suggestthat there is much to be gained from further experimentation and study. Areas for future studyhighlighted here include in the segmentation, structural analysis, structural manipulation and thevisualisation of music.

    7 Appendices

    Please view http://doc.gold.ac.uk/ma503am/writing/voronoi/appendices.html with a web browserto view the Java applet and hear the sound files that accompany this essay.

    10The CVT deformations were carried out by a small program written using the C++ CVT library by John

    Burkardt. Burkardts library is available at http://www.scs.fsu.edu/burkardt/cpp src/cvt/cvt.html . My workingsare available in the src folder accompanying this essay.

    12

  • 7/30/2019 Voronoi Diagrams of Music

    13/16

    List of Figures

    1 A Voronoi diagram of random points rendered with qhull and geomview . . . . . . 3

    2 Voronoi-like diagram by Descartes, published 1644 . . . . . . . . . . . . . . . . . . 33 Daisy florets growing to form Voronoi regions. Photo (c) Kenneth Peterson . . . . 64 Cancer cells as sites on a Voronoi diagram (dotted line) and Delaunay tessellation

    (solid red line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Voronoi diagrams of different topologies. See appendix 1 for java applet. . . . . . . 66 Stock market treemap from smartmoney.com . . . . . . . . . . . . . . . . . . . . . 87 Voronoi treemap of the static structure of the packages, classes, methods and at-

    tributes of the software system jfree. A rectangular treemap generated using theslice and dice method is shown for comparison. . . . . . . . . . . . . . . . . . . . . 8

    8 Screen shots of live Voronoi diagram and Delaunay tessellation with beach lines . . 159 Early results of experiments with deformation of musical structure towards a Cen-

    troidal Voronoi Tessellation, visualised with geomview. Refer to appendix for audio

    samples of the data visualised by these diagrams. . . . . . . . . . . . . . . . . . . . 16All figures still in copyright are reproduced here with the kind permission of their respectiveauthors. Figures not explicitly credited are by the author of this essay.

    References

    [1] Okabe, Boots, Sugihara & Chiu; Spatial Tessellations, Concepts and Applications of VoronoiDiagrams ,2nd Ed., 2000

    [2] J.-R. Sack & J. Urrutia; Handbook of Computational Geometry, 2000

    [3] Japan Journal of Industrial and Applied Mathematics, Vol. 22, No. 2 June 2005, Special issueon Voronoi diagrams in science and engineering

    [4] J Moller, O Skare; Bayesian image analysis with coloured Voronoi tessellations and a view toapplications in reservoir modelling

    [5] Erik Agrell (Ed.), Voronoi-based coding, 1997

    [6] Steve Fortune, A Sweepline Algorithm for Voronoi Diagrams, Algorithmica, pp. 153174,1987

    [7] Shamos & Hoey, Closest-point problems, in Proceedings 16th IEEE Symposium on Founda-tions of Computer Science, pp 151-162, 1975

    [8] Rolf Klein, Concrete and Abstract Voronoi Diagrams, in Lecture Notes in Computer Sciencevol 400, 1989

    [9] Reference to TOPLAP live programming paperTOPLAP http://toplap.org/

    [10] Ahuja & Tuceryan, Extraction of early perceptual structure in dot patterns: integrating re-gion, boundary and component Gestalt, in Computer Vision, Graphics and Image Processing,vol 48 part 3 pp 304-356

    [11] Duyckaerts, Godefroy & Hauw, Evaluation of neuronal density by Dirichlet tessellation, inJournal of Neuroscience Methods Vol. 51(1), pp 47-69, 1994

    [12] Kayser & Stute, Minimum spanning tree, Voronois tessellation and Johnson-Mehl diagramsin human lung carcinoma, in Pathology, Research and Practice, Volume 185(5) pp 729-734,1989

    13

  • 7/30/2019 Voronoi Diagrams of Music

    14/16

    [13] C. Demir & B. Yener, Automated cancer diagnosis based on histopathological images: a sys-tematic survey, Technical report, Rensselaer Polytechnic Institute, Department of ComputerScience, TR-05-09, 2005

    [14] Ward, Rohrhuber, Olofsson, McLean, Griffiths, Collins & Alexander, Live Algorithm Pro-gramming and a Temporary Organisation for its Promotion, 2004

    [15] M. Balzer, O. Deussen, Voronoi Treemaps, IEEE Symposium on Information Visualization,2005

    [16] M. Balzer, O. Deussen, C. Lewerentz, Voronoi Treemaps for the Visualization of SoftwareMetrics, ACM Symposium on Software Visualization, 2005

    [17] Hamanaka & Hirata, Applying Voronoi Diagrams in the Automatic Grouping of Polyphony,2002

    [18] F. Lerdahl and R. Jackendoff, A Generative Theory of Tonal Music,. MIT Press, Cambridge,

    MA, 1983

    [19] Franz Aurenhammer, Voronoi diagrams - a study of a fundamental geometric data structure,ACM Computing Surveys, Volume 23, Number 3, pages 345-405, 1991

    14

  • 7/30/2019 Voronoi Diagrams of Music

    15/16

    Figure 8: Screen shots of live Voronoi diagram and Delaunay tessellation with beach lines

    15

  • 7/30/2019 Voronoi Diagrams of Music

    16/16

    (a) Original melodicstructure

    (b) After 1 CVT iteration (c) After 2 CVT itera-tions

    (d) After 3 CVT itera-tions

    (e) After 100 CVT itera-tions

    Figure 9: Early results of experiments with deformation of musical structure towards a CentroidalVoronoi Tessellation, visualised with geomview. Refer to appendix for audio samples of the datavisualised by these diagrams.

    16