plane tesselation with musical-scale tiles and ...w3.impa.br/~tertu/icmcpaper.pdf · plane...

5
PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We present a method for arranging the notes of certain mu- sical scales (pentatonic, heptatonic, Blues Minor and Blues Major) in the plane by using the idea of plane tessellation with specially designed musical-scale tiles. The motivation of such a representation is described, as well as the math- ematical analysis of the possibility of its realization. As a main application of the idea we introduce a bi-dimensional designed automatic composition algorithm, at which we also explore the target-note improvisation paradigm, by using Markov Chains conditioned in certain events. 1. INTRODUCTION Musical instruments can be separated in two classes regard- ing their input interfaces: one- or bi-dimensional. In the first class we can put the piano, the flute, the the xylophone, the trombone, etc. In the second, most of the string instruments (with more than one string), button accordions, and others. There are still instruments with both interfaces, like the pi- ano accordion, whose melodic interface is one-dimensional and the bass interface is bi-dimensional. So, in the first class, notes are associated with points displayed on a line, and in the second, on a plane. Typically there are no redundancy of notes in one-dimen- sional instruments: a note with, say, fundamental frequency f , can only be triggered at one specific position. On bi- dimensional instruments the contrary is the default: most values of f would have two or more bi-dimensional points associated with. Bi-dimensional instruments are normally tuned in fourths (the guitar, for example) or in fifths (like the mandolin). In both cases, when playing the chromatic scale using more than one row of the matrix of notes, we can see patterns (like tiles) which repeat themself along the instrument interface. In this work we analyze such tiles for instruments tuned in fourths. We will show how the idea of plane tessellation can be applied for musical scales other than the 12-notes chromatic scale. More specifically: the Blues Minor and Major (6-notes) and the generic pentatonic (5-notes) and heptatonic (7-notes) scales. A simple proof of the possi- bility of such tiling is presented. As a main application of the idea we introduce a bi- dimensional designed automatic composition algorithm, at which we also explore the target-note improvisation paradigm, by using Markov Chains conditioned in certain events. There are, actually, three Markov Chains, one for each of the melody, meter and harmony components. The remaining of this paper is organized as follows. In section 2 we briefly mention related works that can be found in the literature. In section 3 the method of plane tessel- lation using musical-scale tiles is described and analyzed. The bi-dimensional automatic composition algorithm based on those tilings is detailed in Section 4. Section 5 contains some results (including a score), and conclusions are ad- dressed in Section 6. 2. RELATED WORK The automatic composition algorithm we will describe shortly has three main aspects: it is bi-dimensional designed, it has a Markovian Process engine, and such process obeys certain restrictions. All these subjects have already been exploited in com- puter assisted composition. Computational models using Markov Chains, for example, are used since at least 1959, according to [7], and ideas using them keep emerging (see [6], for instance). The idea of constraint-composition has been used in [2]. To enable real-time composition, the solution of the related combinatorial problem is searched for a limited amount of time, after what the current approximation is used. We will apply a similar idea in our method. Regarding bi-dimensional composition, [4] (Section 4) mention a work of Xenakis, where Brownian motion of gas particles (in 2D) is combined with Bernoulli’s Law of Large Numbers to work as engine for automatic composition. To build the interface for bi-dimensional improvisation we will explore the idea of tiling the plane with musical- scale tiles. Tilings also have been applied to computer as- sisted composition [3, 5, 1], but we have not found works using that theory for constructing bi-dimensional interfaces for automatic composition. Moreover, to our knowledge the use of Markov Chains with restrictions have not been explored yet on bi-dimensional

Upload: others

Post on 23-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Plane Tesselation with Musical-Scale Tiles and ...w3.impa.br/~tertu/ICMCPaper.pdf · PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We

PLANE TESSELATION WITH MUSICAL-SCALE TILES ANDBIDIMENSIONAL AUTOMATIC COMPOSITION

ABSTRACT

