=Paper=
{{Paper
|id=Vol-1436/Paper87
|storemode=property
|title=OMDN at the MediaEval 2015 C@merata Task
|pdfUrl=https://ceur-ws.org/Vol-1436/Paper87.pdf
|volume=Vol-1436
|dblpUrl=https://dblp.org/rec/conf/mediaeval/Maidin15
}}
==OMDN at the MediaEval 2015 C@merata Task==
OMDN at the MediaEval 2015 C@merata Task Donncha S. Ó Maidín Department of CSIS University of Limerick Limerick, Ireland Donncha.OMaidin@ul.ie ABSTRACT repetition such as ‘melody lasting 8 ....’; ‘ melody of seven ...’. Also the pre-qualifier is used to specify an attribute of an The task is concerned with using a natural language query and a element, either on its own or together with a repetition specifier: file containing an encoding of a music score to produce a list of trill on a quaver A. [attribute + ' on a ' + core element] locations in the score that match the query. This task is achieved slurred .. [ adjectival attribute + core element] by (1) parsing the input query string using string processing, (2) ten staccato …[ repetition + attribute + core element] formation of matching templates and (3) performing the search on the score and (4) reporting results in specified format. Searches on 1.4 Element Post-Qualifiers the score are performed using CPNView [2,3,4], a score Post-qualifiers are used to limit the search to elements with a container-iterator representation is generated from MusicXML specific instrument or clef, time signature, articulation, or code. location: in the Violins 2, in the treble clef, in bars 22-32, in the right hand, in 3/4 time, on the word “...” 1. INTRODUCTION The focus of this work is on searches of sequences of notes 1.5 CPNView and rests. The tackling of this sub-set of the queries involving the Common Practice Notation View, or CPNView is used to matching of strings of notes and the rests, can be broken down answer a subset of the questions in the C@merata challenge [1]. into elements representing the notes or the rests separated by CPNView formed the main topic of a PhD dissertation [2]. The operators that link elements together. Some examples are Ab2 name CPNView was not used in the dissertation, but appeared in followed by Eb3 (operator ‘ followed by ‘), Bb5, G5, F5, E5, Eb5 in later publications [3][4][5]. (operator ‘, ‘), F# E G F# A (operator ‘ ‘). The meaning of symbols in a score depends on their preceding context. The emphasis a performer places on a note, for 1.1 Operators example is influenced by its position in the bar and by the time The three different operators are contained in the above signature. Such contexts may be modified by an attached symbol strings; (1) ' followed by ', (2) ', ' (comma + space), and (3) ' ' such as marcato placed on an otherwise unstressed note. (space). In order to correctly parse the string, it is essential to take Contextual mechanism is employed in pitch representation in into account the context-sensitive nature of some of these which key signature, clef and accidental alterations play a part. In operators. CPNView, the user is freed from the need to keep track of such scoping concerns, as contexts are made available automatically by 1.2 Element Core the iterator class. The core forms the unqualified part of the query element that CPNView models a score as an objected-oriented container. identifies some basic feature of a note or rest, such as pitch, pitch The CPNView model is designed to provide a value-neutral and class and duration, either singly or in combination. objective representation of a score from common-practice notation. The score's internal content is available using iterators. Type Examples The iterators and their member functions can be viewed as paralleling the actions of a human reader. A score object is created pitch class (note) A, Bb, C sharp by specifying a file path: Pitch (note) A3, Bb4, C4 sharp pitch class and duration A crotchet, eighth note A, A Score score(path); (note) eighth note pitch and duration (note) A#4 crotchet, crotchet A4 This model requires no user knowledge of how the score is sharp. represented in a file. CPNView representation is built from a Duration (note) sixteenth note, quaver software component that imports from files in a number of Rest sixteenth note rest, quaver different standard encodings. rest Access to the internals of the score is facilitated by an iterator object: 1.3 Element Pre-Qualifiers ScoreIterator cursor(score); Element pre-qualifiers precede the Element Core. They serve or ScoreIterator cursor(score, 1); a number of functions. These include the specification of The first instance creates an iterator that initially points to the start and is used to visit all of the objects in a score in time order. Copyright is held by the author/owner(s). Where the score contains multiple staves, this is an appropriate MediaEval 2015 Workshop, September 14-15, 2015, Wurzen, Germany. iterator for harmonic analysis. The second form, with an comparisonType value is created from an analysis of the core of additional parameter 1 in this case is used to iterate a single stave. the search string element. The part of the template used for In either case the iterator can be made to step through all of matching note and rest core elements contains identifiers for the the objects in the score using the step member function. The step comparison type, for pitch, duration and attribute details. function returns a value true as long as a succeeding object exists. Search details from the pre- and post element qualifiers are The following code skeleton makes all objects available, in encoded in additional fields of the search template. These include sequence to any code that replaces the ellipsis. the use of a CPN Set class for storing attributes of notes, search range, and various fields that arise in a search including while ( cursor.step()) {...} instrument, tempo, clef, word, and others. If it is required to visit only the notes in the score, a 2.3 The Search parameter may be given to the step function as in the following The task of matching sequence of notes and rests involves code to count the notes in a score. matching members of the template list and exhaustively searching the score for sequences of notes and rests that match the list of long count = 0; templates. while ( cursor.step(NOTE)) {count++;.} For each stave A: set n = 1 A locate member may be used to place the score iterator in B: set m = 1 an arbitrary position. For example the iterator may be positioned set nn = n at the start of bar 20 by means of C: visit element nn on stave and cursor.locate(BAR, 200); check for match with template list record m if element does not match template list record go to D: The ScoreIterator object has a comprehensive range of if template list at end record a match and go to D: member functions to retrieve all of the information that is else increment nn and m and go to C: contained within the score. D: if more elements in stave, increment n and go to B: A natural language query that searches for all of the D notes else if all staves processed exit and prints details of each note arrived at is achieved by else move to next stave while ( cursor.step(NOTE)) 3. RESULTS AND DISCUSSION if ( cursor.getAlpha() == 'D' ) Although the implementation of pre- and post-qualifiers and cout << cursor << “\n”; (1) of inter-element operators had previously produced valid results, these had to be disregarded at the time of submission due to In addition to modeling a score, CPNView has a set of malfunction in the CPNView/MusicXML component that was components that facilitate processing musical information. They under development. Previously functioning harmonic analysis had include container/iterator classes for Lists, Sets and Stores. to be abandoned for similar reasons. A specialised class exist for calculating pitch class sets. The pitch class object is based on a modified version of the Number of Number of Invalid results Disputed classification system of Alan Forte [6]; see also [2]. searches matches from misnumbered results performed bars 2. APPROACH 36 87 Mozart's An Chloe Nos. 23 & Horn Duo 32 42 2.1 Parsing the Input String A string, S(n) with n elements separated by n-1 operators is processed as follows. A list consisting of search template records 4. CONCLUSION is formed where each string element generates a corresponding search record, in sequence. 4.1 Observation With the exception of the two invalid sets of results other Step Form Action case achieved scores of 1.0 in beat precision, beat recall, measure 1 S(1) Parse, create a search template record, and precision and measure recall. Other cases arose from either add the template record to the template list, incompatible bar numbering or from case where the results are exit and perform search disputed. 2 S(n) Structure the string as [ S(1) + operator + S(n-1) ], process S(1) to create a template 4.2 Recommendations for a Line of list record as in step (1) and recursively Questioning apply step (2) to S(n-1) until exit from step The rules of either strict or free counterpoint are well (1). documented. These might provide a material for constructing future questions. In a future iteration of C@merata, some questions relating species counterpoint might be considered, 2.2 Search Template starting with first species counterpoint. Success in this endeavour, The template is a C++ record consisting of native C++ types, especially if the five counterpoint species are eventually explored and various convenient types from CPNView, as well as a might lead to the development of useful tools for composition comparisonType that is used to select the type of search. The students. [4] Ó Maidin, D.S. 1998. A Geometrical Algorithm for Melodic 5. REFERENCES Difference. In Computing and Musicology II. Melodic [1] Sutcliffe, R., Fox., C, Hovy, E., Root, D.L., Lewis, R. Task Similarity. Concepts, Procedures, and Applications, ed Description v2 C@MERATA 15: Question Answering on Walter B. Hewlett and Eleanor Selfridge-Field (Cambridge Classical Music Scores. On http://csee.essex.ac.uk/camerata Massachusetts and London, The MIT Press, 1998), pp. 65- [2] Ó Maidin, D.S. 1995. A Programmer's Environment for 72. Music Analysis. PhD Thesis, University College Cork, 1995. [5] Forte, A. 1973. The Structure of Atonal Music. (New Haven [3] Ó Maidin, D.S. and Cahill, M. 2001. Score Processing for and London: Yale University Press, 1973). MIR. In Proceedings of the International Society for Music Information Retrieval, Bloomington, Indiana 2001, pp.59- 64.