ATTA: AUTOMATIC TIME-SPAN TREE ANALYZER BASED ON
EXTENDED GTTM
Masatoshi Hamanaka
PRESTO, Japan Science andTechnology Agency
A.I.S.T. 1-1-1 Umezono,
Tsukuba, Ibaraki, Japanm.hamanaka@aist.go.jp

Keiji Hirata
NTT Communication Science
Laboratories
2-4, Hikaridai, Seikacho, Keihanna Science City, Kyoto, Japan
hirata@brl.ntt.co.jp

ABSTRACTThis paper describes a music analyzing system called theautomatic time-span tree analyzer (ATTA), which wehave developed. The ATTA derives a time-span tree thatassigns a hierarchy of 'structural importance' to the notesof a piece of music based on the generative theory of
tonal music (GTTM). Although the time-span tree has
been applied with music summarization and collaborative music creation systems, these systems use time-spantrees manually analyzed by experts in musicology. Previous systems based on GTTM cannot acquire a timespan tree without manual application of most of the rules,
because GTTM does not resolve much of the ambiguity
that exists with the application of the rules. To solve thisproblem, we propose a novel computational model of the
GTTM that re-formalizes the rules with computer implementation. The main advantage of our approach isthat we can introduce adjustable parameters, which enables us to assign priority to the rules. Our analyzer
automatically acquires time-span trees by configuring
the parameters that cover 26 rules out of 36 GTTM rules
for constructing a time-span tree. Experimental results
showed that after these parameters were tuned, ourmethod outperformed a baseline performance. We hope
to distribute the time-span tree as the content for various
musical tasks, such as searching and arranging music.
Keywords: ATTA, Generative Theory of Tonal Music(GTTM), time-span tree, grouping structure, metricalstructure, musical knowledge, knowledge acquisition.

1 INTRODUCTION
We propose a method for implementing a music theory
called Generative Theory of Tonal Music (GTTM) [1].
It is difficult for those who are not musical experts tomanipulate music, because commercial music sequence software today only operates on the surface
structure of music, such as the notes, rests, and chords.

Permission to make digital or hard copies of all or part of thiswork for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the fullcitation on the first page.
© 2005 Queen Mary, University of London

358

Satoshi Tojo
Japan Advanced Institute of
Science and Technoloty
1-1, Asahidai, Nomi,
Ishikawa, Japan
tojo@jaist.ac.jp

Our goal is to create a system that will enable a musicalnovice to manipulate a piece of music, which is an ambiguous and subjective media, according to the user's intentions, by implementing the musical knowledge of musicians. Our first step was to attempt to implement the
GTTM, which analyses the meaning of a piece of music
and interprets the implicit intentions of the composer.
Musical theory provides us with the methodologies
for analyzing and transcribing musical knowledge, experiences, and skills from a musician's way of thinking.
Our concern is whether or not the concepts necessary formusic analysis are sufficiently externalized in musicaltheory. We consider the GTTM to be the most promising theory among the many that have been proposed[2–4], in terms of its ability to formalize musicalknowledge, because the GTTM captures the aspects ofthe musical phenomena based on the Gestalt occurringin music and is presented with relatively rigid rules.
The time-span tree provides a summarization of apiece of music, which can be used as the representationof a search, by analyzing the results from the GTTM, resulting in a music retrieval system [5]. It can also be used
for performance rendering [6-8] and reproducing music[9]. These systems enable users to manipulate music using a time-span tree, disregarding the surface structure of
the music. However, the time-span trees in these systems
need to be manually analyzed by experts in musicology.
The biggest problem with computer implementationof the GTTM is that musical theories, including GTTM,
are ambiguous, because music interpretation is tacit andsubjective. Beside that most of the musical theories arepresented for humans, without taking into consideration
computer logic. Attempts have been made to implement
several rules of the GTTM, but when these rules conflict
we could not adequately resolve the priority in multiple
rules [10, 11]. On the other hand, the computer model ofthe GTTM [12] could produce a time-span tree, but it required manual application of most of the rules.
To overcome the ambiguity of the GTTM rules, we
propose an extended GTTM that re-formalizes therules and establishes an algorithm for acquiring a timespan tree by numerical expressions. In the expressions,
we introduce adjustable parameters for controlling
tacitness, ambiguity, and subjectiveness. The extended
GTTM now covers 26 rules out of 36 GTTM rules forconstructing a time-span tree. We implemented a timespan analyzer, called ATTA, based on the extended
GTTM in Perl. User can acquire the time-span tree byusing ATTA via CGI application on the Internet.

This paper is organized in the following way. We
present the problem of applying GTTM rules in Section 2, propose extended GTTM in Section 3, describe
the time-span analyzer and it’s examples in Section 4
and 5, and present experimental results and conclusion
in Sections 6 and 7. Lastly, we provide in the appendix
all the expressions to implement the GTTM analyzer.

