Sei sulla pagina 1di 5

PLANE TESSELATION WITH MUSICAL-SCALE TILES AND

BIDIMENSIONAL AUTOMATIC COMPOSITION

ABSTRACT
We present a method for arranging the notes of certain musical 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 mathematical 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 regarding 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 piano 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-dimensional instruments: a note with, say, fundamental frequency
f , can only be triggered at one specific position. On bidimensional 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 possibility of such tiling is presented.

As a main application of the idea we introduce a bidimensional 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 tessellation 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 addressed 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 computer 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 Bernoullis 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 musicalscale tiles. Tilings also have been applied to computer assisted 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

interfaces (with notes displayed according to the tiling method


we will describe) for the purpose of automatic composition.
3. MUSICAL-SCALE TILES
Roughly speaking, our algorithm for composition consists
of walking randomly on a matrix of points and playing
the musical notes associated with them. We now describe
how to build such matrix.
Lets start by looking at Figure 1, where notes with the
same number have the same corresponding fundamental frequency. The representation of Figure 1-right appears naturally in instruments tuned in fourths, like the guitar, for example. This means the note immediately above the note 0
(i.e., note 5 in Figure 1-right) is its perfect fourth; that the
note 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 at


the piano interface (left) and in instruments tuned in fourths
(right).
Figure 2 shows three examples of heptatonic scales (Major, Natural Minor and Harmonic Minor) in the representation of Figure 1-right.

Figure 2. Gray filled points represent the Major, Natural


Minor and Harmonic Minor scales, according to the representation 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 at
the representation showed in Figure 3-left, where this time
the gray-filled note represent the scale root. The order is
preserved, that is, from the tonic note (scale root), left to
right and bottom to top.
Analogously, we propose for the pentatonic scales the
representation shown at Figure 3-right.
In view of tiling the plane with scale-tiles like those
shown in Figure 3 it is necessary to state precisely some geometrical measures. Here, we will use as example the Blues
Minor 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 the
scale roots.
The corresponding tile is shown in Figure 4-left. Its worth
remembering that the Blues Minor scale notes are: scale
root, minor third, perfect fourth, augmented fourth, perfect
fifth and minor seventh.

Figure 4. On the left, Blues Minor scale tile. Dark gray


filled note: tonic note. Light gray filled note: blue note
(augmented fourth). On the right, tiling of the plane with the
Blues Minor scale tile. The blue note has special highlight
in this representation.
Given a tile, the next step is tiling the plane as shown in
Figure 4-right. Figure 5 shows the octave relation in the tessellation. Again, it is similar the one that appears naturally
in instruments tuned in fourths.
After a tessellation, what remains is to subtract the area
that actually will be used in the algorithm. For simplicity,
such region will normally have a rectangular shape. In the
case of the Blues Minor scale tessellation, an example is
shown at figure 6.
We have studied the shape of tiles for the Blues Major
and Minor Scale, as well as general heptatonic and pentatonic scales. We just described how to tile the plane using
Blues Minor scale tiles. For the other mentioned scales, the
procedure is analogous, tiles being the ones showed in figure
7.
Notice that all tiles have a common L-like shape, as
shown in figure 8-left. The corresponding tessellation must
satisfy the condition that corner x of some tile coincide with
corner y of the adjacent tile (Figure 8-right). The tiling is
completed by coupling side by side the bands shown in Figure 8-right (see Figure 9), what is possible due to the coincident metrical relations of adjacent boundaries (shown in
figure 8-right).

Figure 5. Octave relation in the Blues Scale tiling. Tiles in


the same band are such that the fundamental frequencies
associated with points are the same if the points have the
same relative position in the corresponding tile. Notes of
tiles at the region B are one octave above the ones in the
tiles of region A, and so on.

Figure 9. Geometrical proof of the possibility of tessellating the plane with L-like tiles such that corners x and y (see
Figure 8) meet.
4. BIDIMENSIONAL AUTOMATIC COMPOSITION

Figure 6. A rectangular region of the Blues Minor scale


tessellation.

Figure 7. Tiles for pentatonic, heptatonic and Blues Major


scales.

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

In this section we present the algorithm to generate a music


sample and the related probabilistic tools. In a few words,
a random sample of music was chosen as a Markov Chain
conditioned to specific events.
The finite Markov Chain state-space was defined as E =
H R M, where H is the space of possible chords, whose
sequence determines the music harmony. In the specific implementation, H = {I 7 , IV 7 ,V 7 } (where I, IV and V are the
root, sub-dominant and dominant chords, respectively), but
it could be much more general, as well the next particular
choices. R is the space of rhythm patterns for melody, including the silence figure. We have used five different states,
corresponding to silence (rest), whole, half, third and quarter notes. Lastly, M is the space of possible notes, namely,
the scale. Here is where bi-dimensional composition appears, since M is a rectangular subset of a tessellation as
described in the previous section. More precisely, in our
Blues-like style experiments we have used the Minor pentatonic scale tessellation, as shown in Figure 10.
The Markov Chain (Xn ,Yn , Zn ), for n = 1, . . . , N is indexed with the beat. The blues has, generally, a quaternary
score, and the music twelve bars (thats the well known 12bar Blues). So we fix N = 48.
The Markov Chain of harmony, (Xn ), and (Yn ), the Markov
Chain of rhythm, and independent. On the other hand, (Zn ),
which gives the choice of notes, is strictly dependent of Xn
and Yn . The dependency on harmony, Xn , is natural from the
fact the melody must follows harmony rules. On the other
hand, 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

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 column of the points in the bi-dimensional representation of the
scale that we have introduced. Actually, there are two independent 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 shown
in figure 11.