We present a method for arranging the notes of certain mu-sical scales (pentatonic, heptatonic, Blues Minor and BluesMajor) in the plane by using the idea of plane tessellationwith specially designed musical-scale tiles. The motivationof such a representation is described, as well as the math-ematical analysis of the possibility of its realization. As amain application of the idea we introduce a bi-dimensionaldesigned automatic composition algorithm, at which we alsoexplore the target-note improvisation paradigm, by usingMarkov Chains conditioned in certain events.

1. INTRODUCTION

Musical instruments can be separated in two classes regard-ing their input interfaces: one- or bi-dimensional. In the firstclass we can put the piano, the flute, the the xylophone, thetrombone, etc. In the second, most of the string instruments(with more than one string), button accordions, and others.There are still instruments with both interfaces, like the pi-ano accordion, whose melodic interface is one-dimensionaland the bass interface is bi-dimensional. So, in the firstclass, notes are associated with points displayed on a line,and in the second, on a plane.

Typically there are no redundancy of notes in one-dimen-sional instruments: a note with, say, fundamental frequencyf , can only be triggered at one specific position. On bi-dimensional instruments the contrary is the default: mostvalues of f would have two or more bi-dimensional pointsassociated with.

Bi-dimensional instruments are normally tuned in fourths(the guitar, for example) or in fifths (like the mandolin). Inboth cases, when playing the chromatic scale using morethan one row of the matrix of notes, we can see patterns (liketiles) which repeat themself along the instrument interface.

In this work we analyze such tiles for instruments tunedin fourths. We will show how the idea of plane tessellationcan be applied for musical scales other than the 12-noteschromatic scale. More specifically: the Blues Minor andMajor (6-notes) and the generic pentatonic (5-notes) andheptatonic (7-notes) scales. A simple proof of the possi-bility of such tiling is presented.

As a main application of the idea we introduce a bi-dimensional designed automatic composition algorithm, atwhich we also explore the target-note improvisation paradigm,by using Markov Chains conditioned in certain events. Thereare, actually, three Markov Chains, one for each of the melody,meter and harmony components.

The remaining of this paper is organized as follows. Insection 2 we briefly mention related works that can be foundin the literature. In section 3 the method of plane tessel-lation using musical-scale tiles is described and analyzed.The bi-dimensional automatic composition algorithm basedon those tilings is detailed in Section 4. Section 5 containssome results (including a score), and conclusions are ad-dressed in Section 6.

2. RELATED WORK

The automatic composition algorithm we will describe shortlyhas three main aspects: it is bi-dimensional designed, it hasa Markovian Process engine, and such process obeys certainrestrictions.

All these subjects have already been exploited in com-puter assisted composition. Computational models usingMarkov Chains, for example, are used since at least 1959,according to [7], and ideas using them keep emerging (see[6], for instance).

The idea of constraint-composition has been used in [2].To enable real-time composition, the solution of the relatedcombinatorial problem is searched for a limited amount oftime, after what the current approximation is used. We willapply a similar idea in our method.

Regarding bi-dimensional composition, [4] (Section 4)mention a work of Xenakis, where Brownian motion of gasparticles (in 2D) is combined with Bernoulli’s Law of LargeNumbers to work as engine for automatic composition.

To build the interface for bi-dimensional improvisationwe will explore the idea of tiling the plane with musical-scale tiles. Tilings also have been applied to computer as-sisted composition [3, 5, 1], but we have not found worksusing that theory for constructing bi-dimensional interfacesfor automatic composition.

Moreover, to our knowledge the use of Markov Chainswith restrictions have not been explored yet on bi-dimensional

Page 2: Plane Tesselation with Musical-Scale Tiles and ...w3.impa.br/~tertu/ICMCPaper.pdf · PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We

interfaces (with notes displayed according to the tiling methodwe will describe) for the purpose of automatic composition.

3. MUSICAL-SCALE TILES

Roughly speaking, our algorithm for composition consistsof walking randomly on a “matrix” of points and playingthe musical notes associated with them. We now describehow to build such matrix.