2 INTRODUCTION OF GTTM AND ITSPROBLEMSThe GTTM is composed of four modules, each of whichassigns a separate structural description to a listener’s understanding of a piece of music. These four modules output a grouping structure, a metrical structure, a time-spantree, and a prolongational tree, respectively (Figure 1).
Time-span tree

…
・
・ ・ ・
・ ・ ・・・ ・ ・・ ・ ・・・ ・ ・・ ・ ・・
・・・
・・
・
・
・
・

Metrical structureGrouping structure

2.1 Ambiguous concepts defining preference rules
The GTTM uses some undefined words, causing ambiguities in the analysis. For example, the GTTM has rules
for selecting proper structures when discovering similar
melodies (called parallelism), but does not have the definition of similarity itself.
To solve this problem we attempted to formalize the criteria for deciding whether each rule is applicable or not.
2.2 Conflict between preference rules
The conflict between rules often occurs when applying
the rules and results in ambiguities in the analysis because there is no strict order for applying the preference
rules. Figure 3 shows a simple example of the conflict
between the grouping preference rules (GPR). GPR3a(Register) is applied between notes 3 and 4 and GPR6
(Parallelism) is applied between notes 4 and 5. A
boundary cannot be perceived at both 3-4 and 4-5, because GPR1 (alternative form) strongly prefers that note
4, by itself, cannot form a group.
To solve this problem we introduced adjustable parameters that enable us to control the strength of each rule.

Figure 1. Grouping structure, Metrical structure,
and Time-span tree.

1 2 3 4 5 6 7 8 9 10 11 12 13 14

The grouping structure is intended to formalize theintuitive belief that tonal music is organized into groups
that are in turn composed of subgroups. These groups
are graphically presented as several levels of arcs below
a music staff. The metrical structure describes therhythmical hierarchy of the piece by identifying the position of strong beats at the levels of a quarter note, halfnote, a measure, two measures, four measures, and soon. Strong beats are illustrated as several levels of dots
below the musical staff. The time-span tree is a binary
tree, which is a hierarchical structure describing therelative structural importance of notes that differentiate
the essential parts of the melody from the ornamentation.
For example the left-hand side of Figure 2 depicts a
simple melody and its tree. The time-span (designatedas <--->) is represented by a single note, called a head,
which is designated here as “C4”.

＾ 6＾
＾ 6＾
＾
3a,6
3a
3a
Figure 3. Simple example of conflict between rules.

C4

C4

head

Instantiating−⊂
Abstracting…

2.3 Few mentions to how to calculate hierarchicalstructures
The GTTM does not define a valid procedure for acquiring the hierarchical structure. It is not realistic to firstmake every structure satisfy the well-formedness rules
and then select the optimal structure. For example, only
a ten note score provides 185794560 (= 92 × 9 ! ) kinds oftime-span trees.
To solve this problem we developed an algorithm for
acquiring the hierarchical structure, taking into consideration some of the examples in the GTTM.
2.4 Less precise explanation of feedback link
The GTTM has some feedback links from higher levelstructures to lower level ones, e.g. GPR7 (time-span andprolongational stability) prefers a grouping structurethat results in a more stable time-span and/or prolongation reductions. However, no detailed description andonly a few examples are given.

Figure 2. Subsumption relation of melodies.
There are two types of rules in GTTM, i.e., “wellformedness rules” and “preference rules”. Wellformedness rules are the necessary conditions for theassignment of a structure and the restrictions on the
structures. When more than one structure satisfies thewell-formedness rules, the preference rules indicate thesuperiority of one structure over another.
In this section, we specify the problems with the
GTTM rules in terms of computer implementation.

3 EXTENDED GTTM
To overcome the problems with computer implementation of the GTTM, we propose a computational model ofthe GTTM called the extended GTTM, which covers 26
rules out of 36 GTTM rules for constructing time-span
tree. The remaining 4 rules are for feedback links andanother 6 rules are for homophony. In the current stage,
we restrict the music structure to monophony to correctly evaluate the performance of each rule.

359

In this section we particularize our proposed extension of the GTTM for computer implementation. The
policies are equally applied to the three analyses, which
are the grouping structure, metrical structure, and Timespan reduction analyses.

The σ is an adjustable parameter for a user to control the
degree of symmetry. In Figure 4a is the degree of symmetry corresponding to grouping level a. If the next levelboundary is found in the middle of the group by applying
all grouping rules, the next grouping level’s the degree ofsymmetry will be like the one shown in Figure 4b.

3.1 Re-formalization of rules…

In order to deal with the preference rules on a computer,
we have expressed the rules into numerical styles. Numeric descriptions of the rules allow to quantitatively
combine the result of each rule application.
We expressed the degree of application of the rule as anumerical function Dirule which output 1 (applicable) or 0
(not applicable) if the rule is clearly applicable or not. For
example, GPR2b (Attack-Point) states that a relatively
greater interval of time between attack points initiates agrouping boundary that can be expressed as follows:⎧1
DiGPR2b = ⎨⎩0

