You are on page 1of 4



Masahiro Niitsuma Hiroaki Saito

Department of Computer Science
Keio University

In baroque music, composers wrote only the notes of
the bass part with figures to indicate the chords to be played.
This figured bass is called thorough-bass. The act of play-
ing the accompaniment from thorough-bass is called thorough-
bass realization. Thorough-bass realization is a form of
improvisation which has many possible variations. This
paper presents a method for thorough-bass realization in
baroque music, considering musical tastes. We define “har-
mony cost” which indicates likelihood of chords, then,
present a method for automatic thorough-bass realization
Figure 1. An example of original score (a) and realized
by beam-search dynamic programing using the harmony
score (b).
cost. Experimental results clearly show effectiveness of
our approach and even similarity to human realization.
the likelihood of chords, and beam-search dynamic pro-
1. INTRODUCTION graming using the harmony cost.

In the era of baroque music, composers wrote the melody

and the basso part only. Specific numerical figures were
attached in the basso, and performers played proper chords
from such scores. The basso with figures of this accompa- Here we explain how our system realizes thorough-bass.
niment part is called thorough-bass. Figure 1 (a) shows To simplify the process, the following basic assumptions
the accompaniment part of Brandenburg concerto No.5 are made.
by Bach. In Figure 1(a) no sound of the right hand ex-
cluding the first chord is written. A small Arabic numeral 1. Thorough-bass is realized into four-part.
was added in the part of left hand. Accompanist at that
time played proper chords from this figured bass which 2. Only harmonic tones are produced unless the figure
matched to other string players’ part. An almost constant indicates non harmonic tones.
rule existed in how to read figured-bass. Therefore, ac-
3. No voice is embellished.
companists were able to understand what chords should be
played from figured bass, and how to locate the chord de- Figure 2 shows the process flow of our system. First
pended on entirely the accompanists’ device. Figure 1(b) the figure and the basso of the thorough bass are taken
is one example of realization of Figure1(a). (input). Secondly, the input figure is interpreted, and three
However, it is difficult to realize thorough-bass like figures are hypothesized (interpretation). Thirdly, all the
Figure 1(a) properly for those who don’t specialize in baroque possible chords that can be located are stored from the
music, especially for amateurs, because knowledge of har- basso and the figures (chord location). Fourthly, the best
mony or historical background is necessary. route is searched by dynamic programing (DP). Finally,
In earlier research, probationary rules were set, then the the complete music is produced in MIDI format and a mu-
patterns that did not violate the rules were searched for[5, sical score (output).
6]. However, there are no absolute rules in real music,
and rules can be violated in some cases. Moreover, they 2.1. Figure interpretation
didn’t take into account of figures, and it was impossible
to realize thorough-bass in real music. Three figures are necessary to realize thorough-bass into
This paper presents a method for automatic thorough- the four-part chord. Therefore, figures are supplemented
bass realization based on “harmony cost”, which indicates when the given figures are less than three. Because there

Figure 3. Chord location cost(a < b).

3.1. Local cost

Local cost L(xt ) indicates the likelihood of a certain chord

xt ∈ Xt at time t. L(xt ) consists of two different costs;
figure interpretation cost L1 (xt ) and chord location cost
L2 (xt ).
L(xt ) = L1 (xt ) + L2 (xt ) (1)

Figure interpretation cost L1 (xt ) represents the likeli-