Let’s start by looking at Figure 1, where notes with thesame number have the same corresponding fundamental fre-quency. The representation of Figure 1-right appears natu-rally in instruments tuned in fourths, like the guitar, for ex-ample. This means the note immediately above the note 0(i.e., note 5 in Figure 1-right) is it’s perfect fourth; that thenote immediately above the number 5 (i.e., note number 10)is the perfect fourth of note number 5; and so on.

Figure 1. Arrangement of notes from the chromatic scale atthe piano interface (left) and in instruments tuned in fourths(right).

Figure 2 shows three examples of heptatonic scales (Ma-jor, Natural Minor and Harmonic Minor) in the representa-tion of Figure 1-right.

Figure 2. Gray filled points represent the Major, NaturalMinor and Harmonic Minor scales, according to the repre-sentation of Figure 1-right.

The idea is to take off those circles that are not filled,since they represent notes out of the scale, which have not(and normally must not) be played. This way we arrive atthe representation showed in Figure 3-left, where this timethe gray-filled note represent the scale root. The order ispreserved, that is, from the tonic note (scale root), left toright and bottom to top.

Analogously, we propose for the pentatonic scales therepresentation shown at Figure 3-right.

In view of tiling the plane with scale-tiles like thoseshown in Figure 3 it is necessary to state precisely some ge-ometrical measures. Here, we will use as example the BluesMinor scale, the process for the other scales being similar.

Figure 3. Bi-dimensional representation of heptatonic (left)and pentatonic scales (right). Gray-filled circles are thescale roots.

The corresponding tile is shown in Figure 4-left. It’s worthremembering that the Blues Minor scale notes are: scaleroot, minor third, perfect fourth, augmented fourth, perfectfifth and minor seventh.

Figure 4. On the left, Blues Minor scale tile. Dark grayfilled note: tonic note. Light gray filled note: blue note(augmented fourth). On the right, tiling of the plane with theBlues Minor scale tile. The blue note has special highlightin this representation.

Given a tile, the next step is tiling the plane as shown inFigure 4-right. Figure 5 shows the octave relation in the tes-sellation. Again, it is similar the one that appears naturallyin instruments tuned in fourths.

After a tessellation, what remains is to subtract the areathat actually will be used in the algorithm. For simplicity,such region will normally have a rectangular shape. In thecase of the Blues Minor scale tessellation, an example isshown at figure 6.

We have studied the shape of tiles for the Blues Majorand Minor Scale, as well as general heptatonic and penta-tonic scales. We just described how to tile the plane usingBlues Minor scale tiles. For the other mentioned scales, theprocedure is analogous, tiles being the ones showed in figure7.

Notice that all tiles have a common L-like shape, asshown in figure 8-left. The corresponding tessellation mustsatisfy the condition that corner x of some tile coincide withcorner y of the adjacent tile (Figure 8-right). The tiling iscompleted by coupling side by side the bands shown in Fig-ure 8-right (see Figure 9), what is possible due to the coin-cident metrical relations of adjacent boundaries (shown infigure 8-right).

Page 3: Plane Tesselation with Musical-Scale Tiles and ...w3.impa.br/~tertu/ICMCPaper.pdf · PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We

Figure 5. Octave relation in the Blues Scale tiling. Tiles inthe same “band” are such that the fundamental frequenciesassociated with points are the same if the points have thesame relative position in the corresponding tile. Notes oftiles at the region B are one octave above the ones in thetiles of region A, and so on.

Figure 6. A rectangular region of the Blues Minor scaletessellation.

Figure 7. Tiles for pentatonic, heptatonic and Blues Majorscales.

Figure 8. All presented musical scale tiles have a com-mon L-like shape (left), and the corresponding tessellationis such that corners x and y meet (right).

Figure 9. Geometrical proof of the possibility of tessellat-ing the plane with L-like tiles such that corners x and y (seeFigure 8) meet.

4. BIDIMENSIONAL AUTOMATIC COMPOSITION