ioi i −1 < ioi i and ioi i > ioi i +1
else

where
i
: transition of note
ioi i : inter onset intervals.

, (1)A numerical function Dirule outputs between 1 (applicable) and 0 (not applicable) if the rule is not clearly applicable or not. For example, time-span reduction preference rule 3a (TSRPR3a) that prefers that a higher melodic pitch is used as the head of a time-span can be
expressed as follow:(2)
DiTSRPR3 = pitch i max pitch j ,
j
where
i
: headpitch i : pitch (note number of MIDI).

3.2 Refinement of ambiguous concepts
As described above, the GTTM uses some undefinedconcepts that provide ambiguousness in analysis. The
concepts are ambiguous, with no unique definition. For
example, the concept of a similar melody has a lot ofplausible definitions [13], but no best one.
Here, we attempted to formalize concepts based on
the following two policies, which we esteem.
1) To define intuitionally and comprehensively.
2) Equipment adjustable parameters for controlof the ambiguity.
3.2.1 Concept for symmetry
GPR5 is the rule for symmetry in a grouping structure. It
prefers grouping analyses that most closely approach theideal subdivision of groups into two parts of equal length.
We define the degree of symmetry DiGPR5 so that there
is a preference to subdivide a group into two parts of equal
length. Here, we use a normal distribution with the standard deviation σ as the degree of symmetry, as follows.
end
⎫
⎧ ⎛ i
⎞
DiGPR5 = exp ⎨ − ⎜ ∑ ioi j − ∑ ioi j 2 ⎟ 2σ 2 ⎬ (3)
=
=
j
start
j
start
⎠
⎭
⎩ ⎝
where
start : start transition of group.
end : end transition of a group.

360

grouping level b startgrouping level a start

end

start

end
end

start
start

DiGPR5（a）1[time]0（b）

DiGPR5
1[time]

0

Figure 4. Examples of symmetry level.
3.2.2 Concept for parallelism
GPR6, MPR1, and TSRPR4 rules for parallelism are as
follows.
GPR6: Where two or more segments of the music canbe construed as parallel, they preferably form parallelparts of groups.
MPR1: Where two or more groups or parts of groups
can be construed as parallel, they preferably form parallel metrical structures.
TSRPR4: If two of more time-spans can be construed
as motivically and/or rhythmically parallel, preferably
assign them parallel heads.
We formalized the concept of parallelism and defined
the degree of parallel in each rule, because the target
structures of the rules are different.
In GPR6, we focused on the parallelism of the segments. We introduced the degree of parallel for GPR6DiGPR6, which indicates a high value at the start and endof the parallel part (Figure 5). The degree of parallel
DiGPR6 was calculated by searching all the segments
throughout the score. The length of the segments isfrom a beat to a half of the score by every beat.
GPR6 has three adjustable parameters for controllingthe degree of parallel: Wr (priority to the same rhythm
compared with the same register in parallel segments),
Ws (priority to one end of a parallel segment comparedwith the start of the parallel segment), and Wl (priority
to large parallel segments) (0≦Wr, Ws , Wl ≦1). By
using these parameters, a user can easily find and configure the parallel segment.

…

DiGPR60

Figure 5. Example of the degree of parallel.

iIn MPR1, we focused on the parallelism of beat ingroups. We introduced the degree of parallel for MPR1 Di
MPR1, which is calculated by searching all the groups.
k
MPR1 has two adjustable parameters for controlling thedegree of parallel: Wr (weight of priority of the same
rhythm compared with the same register in parallelgroups), and TMPR1 (threshold that decides whether beat iand beat k are parallel (Di kMPR1= 1) or not (Di kMPR1= 0)).
In TSRPR4, we focused on the parallelism of timespans, which are generated by grouping structure andmetrical structure. We introduced the degree of parallel
for TSRPR4 Di kTSRPR4, which is calculated by searching
all the time-spans. TSRPR1 has no adjustable parameters for controlling the degree of parallel.
3.3 Resolving the preference rule confliction by prioritizing rules
We introduced adjustable parameters, Srule, for controllingthe strength of the GTTM rules. By using these parameters,
we can acquire the local-level strength of boundary/beat/head. For example, as a result of applying the local-level grouping rules, we can acquire low-level groupingboundaries as weighted summations on the grouping rules
results DiGPR and adjustable parameter SGPR as follows:⎛⎞j× S GPR j ⎟⎟ (4)Bi =DiGPR j × S GPR j max ⎜⎜
DiGPR
′
∑
∑
i′
j =( 2 a, 2b,3a ,3b,3c,3d , 6)
⎝ j=( 2a,2b,3a,3b,3c,3d ,6)⎠.
3.4 Top-down algorithm for calculating hierarchicalstructures
We introduced the top-down process for acquiring thestructures. The hierarchal structure is constructed by
calculating the local strength and choosing the nextlevel structure.
- Acquisition of grouping structure
The grouping structure is constructed in the following way.
(1) First, consider the whole piece of music as a group.
(2) Then, calculate local-level boundary strengths anddetect low-level boundaries.
(3) Next, select the strongest boundary and divide thegroup at the boundary.
(4) Finally, iterate (3) while the local boundaries arefound at the group.
- Acquisition of metrical structure
The metrical structure is constructed in the following way.
(1) First, consider all the beats as a lowest (global) level
metrical structure.
(2) Then, calculate the local-level metrical strength.
(3) Next, select the strongest metrical structure frompossible structures.
(4) Finally, iterate (2) and (3) while the current structures have more than one beat.
- Acquisition of time-span tree
The time-span tree is constructed in the following way.
(1) First, consider all the notes as a head.
(2) Then, calculate the local-level head strength.
(3) Next, select the next level head from each time-span.
(4) Finally, iterate (2) and (3) while the time-span contains more than one head.