hood of a certain interpretation of figure. Some figures can
be interpreted differently depending on composers and re-
Figure 2. Flowchart of our method. gions. For instance, the figure of 6 is usually interpreted
as the first inversion chord, and is supplemented as 3 3 6,
3 6 6 or 3 6 8. However, some theorists and composers
are a certain number of rules in this supplementation method, like Telemann, called the figure of 6 a petite accord and
we have extracted 46 rules (Table1) from textbooks [1, 7, supplemented as 3 4 6 [3, 7]. We can reflect this pref-
2]. erence by lowering the cost of the interpretation of 6 as
3 4 6 than other interpretations. Thus, we can generate
different kinds of accompaniment by changing the figure
2.2. Chord allocation
interpretation cost.
In this part, the figures interpreted by the figure inter- Next, chord location cost L2 (xt ) indicates the likeli-
pretation module are received, and the possible chords in hood of a certain chord xt at time t. For instance, the cost
which all voices are set in proper range are stored. How to of a close chord (figure3(a)) is smaller than that of an open
choose an appropriate chord sequence is described in the chord (figure3(b)), for a close chord is more common than
next section. an open chord if there is no specific reason. Table2 lists
some of the factors for chord location cost.
SEQUENCE 3.2. Transition Cost
The optimal sequence of chords is found by DP [4]. With Transition cost T (xt , xt+1 ) indicates the likelihood of the
DP, we search for the route with minimum cost. We adopt connection between two chords when there are a certain
two kinds of cost; the local cost and the transition cost. chordxt at time t and chord xt+1 at time t + 1. For in-
Here we define a notation: a set of chords Xt represents stance, Figure 4(a) has successive octave between soprano
all possible chords located at time t. and tenor, therefore the transition cost of Figure 4(a) is
larger than that of Figure 4(b). Table3 lists some of the
factors for transition cost.
Table 1. Figure interpretation rules (excerpts)
figure interpretation
none 358 Table 2. Example factors for chord location cost. N: Neg-
6 366 ative rule, P: Positive rule.
6 336 Factor N/P
6 368 Each voice is not set in a proper range N
6 346 Leading note is doubled N
7 357 Close position P
24 246 Not prepared seventh N
25 255 Not prepared ninth N

pared as MIDI files, where all files have the same volume
and the same tone color.
r Bass-Part only (BPO)
r Four-Part by our system (FPOS)
r Four-Part by a commercial system (FPCS)
r Four-Part by a professional musician (FPPM)
The four players are familiar with music from infancy,
Figure 4. Transition cost(a > b). and have good command of the instrument(recorder). To
evaluate three roles of the accompaniment, they were asked
to evaluate the following criteria and rank it between 1-
3.3. Determining cost 5(poor-excellent).
r Can you feel harmony?(Harmony)
r Can you feel rhythm?(Rhythm)
It is necessary to assign the weight of the factor of each
r Does melody sound better?(Melody)
cost. It would be ideal to decide the cost by some learn-
ing method automatically. However, it is difficult at this
point to get a large amount of training data of realization. The experiment platform was Mac OS X, 2.16GHz In-
Moreover, because thorough-bass realization varies from tel Core Duo processor with 2GB memory. To lead im-
one composer to another, it would not be good to calcu- partial judgment, the performers didn’t know with which
late the general weight. Therefore, we assign the cost by accompaniment they were playing.
humans by trial and error. Figure 5 shows the average score for all pieces, and
Figure 6 shows the score difference between accompani-
ment by our system (FPOS) and by a professional musi-
3.4. Search by DP
cian (FPPM).
In standard DP, accumulated cost is memorized at each
state and then the route is traced back to obtain the best
state sequence. If this method is used in thorough-bass re-
alization, the amount of memory needed becomes O(en )
as the length of music (n) increases. Thus we adopt the
beam search algorithm which keeps states with small cost
only [8].
Finally we define “harmony cost” P (xt ) as the sum of
local cost L(xt ) and transition cost T (xt , xt+1 ).

P (xt ) := L(xt ) + T (xt+1 ) (2)


4.1. The Method of Experiment