In this section we present the algorithm to generate a musicsample and the related probabilistic tools. In a few words,a random sample of music was chosen as a Markov Chainconditioned to specific events.

The finite Markov Chain state-space was defined as E =H×R×M, where H is the space of possible chords, whosesequence determines the music harmony. In the specific im-plementation, H = {I7, IV 7,V 7} (where I, IV and V are theroot, sub-dominant and dominant chords, respectively), butit could be much more general, as well the next particularchoices. R is the space of rhythm patterns for melody, in-cluding the silence figure. We have used five different states,corresponding to silence (rest), whole, half, third and quar-ter notes. Lastly, M is the space of possible notes, namely,the scale. Here is where bi-dimensional composition ap-pears, since M is a rectangular subset of a tessellation asdescribed in the previous section. More precisely, in ourBlues-like style experiments we have used the Minor penta-tonic scale tessellation, as shown in Figure 10.

The Markov Chain (Xn,Yn,Zn), for n = 1, . . . ,N is in-dexed with the beat. The blues has, generally, a quaternaryscore, and the music twelve bars (that’s the well known 12-bar Blues). So we fix N = 48.

The Markov Chain of harmony, (Xn), and (Yn), the MarkovChain of rhythm, and independent. On the other hand, (Zn),which gives the choice of notes, is strictly dependent of Xnand Yn. The dependency on harmony, Xn, is natural from thefact the melody must follows harmony rules. On the otherhand, the dependency on Yn, the sequence of time figures,comes from the fact the number of notes is determined by it,and can be even none, in the case of the silence figure.

The conditioning on specific events mimics the behavior

Page 4: Plane Tesselation with Musical-Scale Tiles and ...w3.impa.br/~tertu/ICMCPaper.pdf · PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We

Figure 10. Rectangular subset of the (minor) pentatonicscale tessellation. Numbers represent MIDI-note codes.

of a musician, that when improvising, pursues a target notein meaningful chords. This is what we call the target-noteimprovisation paradigm. In a naive case, when in the V 7

chord preceding the final chord I7, it is natural to finalizewith the note of the music tonality, which will combine withthe next chord, I7.

In our implementation, besides the previous condition-ing for the melody we have conditioned the first note of the12-bar series as being the root note (modulo the octave).

Regarding chords we sample one for each bar. The firstis fixed as being the root chord (I7), and the last the sub-dominant (V 7). For the others, we have conditioned a chordIV 7 for the fifth bar and V 7 for the ninth.

Let be A the set of sequences which satisfy the rules cho-sen. The method to simulate the conditioning of the MarkovChain on A is the very well known “Rejection Method”,which consists simply in sampling the Markov Chain, andif the sample belongs to the set A, keeping that one. If not,we resample until we get an allowed sample. In computa-tional terms, the number of samples until an allowed samplebe obtained can be very large. For this reason, we limitedthe number of trials. If no allowed sample is found, thelast one is chosen. Of course doing this we do not simu-late exactly the conditioned Markov Chain defined above.However, this way the algorithm imitates musician’s errors,when he doesn’t reach the target note, what can eventuallyhappen.

Summarizing: each time a new 12-bar series will beginwe sample three Markov Chains as described above until thementioned conditions are satisfied or the maximum speci-fied number of trials is reached, what come first.

We have used the uniform distribution as initial distribu-tion of both (Xn), (Yn) and (Zn) sequences. The transitionprobabilities for (Xn) was set as uniform, i.e., being at stateI, the next state could be IV or V with equal probability, andso on. For (Yn) we have chosen M-like functions centeredin the current sample. This means that if at the current beatthe chosen figure is “three thirds”, in the next beat the prob-ability of playing the same figure is small, the probability

of playing two half-notes or four quarter notes is high, etc.Figure 11 illustrates this situation. The case of the sequence(Zn) is analogous, with the states being the row and the col-umn of the points in the bi-dimensional representation of thescale that we have introduced. Actually, there are two inde-pendent Markov Chains controlling the sequence of notes,one for the row index and the other for the column index,the transition probabilities of them being shaped as shownin figure 11.