4 STRUCTURE OF ATTA
We implemented the extended GTTM described aboveon the computer that we call ATTA. Figure 6 is the overview of the ATTA which consists of a grouping structure analyzer, a metrical structure analyzer, and a timespan tree analyzer. ATTA has three distinctive features,
an XML-based data structure, its implemented in Perl,and has a Java-based GUI.
MusicXMLGrouping Structure
Analyzer

Low-Level boundaryBi

Detection of
low-level boundary ( boundary
strength ) Applying GPR1, 2, 3, 6

[time]

Divide by top down

Detection ofhigh-level boundary

Applying GPR1, 2, 3, 4, 5, 6
Contains more than one boundaryNo

YesGroupingXML
Metrical Structure
Analyzer

Calculation of lowlevel beat strength

Choosing nextlevel structure

Current
structure

Dilow-level(strength of beat) Applying MPR1,2,3,4,5[time]ˆ =1
Choice of mmˆ = 2next level mˆ =3structures mˆ = 4mˆ = 5Choosing with applying MPR10

Contains more than one beatNo

Yes

MetricalXML
TimeTime-span tree
Analyzer

Calculation ofhead strength

Current
structure

Ditime-span(strength of head)Applying TSRPR1,3,4,8,9
Choosing nextlevel structure

Next levelstructure
Contains more than one headNo

Yes

Time-spanXML

Figure 6. Processing flow of ATTA.
4.1 XML based data structure
We use an XML format for all the input and output data
structures of the ATTA. Each analyzer of the ATTA
works independently but are integrated by the XMLbased data structure.
As a primary input format, we chose MusicXML [14]because it provides a common ‘interlingua’ for music notation, analysis, retrieval, and other applications. We designed GroupingXML, MetricalXML, and TimespanXML as the export formats for our analyzer. The
XML format is extremely qualified to express the hierar-361

chical grouping structures, metrical structures, and timespan trees. Note that note elements in GroupingXML, MetricalXML, and Time-spanXML are connected to note elements in MusicXML, using Xpointer [15] and Xlink [16].
We expect that the distribution of a MusicXML or a
SMF, together with a grouping structure, metrical structure, and time-span tree, is useful for various musicaltasks such as searching and arranging.

if there is a low-level boundary or not. In this case, sevenpositions are over the threshold and five positions are applied to GPR1. Therefore, we can acquire five low-levelboundaries as shown with the arrows in Figure 8.
Low-Level boundaries
Bi1

Tlow-level0i

4.2 Implementation in Perl

DiGPR1i

