<!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>
      <journal-title-group>
        <journal-title>DL</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>The Music Part Ontology (Extended Abstract)</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 Dervakos</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgos Stamou</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Artificial Intelligence and Learning Systems Laboratory, National Technical University of Athens</institution>
          ,
          <addr-line>Heroon Polytechniou 9, Zografou, Attica, 157 80</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>36</volume>
      <fpage>2</fpage>
      <lpage>4</lpage>
      <abstract>
        <p>Symbolic representations of music play a vital role in the field of computer science, describing various musical elements such as notes, chord progressions, parts and structure, distinguishing them from audio formats. A plethora of user-generated symbolic music data lies on the web; however, for it to be valuable it necessitates to be processed and defined in a machine-readable way. This paper describes the creation of the Music Part Ontology (MPO), an ontology designed to formalize and analyze symbolic representations of music tracks based on their structural attributes using Description Logics and Semantic Web techniques and showcases its practical application in the Music Information Retrieval (MIR) domain.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Ontology Engineering</kwd>
        <kwd>Description Logics</kwd>
        <kwd>Semantic Web</kwd>
        <kwd>Music Information Retrieval</kwd>
        <kwd>Music Structure</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Data curation and management hold significant importance in the field of Computer Science.
The advancements in Artificial Intelligence (AI) have given rise to many tools which rely
on well-defined data and metadata in order to achieve high quality and trust-worthy results.
Particularly, when dealing with symbolic music data, curation and standardization become
necessary as a large amount of it is sourced from user-generated data on the web1. This raw
data needs to be formalized in order to be efectively utilized in Muisc Information Retrieval
(MIR) tasks. More specifically, our ontology specializes in converting raw text data into a graph
representation.</p>
      <p>
        Various ontologies have been introduced dealing with music-related data and can be
categorized into two main directions; one direction focuses on the description of concepts related to
music production and performance, audio terms and general low-level music features [
        <xref ref-type="bibr" rid="ref1">1, 2, 3</xref>
        ],
while the other one concentrates on high-level music concepts derived from music notation,
theory and harmony notions [4, 5, 6] Although these ontologies facilitate real-world
applications such as managing music collections, transcribing handwritten music and formalizing and
inferring music knowledge, none of them capitalize on the structure of a music track and the
sequential nature of its fundamental components (rhythm, melody and harmony).
      </p>
      <p>In the proposed approach, we develop and introduce the Music Part Ontology (MPO)2; we
define a set of concepts and relationships relevant to the structural attributes and sequential
aspects of contemporary western music. For example, the ontology defines terms such as
Intro, Verse, ChordProgression, and a music track can be assigned a sequence of these terms.
Furthermore, we demonstrate their ability to be interlinked, utilizing Semantic Web technologies.
For example, by defining the chord concept, the MPO ontology can be linked with the Functional
Harmony Ontology (FHO)3, the Music Theory Ontology (MTO) and the Chord Ontology4.
Finally, we showcase its capabilities by gathering user-generated symbolic music data and
converting them into a well-defined music knowledge base where we apply SPARQL queries to
approach the genre classification MIR task. More specifically, we demonstrate how the ontology
can be used to facilitate complex music related queries, such as “Retrieve all songs that have a
ii-V-I progression in the intro”.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The Music Part Ontology</title>
      <p>The MPO was developed to formalize one the most common representations of symbolic music
data which is the text representation consisting of parts and chord progressions over lyrics and is
ubiquitous on the web. We introduce four main Classes: Track, Part, ChordProgression and Chord
which are connected through the properties hasPart, hasChordProgression and hasProgChord to
describe the structure of a music track. In order to represent the sequential aspect of a music
track we chain parts, chord progressions and chords with hasNextPart, hasNextChordProgression
and hasNextChord functional properties respectively. The format of MPO is depicted in Figure 1.
Furthermore, for each chain property hasNextX, we created the ancestral transivite property
isFollowedbyX. This enables us to infer that for a, b, c instances, if a hasNextX b and b hasNextX
c, then a isFollowedbyX c, as introduced in [7].</p>
      <p>Musical parts are hard to define, as they can vary across genres and cultures. For example,
in electronic dance music, the parts such as “build”, “drop” are defined mainly based on the
dynamics and timbral characteristics of the music. In other genres, such as pop and rock,
diferent parts (e.g. verse, chorus) are often characterized by diference in harmony, such as
diferent chord progressions. We ended up defining eight parts as subclasses of the class Part:
Intro, Verse, Chorus, Outro, Bridge, Instrumental, Interlude and Solo, as these are the most common
parts used in prior works [8, 9]. Each instance of a subclass is constructed by defining each first
and last chord using the properties hasFirstPartChord and hasLastPartChord. We also created
the hasPartChord property to link every part with all their chords. Additionally, for each part
we defined the properties hasVerse, hasChorus, etc as subproperties of hasPart.</p>
      <p>Chord progressions are the foundations of a music track’s harmony. Common chord
progressions in western music contain usually three to eight chords. In order to create instances of the
ChordProgression class we define its first and last chord using the properties hasFirstProgChord
and hasLastProgChord.</p>
      <p>There are multiple ways to represent music chords. We utilize the vocabulary from the FHO</p>
      <sec id="sec-2-1">
        <title>2http://purl.org/ontology/mpo 3https://purl.org/ontology/fho 4https://purl.org/ontology/chord/</title>
        <p>by linking our Chord class with it, which is also interlinked with concepts from the Music
Theory Ontology and the Chord Ontology.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Demonstration</title>
      <p>In order to evaluate the practical application of our proposed ontology, we set up an experiment.