We conducted an experiment to evaluate the effectiveness Figure 5. Average score for four each accompaniments.
of our method. In the experiment, four human soloists
played four different pieces with four different accompa-
niment. Table4 shows the pieces used in the experiment.
4.2. Harmony
Four accompaniments of each piece (Table4) were pre-
Figure 5 illustrates that evaluation of FPOS is higher than
commercial systems(FPCS), only basso (BPO), and al-
Table 3. Example factors for transition cost. most the same as FPPM. Here we focus on FPOS and
Factor N/P FPPM, Figure 6 illustrates that the score of FPOS is al-
Parallel octave N most the same as FPPM other than Purcell. An examinee
Parallel unison N
Successive fifth N
Successive octave N Table 4. Pieces used for experiment
Successive unison N Title Key Bar number
Contrary motion with other voices P D. Purcell Sonata F dur 52
Leap larger than octave N Telemann Sonata d moll 17
Seventh interval motion N Marcello Sonata F dur 38
Augmented interval motion N Barsanti Sonata g moll 38


This paper presented a method for automatic thorough-

bass realization. Experimental results clearly show effec-
tiveness of our approach and similarity to human realiza-
tion. As for future work, the realization with arpeggio
remains one of the issues to be pursued. Furthermore, re-
alization of thorough-bass with defective figures is a far
more complicated problem and needs further study. We
intend to apply the method presented here to automatic
improvisation and automatic composition.

This research was conducted under the auspices of the un-
trodden youth software business in the latter six months of
Figure 6. Difference between the score of FPOS and that
fiscal year 2006.
of FPPM.


[1] Jasper Boje Christensen. 18th century continuo play-

ing a historical guide to the basics. Barenreiter, 2002.
[2] Handel. Continuo Playing According to Handel. Ox-
ford University Press, 1990.
[3] Johan David Heinchen. Thorough-Bass Accompani-
ment according to Johan David Heinchen. Nebrask,
[4] Xuedong Huang, Alex Acero, and Hsiao-Wuen Hon.
Figure 7. Difference between our system (a) and profes- Spoken Language Processing: A Guide to Theory,
sional(b) in Purcell. Algorithm, and System Development. Prentice Hall,
[5] Masanobu Miura, Tohru Simoishizawa, Yumi Saiki,
expressed that the harmony was sometimes uncomfortable and Masuzo Yanagida. Evaluation of basse donnee
for the accompaniment of FPOS in the experiment of Pur- system for the theory of harmony. The Trans. of the
cell. Figure 7(a) shows the part of harmony discomfort , institute of electronics, information and communica-
alto progresses with B H B. Because this part belongs to A tion engineers(in Japanese, 54(6):936–945, 2001.
minor, B sounds uncomfortable relative to the solo part of [6] Masanobu Miura, Masashi Yamada, and Masuzo Ya-
A minor. This problem occurred because the input figure magoda. Realizability of a music aesthetics evalu-
itself lacked necessary ]. ation stystem for allowable solutions of given bass
tasks. In 8th International Conference on Music
Perception and Cognition, pages 538–541, 8 2004.
4.3. Rhythm and Melody Chicago,USA.
[7] Saint-Lambert. Nouveau traite de l’accom-
Figure 5 illustrates that the evaluation of FPOS is higher pagnement de clavecin, de l’orge , et des autres in-
than FPCS and BPO, and is almost the same as FPPM. struments. Paris:Christophe Ballard, 1707.
Here we focus on FPOS and FPPM; Figure 6 illustrates [8] Ney H Tillmann C. Word reordering and a dy-
that the evaluation of FPOS is the same as FPPM other namic programming beam search algorithm for statis-
than Purcell. As for the piece of Purcell, because the har- tical machine translation. Computational Linguistics,
monic changes are few, chords were played with arpeggio 29(1):97–133, 2003.
in FPPM as shown in Figure 7(b). An examinee expressed
that he was impressed by chords played with arpeggio for
the accompaniment of FPPM in the experiment of Purcell.
On the other hand, chords were merely played at the same
time in FPOS as shown, and there was an opinion that he
felt the chords being very hard for the accompaniment of
FPOS in the experiment of Purcell. This indicates that the
sustaining one chord with the same harmony can become
hard and tedious.