We implemented the ATTA in Perl so that using CGI
allows it to be used through the internet (available at
http://staff.aist.go.jp/m.hamanaka/atta/). We believe thatthe exhibition of this kind of resource is very important
for the music researching community. ATTA is the first
application for automatically acquiring time-span tree.
We hope to benchmark the ATTA to other systems,
which hereafter will be constructed.

DiGPR2aDiGPR2b

i
i
i
i
i
i
i

4.3 Java based GUI∑

DiGPR3a

SGPR jDiGPR3b
DiGPR3c
D GPR3di
adjustable
GPR6
Dparameters i

Figure 8. Detection of low-level boundaries.

Although our analyzer implemented in Perl has a simple
user interface, we also developed a graphical user interface in Java called GTTM editor (Figure 7). The GTTM
editor has two modes, the automatic analysis and manual-edit modes. The automatic-analysis mode analyzes
using our analyzer and displays the results. The structureschange depending on the configured parameters. The
manual-edit mode assists in editing the grouping structure,
metrical structure, and time-span tree. It can be used toedit the results of the automatic-analysis mode.

5.2 Detection of high-level boundaries
The hierarchical grouping structure is constructed in the
top-down method (Figure 9). First of all, consider awhole score as a group and calculate the degree of highlevel boundary Di high-level boundary. Then select the strongest boundary for the next level grouping boundary as
shown with the upward arrows in Figure 9. Finally iterate while the group contains low-level boundaries.
Low-level boundaries…

Time-span tree
adjustableparameters
Grouping structure

Dihigh −level boundary0

Dihigh −level boundary0

Metrical Structurei

Dihigh −level boundary
0

Figure 7. GTTM editor (automatic-analysis mode).

ii

Calculate this way the degree of high-level boundary iteratively

5 EXAMPLES OF ANALYSIS USING ATTA

Figure 9. Construction of hierarchical grouping structure .

We provide in the appendix all the expressions to implement
the ATTA, so that they may be helpful for those users who
intend to develop other systems. In this section we expatiate how to acquire the grouping structure by using ATTA.

6 EXPERIMENTAL RESULTS

5.1 Detection of low-level boundaries
Figure 8 is the result of applying the local-level grouping
rules, such as GPR1, 2a, 2b, 3a, 3d and 61. We calculate
the degree of low-level boundary Bi as the weighted summation on the local-level grouping rules results DiGPR andadjustable parameter SGPR j. The threshold Tlow-level decides
1

The GTTM define the GPR6 for large-level grouping rules. However,
we also include it for low-level grouping rules, as manual analyzing
results based on GTTM by musicology experts.

362

We evaluated the performance of the music analyzer
using an F-measure, which is given by the weighted
harmonic mean of Precision P and Recall R,
Fmeasure = 2 ×

P×R
P+R .

(5)

This evaluation required us to prepare correct data ofa grouping structure, metrical structure, and time-span
tree. We collected a hundred pieces of 8-bar length,monophonic, classical music pieces, and asked musicology experts to manually analyze them faithfully withregard to the GTTM, using the manual-edit mode ofJava GUI to assist in editing the grouping structure,metrical structure, and time-span tree. Three other experts crosschecked these manually produced results.
To evaluate the baseline performance of our system,
we used the following default parameters: S rules=0.5,
Trules=0.5, Ws,=0.5 Wr =0.5, Wl=0.5, and σ=0.05.
In the current stage, the parameters are configured byhumans, because the optimal values of the parameters
depend on a piece of music. When a user changes theparameters, the hierarchical structures change as a resultof the new analysis.
It took us an average of about 10 minutes per piece tofind the plausible tuning for the set of parameters (Table 1).
As a result of configuring the parameters, each F-measureof our analyzer outperformed the baseline (Table 2).

7 CONCLUSION
We developed a music analyzing system called ATTA,
which derives the time-span tree of the GTTM. The following three points are the main results of this study.
- Proposed extended GTTM
We propose an extended GTTM for computer implementation. The difficulty with the computer implementation of GTTM has been designated, however no radical solutions have been proposed [17].
We re-formalized the rules using a numerical expression with adjustable parameters, so that it canseparate the definition and ambiguity from the analyzed material.
- Implemented ATTA on computer
We implemented an actual working system to acquire the hierarchical grouping structure, metricalstructure, and time-span tree of music, based on the
GTTM. The ATTA automatically acquirers the timespan tree by configuring the parameters withoutmanually analyzing by experts in musicology.

-

Constructed a set of correct data
We made a set of one hundred correct data, which is
the greatest database of analyzed results from the
GTTM to date. We plan to exhibit this database in
the near future.
- Evaluated the performance of ATTA
Our experimental results showed that, as a result ofconfiguring the parameters, our music analyzer outperformed the baseline F-measure. The set of parameters that was tuned for a certain family of musicpieces would possibly reflect the common featuresof the family. Thus, the idealized parameter set for amusic family, if any, would expectedly analyze a
new piece correctly, priort to human analysis.
We plan to develop further systems, using time-spantrees and the results of the music analyzer, for othermusical tasks, such as searching, harmonizing, voicing,
and ad-lib to indicate the effectiveness of implementing
the GTTM to provide music knowledge.

REFERENCES[1] Lerdahl, F., and Jackendoff, R. A Generative Theoryof Tonal Music. MIT Press, Cambridge, 1983.
[2] Cooper, G., and Meyer, L. B. The Rhythmic Structureof Music. The University of Chicago Press, 1960.
[3] Narmour, E. The Analysis and Cognition of Basic
Melodic Structure. The University of Chicago Press,
1990.
[4] Temperley, D. The Congnition of Basic Musical
Structures. MIT press, Cambridge, 2001.
[5] Hirata, K., and Matsuda, S. Interactive Music
Summarization based on Generative Theory ofTonal Music. Journal of New Music Research, 32:2,

Table 1. Adjustable parameters.
Grouping structure

Parameters
SGPR jσ

Metrical structure

Time-span tree

Ws
Wr
Wl
TGPR4
Tlow-level
SMPR jWr
TMPR jSTSRPR j

Description
The strength of each grouping preference rule. j= (2a, 2b, 3a, 3b, 3c, 3d, 4, 5, 6)
The standard deviation of a normal distribution for GPR5.
The priority to one end of a parallel segment compared with the start of a parallel segment.
The priority to the same rhythm compared with the same register in parallel segments.
The priority to large parallel segments.
The value of the threshold that decides whether GPRs 2 and 3 are relatively pronounced or not.
The value of the threshold that decides whether transition i is a low-level boundary or not.
The strength of each metrical preference rule. j= (1,2,3,4,5a, 5b, 5c, 5d, 5e ,10)
The priority to the same rhythm compared with the same register in parallel groups.
The value of the threshold that decides whether or not each rule is applicable. j =(4, 5a, 5b, 5c)
The strength of each time-span tree preference rule. j= (1, 3a, 3b, 4, 8, 9)

Table 2. F-measure for our method.

Melodies
1. Moments musicaux
2. Wiegenlied
3. Traumerei
4. An die Freude
5. Barcarolle

Total (100 melodies)Grouping Structure Analyzer

Metrical Structure Analyzer

Time-Span Tree Analyzer

Baseline
performance

Baseline
performance

Our methodwith Configured
parameters

Baseline
performance

Our methodwith Configured
parameters

1.00
0.85
1.00
1.00
0.79
:
0.90

0.71
0.54
0.50
0.22
0.24
:
0.44

0.84
0.69
0.63
0.48
0.60
:
0.60

0.18
0.76
0.60
0.12
0.04
:
0.46

Our methodwith Configured
parameters

0.56
1.00
0.87
0.73
0.54
:
0.77

0.95
0.83
0.76
0.95
0.72
:
0.84

363

165-177, 2003.

Step2: Application of GPR[6] Todd, N. A Model of Expressive Timing in Tonal
Music. Musical Perception, 3:1, 33-58, 1985.
[7] Widmer, G. ''Understanding and Learning MusicalExpression'', Proceedings of International Computer
Music Conference, pp. 268-275, 1993.
[8] Hirata, K., and Hiraga, R. ''Ha-Hi-Hun plays
Chopin’s Etude'', Working Notes of IJCAI-03
Workshop on Methods for Automatic Music
Performance and their Applications in a Public
Rendering Contest, pp. 72-73, 2003.
[9] Hirata, K., and Matsuda, S. ''Annotated Music forRetrieval, Reproduction, and Sharing'', Proceedingsof International Computer Music Conference, pp.
584-587, 2004.
[10] Ida, K., Hirata, K., and Tojo, S. '' The Attempt of
the Automatic Analysis of the Grouping Structureand Metrical Structure based on GTTM'',
Proceedings of International Computer Music
Conference, SIG Technical Report, 2001(42):49-54,
2001 (in Japanese).
[11] Touyou, T., Hirata, K., Tojo, S., and Satoh, K. ''Improvement of Grouping Rule Application in
Implementing GTTM'', Proceedings of International
Computer Music Conference, SIG Technical Report,
2002(47):121-126, 2002 (in Japanese).
[12] Nord, T. A. Toward Theoretical Verification:
Developing a Computer Model of Lerdahl andJackendoff’s Generative Theory of Tonal Music.
Ph.D. Thesis, The University of Wisconsin,
Madison, 1992.
[13] Hewlett, W. B. ed. Melodic Similarity Concepts,
Procedures, and Applications, Computing inMusicology 11, The MIT press, Cambridge, 1998.
[14] Recordare LLC.
http://www.
tutorial.pdf., 2004.

MusicXML 1.0 Tutorial.
recordare.com/xml/musicxml-[15] W3C. XML Pointer Language
http://www.w3.org/TR/xptr/, 2002.

(XPointer).

[16] W3C. XML Linking Language (XLink) Version
1.0. http://www.w3.org/TR/xlink/, 2001.
[17] Heikki, V. Lerdahl and Jackendoff Revisited.
http://www.cc.jyu.fi/~heivalko/articles/lehr_jack.htm.

Appendix 1: Grouping Structure analyzer
Step 1: Calculation of basic parameters
Six basic parameters for note transition i are calculated
from MusicXML: resti (interval between current offset
and next onset), ioii (inter-onset intervals), regii (pitchintervals), leni (subtraction of duration), dyni (subtractionof dynamics), and arti (subtraction of ratio between duration of performed note and proper duration of the note).

364

GPR1 (Alternative form)
B i -1 ≤ B i⎧1
D iGPR1 = ⎨
⎩0

where

Bi =

and Bi ≥ Bi +1∑D

× S GPR j

GPR jij = ( 2 a , 2 b ,3 a , 3b ,3 c , 3 d , 6 )

(6)

,

e lse

⎛
⎞
j
× S GPR j ⎟⎟max ⎜⎜
D iGPR′∑i′.⎠⎝ j = ( 2 a , 2 b , 3 a ,3b , 3c , 3 d , 6 )GPR2a (Slur/Rest)
rest i −1 < rest i and rest i > rest i +1

⎧1
D iGPR2a = ⎨
⎩0

(7)

else

GPR2b (Attack-Point)
ioi i −1 < ioi i and ioi i > ioi i +1

⎧1
D iGPR2b = ⎨
⎩0

(8)

else

GPR3a (Register)regi i −1 < regi i and regi i > regi i +1

⎧1
D iGPR3a = ⎨
⎩0

(9)

else

GPR3b (Dynamics)
dyn i −1 = 0 and dyn i ≠ 0 and dyn i +1 = 0⎧1
DiGPR3b = ⎨
⎩0

(10)

else

GPR3c (Articulation)
arti i −1 = 0 and arti i ≠ 0 and arti i +1 = 0 (11)⎧1
DiGPR3c = ⎨
⎩0

e lse

GPR3d (Length)
len i −1 = 0 and len i ≠ 0 and len i +1 = 0⎧1
D iGPR3d = ⎨⎩0

GPR4 (Intensification)⎧1
D iGPR4 = ⎨
⎩0

where
Pirest= rest i

(12)

else

(

)

max Pirest , Piioi , Piregist , Pidyn , Piarti > T GPR 4 (13)
e lse
i +1

∑ restj = i −1⎧
⎪ regi i
Piregist = ⎨
⎪
0
⎩

j

, Piioi = ioi i

i +1∑ regij = i −1

i +1

∑ ioi , P

j = i −1dynij= dyn i⎞⎛⎜ ∑ regi j > 0 ⎟⎟ , P arti = arti⎜ii⎠
⎝ j = i −1
e lse

i +1

∑ dyn ,jj = i −1

i +1

j

i +1

∑ artij = i −1.

j

GPR5 (Symmetry)2⎧⎪ ⎛ i⎫⎪end⎞
DiGPR5 = exp ⎨ − ⎜ ∑ ioi j − ∑ ioi j 2 ⎟ 2σ 2 ⎬ ,
=
=
j
start
j
start
⎪⎩ ⎝
⎪⎭
⎠

(14)

where
start : start transiton of a group.
end : end transition of a group.
GPR6 (Parallelism)⎧Gistart
j r × (1 − W s )⎪end⎪⎪Gi j r × W s
DiGPR6 = ∑ ∑ ⎨j r ⎪G start × (1 − W ) + G end × W
i jr
s
i jr
s
⎪
where
⎩⎪0

mi j = b
mi j = e(15)

mi j = t ,mi j = sdivision : duration of a quarter note.
r : length of parallel segments based on the division of a quarter note.
Gistart
=
j
Giend
j =

zqi q j r
yqi q j r

× (1 − Wr ) × r1+Wl +zqi - r q j - r r
yqi - r q j - r r

yqi q j r
zqi q j r

× (1 − Wr ) × r1+Wl +× Wr × r1+Wl

yqi - r q j - r r
zqi - r q j - r r

× Wr × r1+Wl⎡ i⎤([ ] : Gausian integer )qi = ⎢ ∑ ioi k division⎥⎣k =1⎦⎧b qi ≠ qi -1 and q j ≠ q j -1 and qi = qi +1 and q j = q j +1⎪
⎪e qi = qi -1 and q j = q j -1 and qi ≠ qi +1 and q j ≠ q j +1
mi j = ⎨⎪t qi ≠ qi -1 and q j ≠ q j -1 and qi ≠ qi +1 and q j ≠ q j +1
⎪s else⎩x qi r

⎧1
= ∑⎨
j ⎩0

qi ≤ q j and q j ≤ qi + relse

(qi − q j )× division = ∑ ioi g − ∑ ioi g⎧⎪1
y qi q j r = ∑ ∑ ⎨
k l ⎪
⎩0

k

l

g =1

g =1

MPR5d (Repetition of an Articulation Pattern)⎧⎪1
DiMPR5d = ⎨
⎪⎩ 0

else

(

)

k
l
⎧
⎪1 qi − q j × division = ∑ ioi g − ∑ ioi g and regii = regi jz qi q j r = ∑ ∑ ⎨
g =1
g =1
k l ⎪
⎩0 elseStep3: Detection of low-level boundaries
The degree of the low-level boundary Dilow-level boundaryis expressed as follows.
⎧⎪1
Dilow-level boundary = ⎨⎪⎩0

Bi > T low−level and DiGPR 1 = 1
else

(16)

Step4: Detection of high-level boundaries
A group that contains a local boundary detected iteratively by the next level boundary iˆ is calculated as follows.
iˆ = argmax Dihigh −level boundary

(17)

i

where
Dihigh −level boundary = Dilow−level boundary ×∑D× S GPR j

GPR jij ( = 2 a , 2 b , 3 a , 3b , 3 c 3 d , 4 , 5 , 6 )=1
DiMPR5a = 1 and DiMPR5a+1

MPR5e (Pitch Repetition)
numi = numi + 1
numi ≠ numi + 1⎧1
DiMPR5e = ⎨⎩0⎧⎪ B × S MPR1
Dilow -level metrical = Bi + ∑ ⎨ k
k ⎪
⎩ 0
where
MPR j

Bi =

∑ Di

Appendix 2: Metrical Structure analyzer

⎧

z
yi k
× Wr + i k × (1 − Wr ) > T MPR1
yi k
xi k
else

⎪⎩ 0

where
i start : beginning of a groupi end : ending of a group
xi k

=

yi k

=

zi k

=

i end

∑

∑

(18)

− i start

⎩0

)

