A THEORETICAL MODEL OF MUSICAL FORM
Ma in Roh meie
Digi al and Cogni i e Musicology Lab
École Poly echnique Fédé ale de Lausanne
[email p o ec ed]
Ma kus Neuwi h
Ins i u e o Theo y and His o y
An on B uckne Uni e si y, Linz
[email p o ec ed]
ABSTRACT
Musical o m is one o he mos cen al aspec s o musi-
cal s uc u e, as i conce ns he o e a ching o ganiza ion
p inciples o music ac oss gen es and s yles. The e o e,
unde s anding he o mal cha ac e iza ion o musical o m
is a cen al opic in music heo y, compu a ional music
analysis, MIR, and music gene a ion. This pape makes
a heo e ical con ibu ion p oposing a o mal model ha
cha ac e izes he main aspec s o musical o m. We cha -
ac e ize musical o m by he ollowing aspec s: G ouping
s uc u e, hy hmic pa i ioning, o mal unc ions, epe i-
ion s uc u e, schema a, and ha monic ancho poin s. As
he s uc u es o hie a chical segmen a ion as well as o m-
unc ionali y ha e p e iously been concep ualized in e ms
o a ecu si e ee-shaped hie a chy, we g ound ou model
in abs ac gene a i e g amma s. Ou model ex ends his
hie a chical analysis by an accoun o he hy hmical p op-
e ies o o m as well as epe i ion s uc u e. The ha monic
layou de ines cons ain s o mo i ic con en (pi ch and
hy hm). Ou app oach also add esses epe i ion s uc u e
by modeling he loca ion and deg ee o a ia ion o e-
pea ed ideas. This is achie ed ia a iable binding. We
exempli y ou heo e ical con ibu ion by a de ailed analy-
sis.
1. INTRODUCTION
The e m “musical o m” is complex and has a a ie y o
uses in musical p ac ice and esea ch. Fo ins ance, Jazz
musicians may nego ia e he o m hey pe o m as Blues
o m,Rhy hm changes, o A A B A o A A o ms. Such
schema a cha ac e ize o m wi h ega d o g ouping and
hy hmic pa i ioning, conc e e cho ds o de ined ha monic
ancho posi ions, as well as epe i ion pa e ns o melody
o en i e pa s. Fo ins ance, Rhy hm changes may be cha -
ac e ized as a 32-ba A A B A schema, whe e A ins an i-
a es an 8-ba uni wi h a co e melody and pa icula onal
ancho poin s (a onic a he beginning and he end) and
whe e a middle sec ion B displays a Fon e schema (i.e., a
speci ic a ian o a descending- i hs sequence [1]). No-
ably, he e a e also ce ain abs ac o mal unc ions (such
© M. Roh meie and M. Neuwi h. Licensed unde a C e-
a i e Commons A ibu ion 4.0 In e na ional License (CC BY 4.0). A -
ibu ion: M. Roh meie and M. Neuwi h, “A Theo e ical Model o
Musical Fo m”, in P oc. o he 26 h In . Socie y o Music In o ma ion
Re ie al Con ., Daejeon, Sou h Ko ea, 2025.
as beginnings, middles, and endings) ha a e exp essed
wi h he help o speci ic ha monic and oice-leading pa -
e ns [2]. Also, he e a e o mal empla es, such as con-
ce o o m, ondo o m, o sona a o m, which ha e a
s onge ocus on hema ic and onal (modula ion) plans.
Such o m ypes, howe e , also embody aspec s o o e all
d ama u gic ajec o ies as well as p o o ypical hy hmic
s yles and ins umen a ion.
P esen ly, he e is no eady- o-use heo e ical model
o musical o m ha lends i sel o compu a ional im-
plemen a ion and applica ion. Also, om he pe spec-
i e o compu a ional gene a ion, o m is s ill a challenge,
since as o ye o e a ching long- e m cohe ence is ha d
o achie e, e.g. o deep-lea ning app oaches. Add ess-
ing his gap, ou pape p oposes a heo e ical con ibu ion,
ou lining a g amma -based model o musical o m a he
symbolic le el. We p opose a cha ac e iza ion o musical
o m in onal music om he (ex ended) common p ac-
ice, aking in o accoun he ea u es o g ouping s uc u e,
hy hmic pa i ioning, o mal unc ions, epe i ion s uc-
u e,schema a, and ha monic ancho poin s.
1.1 Rela ed li e a u e
In music heo y, he e a e nume ous s udies ha add ess
speci ic ques ions o o m-building in a wide a ie y o
epe oi es (e.g., in classical and oman ic s yles o in
Pop/Rock and Jazz; [2–4]). Simila ly, in he domain
o compu a ional musicology and MIR impo an compo-
nen s o musical o m (such as segmen a ion, epe i ion,
and cadences) a e being ackled (e.g., [5]). Ye bo h ields
s ill lack a comp ehensi e model o musical o m, and
he e a e only ew da ase s o o mal anno a ions a ailable
(e.g., [6–9]). The ollowing o e iew lis s such pa ial ap-
p oaches o o m.
The e a e se e al app oaches modeling segmen a ion.
Cambou opoulos p oposes a ule-based model o hy h-
mic bounda y de ec ion [10]. Bod models segmen a ion
in he Essen olksong collec ion by p obabilis ic g amma s
[11,12]. Hamanaka e al. [13,14] ha e de eloped a com-
pu a ional model o g ouping s uc u e om he GTTM
[15]. Feis haue e al. ely on hy hmic, ex u al, and ha -
monic ea u es in o de o in e s uc u al b eaks in sona a-
o m mo emen s. To de ec hese momen s o caesu a,
hey d aw on a da ase o 27 s ing-qua e mo emen s by
Moza , aining an LSTM neu al ne wo k [16].
Se e al s udies add ess o mal bounda ies by ocusing
on cadences. Hen schel e al. [17] o e a co pus o all
312
Moza piano sona as ea u ing expe -labels o ha monic,
ph ase, and cadence analyses. Raz e al. [18] p esen a
la ge da ase o Moza ’s ins umen al wo ks wi h his o -
ically in o med expe anno a ions o caden ial momen s.
O he s udies a e de o ed o he au oma ic de ec ion o ca-
dences and cadence ypes [19–21].
Few s udies explici ly model epe i ion in a symbolic
ashion. Since epe i ion equi es a model o a leas
con ex -sensi i e complexi y [22,23], ecen con ibu ions
model epe i ion in music wi h a iable binding o speci ic
sub ees [24,25].
The e a e ecen app oaches analyzing keys and key a-
jec o ies by way o hie a chical scape plo s [26–29]. Weiß
e al. use isualiza ions o local key cha ac e is ics in au-
dio eco dings o explo e he adi ional sona a- o m model
in ela ion o his o ical accoun s o o m based on selec ed
Bee ho en sona as [30]. Alleg aud e al. model sona a
o m by using Hidden Ma ko Models ained on a labeled
da ase [31].
2. MODELING MUSICAL FORM
Ou p oposed model cha ac e izes musical o m in e ms
o g ouping s uc u e [15], hy hmic pa i ioning (based
on [32]), o mal unc ions, epe i ion s uc u e, schema a,
and ha monic ancho poin s. I models he in e play o
hese pa ame e s in gene a ing he o mal ou line o a mu-
sical piece. Mo e speci ically, we concep ualize o m as a
kind o la en s uc u e ha models segmen a ion and cas s
conc e e cons ain s o he placemen o epe i ion, ancho
cho ds, and speci ic musical schema a. Hence, he esul o
he o m model is unde s ood as a layou (a cloze) o hese
musical ea u es. Such a o m layou may be ele an o
music gene a ion; con e sely, o m analysis consis s in in-
e ing he layou and la en o m pa ame e s om a gi en
piece.
Ou model adop s hie a chical s uc u es, as hey a e
well-sui ed o exp ess con ainmen ela ionships essen ial
o musical o m. We ound p e iously, howe e , ha he
di e en kinds o hie a chical s uc u es iden i ied in mu-
sic canno be subsumed unde a single o e a ching ee
model. Speci ically, while he epe i ion s uc u e and he
ha monic dependencies o a piece o music can each be
modeled in e ms o hie a chical ees [24, 33, 34], he
b anchings o hese ees, howe e , o en do no ma ch, im-
plying ha hese a e mu ually independen s uc u al do-
mains. Mo eo e , he pa se o op-le el s uc u e o ha -
monic ees is o en highly ambiguous. This ambigui y
can, howe e , be esol ed by e e ence o musical o m
[35, 36], as he op le el o he ha monic ee commonly
e lec s he ou line o he o mal p o o ype [34]. This holds
o many pieces, hough he e a e examples (e.g., “So-
la ” o “Blues o Alice”), whe e he ha monic ee can
be mos ly independen o he o m hie a chy.
Taking hese indings in o accoun , ou p oposed solu-
ion o modeling o m and main aining he mu ual indepen-
dence o g ouping/ epe i ion s uc u e and ha monic hie -
a chy lies in he ollowing app oach: The e is a join op-
le el o m ee, which is guided by hy hmic g ouping and
o mal unc ions [37] and gene a es he co e o ganiza ion
o he piece o segmen . This in ol es a layou /cloze o he
co e cho ds, epe i ions, and schema a a ce ain loca ions,
which cons i u es a binding in e ace o he ha monic and
epe i ion ees. This co e s uc u e is hen illed in by gen-
e a ing ha mony and epe i ion s uc u e as sepa a e ees,
beginning om he join o m ee.
Conc e ely, ou model ope a es in ou s ages o gene -
a ion: (1) gene a e a empla e o he o e a ching g oup-
ing and o m- unc ional design o he whole piece (o
segmen ) wi h ha monic, schema ic and epe i ion ancho
poin s. (2) This op-le el layou is used o gene a e he
ha monic s uc u e o he piece, including epe i ions o
ha monic p og essions when equi ed by he o mal em-
pla e. (3) A model o igu a i e epe i ion s uc u e akes
he op-le el o m layou ( om (1)) and gene a es a layou
o he g ouping and epe i ion o ideas, aking accoun o
ha mony when necessa y. These s eps esul in a de ailed
desc ip ion o he piece a he onal, ha monic, and igu a-
i e le els, which we conside a ull cha ac e iza ion o i s
o m and i s implica ions o he musical ma e ial. A inal
s ep o music gene a ion (which is no pa o his pape )
would be (4) o ins an ia e his s uc u e wi h conc e e mu-
sical ma e ial.
2.1 The g amma
Ou o malism employs abs ac con ex - ee g amma s
[38] and de ines a g amma G:= (F, R, 0)as a se o
non e minal symbols o o m ca ego ies F, a se o ule
unc ions R, and a s a symbol 0∈ F. In he special case
o his g amma , he e a e no dedica ed e minal symbols,
since he gene a ion me ely esul s in a sequence o o m-
ca ego y symbols, which subsequen ly a e u he used o
gene a e ha monic and igu a i e ees. In o he wo ds, any
o m-ca ego y symbol excep o he s a symbol can be
e minal, and he gene a ion can s op a any poin in he
con ex o his join op-le el o m ee.
We de ine o m ca ego ies (c∈ F) as a composi e
s uc u e ha combines ea u es o o mal unc ions, hy h-
mic ca ego ies, schema, ha mony, and epe i ion. Speci -
ically, adap ing [37], i is assumed ha o m- unc ionali y
subdi ides in o ou ca ego ies (beginning,middle,end,
whole), while only he s a symbol ins an ia es he alue
whole. Using he o mal model o hy hm in [32], he
hy hmic ea u e encodes ca ego ies in ol ing imespan
and i s hype me e . The se o schema ea u es Sis an
enume a ion ype o o m p o o ypes (e.g., bina y, e na y,
sen ence,pe iod,p esen a ion,con inua ion) and oice-
leading schema a (e.g., sequences such as Fon e, Mon e,
descending i hs, e c. [1], and cadences such as PAC, HC,
e c. [17]). The epe i ion ea u e encodes a se o iden i-
ie s (V) o a iables ha guide he epe i ion o sub ees
o epe i ion o igu a i e ideas (see 2.6). The ha mony
ea u e encodes cho d symbols and keys [34,39]. The s a
symbol 0de ines he o mal unc ion whole, he du a ion
o he piece o segmen , he only epe i ion iden i ie ha
canno be epea ed, and onic Iand key o he piece; i may
op ionally encode a o m schema (e.g., bina y o e na y).
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
313
c:=
unc ion :∈[beg, mid, end, whole]
hy hm : [upbea :body :coda], M
schema :s∈ S
ha mony :cho d ∈ H
epe i ion : ∈ V
∈ F
The p oduc ion o a o m ca ego y wi h ule unc ion
ac s in such a way ha he ea u es o he child ca e-
go ies a e successi ely illed. (1) The o mal unc ions a e
gene a ed, which also se s he g ouping ca dinali y. (2)
The hy hmic p opo ion o he spli is decided. (3) The
schema ea u e is se (o le emp y). (4) Ha mony is se ;
and (5) Repe i ion cons ain s a e se i equi ed by he
o m schema (e.g., a pe iod). I he pa en o m ca ego y
in okes a speci ic schema, he ew i e akes place by inse -
ing an en i e empla e sub ee (see 2.5), ollowing he o -
malism wi h a iable binding desc ibed by [24]. Simila ly,
i he epe i ion ea u e o he pa en ca ego y equi es a
epe i ion, he espec i e epea ed sub ee is inse ed.
2.2 Fo mal unc ions
The h ee o mal unc ions beg,mid,end guide he g oup-
ing s uc u e and he p oduc ion p ocess (whole only ap-
plies o he s a o he de i a ion). Fo malizing [2], he
ollowing p oduc ion ules go e n he p oduc ion o o mal
unc ions. The s a symbol whole can only be ew i en in
e ms o he gene al ules (1–3).
__ −→ beg [mid] [mid]end (1)
__ −→ beg beg mid end (2)
__ −→ beg mid end end (3)
beg −→ beg mid |mid end (4)
mid −→ mid mid |mid end (5)
end −→ mid end |end end (6)
Fo mal unc ions cas implica ions on ha monic ancho
poin s (e.g., onic s a emen s a beginnings, sequences o
onal ansi ions a middles, and cadences a ends), which
we model by se ing cons ain s o he ha mony ea u e
o he ca ego y. C ucially, ha monic ea u es can only
be se i hey a e also licensed (i.e., de i able) by he
ules o he ha monic g amma [33, 34]. Fo ins ance, a
ew i e begha =I→beg mid end may se ha monic an-
cho s I,V,I espec i ely; and his is possible because
he p og ession I V I is de i able by he ha monic ules
I→I I and I→V I in he ollowing de i a ion se-
quence: I→I I →I V I. Acco dingly, implica ions
on ha monic ancho s encompass ules like he ollowing
examples: 1
c_beg =⇒c_ha :=I|I∗(7)
c_mid =⇒c_ha :=V|I(8)
c_end =⇒c_ha :=I(9)
1No e ha I∗implies an open onic cons i uen ha may be ollowed
by an un esol ed V(no igh -b anch onic closu e; see [35]).
Fo mal unc ions may also ha e implica ions o
di e en ha monic/ oice-leading schema a (e.g., middle
schema a o cadences). The o m- unc ionali y and ecu -
si e na u e o he o m ee ha e an impac on he closu al
s eng h o such caden ial endings: o ins ance, he end o
an an eceden (beg) o a i s sec ion (beg) may be weak,
implying ei he a HC o an IAC; he end o he conse-
quen (end) o a i s sec ion (beg) may be he s onges
o i s sec ion, bu weake han he inal cadence a he
end o he inal pa (end) o he second sec ion (end).
Hence, i equi es he se up o a s yle-speci ic unc ion
closu e(c)7→ CAD ha selec s he cadence ype wi h
he app op ia e deg ee o closu al s eng h [40] based on
he o mal unc ions o he ances y o he o m ca ego y
c. In ou model, we assume he ollowing se o closu e
schema a (o de ed om s ong o weak closu e): CAD =
{PAC,IAC,HC,DEC,EVAD,PLAG,TC}, which s and
o pe ec au hen ic, impe ec au hen ic cadence, hal ,
decep i e, e aded, plagal cadences, as well as onic com-
ple ion. Fo mal unc ions also ha e implica ions on o he
s yle-speci ic schema a, such as sequences o ansi ions
(SEQ, TRANS), which cons i u e middles. Rules o en-
compass such schema ic implica ion ha e he o m shown
in he ollowing examples:
c_end =⇒c_schema:=closu e(c)(10)
c_mid =⇒c_schema:=SEQ|TRANS (11)
2.3 G ouping s uc u e and hy hmic pa i ioning
The g ouping s uc u e cha ac e izes he con ainmen ela-
ionships o uni s as well as he subuni s ha a la ge uni
consis s o , and is e lec ed in he b anching s uc u e o he
ee. In ou model, he ew i e o o mal unc ions de ines
he g ouping s uc u e.
Based on he ca dinali y o he subdi ision, he hy h-
mic model comple es he empo al pa i ioning o he child
ca ego ies. Fo his pu pose, a simpli ied e sion o he hi-
e a chical model o hy hm p oposed by [32] is adop ed,
which only employs he spli ule. The cen al condi ion o
he hy hmic pa i ioning is ha he sum o he du a ions
assigned o he child en ma ches he du a ion o he pa en
ca ego y. 2Hence, he pa i ion o hy hmic ea u es io
he espec i e ca ego ies obeys he ollowing equi emen :
0−→ 1 2| 1 2 3| 1 2 3 4,X i=| 0|(12)
The p opo ions o he spli s a e p e e ably simple in e-
ge a ios: 1:1, 1:1:1, 1:1:1:1, 2:1, 2:1:1, 2:1:2:1, 3:1, e c.,
in line wi h esul s om p e ious compu a ional esea ch
[41]. Based on ou p io explo a ion, all o m spli s could
be explained wi h he simple a ios based on {1,2,3}.
2.4 Ha monic ancho s
The o m ee places ha monic ancho s ha he ha monic
g amma (o o he model) is equi ed o espec . These an-
2Following [32], he du a ion o a imespan ca ego y in uni s o bea s
is de ined as |[a:b:c]|:= b−a+c.
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
314
cho s a e de ined along wi h he gene a ion o each sub-
di ision in he o m ee. Based on he b anching and
i s o mal unc ions, ha monic ancho s a e de ined ha
go e n he head o he ha monic s uc u e o he imes-
pan o he ca ego y. The ha monic ancho labels ollow
he ules o ha monic g amma s ou lined in p e ious wo k
[34,35,39]. Fo example, a ew i e endha =i→mid end
could be ma ched wi h a ew i e o he ha monic ea u es
as I→V I, such ha he new child en ha e he ea u es
midha =V,endha =I. This concep ualiza ion implemen s
he p oposal by [34] ha he op-le el s uc u es o ha -
monic and o m ees should ma ch. Acco dingly, p oduc-
ion ules o o mal unc ions selec app op ia e ha monic
ew i es, ha ma ch ha monic implica ions o o mal unc-
ions as de ined in [2,37]. As ou lined in 2.2, in he special
case o e na y o qua e na y b anching (ha monic depen-
dencies a e no mally bina y), he e needs o exis a alid
de i able ha monic sub ee, ha ma ches he sequence o
ha monic ancho s. This gene a ion p ocedu e ensu es ha
he ha monic ea u es alone p oduce a alid ha monic sub-
ee, which could hen gene a e ine de ails o igina ing
om he o m layou .
2.5 Schema a and empla es
I is an essen ial cha ac e is ic o o m ha ce ain aspec s
a e epea ed o schema ized as ull empla es. This con-
ce ns s anda dized o m uni s, such as ph ase and heme
ypes, ha monic o oice-leading schema a (e.g., cadences
o sequences), and epea ed pa s (wi h o wi hou a ia-
ion), such as in ABA o ms [2]. All o hese ha e in com-
mon ha en i e sub ees a e inse ed, which come ei he
om s ylis ic empla es o om he piece i sel [25], sim-
ila o euse g amma s in linguis ics [42]. These aspec s
could be ep esen ed in he o m ee in wo ways: Fi s ,
symbols ha in oke such empla es o epe i ions should
be inse ed by he independen ha monic o epe i ion ees
(such as PAC o i1, i1). Second, i he o m i sel equi es
a epe i ion, such as in a pe iod, he epe i ion is di ec ly
placed in o he o m ee using he same mechanism o
a iable bound epe i ion [24]. The de ailed example in
Figu e 2 illus a es he wo king o such empla es in e ms
o cadences (PAC), a Fon e sequence in he middle, and a
sen ence ph ase schema o he i s 8 measu es. An ad an-
age o his concep ualiza ion is ha i makes i possible o
exp ess common o m p o o ypes [2] in e ms o ee em-
pla es o ou o m g amma . Fo ins ance, wo p ominen
hema ic p o o ypes can be exp essed in e ms o wo em-
pla e ees:
pe iodI
A′
cons,end,I
i′
2,P AC
i1
Aan ,beg,I∗|I
i2,HC|IAC
i1
sen ence,I
Bcon ,end,I
i3,PAC
i2,mid
Ap es,beg,I
i′
1,HC|IAC|T C
i1
These empla es exp ess ha he pe iod is cha ac e ized
by i s wo almos iden ical pa s (an eceden , consequen ),
he o me wi h a beg unc ion and a weak ending (HC,
IAC), he la e wi h an end unc ion and a s ong close
(PAC); he sen ence empla e exhibi s wo di e en pa s,
wi h he i s (beg) ea u ing mo i ic epe i ion o i s wo
pa s and weak closu e (TC), he la e a middle unc ion,
and a s ong close in he second subpa . Figu e 2 illus-
a es an ins ance o he sen ence p o o ype.
2.6 Figu a i e and mo i ic epe i ion
The p e ious sec ion ou lined he way in which epe i ion
may be encoded in he o m ee. This sec ion desc ibes
how he ep esen a ion o mo i ic a ia ion is modeled and
how he independen epe i ion ee is buil (s ep (3) o he
gene a ion p ocess) based on he model o epe i ion s uc-
u e in [24].
We model mo i ic a ia ion in e ms o a se o p ima y
musical ideas and he composi ion o unc ions ha de-
i e composi e ideas om simple ones. The se o p ima y
ideas may ep esen o iginal ideas (mo i es o smalle ig-
u es) o he speci ic piece o be modeled as well as gene al
schema ic ma e ial (such as cadences o clausulae, e c.).
The se ηde ines he en i e se o ideas ha is buil om
p ima y ideas and composi e ones. The en i e piece and
he cons i u i e pa s he eo a e modeled as a p ima y o
composi e idea. This way o cha ac e izing mo i ic ela-
ionships es ablishes an ances y ep esen a ion cap u ing
he componen s and ope a ions ideas a e buil om.
The co e unc ions o model he cons uc ion o new
ideas om p e ious o p ima y ideas a e conca ena ion
(conca ), exac ch oma ic ansposi ion ( ansp), dia onic
ansposi ion inside he cu en scale (d ansp), adap a ion
o speci ic ha monies (adap ), agmen a ion ( ag), in e se
(in ), e og ade ( e o), diminu ion (dim), augmen a ion
(aug), and a ia ion ( a ) o o he kinds o changes. All
o hese unc ions map one o mo e ideas om η o a com-
posi e idea ha is o be appended o η. Acco dingly, he
ollowing de ines he signa u es o hese unc ions (whe e
i is he se o musical in e als, and C he se o cho ds).
conc :η×η7→ η(13)
ansp, d ansp :η×i 7→ η(14)
adap :η×C7→ η(15)
ag, in , e o, dim, aug, a :η7→ η(16)
The epe i ion ee models con ainmen ela ions ha
exp ess how la ge pa s a e composed o smalle ones, ex-
ending p e ious app oaches [24]. The nodes in he ee
cons i u e a iables ha indica e epea ed elemen s, as well
as ans o ma ions ha indica e a ia ion o con en . The
epe i ion ee algo i hm begins wi h he ee shape o he
o m ee and an emp y se o epe i ion a iables (ik). The
algo i hm ope a es in ecu si e dep h- i s le -b anching
ee gene a ion/expansion. E e y ime a lea is eached, i
decides whe he o add ano he subdi ision (un il a eason-
able end is eached, e.g., a 1-measu e limi ), o o choose
o es ablish and inse a new a iable in+1, o o d aw
one om he exis ing pool o a iables ha ma ches he
du a ion. I a new a iable is c ea ed, i is added o he
pool. I an exis ing a iable is chosen, he algo i hm se-
lec s whe he o no o a y his a iable. I yes, i is a -
ied acco ding o he unc ion composi ion below. Once all
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
315
Figu e 1. Dependency and de i a ion g aph o he ideas in Moza ’s minue , K. 1 (see Figu e 2 o he ull piece).
b anches o a sub ee a e comple e, he algo i hm decides
o c ea e a new iden i ie o he head o he sub ee and
adds i o he pool. Fo he subsequen ecu si e gene a-
ion, he algo i hm can also decide a heads o sub ees o
epea a sub ee i he e is a leng h-ma ching a iable in he
pool, hus comple ing his b anch. Finally, i he o m ee
has se cons ain s on he epe i ion, he algo i hm has o
espec hese cons ain s in i s de ini ion o epe i ions.
3. EXAMPLE ANALYSIS
Figu e 2 shows a de ailed analysis o an ea ly Moza min-
ue , K. 1, o illus a e he o malism. The piece cons i u es
a 16-measu e wo-pa (=bina y) o m. The i s sec ion
consis s o 8 measu es (con o ming o he hema ic p o o-
ype o a sen ence), which in u n a e subdi ided in o wo
4-measu e uni s: a p esen a ion ph ase and a con inua ion
ph ase. The second sec ion o he piece encompasses 8
measu es, oo, and consis s o a ha monic and melodic se-
quence, which o ms he middle o 4 measu es, and a i-
nal pa o 4 measu es, which closes he piece. Each la ge
8-measu e sec ion closes wi h a cadence (a pe ec au hen-
ic cadence, PAC), while he ini ial 4-measu e uni o each
sec ion p ojec s only a weak sense o closu e (TC). No-
ably, he o m and epe i ion ees e eal ha bo h pa s
sha e he same abs ac ea u es, esembling he pe iod
empla e. Fu he no e ha he sequence pa epea s he
ini ial mo i es, which is a decision aken a he le el o he
epe i ion ee a he han he o m layou (see Fig. 2).
Figu e 1 and he ollowing dependency de ini ions
model he igu a i e epe i ion s uc u e and exempli y he
wo king o he unc ion composi ion o malism.
i1:= conca (β1, β2); i
1:= ansp(i1,−1) (17)
i′
1:= conca (adap (β1),adap ( a (β2))) (18)
(i′
1) := d ansp(i′
1,−1) (19)
i2:= conca (i1, i
1); i
2
′:= adap ( a (i2)) (20)
i3:= conca (α, d ansp(α, −2)),(21)
α:= adap ( ag(i1)) = adap (β1)
i′
3:= a (i3); (i′
3)′:= a (aug(i′
3)) (22)
i
3:= ansp(i3,−7); (23)
((i′
3) )′:= in ( ansp(i′
3,5)) (24)
(((i′
3)′) )′:= a ( ansp((i′
3)′,5) (25)
i4:= conca (i3, i′
3,(i′
3)′); (26)
i′
4:= a (d ansp(i4,5)) (27)
[= conca (i
3,((i′
3) )′,(((i′
3)′) )′)]
i5:= conca (i2, i4)(28)
i′
5:= a (i5) = a (conca (i2, i4)) (29)
[= conca (i
2
′, i′
4)]
4. CONCLUSION
Ou model o musical o m seeks o accoun o essen ial
o m-de e mining ac o s and hei complex in e play. Im-
po an ly, ou model is no a model o composi ion, al-
hough i could be use ul in an o e all music gene a ion
pipeline. Also, he model needs o be es ed by implemen-
a ion, and he implemen a ion needs o be p obabilis ic in
o de o be able o dynamically cap u e s ylis ic de ails.
Unsupe ised ule in e ence me hods may e en achie e
be e esul s [35]. Since he co e s ylis ic scope o he
model conce ns onal music o he (ex ended) common
p ac ice, i will be necessa y o es i s applicabili y be-
yond ha epe oi e. The ac ha he model encompasses
gene al ca ego ies (such as he basic o mal unc ions o
beginning, middle, and end) ende s i su icien ly lexible
o be use ul o he cha ac e iza ion o o he (po en ially
e en non-Wes e n) s yles. Fu he s eps include modeling
inse ions ha expand o mal p o o ypes as well as inco -
po a ing polyphony and oice-leading.
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
316
Ikey=G: 16
I: 8
I: 4, PAC
I: 2, PAC
I: 1
V: 1
V:2
3
ii :1
3
I: 2, mid
I:1
3
V6:5
3
V6:3
3
ii :2
3
I: 4, SEQ, TC
I: 1
V: 3
V: 1
ii : 2
ii : 1V/ii : 1
I∗: 8
V: 4, PAC
Ikey=V
I: 2, PAC
I: 1V: 1
V:2
3
IV :1
3
I: 2, mid
I:1
3
V6:5
3
V6:3
3
ii6:2
3
I: 4
I: 2, TC
I: 1 iio: 1
I∗: 2, beg
iio6: 1I: 1
↑
beg
(1 : 6 : −1)
__
I∗
µ2
end
(1 : 6 : −1)
TC
I
µ
2
H
H
H
H
un: beg
hy: (2
8: 4 ·3 : −1
4)
schema: p esen a ion, TC
ha : I
ep: __
mid
(1 : 6 : 0)
__
Ikey=V
__
end
(0 : 6 : −1)
PAC
Ikey=V
__
b
b
b
un: end
hy: (2
8: 4 ·3 : −1
4)
schema: con inua ion, PAC
ha : V=IDmaj
ep: µ3
X
X
X
X
X
X
X
un: beg
hy: (2
8: 8 ·3 : −1
4)
schema: an eceden , sen ence
ha : I∗
ep: µ1
mid
(1 : 6 : −1)
SEQ
__
__
mid
(1 : 6 : −1)
SEQ, TC
I
__
H
H
H
H
un: mid
hy: (2
8: 4 ·3 : 0)
schema: sequence, TC
ha : I
ep: __
mid
(1 : 6 : 0)
__
I
__
end
(0 : 6 : −1)
PAC
I
__
b
b
b
un: end
hy: (0 : 4 ·3 : −1
16 )
schema: con inua ion, PAC
ha : I
ep: µ
3
′
X
X
X
X
X
X
X
un: end
hy: (2
8: 8 ·3 : −1
4)
ype: consequen
ha : I
ep: µ′
1
(
(
(
(
(
(
(
(
(
(
(
(
hhhhhhhhhhhh
un: whole
hy: (2
8: 16 ·3 : −2
8)
schema: bina y
ha : Ikey=Gmaj
ep: __
↓
i6: 16
i′
5: 8(= µ′
1)
i′
4: 4(= µ
3′)
(((i′
3)′) )′: 2((i′
3) )′: 1
i
3: 1
(i
2)′: 4
(i′
1) ′: 2
i′
1: 2
i5: 8(= µ1)
i4: 4(= µ3)
(i′
3)′: 2i′
3: 1i3: 1
i2: 4
i
1: 2(= µ
2)i1: 2(= µ1)
Fo m layou
measu e: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
schema: bina y
schema: an eceden , sen ence consequen
schema: p esen a ion con inua ion sequence con inua ion
schema: TC PAC SEQ, TC PAC
ha mony: I I Ikey=VIkey=VIII
epe i ion: µ1µ
1µ3µ
3
′
epe i ion: i1i
1i3i′
3(i′
3)′i′
1(i′
1) i
3((i′
3) )′(((i′
3)′) )′
ha mony: I iio6 iioIV:[ii V 6- -V6I IV V I]I:V/ii ii V 7I ii V 6− −V6I ii V I
Sub i le
Un i ledsco e
Compose /a ange
25
3
3 ii06 VI
ii V7 I
V
I
I
I]
V6
iiI
ii0 I
V6
IV
iiI.V/ii
V.[ii
Figu e 2. Example analysis o Moza , Minue in G, K. 1, showing he o m analysis (middle), he pa ially ma ching
(dashed) ha monic ee ( op) and he pa ially ma ching epe i ion ee (abo e o m layou ). All h ee hie a chical models
combine o cons uc he o m layou (bo om) ha cap u es he co e o mal p ope ies o he piece ( o analysis o gene a-
ion).
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
317
5. ACKNOWLEDGMENTS
This esea ch is pa o he p ojec “Towa ds a Uni ied
Model o Musical Fo m: B idging Music Theo y, Digi al
Co pus Resea ch, and Compu a ion” (g an no. 10000183;
2024-2028), a collabo a ion be ween he École Poly ech-
nique Fédé ale de Lausanne and he An on B uckne Uni-
e si y in Linz, unded by he Swiss Na ional Science
Founda ion (SNSF) ia he Sine gia p og am. In pa , his
p ojec has ecei ed unding om he Eu opean Resea ch
Council (ERC) unde he Eu opean Union’s Ho izon 2020
esea ch and inno a ion p og amme unde g an ag eemen
No 760081 – PMSB. We hank M . Claude La ou o gen-
e ously suppo ing his esea ch h ough he La ou chai
in digi al musicology.
6. REFERENCES
[1] R. O. Gje dingen, Music in he Galan S yle. New
Yo k: Ox o d Uni e si y P ess, 2007.
[2] W. E. Caplin, Classical Fo m: A Theo y o Fo -
mal Func ions o he Ins umen al Music o Haydn,
Moza , and Bee ho en. New Yo k: Ox o d Uni e -
si y P ess, 2001.
[3] J. Yus , O ganized Time: Rhy hm, Tonali y, and Fo m.
Ox o d: Ox o d Uni e si y P ess, 2018.
[4] D. Nobile, “Teleology in Ve se–P echo us–Cho us
Fo m, 1965–2020,” Music Theo y Online, ol. 28,
no. 3, 2022.
[5] M. Gi aud, R. G oul , and F. Le é, “Compu a ional
analysis o musical o m,” in Compu a ional Music
Analysis. Sp inge , 2016, pp. 113–136.
[6] M. Go ham and M. I eland, “Taking o m: A ep e-
sen a ion s anda d, con e sion code, and example co -
pus o eco ding, isualizing, and s udying analyses
o musical o m,” in 20 h In e na ional Socie y o Mu-
sic In o ma ion Re ie al Con e ence, Del , 2019, pp.
633–699.
[7] D. Tymoczko, M. Go ham, M. S. Cu hbe , and
C. A iza, “The RomanTex o ma : A lexible and s an-
da d me hod o ep esen ing oman nume al analy-
ses,” 20 h In e na ional Socie y o Music In o ma ion
Re ie al Con e ence, Del , pp. 123–129, 2019.
[8] F. C. Moss, W. F. Souza, and M. Roh meie , “Ha -
mony and Fo m in B azilian Cho o: A Co pus-D i en
App oach o Musical S yle Analysis,” Jou nal o New
Music Resea ch, pp. 1–22, 2020, publishe : Taylo &
F ancis.
[9] C. Ha e, M. Sandle , S. Abdallah, and E. Gomez,
“Symbolic Rep esen a ion o Musical Cho ds. A P o-
posed Syn ax o Tex Anno a ions,” in P oceedings o
he 6 h In e na ional Con e ence on Music In o ma ion
Re ie al, London, 2005, pp. 66–71.
[10] E. Cambou opoulos, “Musical hy hm: A o mal
model o de e mining local bounda ies, accen s and
me e in a melodic su ace,” in Lec u e No es in Com-
pu e Science (including subse ies Lec u e No es in A -
i icial In elligence and Lec u e No es in Bioin o ma -
ics), 1997, iSSN: 16113349.
[11] R. Bod, “Memo y-Based Models o Melodic Analysis:
Challenging he Ges al P inciples,” Jou nal o New
Music Resea ch, ol. 30, no. 3, pp. 27–36, 2001.
[12] ——, “A uni ied model o s uc u al o ganiza ion in
Language and Music,” Jou nal o A i icial In elligence
Resea ch, ol. 17, pp. 289–308, 2002.
[13] M. Hamanaka, K. Hi a a, and S. Tojo, “Au oma ic gen-
e a ion o g ouping s uc u e based on he GTTM,” in
P oceedings o he In e na ional Compu e Music con-
e ence 2004, 2004, pp. 141–144.
[14] ——, “Implemen ing Me hods o Analysing Music
Based on Le dahl and Jackendo ’s Gene a i e The-
o y o Tonal Music,” in Compu a ional Music Analysis,
D. Me edi h, Ed. Cham: Sp inge , 2016, pp. 221–249.
[15] F. Le dahl and R. Jackendo , A Gene a i e Theo y o
Tonal Music. Camb idge, MA: MIT P ess, 1983.
[16] L. Feis haue , L. Bigo, and M. Gi aud, “Modeling and
lea ning s uc u al b eaks in sona a o ms,” in P oceed-
ings o he In e na ional Socie y o Music In o ma ion
Re ie al Con e ence, 2019, pp. 398–404.
[17] J. Hen schel, M. Neuwi h, and M. Roh meie , “The
Anno a ed Moza Sona as: Sco e, Ha mony, and Ca-
dence,” T ansac ions o he In e na ional Socie y o
Music In o ma ion Re ie al, ol. 4, no. 1, pp. 67–80,
2021.
[18] O. Raz, D. Chawin, and U. B. Rom, “The Moza Ex-
posi ional Punc ua ion Co pus: A Da ase o In e he-
ma ic Cadences in Moza ’s Sona a-Alleg o Exposi-
ion,” Empi ical Musicology Re iew, ol. 16, no. 1,
2021.
[19] D. R. Sea s, M. T. Pea ce, W. E. Caplin, and
S. McAdams, “Simula ing Melodic and Ha monic
Expec a ions o Tonal Cadences Using P obabilis ic
Models,” Jou nal o New Music Resea ch, ol. 47,
no. 1, pp. 29–52, 2018.
[20] L. Bigo, L. Feis haue , M. Gi aud, F. Le é, L. Bigo,
L. Feis haue , M. Gi aud, F. Le é, D. Pica die, and
J. Ve ne, “Rele ance o musical ea u es o cadence
de ec ion To ci e his e sion : HAL Id : hal-
01801060,” no. Ismi , 2018.
[21] B. Duane, “Melodic pa e ns and onal cadences:
Bayesian lea ning o caden ial ca ego ies om con a-
pun al in o ma ion,” Jou nal o New Music Resea ch,
ol. 48, no. 3, pp. 197–216, 2019, publishe : Taylo &
F ancis.
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
318
[22] J. E. Hopc o and J. D. Ullman., Fo mal Languages
and hei Rela ion o Au oma a. Addison-Wesley
Longman Publishing, 1969.
[23] M. Sipse , In oduc ion o he Theo y o Compu a ion.
Bos on, MA: Cengage Lea ning, 2012.
[24] C. Finkensiep, M. Haebe le, F. Eisenb and,
M. Neuwi h, and M. A. Roh meie , “Repe i ion-
S uc u e In e ence wi h Fo mal P o o ypes,” in
P oceedings o he 24 h In e na ional Socie y o
Music In o ma ion Re ie al Con e ence (ISMIR
2023), Milan, I aly, 2023.
[25] Z. Ren, Y. Rammos, and M. A. Roh meie , “Fo mal
Modeling o S uc u al Repe i ion using T ee Com-
p ession,” in P oceedings o he 25 h In e na ional So-
cie y o Music In o ma ion Re ie al Con e ence (IS-
MIR 2025), San F ancisco, Uni ed S a es, 2024.
[26] C. S. Sapp, “Ha monic Visualiza ions o Tonal Mu-
sic,” he In e na ional Compu e Music Con e ence
(ICMC), pp. 423–430, 2001.
[27] ——, “Visual hie a chical key analysis,” Compu e s
in En e ainmen (CIE), ol. 3, no. 4, pp. 1–19, 2005,
publishe : ACM New Yo k, NY, USA.
[28] D. Chawin and U. B. Rom, “Sliding-Window Pi ch-
Class His og ams as a Means o Modeling Musical
Fo m,” T ansac ions o he In e na ional Socie y o
Music In o ma ion Re ie al, ol. 4, no. 1, 2021.
[29] R. Lieck and M. Roh meie , “Modelling Hie a chical
Key S uc u e wi h Pi ch Scapes,” in P oceedings o he
21s In e na ional Socie y o Music In o ma ion Re-
ie al Con e ence (ISMIR 2020), Mon eal, Canada,
2020, pp. 811–818.
[30] C. Weiß, S. Klauk, M. Go ham, M. Mülle , and
R. Kleine z, “Discou se no dualism: An in e disci-
plina y dialogue on sona a o m in bee ho en’s ea ly
piano sona as.” in ISMIR, 2020, pp. 199–206.
[31] P. Alleg aud, L. Bigo, L. Feis haue , M. Gi aud,
R. G oul , E. Leguy, and F. Le é, “Lea ning sona a
o m s uc u e on moza ’s s ing qua e s,” T ansac-
ions o he In e na ional Socie y o Music In o ma-
ion Re ie al, ol. 2, no. 1, 2019, publishe : Ubiqui y
P ess.
[32] M. Roh meie , “Towa ds a o maliza ion o musical
hy hm,” in P oceedings o he 21s In e na ional Soci-
e y o Music In o ma ion Re ie al Con e ence, 2020,
pp. 621–629.
[33] ——, “Towa ds a gene a i e syn ax o onal
ha mony,” Jou nal o Ma hema ics and Music,
ol. 5, no. 1, pp. 35–53, 2011. [Online]. A ail-
able: h p://www. and online.com/doi/abs/10.1080/
17459737.2011.573676
[34] ——, “The Syn ax o Jazz Ha mony: Dia onic
Tonali y, Ph ase S uc u e, and Fo m,” Music Theo y
and Analysis (MTA), ol. 7, no. 1, pp. 1–63, Ap . 2020.
[Online]. A ailable: h ps://www.ingen aconnec .com/
con en /10.11116/MTA.7.1.1
[35] D. Ha asim, “The Lea nabili y o he G amma o Jazz
: Bayesian In e ence o Hie a chical S uc u es in Ha -
mony,” PhD Thesis, École Poly echnique Fédé ale de
Lausanne, 2020.
[36] W. B. De Haas, “Music In o ma ion Re ie al Based
on Tonal Ha mony,” PhD Thesis, U ech Uni e si y,
2012.
[37] W. E. Caplin, “Wha A e Fo mal Func ions?” in Musi-
cal Fo m, Fo ms & Fo menleh e: Th ee Me hodologi-
cal Re lec ions, P. Be gé, Ed. Leu en: Leu en Uni-
e si y P ess, 2009, pp. 21––40.
[38] D. Ha asim, M. Roh meie , and T. J. O’Donnell, “A
Gene alized Pa sing F amewo k o Gene a i e Mod-
els o Ha monic Syn ax,” in P oceedings o he 19 h
In e na ional Socie y o Music In o ma ion Re ie al
Con e ence, 2018, pp. 152–159.
[39] M. Roh meie and M. Neuwi h, “Towa ds a Syn ax
o he Classical Cadence,” in Wha Is a Cadence?
Theo e ical and Analy ical Pe spec i es on Cadences
in he Classical Repe oi e, M. Neuwi h and P. Be gé,
Eds. Leu en: Leu en Uni e si y P ess, 2015, pp.
285–336, ex.u lyea : 2019-08-23. [Online]. A ailable:
h p://www.js o .o g/s able/10.2307/j.c 14jx 45
[40] D. R. W. Sea s, “The classical cadence as a closing
schema: Lea ning, memo y, and pe cep ion,” Ph.D.
disse a ion, McGill Uni e si y, Mon eal, Canada,
2017.
[41] D. Ha asim, T. J. O’Donnell, and M. Roh meie , “Ha -
monic syn ax in ime hy hm imp o es g amma ical
models o ha mony,” in P oceedings o he 20 h In e -
na ional Socie y o Music In o ma ion Re ie al Con-
e ence, ISMIR 2019, 2019.
[42] T. J. O’Donnell, P oduc i i y and Reuse in Language:
A Theo y o Linguis ic Compu a ion and S o age.
Camb idge, MA: MIT P ess, 2015.
P oceedings o he 26 h ISMIR Con e ence, Daejeon, Ko ea, Sep embe 21-25, 2025
319