Figure 10. Rectangular subset of the (minor) pentatonic


scale tessellation. Numbers represent MIDI-note codes.
of a musician, that when improvising, pursues a target note
in meaningful chords. This is what we call the target-note
improvisation paradigm. In a naive case, when in the V 7
chord preceding the final chord I 7 , it is natural to finalize
with the note of the music tonality, which will combine with
the next chord, I 7 .
In our implementation, besides the previous conditioning for the melody we have conditioned the first note of the
12-bar series as being the root note (modulo the octave).
Regarding chords we sample one for each bar. The first
is fixed as being the root chord (I 7 ), and the last the subdominant (V 7 ). For the others, we have conditioned a chord
IV 7 for the fifth bar and V 7 for the ninth.
Let be A the set of sequences which satisfy the rules chosen. The method to simulate the conditioning of the Markov
Chain on A is the very well known Rejection Method,
which consists simply in sampling the Markov Chain, and
if the sample belongs to the set A, keeping that one. If not,
we resample until we get an allowed sample. In computational terms, the number of samples until an allowed sample
be obtained can be very large. For this reason, we limited
the number of trials. If no allowed sample is found, the
last one is chosen. Of course doing this we do not simulate exactly the conditioned Markov Chain defined above.
However, this way the algorithm imitates musicians errors,
when he doesnt reach the target note, what can eventually
happen.
Summarizing: each time a new 12-bar series will begin
we sample three Markov Chains as described above until the
mentioned conditions are satisfied or the maximum specified number of trials is reached, what come first.
We have used the uniform distribution as initial distribution of both (Xn ), (Yn ) and (Zn ) sequences. The transition
probabilities for (Xn ) was set as uniform, i.e., being at state
I, the next state could be IV or V with equal probability, and
so on. For (Yn ) we have chosen M-like functions centered
in the current sample. This means that if at the current beat
the chosen figure is three thirds, in the next beat the probability of playing the same figure is small, the probability

Figure 11. Shape of the transition probabilities for music


figures and notes. The probability of remaining in the same
state is small of that of going to the nearest states. Then, the
farther the state, the lower the probability of it to be the next
state.

5. RESULTS
Figure 12 shows the score corresponding to a 12-bar sample
output of our method. The algorithm has many parameters
and we have found good results with the ones cited in the
previous section.
Regarding Markov Chain restrictions, the more the number of target notes, the more the number of trials the algorithm has to do satisfy the restrictions. We have seen that
for two target notes an upper bound of one thousand trials
is never reached i.e., the algorithm always find a satisfying
solution before the thousandth trial.
However, in some tests we have conducted, for more
than 4 or 5 solutions that upper bound is easily passed. We
could in this case raise up the upper bound to, say, 10, 000.
But in this case when the number of trials is high (near the
upper bound) the time consumed is such that the algorithm
can not work in real time (for tempos around 120 beats per
minute).
6. CONCLUSIONS
In this work we have presented a method for automatic composition which has three main aspects: it is bi-dimensional
based, it uses a Markov Process engine and the composition
tries to follow the target-note improvisation paradigm.
The bi-dimensional nature of the algorithm comes from
the fact that the melodic line is sampled according to a random walk in a matrix of points, whose associated notes are

Figure 12. A 12-bar sample from the automatic composition algorithm we have implemented.
modeled according to the idea of tiling the plane with music
scale tiles.
We have implemented the method for the 12-bar blues
style, using the pentatonic minor scale for the melodic line.
Technically speaking, such an algorithm is not difficult
to implement, given the simplicity of the Markov Model and
of the bi-dimensional representation of musical scales we
have used.
Regarding musical quality, the method produce nice jazzlike improvisations. Of great importance here is the fact that
only the notes of some determined scale are played.
We believe bi-dimensional inspired automatic composition is more adequate to simulate certain kinds of improvisations. The guitarist, for example, thinks about the scale
at which he is improvising, but it also uses more the notes
which are near the current note. This means that the geometry and the dimension of the instrument is of great importance, and its worth noting when building automatic composition systems.
As future work it would be interesting to use Machine
Learning techniques to estimate the transition probabilities
of notes for different styles, specially those when the instrument used for improvisation is bi-dimensional.
For more examples of music samples built using the
method described here the reader can refer the project website (to appear in the final version of this text). There he
can also download the software we have used to obtain the
hosted results.

7. REFERENCES
[1] E. Amiot, M. Andreatta, and C. Agon, Tiling the (musical) line with polynomials: Some theorethical and implementation aspects, in International Computer Music Conference, 2005.
[2] T. Anders and E. Miranda, Constraint-based composition in real time, in International Computer Music
Conference, 2008.
[3] M. Andreatta, C. Agon, and A. E., Tiling problems in
music composition: Theory and implementation, in International Computer Music Conference, 2002.
[4] P. Doornbusch, A brief survey of mapping in algorithmic composition, in International Computer Music
Conference, 2002.
[5] F. Jedrzejewski, Permutation groups and chord tessellations, in International Computer Music Conference,
2005.
[6] F. Pachet, The continuator: Musical interaction with
style, Journal of New Music Research, vol. 32, pp.
333341, Sep 2003.
[7] G. Papadopoulos and G. Wiggins, Ai methods for algorithmic composition: A survey, a critical view and
future prospects, in AISB Symposium on Musical Creativity, 1999, pp. 110117.

Potrebbero piacerti anche