(19)

velo i > 0
velo i = 0(20)velo i > 2 × µ velo × T MPR 4
else

(21)

valu i > 2 × µ valu × T MPR 5 a
else

(22)

MPR5b (Long Duration of Dynamic)⎧⎪ 1
DiMPR5b = ⎨⎪⎩0

vol i > 2 × µ vol × T MPR 5b
else

(23)

MPR5c (Long Slur)⎧⎪1
DiMPR5c = ⎨⎪⎩0sluri > 2 × µ slur × T MPR 5c
else

(30)
(31)

⎧1
=⎨
D iTSRPR4k⎩0ioi i -1 = ioi k −1 , ioi i = ioi k , ioi i + 1 = ioi k +1
else

(32)

TSRPR8 (Structural Beginning)⎧⎪1
DiTSRPR8 = ⎨⎪⎩0

i = i start

(33)

else

TSRPR9 (Structural Ending)

MPR5a (Long Pitch-Event)⎧⎪ 1
DiMPR5a = ⎨⎪⎩0j

TSRPR4 (Parallelism)

MPR4 (Stress)⎧⎪1
DiMPR4 = ⎨
⎪⎩0

(29)

D iTSRPR1 = dot i max dot jj

MPR3 (Event)⎧1
DiMPR3 = ⎨Step1: Calculation of basic parameters
Four basic parameters of the current head (abstracting note or non-abstracting note) i are calculated: resti(interval between current head’s offset and next head’s
onset), ioii (inter onset intervals of heads), doti (numberof metrical dots), and pitchi (pitch).
Step2: Application of TSRPR

