<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Musical Harmony Analysis with Description Logics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Spyridon Kantarelis[</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Edmund D</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgos St</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Technical University of Athens</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Symbolic representations of music are emerging as an important data domain both for the music industry, and for computer science research, aiding in the organization of large collections of music and facilitating the development of creative and interactive AI. An aspect of symbolic representations of music, which di erentiates it from audio representations, is their suitability to be linked with notions from music theory which have been developed over the centuries. One core such notion is that of functional harmony, which involves analyzing progressions of chords. This paper proposes a description of the theory of functional harmony within the OWL 2 RL pro le and experimentally demonstrates its practical use.</p>
      </abstract>
      <kwd-group>
        <kwd>description logics</kwd>
        <kwd>ontology engineering</kwd>
        <kwd>SPARQL</kwd>
        <kwd>music information retrieval</kwd>
        <kwd>functional musical harmony</kwd>
        <kwd>music theory</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Music in general is complex and can be analyzed in many di erent ways, across
di erent levels of abstraction, and regarding di erent aspects of it. Algorithmic
analysis of music is increasingly determining how music is consumed {for
instance through recommender systems of various streaming platforms, and how
music is produced {for instance using plugins which implement various music
analysis algorithms within digital audio workstations (DAWs). Music
information retrieval (MIR) and automatic music analysis on a large scale, mostly rely
on signal processing and machine learning (ML) {in the audio domain{ and do
not make use of symbolic representations. However, there exists an abundance
of symbolic music which is openly available on the web and could be utilized, in
conjunction with knowledge representation technologies, for analyzing music.</p>
      <p>
        A particular aspect of music which may be analyzed based on symbolic
representations is that of harmony. In music, harmony relates to the way humans
perceive superpositions of sounds {for instance chords{ and how sequences of
Copyright © 2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
such superpositions {such as chord progressions{ may be used within a
composition in order to serve the underlying music and the emotions it conveys. There
are multiple di erent theories of harmony, across di erent cultures, which
however share some common features. Many approaches to harmonic analysis for
instance focus on the ideas of building tension and resolution by the appropriate
use of chords or pitches within a piece of music. One of the most widely used
such frameworks for analyzing harmony, especially in western culture, is that of
tonal harmony [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], where given a chord progression each chord is assigned one
of three general functions {depending on if the chord builds tension or resolution
in a given context.
      </p>
      <p>
        Algorithms for automatic functional harmonic analysis have been proposed
in the literature and have successfully been applied in a practical setting. An
important example of such work is HarmTrace [
        <xref ref-type="bibr" rid="ref5 ref6">5,6</xref>
        ] which is used by platforms such
as Chordify [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. HarmTrace de nes a language through a context free grammar
(CFG), based on the formalism proposed by Rohmeier [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. It is implemented in
the Haskell programming language, and is able to produce functional harmonic
analyses which are compliant with western tonal harmony, when given a
symbolic (text) representation of a chord progression, in addition to a key signature.
We perform an extensive comparison of HarmTrace and our semantic web based
approach in the evaluation section of this paper.
      </p>
      <p>
        In the proposed approach, we represent the theory of tonal harmony, modal
harmony and functional harmonic analysis using Description Logic (DL)
languages. DL languages enrich knowledge representation systems, in terms of the
language expressivity for describing the knowledge base, the reasoning
techniques and the e ectiveness of the interaction between the user and the system
[
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. DLs allow for implementation-independent precise speci cation of both the
provided functionality and the inferences. The \TBox" and \ABox" of an
ontology accomplish a clear distinction between the intensional knowledge, or general
knowledge about the problem domain, and the extensional knowledge.
      </p>
      <p>By representing music theory as a TBox we are able to perform analysis of
chord progressions via reasoning. We have identi ed many bene ts of this
approach when compared to others, namely ease of use {through the utilization of
standardized technologies such as the web ontology language OWL 2,
extendibility of the framework by either adding axioms to the TBox or by describing
different aspects of music theory with description logics, and their ability to be
interlinked with other sources of data {since these technologies are intended for
use on the semantic web.</p>
      <p>
        The rest of the paper is structured as follows: Section 2 presents a
comprehensive list of ontologies and data models which are aimed at representing
information related to music. Section 3 describes in detail the translation of tonal
and modal harmony into a fragment of description logics which is compatible
with the OWL 2 RL [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] pro le. In Section 4 we perform an extensive evaluation
of the proposed framework and in Section 5 we conclude the paper.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related Ontologies and Data Models</title>
      <sec id="sec-2-1">
        <title>Symbolic Music Representation</title>
        <p>
          Symbolic representations of music vary in form, information content and
application domain. One of the most widely used such representations is the Musical
Instrument Digital Interface (MIDI) [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ][
          <xref ref-type="bibr" rid="ref19">19</xref>
          ][
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. MIDI allows for light-weight
communication of musical information between devices and since its inception it has
been the de facto protocol for representing music symbolically. MIDI may also be
losslessly converted to Linked Data [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] which may be used in a variety of ways
{such as generating mashups via SPARQL [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. Another widely used framework
for symbolic music representation is MusicXML [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] which is a format proposed
for representing sheet music and digital scores. MusicXML's information content
is similar to that of MIDI, however it is aimed at rendering human-readable
musical scores with information which is relevant to a performer, when compared
to MIDI which is aimed at controlling digital instruments. Among the many
symbolic representations of music are also text representations, such as ASCII
tablatures for fretted instruments, and chord progressions with or without lyrics,
which are widely available on the web 1.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Related Ontologies</title>
        <p>
          Alvaro et al. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] developed a novel dynamic representation system for musical
knowledge adapted to computer-aided composition. Raimond et al. [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ]
introduce the Music Ontology, including editorial, cultural and acoustic information
using the Resource Description Framework, the Timeline2 and the Event
Ontology,3 and incorporating music production speci c concepts. They also divide
the ontology in several levels of expressiveness (editorial information, events,
event decomposition), in order to allow a large range of granularity. Song et
al. [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ] present a Context-based Music Recommendation (COMUS) ontology
to reason desired user emotion state from context capturing low-level musical
features. Fields et al. [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] propose a Segment Ontology for MIR signal
processing tasks, modeling musicological properties whilst maintaining an accurate and
complete description of their relationships. Fazekas et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] introduce the Studio
Ontology Framework specialized in music production, providing an explicit,
application and situation independent conceptualisation of the studio environment.
Kolozali et al. [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] propose an instrument ontology based on the Hornbostel and
Sach's classi cation scheme, considering terminology and conceptualisation used
by ethnomusicologists. Their ontology, based on the Musicbrainz instrument tree
and the SKOS instrument taxonomy, use the Ontology Web Language (OWL)
and SPARQL queries, which demonstrate real-world use cases for instrument
1 http://www.ultimate-guitar.com,
        </p>
        <p>
          chords.com
2 http://motools.sf.net/timeline/timeline.html
3 http://motools.sf.net/event/event.html
http://www.guitartabs.cc,
http://www.eknowledge representation. Jones et al. [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] developed the MusicOWL Ontology4
for encoding music scores of Western music. Using MusicOWL Ontology they
managed to convert existing music scores into RDF. S. Cher et al. [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] introduce
the MUSICNOTE Ontology5, an ontology of music notation that relies on the
structural aspects of a score.
        </p>
        <p>
          Sabbir et al. [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] introduce the Music Theory Ontology, including classes for
musical notation, duration, chords, progression and degrees. These are
fundamental concepts used for the analysis of music. They limit their focus to Western
music concepts. Music Theory Ontology references several namespaces pre xes
for relevant Ontologies, such as the Music Ontology and the Chord Ontology6.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Harmonic Analysis with Description Logics</title>
      <p>
        In this section we describe the terminology used from music theory, and we
present axioms which may be used to infer the function of a chord in the context
of a chord progression [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. Where applicable we denote corresponding concepts
from the music theory ontology with the pre x mto, while for concepts from our
ontology we use the pre x fho.
3.1
      </p>
      <sec id="sec-3-1">
        <title>Preliminaries</title>
        <p>Let V = hCN; RN; INi be a vocabulary, with CN, RN, IN mutually disjoint nite
sets of concept, role and individual names, respectively. Let also T and A be
a terminology (TBox) and an assertional database (ABox), respectively, over V
using a Description Logics (DL) dialect L, i.e. a set of axioms and assertions
that use elements of V and constructors of L. The pair hV; Li is a DL-language,
and K = hT ; Ai is a knowledge base (KB) over this language.</p>
        <p>The Web Ontology Language (OWL) is a family of knowledge representation
languages for authoring ontologies. OWL classes correspond to description logic
(DL) concepts, OWL properties to DL roles, while individuals are called the
same way in both the OWL and the DL terminology.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Chords and Chord Progressions</title>
        <p>
          In Western culture, music typically uses twelve pitch classes across any number
of octaves, the musical notes (mto:Note). Harmony concerns itself with sets of
the twelve pitch classes in a given context. The context is ambiguous {it relates
to both local and global characteristics of a piece of music, however in every case
it involves a speci c pitch class which is called the tonic note. Humans tend to
perceive superpositions of sounds by identifying a fundamental frequency, which
in most cases we assume to be the tonic note, and all other frequencies are
perceived in relation to the fundamental frequency [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <sec id="sec-3-2-1">
          <title>4 http://linkeddata.uni-muenster.de/ontology/musicscore/ 5 http://cedric.cnam.fr/isid/ontologies/ les/MusicNote.html 6 http://purl.org/ontology/chord/</title>
          <p>Scales and Modes In music theory, a scale (mto:Key ) is any set of musical
notes ordered by pitch. The root of the scale is its tonic note. In Western
music, scales are typically formed by seven di erent pitches (heptatonic scales). A
di erence in pitch between two notes is called an interval (mto:Interval ). The
smallest of these intervals is a semitone (mto:Semitone). A tone (mto:Tone)
is an interval composed by two semitones. A diatonic scale is an heptatonic
scale (mto:HeptatonicScale) structured using ve tone (T) intervals and two
semitone (S) intervals. The two semitone intervals should be separated by two
and three tones. The most commonly used diatonic scale is the major scale
(mto:MajorKey ). The sequence of its intervals is (T-T-S-T-T-T-S). In Western
music, there are seven di erent diatonic scales, which are built by taking a di
erent position of the major scale as their root. They are most commonly known as
the Modes of major scale (Ionian/Major, Dorian, Phrygian, Lydian, Mixolydian,
Aeolian/Natural Minor, and Locrian). The most commonly used non-diatonic
scales are the harmonic minor (mto:HarmonicMinorScale) and the melodic
minor scale (mto:MelodicMinorScale). Modes that are structured using the same
seven pitches are called relative modes. Modes that are structured using the
same root are called parallel modes. In heptatonic scales, the position each
different note holds is called scale degree (mto:Degree), usually starting with rst
for tonic.</p>
          <p>Tertian Chords In music theory, a chord (mto:Chord ) is any set of three or
more musical notes that are heard as if sounding simultaneously. In Western
music, chords are typically based on thirds known as Tertian Chords. The most
frequently used tertian chords are triads (mto:Triad ). Triads consist of three
distinct notes: the root, an interval of a third above the root and an interval of a
fth above the root. Tertian Chords with four or more notes are called extended
chords. Extended chords include seventh chords (mto:SeventhTetrad {a triad
with an interval of a seventh above the root), ninth chords (mto:NinthPentad
{a seventh chord with an interval of a ninth above the root), eleventh chords
(a ninth chord with an interval of an eleventh above the root) and a thirteenth
chord (an eleventh chord with an interval of a thirteenth chord above the root).
Other Chords The most commonly used non Tertian chords are the suspended
chords (mto:SuspendedChord ) and the added ninth chords. A suspended chord
is a tertian chord whose third interval above the root has been replaced by a
second or a fourth interval above the root. An added ninth chord is a triad with
an interval of a ninth above the root.</p>
          <p>
            Chord Progressions In musical composition, a series of chords is called a chord
progression (mto:HarmonicProgression ). In Western music, chord progressions
are the foundation of harmony. All popular western music genres use chord
progressions as the base on which melody and rhythm are built.
Tonal Harmony As we mentioned, the tonic note is the root of any mode.
It is also its tonic center, meaning that every other pitch is perceived in
relation to it. In tonal harmony, a chord can serve three di erent functions: a
tonic function, a dominant function or a subdominant function. A tonic chord
gives us the acoustic impression that we are in the tonic center. A dominant
chord creates an acoustic instability that most frequently leads to a tonic chord
(resolution). A subdominant chord has an abstract function. Whilst it is not
the tonic center, it is not as unstable as a dominant chord. It can lead to a
tonic chord or prepare a dominant chord. The rules of tonal harmony apply
to the major scale (Ionian Mode) and the minor scales (Harmonic, Melodic
and Natural Minor Mode). In the major scale, the tonic chord is the chord
of rst degree (fho:IonianTonic) and the relative tonic is the chord of sixth
degree (fho:IonianRelativeTonic), dominant chords are the chords of fth and
seventh degree (fho:IonianDominant,fho:IonianSeventhDominant ) and
subdominant chords are the chords of fourth and second degree (fho:IonianSubdominant,
fho:IonianRelativeSubdominant ). Chords of third degree can serve as a
relative tonic or a relative dominant (fho:IonianRelativeDominant ). In the minor
scales, the tonic chord is the chord of rst degree (fho:AeolianTonic) and the
relative tonic is the chord of third degree (fho:AeolianRelativeTonic),
dominant chords are the chords of fth and seventh degree (fho:AeolianDominant,
fho:AeolianRelativeDominant ) and subdominant chords are the chords of fourth
and sixth degree (fho:AeolianSubdominant, fho:AeolianRelativeSubdominant ). We
extend these rules to all modes depending on the type of their rst degree chord.
Modal Harmony Modal Harmony [
            <xref ref-type="bibr" rid="ref23">23</xref>
            ] uses all Modes of the major scale.
Chords align in function with their tonal counterparts, although the additional
modal in ections create greater overlap between these functions. For example,
a chord of fth degree can serve as a dominant chord to any tonic chord of a
parallel mode. We can perceive tonal harmony as part of modal harmony.
3.4
          </p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Axioms for Functional Analysis</title>
        <p>Chords At the top level of our hierarchy is the fho:Chord mto:Chord class .
There are direct subclasses for di erent types of tertian and suspended chords:
AugChord t DimChord t MajChord t MinChord t SusChord v Chord and for
different note cardinalities of chords: Triad t Tetrad t ::: v Chord. There is also a
direct subclass for chords which belong to a mode ModalChord v Chord, where
the class ModalChord has as direct subclasses, all major and minor scales:</p>
        <p>CMajorScaleChord t CsMajorScaleChord t ::: v ModalChord
and each major scale chord class has as direct subclasses each of the seven
corresponding modes:</p>
        <p>CIonianChord t DDorianChord t ::: v CMajorScaleChord
In addition, each of these classes which correspond to the chords of a speci c
mode has as direct subclasses the scale degrees of the mode:</p>
        <p>CIonianFirst t CIonianSecond t ::: v CIonianChord
Finally, each scale degree has as direct subclasses, all tertian and suspended
chords which belong to the speci c scale degree of the speci c mode:</p>
        <p>C t Csus4 t Cmaj7 t ::: v CIonianFirst
The type of each chord (Major, Minor, Diminished, Augmented, Suspended), in
addition to the number of notes it consists of are also asserted in the ontology:</p>
        <p>Cmaj9 v Pentad u MajorChord
Tonalities At the top level of our hierarchy is also the Tonality class. Its
subclasses are all the di erent modes:</p>
        <p>CIonianTonality t CsIonianTonality t DDorianTonality t ::: v Tonality
Each Tonality has its Tonic chord. To describe this concept, we de ne the object
property hasTonality with a domain of Chord and range of Tonality:</p>
        <p>CIonianFirst u 9hasTonality:CIonianTonality v CIonianTonic
All Tonic chords are subclasses of the class Tonic.</p>
        <p>Chord Functions At the top level of our hierarchy is also the FunctionChord
class. Among its subclasses are the three harmonic functions:</p>
        <p>TonicChord t DominantChord t SubdominantChord v FunctionChord
Each of these classes has nine subclasses, one for each mode:</p>
        <p>IonianDominant t DorianDominant t LocrianDominant t ::: v DominantChord
and each of these classes has twelve subclasses, one for each pitch class:
AIonianDominant t AsIonianDominant t BIonianDominant t ::: v IonianDominant
Chord Progressions and Axioms For representing chord progressions we
de ne the object properties hasNext hasPrevious with a domain and range of
Chord. Now we can add axioms to each FunctionChord, based on the functions
of the scale degree of each mode as we have described, for example:</p>
        <p>CIonianFifth u 9hasNext:CIonianFirst v CIonianDominant</p>
        <p>Parallel Functions In order to use concepts of the Modal Harmony, we rst
introduce the ParallelTonic class fho:ParallelTonic. Its direct subclasses are the
Tonic chords of every di erent pitch:</p>
        <p>CParallelTonic t CsParallelTonic t DParallelTonic t ::: v ParallelTonic
Each of these subclasses has its direct subclasses:</p>
        <p>CIonianTonic t CDorianTonic t CPhrygianTonic t ::: v CParallelTonic
Now we can extend the chord functions by adding axioms based on the Modal
harmony, for example:</p>
        <p>CIonianFifth u 9hasNext:CParallelTonic v CParallelDominant
Local Functions In a music piece, the tonic center can change. Any chord
can serve as a tonic center depending on its relationship with its adjacent
chords. For this reason, we introduce the classes LocalTonic, LocalDominant and
LocalSubdominant, where:</p>
        <p>Tonic u 9hasPrevious:ParallelDominant v LocalTonic</p>
        <p>DominantChord u 9hasNext:LocalTonic v LocalDominant</p>
        <p>DominantChord u 9hasNext:LocalDominant v LocalSubdominant
4
4.1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <sec id="sec-4-1">
        <title>Experiment Setting</title>
        <p>For setting up our experiments we rst gathered a set of commonly used datasets
of music annotated with chords, and represented them them in an RDF
knowledge graph. We fed chord progressions for which the key was known through
HarmTrace and compared the resulting analyses with those resulting from
reasoning on our ontology. We setup a semantic repository where we loaded the
ontology (described in section 3) and data (described in section 4.1.2), and then
get the answers for a set of SPARQL queries which are described in detail in
section 4.2. All experiments were performed on the same Intel Core i7-7500U
machine running at 2.90 GHz with 8 GB of installed RAM and a stable internet
connection of 4.84 Mbps average upload speed.</p>
        <p>
          Datasets For the evaluation procedure we gathered four datasets from di erent
sources. These are:
{ Isophonics Beatles Reference Annotations [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. This dataset contains
annotations concerning the whole discography of The Beatles. Among the
available information are also chord annotations, given in multiple formats
- including RDF (turtle).
{ McGill Billboard Annotations [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. This dataset contains multiple
annotations (including chords) for 740 distinct songs which have appeared in the
Billboard charts from 1958 to 1991. The annotations are available in
multiple di erent formats. We used the tsv style LAB format, and converted each
chord progression into RDF.
{ The Weimar Jazz Database7 [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. This is an SQL database containing
transcriptions and meta-data for a set of 456 Jazz improvisations. From this
we only only utilize the beats table which contains information relating to
chords, and we represent this information in our knowledge graph.
{ Data scraped from hooktheory.8 This is MusicXML data used to render
the web application, which contains information about the diatonic mode of
the progression and the scale degree of each chord. We gathered a set of 743
chord progressions and added them to our knowledge graph, after setting
the tonic of the scale to C and converting scale degrees to chords.
Knowledge Graph Representation We represented each chord progression
in our dataset as a RDF knowledge graph. Consecutive chords are connected
by fho:hasNext edges, and for each chord in the progression we assert its chord
type by adding triples of the form hchrd 1i hrdf:Typei hfho:Cmaj9i, where we
acquire the type of each chord by parsing the strings in each dataset. For our
ontology reasoning and SPARQL query answering, we created a repository on
GraphDB,9 where we uploaded our ontology and the RDF les. The ontology
was imported successfully in 8 minutes. The time required to import a RDF le
varies depending on its size with an estimated average around 10 seconds.
Ontology Expressivity By loading our ontology into Protege, we can observe
several metrics. Our ontology counts 4347 classes and 4 object properties. There
are 21131 logical axioms and 21122 class axioms. The Description Logic (DL)
expressivity of the ontology is ALEHIF.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Results</title>
        <p>Comparison with HarmTrace HarmTrace performs an automatic functional
harmonic analysis based on the rules of Tonal Harmony. Taking as input the
chord progression and the key of a musical piece, it generates a parse tree to
visualize the function of each chord. It performs deletions and insertions of chords,
so every chord depicted on the tree has a function based on the rules of Tonal
Harmony. HarmTrace uses only tonic and dominant function to characterize
chords or groups of chords. We used HarmTrace to analyze the hooktheory
Dataset, which is the only Dataset with known song keys. The analysis took</p>
        <sec id="sec-4-2-1">
          <title>7 https://jazzomat.hfm-weimar.de/</title>
          <p>8 https://www.hooktheory.com/
9 https://graphdb.ontotext.com/
1253 seconds (1.68s per chord progression). HarmTrace performed 3832
deletions (5.25 per chord progression) and 4768 insertions (6.41 per chord
progression) in a total of 16883 chords. In this given dataset, HarmTrace found 3264
chords or groups of chords which serve a tonic function and 7604 chords or
groups of chords which serve a dominant function. In order to compare our
system with HarmTrace, we enriched our ontology with the concepts of SongTonic,
SongRelativeTonic, SongDominant and SongRelativeDominant using the object
property hasSongTonality, considering that the given dataset provides the
tonality of every chord progression. Our system found 2767 chords that serve a tonic
function and 7529 chords that serve a dominant function. In Figure 1 we show
an example chord progression, along with the analysis generated by HarmTrace
and in Table 1 we show the analysis from reasoning on our ontology for the same
progression.</p>
          <p>Even though our ontology cannot be directly compared with HarmTrace,
mainly due to them being based on di erent theoretical frameworks (tonal vs
modal functional harmony) and due to the fact that HarmTrace inserts and
deletes chords, the resulting analyses are in most cases identical. A bene t of
HarmTrace is the hierarchical representation of analyses which could provide
a musician with more insight when compared to our approach. On the other
hand, our approach is theoretically more thorough, since tonal harmony is part
of modal harmony, in addition to being empirically more usable. We base this
claim rstly on the fact that insertions and deletions of chords performed by
HarmTrace can be confusing for a user who has not extensively studied the
grammar which HarmTrace is based on, and secondly we argue that using
description logics along with standardized technologies such as OWL 2, provides
more usability and extendability when compared to Haskell.
Dataset Comparison For this set of experiments we performed SPARQL
Queries in order to nd di erences based on the harmonic structure between</p>
          <p>Inferred Types
LocalSubdominant D PhrygianParallelDominant</p>
          <p>LocalDominant G IonianParallelDominant
G AeolianSongTonic C AeolianParallelDominant
LocalSubdominant F MixolydianParallelDominant</p>
          <p>LocalDominant B ParallelDominant
G AeolianRelativeTonic E LydianParallelDominant</p>
          <p>LocalTonic A LocrianParallelDominant
LocalSubdominant D ParallelDominant</p>
          <p>LocalDominant G ParallelDominant
G AeolianSongTonic C MixolydianDominant</p>
          <p>LocalDominant F ParallelDominant</p>
          <p>LocalTonic B[ AeolianDominant
LocalSubdominant E[ ParallelDominant</p>
          <p>LocalDominant A LocrianDominant</p>
          <p>LocalTonic</p>
          <p>LocalDominant G ParallelDominant</p>
          <p>G AeolianSongTonic
the Jazz Dataset, and the Billboard and Beatles Dataset, which can both be
labeled as pop-rock genre. On these datasets, the tonality of each song is not
known, so we are not able to de ne the tonic center. We will focus on the
dominant and subdominant functions instead. As we mentioned, a chord with a
dominant function is used to build tension, whereas a chord with a subdominant
function has a much more peaceful sound when it resolves to its tonic. We can
also assume that a chord with a local tonic function, which does not serve a
dominant function, o ers a brief acoustic stability. The results of our queries are
shown in Table 2.</p>
          <p>As we can see, in the Jazz genre, over the half of the chords are used to
build tension. In contrast, in the pop-rock genre, the dominant and subdominant
functions are more equally distributed. This demonstrates that even with simple
SPARQL Queries, we are able to nd distinct di erences between dissimilar
music genres based only on the harmonic structure.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and Future Work</title>
      <p>Expressing notions from music theory with description logics provides a practical
way for semantically enriching datasets of symbolically represented music. This
process could signi cantly aid in the organization of large collections of music,
in addition to potentially enhancing performance for various music information
retrieval tasks such as genre or mood classi cation . We plan to explore the
impact of utilizing these additional features for machine learning pipelines in
future work.</p>
      <p>Furthermore, formally representing music theory with description logics could
be useful for music education. Learning abstract concepts such as harmony can
be challenging for music students. By using knowledge representation we are
able to provide countless real world examples of chord patterns, in addition to
providing explanations for entailments. One of our future research directions
involves working with music educators with the goal of developing a tool, by
utilizing music theory knowledge representation, to be used by music students
in an educational setting.</p>
      <p>Additionally, RDF triples provide a versatile way to represent music
information. A direction of future research involves converting MIDI and MusicXML
les into RDF using concepts introduced by our ontology in order to perform
functional harmonic analysis. Considering that MIDI and MusicXML are the
most common tools used for symbolic music representation, this will provide
accessibility to a much larger variety of music information as well as make the
procedure of functional harmonic analysis easier to the average user.</p>
      <p>Finally, as mentioned in the introduction, there are multiple music-theoretical
frameworks for describing harmony, especially when taking under consideration
di erent cultures. In addition there are other aspects of music besides harmony,
such as rhythm, melody and structure, which have strong theoretical
foundations. Thus another direction of our future research involves representing
additional notions from music theory with Description Logics.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This research is carried out / funded in the context of the project \Music
Synthesis based on Knowledge Representation, Automated Reasoning and Machine
Learning" (MIS 5049188) under the call for proposals \Researchers' support
with an emphasis on young researchers-2nd Cycle". The project is co- nanced
by Greece and the European Union (European Social Fund- ESF) by the
Operational Programme Human Resources Development, Education and Lifelong
Learning 2014-2020."</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alvaro</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miranda</surname>
            ,
            <given-names>E.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barros</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Ev: Multilevel music knowlegde representation and programming</article-title>
          .
          <source>Proceedings of SBCM</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Association</surname>
            ,
            <given-names>M.M.</given-names>
          </string-name>
          , et al.:
          <article-title>The complete midi 1.0 detailed speci cation</article-title>
          . Los Angeles, CA, The MIDI Manufacturers
          <string-name>
            <surname>Association</surname>
          </string-name>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Burgoyne</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wild</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fujinaga</surname>
            ,
            <given-names>I.:</given-names>
          </string-name>
          <article-title>An expert ground truth set for audio chord recognition and music analysis</article-title>
          .
          <source>In: ISMIR</source>
          . vol.
          <volume>11</volume>
          , pp.
          <volume>633</volume>
          {
          <issue>638</issue>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Cher</surname>
            ,
            <given-names>S.S.s.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guillotel</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hamdi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rigaux</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Travers</surname>
          </string-name>
          , N.:
          <article-title>Ontologybased annotation of music scores</article-title>
          .
          <source>In: Proceedings of the Knowledge Capture Conference. K-CAP</source>
          <year>2017</year>
          ,
          <article-title>Association for Computing Machinery</article-title>
          , New York, NY, USA (
          <year>2017</year>
          ). https://doi.org/10.1145/3148011.3148038, https://doi.org/ 10.1145/3148011.3148038
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>De Haas</surname>
            ,
            <given-names>W.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magalhaes</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiering</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltkamp</surname>
            ,
            <given-names>R.C.</given-names>
          </string-name>
          : Harmtrace:
          <article-title>Automatic functional harmonic analysis</article-title>
          .
          <source>Tech. rep.</source>
          ,
          <source>Technical Report UU-CS-2011-023</source>
          , Department of Information and Computing . . . (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>De Haas</surname>
            ,
            <given-names>W.B.</given-names>
          </string-name>
          , Rodrigues Magalha~es, J.,
          <string-name>
            <surname>Veltkamp</surname>
            ,
            <given-names>R.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiering</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Harmtrace: Improving harmonic similarity estimation using functional harmony analysis</article-title>
          .
          <source>In: Proceedings of the 12th International Conference on Music Information Retrieval (ISMIR)</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Deutsch</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Grouping mechanisms in music</article-title>
          .
          <source>In: The psychology of music</source>
          , pp.
          <volume>299</volume>
          {
          <fpage>348</fpage>
          .
          <string-name>
            <surname>Elsevier</surname>
          </string-name>
          (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fazekas</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sandler</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The studio ontology framework</article-title>
          . pp.
          <volume>471</volume>
          {
          <issue>476</issue>
          (01
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Fields</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Page</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Roure</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Crawford</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The segment ontology: Bridging music-generic and domain-speci c</article-title>
          . pp.
          <volume>1</volume>
          {
          <issue>6</issue>
          (
          <issue>07</issue>
          <year>2011</year>
          ). https://doi.org/10.1109/ICME.
          <year>2011</year>
          .6012204
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Good</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , et al.:
          <article-title>Musicxml: An internet-friendly format for sheet music</article-title>
          .
          <source>In: Xml conference and expo</source>
          . pp.
          <volume>03</volume>
          {
          <fpage>04</fpage>
          .
          <string-name>
            <surname>Citeseer</surname>
          </string-name>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Harte</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Towards automatic extraction of harmony information from music signals</article-title>
          .
          <source>Ph.D. thesis</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Hindemith</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>A Concentrated Course in Traditional Harmony</article-title>
          , volume
          <volume>1</volume>
          . New York: Associated Music Publishers (
          <year>1943</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , Krotzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Parsia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Patel-Schneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.F.</given-names>
            ,
            <surname>Rudolph</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          , et al.:
          <article-title>Owl 2 web ontology language primer</article-title>
          .
          <source>W3C recommendation 27(1)</source>
          ,
          <volume>123</volume>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Jones</surname>
            , J., de Siqueira Braga,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tertuliano</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kauppinen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Musicowl: The music score ontology</article-title>
          .
          <source>In: Proceedings of the International Conference on Web Intelligence</source>
          . p.
          <volume>1222</volume>
          {
          <fpage>1229</fpage>
          . WI '
          <volume>17</volume>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA (
          <year>2017</year>
          ). https://doi.org/10.1145/3106426.3110325, https://doi. org/10.1145/3106426.3110325
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Kolozali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barthet</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fazekas</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sandler</surname>
            ,
            <given-names>M.B.</given-names>
          </string-name>
          :
          <article-title>Knowledge representation issues in musical instrument ontology design</article-title>
          .
          <source>In: ISMIR</source>
          . pp.
          <volume>465</volume>
          {
          <issue>470</issue>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Magalhaes</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          : Chordify:
          <article-title>Three years after the launch (</article-title>
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Meron</surname>
          </string-name>
          <article-title>~o-Pen~uela,</article-title>
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Hoekstra</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.:</surname>
          </string-name>
          <article-title>The song remains the same: lossless conversion and streaming of midi to rdf and back</article-title>
          .
          <source>In: European Semantic Web Conference</source>
          . pp.
          <volume>194</volume>
          {
          <fpage>199</fpage>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Meron</surname>
          </string-name>
          <article-title>~o-Pen~uela,</article-title>
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Meerwaldt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Schlobach</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Sparql-dj: The midi linked data mashup mixer for your next semantic party</article-title>
          .
          <source>In: International Semantic Web Conference (Posters, Demos &amp; Industry Tracks)</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Moog</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          :
          <article-title>Midi: Musical instrument digital interface</article-title>
          .
          <source>Journal of the Audio Engineering Society</source>
          <volume>34</volume>
          (
          <issue>5</issue>
          ),
          <volume>394</volume>
          {
          <fpage>404</fpage>
          (
          <year>1986</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brachman</surname>
            ,
            <given-names>R.J.</given-names>
          </string-name>
          , et al.:
          <article-title>An introduction to description logics</article-title>
          .
          <source>Description logic handbook 1</source>
          ,
          <issue>40</issue>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21. P eiderer, M.,
          <string-name>
            <surname>Frieler</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>The jazzomat project. issues and methods for the automatic analysis of jazz improvisations. Concepts, experiments, and eldwork: Studies in systematic musicology</article-title>
          and ethnomusicology pp.
          <volume>279</volume>
          {
          <issue>295</issue>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22. P eiderer, M.,
          <string-name>
            <surname>Frieler</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abe</surname>
            <given-names>er</given-names>
          </string-name>
          , J.,
          <string-name>
            <surname>Zaddach</surname>
            ,
            <given-names>W.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Burkhart</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Inside the jazzomat</article-title>
          .
          <source>New Perspectives for Jazz Research</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Piston</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Devoto</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Harmony</surname>
          </string-name>
          . W. W. Norton Company (
          <year>1978</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Raimond</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abdallah</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sandler</surname>
            ,
            <given-names>M.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giasson</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The music ontology</article-title>
          .
          <source>In: ISMIR</source>
          . vol.
          <year>2007</year>
          , p.
          <fpage>8th</fpage>
          .
          <string-name>
            <surname>Citeseer</surname>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Rashid</surname>
            ,
            <given-names>S.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Roure</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.:</given-names>
          </string-name>
          <article-title>A music theory ontology</article-title>
          .
          <source>In: Proceedings of the 1st International Workshop on Semantic Applications for Audio and Music</source>
          . p.
          <volume>6</volume>
          {
          <fpage>14</fpage>
          . SAAM '
          <volume>18</volume>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA (
          <year>2018</year>
          ). https://doi.org/10.1145/3243907.3243913, https: //doi.org/10.1145/3243907.3243913
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Riemann</surname>
          </string-name>
          , H.:
          <article-title>Vereinfachte Harmonielehre oder die Lehre von den tonalen Funktionen der Akkorde</article-title>
          . London: Augener Co.
          <article-title>(</article-title>
          <year>1893</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Rohrmeier</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Towards a generative syntax of tonal harmony</article-title>
          .
          <source>Journal of Mathematics and Music</source>
          <volume>5</volume>
          (
          <issue>1</issue>
          ),
          <volume>35</volume>
          {
          <fpage>53</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wood</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>The'usi', or universal synthesizer interface</article-title>
          .
          <source>In: Audio Engineering Society Convention 70. Audio Engineering Society</source>
          (
          <year>1981</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Song</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rho</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hwang</surname>
          </string-name>
          , E.:
          <article-title>Music ontology for mood and situation reasoning to support music retrieval and recommendation</article-title>
          .
          <source>In: 2009 Third International Conference on Digital Society</source>
          . pp.
          <volume>304</volume>
          {
          <issue>309</issue>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>