Figure 11. Shape of the transition probabilities for musicfigures and notes. The probability of remaining in the samestate is small of that of going to the nearest states. Then, thefarther the state, the lower the probability of it to be the nextstate.

5. RESULTS

Figure 12 shows the score corresponding to a 12-bar sampleoutput of our method. The algorithm has many parametersand we have found good results with the ones cited in theprevious section.

Regarding Markov Chain restrictions, the more the num-ber of target notes, the more the number of trials the algo-rithm has to do satisfy the restrictions. We have seen thatfor two target notes an upper bound of one thousand trialsis never reached i.e., the algorithm always find a satisfyingsolution before the thousandth trial.

However, in some tests we have conducted, for morethan 4 or 5 solutions that upper bound is easily passed. Wecould in this case raise up the upper bound to, say, 10,000.But in this case when the number of trials is high (near theupper bound) the time consumed is such that the algorithmcan not work in real time (for tempos around 120 beats perminute).

6. CONCLUSIONS

In this work we have presented a method for automatic com-position which has three main aspects: it is bi-dimensionalbased, it uses a Markov Process engine and the compositiontries to follow the target-note improvisation paradigm.

The bi-dimensional nature of the algorithm comes fromthe fact that the melodic line is sampled according to a ran-dom walk in a matrix of points, whose associated notes are

Page 5: Plane Tesselation with Musical-Scale Tiles and ...w3.impa.br/~tertu/ICMCPaper.pdf · PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION ABSTRACT We

Figure 12. A 12-bar sample from the automatic composition algorithm we have implemented.

modeled according to the idea of tiling the plane with musicscale tiles.

We have implemented the method for the 12-bar bluesstyle, using the pentatonic minor scale for the melodic line.

Technically speaking, such an algorithm is not difficultto implement, given the simplicity of the Markov Model andof the bi-dimensional representation of musical scales wehave used.

Regarding musical quality, the method produce nice jazz-like improvisations. Of great importance here is the fact thatonly the notes of some determined scale are played.

We believe bi-dimensional inspired automatic composi-tion is more adequate to simulate certain kinds of improvi-sations. The guitarist, for example, thinks about the scaleat which he is improvising, but it also uses more the noteswhich are near the current note. This means that the geom-etry and the dimension of the instrument is of great impor-tance, and it’s worth noting when building automatic com-position systems.

As future work it would be interesting to use MachineLearning techniques to estimate the transition probabilitiesof notes for different styles, specially those when the instru-ment used for improvisation is bi-dimensional.

For more examples of music samples built using themethod described here the reader can refer the project web-site (to appear in the final version of this text). There hecan also download the software we have used to obtain thehosted results.

7. REFERENCES

[1] E. Amiot, M. Andreatta, and C. Agon, “Tiling the (mu-sical) line with polynomials: Some theorethical and im-plementation aspects,” in International Computer Mu-sic Conference, 2005.

[2] T. Anders and E. Miranda, “Constraint-based compo-sition in real time,” in International Computer MusicConference, 2008.

[3] M. Andreatta, C. Agon, and A. E., “Tiling problems inmusic composition: Theory and implementation,” in In-ternational Computer Music Conference, 2002.

[4] P. Doornbusch, “A brief survey of mapping in algo-rithmic composition,” in International Computer MusicConference, 2002.

[5] F. Jedrzejewski, “Permutation groups and chord tessel-lations,” in International Computer Music Conference,2005.

[6] F. Pachet, “The continuator: Musical interaction withstyle,” Journal of New Music Research, vol. 32, pp.333–341, Sep 2003.

[7] G. Papadopoulos and G. Wiggins, “Ai methods for al-gorithmic composition: A survey, a critical view andfuture prospects,” in AISB Symposium on Musical Cre-ativity, 1999, pp. 110–117.