DiTSRPR3b = 1 − pitch i max pitch j⎧ 1 velo i > 0 and num i′-1 = num i′ and num k + i′− i -1 = num k + i′− i0 else.
i ′= i start ⎩end

Appendix 3: Time-span tree analyzer

TSRPR3b (Lower Bass Pitch)⎧1 velo i > 0 and velo k + i′ + i > 0
⎨
else

) (i

.

j

∑ ⎨

(

else

DiTSRPR3a = pitch i max pitch j0i ′ = i start ⎩i end

DiMPR2 = i end − i0

TSRPR3a (Higher Melodic Pitch),k end ⎧1 velo ′ > 0⎧1 velo i ′ > 0
k
+ ∑ ⎨
⎨
velo i′ = 0 k ′= k start ⎩ 0 velo k ′ = 0

MPR2 (Strong beat early),

× S MPR j

TSRPR1 (Metrical Position)0i ′ = i start ⎩
i end

(27)

+

MPR1 (Parallelism)⎪1=⎨
DiMPR1k

DiMPR1=1k
DiMPR1=0k

j = ( 2,3, 4,5 a ,5b ,5c ,5 d ,5 e ).
Step4: Acquisition of hierarchical metrical structure
When the current structure contains more than one
beat, the next level structure mˆ is calculated as follows:⎧ D ilow -level metrical(i - m ) mod 2 = 0⎪mˆ = argmax ∑ ⎨ D ilow -level metrical × S MPR10 (i - m ) mod 3 = 1 (28)⎩

Step2: Application of MPR(26)

Step3: Calculation of Low-level beat strength
Low-level beat strength is calculated by weighted
summation of DiMPR j (=1,2,3,4,5a,5b,5c,5d,5e).

m ( =1, 2 ,3, 4 , 5 ) i ⎪Step1: Calculation of basic parameters
Calculating from MusicXML and GroupingXML
five basic parameters of a note form beat i: veloi (velocity), valui (length of note), voli (duration of dynamic),sluri (length of slur), and numi (pitch). µvelo, µvalu, µvol,µslur, and µnum are the average of the basic parameters.

(25)

else

(24)

⎧⎪1
DiTSRPR9 = ⎨⎪⎩0

i = i end

(34)

else

Step3: Calculation of head strength
The strength of a head is calculated by weighted
summation of DiTSRPR j (=1, 3a, 3b, 4, 8, 9).
⎧⎪B × S TSRPR4
Ditime-span = Bi + ∑ ⎨ k
k ⎪
⎩ 0

where

Bi =

∑D

TSRPR jij = (1, 3 a , 3 b , 8 , 9 )DiTSRPR4=1k
DiTSRPR4
=0
k

,

(35)

× S TSRPR j .

Step4: Acquisition of next level heads
When a time-span contains more than one head i andj, the next level head hˆ is calculated as follows:⎧⎪ihˆ = ⎨⎪⎩ j- spanD itime - span ≥ D time
j

e lse

.

(36)

365