<!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>C@merata Task: the Stravinsqi Algorithm</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Andreas Katsiavalos and Tom Collins Faculty of Technology De Montfort University Leicester</institution>
          ,
          <country country="UK">UK</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>The Stravinsqi-Jun2015 algorithm (hereafter, Stravinsqi), which was entered into the</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <fpage>14</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>This paper describes the Stravinsqi-Jun2015 algorithm, and evaluates its performance on the MediaEval 2015 C@merata task. Stravinsqi stands for STaff Representation Analysed VIa Natural language String Query Input. The algorithm parses a query string that consists of a natural language expression concerning a symbolically represented piece of music (which the algorithm parses also), and then identifies where in the music event(s) specified by the query occur. For a given query, the output is a list of time windows specifying the locations of the relevant events. Time windows output by the algorithm can be compared with time windows specified by music experts for the same querypiece combinations. Across a collection of twenty pieces and 200 questions, Stravinsqi-Jun2015 had recall .794 and precision .316 at the measure level, and recall .739 and precision .294 at the beat level. The paper undertakes a preliminary analysis of where Stravinsqi might be improved, identifies applications of the C@merata task within the contexts of music education and music listening more generally, and provides a constructive critique of some of the question categories that are new this year.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        The premise of the C@merata task [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is that it is interesting
and worthwhile to develop algorithms that can (1) parse a natural
language query about a notated piece of music, and (2) retrieve
relevant time windows from the piece where events/concepts
mentioned in the query occur. The premise is strong, if we
consider that each year in the U.S. alone over 200,000 freshman
students declare music their intended major [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ], and that there
is a line connecting the types of queries being set in the
C@merata task and the questions these students are taught (or, by
college, have already been taught) to answer [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The C@merata
task, apart from posing an interesting research problem at the
intersection of music theory, music psychology, music computing,
and natural language processing (NLP), could lead to new
applications that assist students, and music lovers more generally,
in gaining music appraisal skills. Other applications of research
motivated by the C@merata task include supporting work in
musicology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and informing solutions to various music
informatics tasks, such as generation of music in an intended style
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] or expressive rendering of staff notation [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], where systems for
either task may benefit from being able to automatically extract,
say, cadence locations and/or changes in texture.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. APPROACH</title>
    </sec>
    <sec id="sec-3">
      <title>2.1 Overview</title>
      <p>Found
Found
8. Check</p>
      <p>synchronous
answers
7. Check
asynchrnous
answers
Found
6. Get
elemental
answers
nil
nil
nil
chord-time-intervals
harmonic-interval-of-a
melodic-interval-of-a
. . .
duration&amp;pitch-class-time-intervals
pitch-class-time-intervals
duration-time-intervals
. . .</p>
      <p>
        Lisp package called MCStylistic-Jun2015 that has been under
development since 2008 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The MCStylistic package, free and
cross-platform, supports research into music theory, music
cognition, and stylistic composition, with new versions released
on an approximately annual basis.1 In addition to Stravinsqi,
MCStylistic includes implementations of other algorithms from
the fields of music information retrieval and music psychology,
for tonal and metric analysis [e.g., 9], and for the discovery of
repeated patterns (e.g., motifs, themes, sequences) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        A flow diagram outlining the Stravinsqi algorithm is given in
Figure 1. The following is a succinct overview of focusing on the
1
differences between this year’s (Stravinsqi-Jun2015) and last
year’s submission (Stravinsqi-Jun2014) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].2 Step 1 of Stravinsqi
involves extracting the question string and divisions value from
      </p>
      <sec id="sec-3-1">
        <title>1 http://www.tomcollinsresearch.net 2 For more details, please see the six-page version of this paper.</title>
        <p>Melody n
1
the question file. Step 2 parses the question string for mention of
bar restrictions (“minim in measures 6-10”), stores this for
subsequent processing (as (6 10), say), removes the restriction
from the question string (“minim”), and passes it to step 3.</p>
        <p>Prompted by one of the questions from the task description
[12, p. 9], Stravinsqi splits queries by synchronous commands
first (step 3) and then further by asynchronous commands (step 4).
For example, “D followed by A against F followed by F” would
emerge as (“D followed by A” “F followed by F”) from step 3,
and as ((“D” “A”) (“F” “F”)) from step 4. In general, a question
string emerges from step 4 as some nested list of strings ((s1,1 s1,2
... s1,n(1)) (s2,1 s2,2 ... s1,n(2)) ... (sm,1 sm,2 ... sm,n(m))), where each si,j is
a query element. Examples of query elements include “D”, “A♭4
eighth note”, “perfect fifth”, “melodic interval of a 2nd”, etc.</p>
        <p>
          In step 5, point-set representations of the relevant piece are