First, we gathered user-generated symbolic music data from ultimate-guitar in text form.
Then, we curated the data: we transformed the chords to match the proposed chord vocabulary
and also filtered the diferent part names to correspond to the proposed subclasses of the Part
class (e.g. coda, ending and outro align with Outro class). In addition, we retrieved the music
genres of the gathered tracks using the Spotify Web API 5 and created the Genre class and its
subclasses (Rock, Pop, Jazz, etc) and the property hasGenre. After that, all the music tracks were
converted into an RDF graph using the RDFLib Python package6. Lastly, we set up a semantic
repository on GraphDB7 and loaded the MPO, the FHO and the RDF graphs of the music tracks.
We ended up with 250 music tracks of five genres: ( Rock, Pop, Jazz, Blues and Reggae).</p>
      <p>Having ontologies that define music theoretical notions, and large collections of music that
are semantically characterized, we can perform complex SPARQL queries, that can be especially
useful for music information retrieval, as a way to find patterns based on chord progressions.
For example, we can retrieve all ii-V-I progressions (that are regularly used in Jazz) and see</p>
      <sec id="sec-3-1">
        <title>5https://developer.spotify.com/documentation/web-api 6https://rdflib.readthedocs.io/en/stable/ 7https://graphdb.ontotext.com/</title>
        <p>their distribution between diferent genres and therefore could enhance the performance of a
genre classification model [ 10, 11], e.g. by deploying these results as a complementary input.
Table 1 shows the results of this query. Table 2 shows the results of a query about the Chorus
distribution between genres, a much simpler query.</p>
        <p>On that account, it is worth mentioning that the structural and sequential attributes of a
music track have the potential to boost the efectiveness of a classification model. This is evident
when we observe that by using both complex and simple queries, we can obtain further insights
into the distinctions and resemblances among various music genres.</p>
        <p>On our GitHub8, we provide some SPARQL queries examples, some RDF files and text files of
music tracks and the python script used to convert text to RDF.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>In this paper we introduced the Music Part Ontology. We showed its capability for formalizing
and converting raw symbolic music data into a graph representation. Our ontology can be easily
interlinked with other ontologies of the MIR domain. In addition, we showcased its practical
application by performing SPARQL queries that can be exploited to enhance the performance
of models on MIR tasks, such as genre classification. We plan to further extend our ontology to
include more concepts about the structure of a music track and explore ways to retrieve and
define common chord progressions through reasoning.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>The authors would like to thank researchers Konstantinos Thomas and Vassilis Lyberatos of
the Artificial Intelligence and Learning Systems Laboratory for their contribution on gathering
the data used in section 3.</p>
      <sec id="sec-5-1">
        <title>8https://github.com/spyroskantarelis/MusicPartOntology</title>
        <p>[2] S. Song, M. Kim, S. Rho, E. Hwang, Music ontology for mood and situation reasoning to
support music retrieval and recommendation, in: 2009 Third International Conference on
Digital Society, 2009, pp. 304–309.
[3] B. Fields, K. Page, D. De Roure, T. Crawford, The segment ontology: Bridging music-generic
and domain-specific, 2011, pp. 1–6. doi: 10.1109/ICME.2011.6012204.
[4] S. M. Rashid, D. De Roure, D. L. McGuinness, A music theory ontology, in: Proceedings of
the 1st International Workshop on Semantic Applications for Audio and Music, SAAM
’18, Association for Computing Machinery, New York, NY, USA, 2018, p. 6–14. URL:
https://doi.org/10.1145/3243907.3243913. doi:10.1145/3243907.3243913.
[5] S. S.-s. Cherfi, C. Guillotel, F. Hamdi, P. Rigaux, N. Travers, Ontology-based annotation
of music scores, in: Proceedings of the Knowledge Capture Conference, K-CAP 2017,
Association for Computing Machinery, New York, NY, USA, 2017. URL: https://doi.org/10.
1145/3148011.3148038. doi:10.1145/3148011.3148038.
[6] S. Kantarelis, E. Dervakos, N. Kotsani, G. Stamou, Functional harmony ontology: Musical
harmony analysis with description logics, Journal of Web Semantics 75 (2023) 100754.
URL: https://www.sciencedirect.com/science/article/pii/S1570826822000385. doi:https:
//doi.org/10.1016/j.websem.2022.100754.
[7] N. Drummond, A. L. Rector, R. Stevens, G. Moulton, M. Horridge, H. Wang, J. Seidenberg,</p>
        <p>Putting owl in order: Patterns for sequences in owl., in: OWLED, 2006.
[8] J.-C. Wang, Y.-N. Hung, J. B. Smith, To catch a chorus, verse, intro, or anything else:
Analyzing a song with structural functions, in: ICASSP 2022-2022 IEEE International
Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, 2022, pp. 416–420.
[9] J. B. L. Smith, J. A. Burgoyne, I. Fujinaga, D. De Roure, J. S. Downie, Design and creation
of a large-scale database of structural annotations., in: ISMIR, volume 11, Miami, FL, 2011,
pp. 555–560.
[10] N. Ndou, R. Ajoodha, A. Jadhav, Music genre classification: A review of deep-learning and
traditional machine-learning approaches, in: 2021 IEEE International IOT, Electronics and
Mechatronics Conference (IEMTRONICS), IEEE, 2021, pp. 1–6.
[11] E. Dervakos, N. Kotsani, G. Stamou, Genre recognition from symbolic music with cnns,
in: Intern. Conf. on Comp. Intelligence in Music, Sound, Art and Design (Part of EvoStar),
Springer, 2021.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Raimond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Abdallah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. B.</given-names>
            <surname>Sandler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Giasson</surname>
          </string-name>
          ,
          <article-title>The music ontology</article-title>
          .,
          <source>in: ISMIR</source>
          , volume
          <year>2007</year>
          , Citeseer,
          <year>2007</year>
          , p.
          <fpage>8th</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>