loaded and possibly restricted to those points that belong to a
certain bar-number range. The xml2hum script is used to convert
each piece from its MusicXML format to kern format [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].3
Temporarily, in step 6 of Figure 1, each question element si,j from
step 4 is treated independently. A query element si,j is passed to
seventeen music-analytic sub-functions, each of which tests
whether si,j is a relevant query for that function, and, if so,
searches for instances of the query in the piece of music. If the
query is irrelevant to a sub-function, that function returns nil.
        </p>
        <p>The output of step 6 is a nested list of time-interval sets,
((T1,1 T1,2 ... T1,n(1)) (T2,1 T2,2 ... T1,n(2)) ... (Tm,1 Tm,2 ... Tm,n(m))), one
for each query element si,j, some of which may be empty. The
purpose of steps 7 and 8 is to determine whether any combination
v of these time intervals satisfies the constraints imposed by
synchronous and asynchronous parts of the question string (there
may be one such v, several, or none). The final step of Stravinsqi,
labeled Step 9 in Figure 1, comprises the conversion of the time
intervals v1, v2,…, vr into the XML format required by the task.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. RESULTS AND DISCUSSION</title>
      <p>
        Figure 2 contains a summary of results for the Stravinsqi
algorithm across various question categories.4 The mean measure
recall across all 200 questions, indicated by the black line next to
the “Mean” label, is .794, and the mean measure precision,
indicated by the blue line, is .316. The mean beat recall (green
line) and beat precision (red line) are both slightly lower than their
measure counterparts (.739 and .294 respectively), but in general
it can be assumed that if Stravinsqi returned the correct
beginning/ending measure number pairs for a question, then it was
also able to identify the relevant beats. Stravinsqi had the highest
measure and beat recall of any algorithm submitted to the 2015
C@merata task [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and the third highest measure and beat F1
score (F1 = 2PR/(P + R), where P is precision and R is recall).
      </p>
      <p>Across eight of the eleven question categories shown in
Figure 2 (Melody 1, Melody n, Harmony, Articulation,
Instrument, Clef, Follow, and Synch), Stravinsqi achieves
consistently high recall of approximately .75. For the remaining
three categories (Time Sig., Key Sig., and Texture) it is less
successful. Overall, the results suggest the need to investigate
Stravinsqi’s precision being lower than its recall.</p>
      <p>We have not yet incorporated in Stravinsqi restrictions to
notes occurring after particular clef, time signature, or key
signature changes. Currently, a query such as “G4 in the key of G
major” would be parsed as though it were “G4”. Therefore, the
recall of Stravinsqi remains high for such questions, but the
precision will be negatively impacted. The design of Stravinsqi is</p>
      <sec id="sec-4-1">
        <title>3 http://extras.humdrum.org/bin/osxintel64/ 4 Please see [1] for definitions of the various metrics.</title>
        <p>
          motivated more by music-perceptual than typographical concerns,
based on the premise that music is primarily an auditory-cognitive
phenomenon, and a visuo-cognitive phenomenon secondarily.
When music perception and music theory collide, as they do
occasionally in the C@merata task and beyond [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], Stravinsqi's
precision can be adversely affected. For example, unlike the task
description (consecutive elements “must both be on the same
stave” [12, p. 7]), Stravinsqi does not require consecutive question
elements to be on the same staff, because a staff swap has little (or
sometimes no) effect on how the music sounds. Stravinsqi tends
to find the correct answers according to the task description, but
also some extra answers that involve elements on different staves,
which has a detrimental effect on its precision.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. CONCLUSION</title>
      <p>
        We have provided an overview of the Stravinsqi-Jun2015
algorithm, and described its performance on the 2015 C@merata
task. Stravinsqi achieved high recall (approximately .75) in eight
of the eleven question categories, and had the highest measure and
beat recall of any algorithm submitted to the task [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Further
analysis of the results is required to determine whether Stravinqi’s
precision can be improved while adhering to our general design
principle of favouring music-perceptual over typographical
concerns. In the introduction, it was remarked that there is a line
connecting the types of queries being set in the C@merata task
and the examination questions that students of the Western
classical tradition are taught to answer. This year’s C@merata test
set was lacking cadence and functional harmony queries, which
was indicative of a general tendency to replace musically
interesting questions (e.g., concerning cadence, triad, hemiola,
ostinato, sequence, etc.) with questions that were linguistically
challenging to parse but of less musical relevance (e.g., Question
130, “fourteen sixteenth notes against a whole note chord in the
bass”). Next year, we would welcome the reintroduction of more
musically interesting (if complex) question categories, to
reestablish and strengthen the line that connects C@merata queries
with concepts that are relevant for music students and enthusiasts.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Sutcliffe</surname>
            ,
            <given-names>R. F. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fox</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Root</surname>
            ,
            <given-names>D. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hovy</surname>
            ,
            <given-names>E</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2015</year>
          .
          <article-title>The C@merata Task at MediaEval 2015: Natural language queries on classical music scores</article-title>
          .
          <source>In MediaEval 2015 Workshop</source>
          , Wurzen, Germany,
          <source>September 14-15</source>
          ,
          <year>2015</year>
          . http://ceur-ws.
          <source>org.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Kena</surname>
            ,
            <given-names>G</given-names>
          </string-name>
          , et al.
          <year>2015</year>
          .
          <article-title>The Condition of Education 2015</article-title>
          . U.S. Department of Education, Washington, DC. Retrieved June 4, 2015 from http://nces.ed.gov/pubsearch.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Eagan</surname>
            ,
            <given-names>K</given-names>
          </string-name>
          , et al.
          <year>2014</year>
          .
          <article-title>The American Freshman: National Norms Fall 2014</article-title>
          . Higher Education Research Institute, UCLA, Los Angeles, CA.
          <source>Retrieved March</source>
          <volume>15</volume>
          ,
          <year>2015</year>
          from http://www.heri.ucla.edu.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>AQA.</surname>
          </string-name>
          <year>2012</year>
          .
          <article-title>Music in Context: Past Paper for A-level Music Unit 4</article-title>
          . AQA, Manchester, UK.
          <source>Retrieved January 13</source>
          ,
          <year>2014</year>
          from http://www.aqa.org.uk.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Cuthbert</surname>
            ,
            <given-names>M. S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ariza</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>music21: a toolkit for computer-aided musicology and symbolic music data</article-title>
          .
          <source>In Proceedings of the International Symposium on Music Information Retrieval (Utrecht, The Nethlerands, August 09 - 13</source>
          ,
          <year>2010</year>
          ).
          <fpage>637</fpage>
          -
          <lpage>642</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6] Collins,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Laney</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Willis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            , and
            <surname>Garthwaite</surname>
          </string-name>
          ,
          <string-name>
            <surname>P. H.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Developing and evaluating computational models of musical style</article-title>
          .
          <source>Artificial Intelligence for Engineering Design</source>
          ,
          <article-title>Analysis and Manufacturing</article-title>
          . DOI:
          <volume>10</volume>
          .1017/S0890060414000687
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>van Herwaarden</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grachten</surname>
            ,
            <given-names>M</given-names>
          </string-name>
          , and de Haas, W. B.
          <year>2014</year>
          .
          <article-title>Predicting expressive dynamics in piano performances using neural networks</article-title>
          .
          <source>In Proceedings of the International Symposium on Music Information Retrieval (Taipei, Taiwan, October 27 - 31</source>
          ,
          <year>2014</year>
          ).
          <fpage>47</fpage>
          -
          <lpage>52</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8] Collins,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <year>2011</year>
          .
          <article-title>Improved Methods for Pattern Discovery in Music, with Applications in Automated Stylistic Composition</article-title>
          .
          <source>Doctoral Thesis. Faculty of Mathematics, Computing and Technology</source>
          , The Open University.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Volk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>The study of syncopation using inner metric analysis: linking theoretical and experimental analysis of metre in music</article-title>
          .
          <source>J. New Music Res</source>
          .
          <volume>37</volume>
          ,
          <issue>4</issue>
          ,
          <fpage>259</fpage>
          -
          <lpage>273</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Meredith</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lemström</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Wiggins</surname>
            ,
            <given-names>G. A.</given-names>
          </string-name>
          <year>2002</year>
          .
          <article-title>Algorithms for discovering repeated patterns in multidimensional representations of polyphonic music</article-title>
          .
          <source>J. New Music Res</source>
          .
          <volume>31</volume>
          ,
          <issue>4</issue>
          ,
          <fpage>321</fpage>
          -
          <lpage>345</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11] Collins,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <year>2014</year>
          . Stravinsqi/De Monfort University at the C@
          <article-title>merata 2014 task</article-title>
          .
          <source>Proceedings of the C@merata Task at MediaEval</source>
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Sutcliffe</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fox</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Root</surname>
            ,
            <given-names>D. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hovy</surname>
            ,
            <given-names>E</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2015</year>
          .
          <article-title>Task Description v2: C@merata 15: Question Answering on Classical Music Scores</article-title>
          .
          <source>Retrieved June 4</source>
          , 2015 from http://csee.essex.ac. uk/camerata.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Sapp</surname>
            ,
            <given-names>C. S.</given-names>
          </string-name>
          <year>2013</year>
          .
          <string-name>
            <given-names>Humdum</given-names>
            <surname>Extras</surname>
          </string-name>
          .
          <source>Retrieved March 3</source>
          , 2014 from http://wiki.ccarh.org/wiki/Humdrum_Extras.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Cook</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <year>1994</year>
          .
          <article-title>Perception: a perspective from music theory</article-title>
          . In Musical perceptions, R. Aiello and
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Sloboda</surname>
          </string-name>
          , Eds. Oxford University Press, Oxford, UK,
          <fpage>64</fpage>
          -
          <lpage>95</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>